Work with earlier versions of mysql that did not support "\. filename" as a command

This commit is contained in:
johnkeis 2003-06-10 23:09:39 +00:00
Родитель f4a06bd20f
Коммит d3983542f1
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -180,8 +180,10 @@ sub execute_sql_file {
push @exec_params, ("-P", $args{port}) if $args{port};
push @exec_params, ("-u", $args{username}) if $args{username};
push @exec_params, ("-p", $args{password}) if $args{password};
push @exec_params, ("-e", "\\. $sql_file.new", $dbname);
print "Executing " . join(' ', @exec_params) . " ...\n";
system(@exec_params);
push @exec_params, $dbname;
my $cmd = join(' ', @exec_params);
$cmd .= " < $sql_file.new";
print "Executing $cmd ...\n";
system($cmd);
unlink("$sql_file.new");
}