From: Eric Bollengier Date: Tue, 30 Nov 2010 22:32:30 +0000 (+0100) Subject: regress: add parameter to online_mssql_db() in regress-win32.pl X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1fba2fbfc353a3789315361f8845fdfbc3b5f98e;p=bacula%2Fbacula regress: add parameter to online_mssql_db() in regress-win32.pl --- diff --git a/regress/scripts/regress-win32.pl b/regress/scripts/regress-win32.pl index 9aebc34341..e367828c20 100644 --- a/regress/scripts/regress-win32.pl +++ b/regress/scripts/regress-win32.pl @@ -718,11 +718,11 @@ sub find_mdf sub online_mssql_db { my ($r) = shift; - if ($r->url !~ m!^/online_mssql_db\?db=([\w\d]+)$!) { + if ($r->url !~ m!^/online_mssql_db\?mdf=([\w\d]+);db=([\w\d]+)$!) { return "ERR\nIncorrect url\n"; } - my $db = $1; - $mdf_to_find = "$db.mdf"; + my ($mdf, $db) = ($1, $2); + $mdf_to_find = "$mdf.mdf"; find(\&find_mdf, 'c:/program files/microsoft sql server/'); $mssql_mdf =~ s:/:\\:g; @@ -732,8 +732,8 @@ sub online_mssql_db USE [master] GO CREATE DATABASE [$db] ON -( FILENAME = N'$mssql_mdf\\$db.mdf' ), -( FILENAME = N'$mssql_mdf\\${db}_log.LDF' ) +( FILENAME = N'$mssql_mdf\\$mdf.mdf' ), +( FILENAME = N'$mssql_mdf\\${mdf}_log.LDF' ) FOR ATTACH GO USE [$db]