Commit 36d40091 authored by unknown's avatar unknown

Merge mysql.com:/Users/kent/mysql/bk/mysql-5.1-release

into mysql.com:/Users/kent/mysql/bk/mysql-5.1-new

parents 424ade5c 8cab8c82
......@@ -157,6 +157,7 @@ static uint global_expected_errors;
static int record = 0, opt_sleep=0;
static char *db = 0, *pass=0;
const char *user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./";
const char *opt_include= 0;
static int port = 0;
static my_bool opt_big_test= 0, opt_compress= 0, silent= 0, verbose = 0;
static my_bool tty_password= 0;
......@@ -3117,6 +3118,8 @@ static struct my_option my_long_options[] =
#endif
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"include", 'i', "Include SQL before each test case.", (gptr*) &opt_include,
(gptr*) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"manager-host", OPT_MANAGER_HOST, "Undocumented: Used for debugging.",
(gptr*) &manager_host, (gptr*) &manager_host, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
......@@ -4924,6 +4927,11 @@ int main(int argc, char **argv)
*/
var_set_errno(-1);
if (opt_include)
{
open_file(opt_include);
}
while (!abort_flag && !read_query(&q))
{
int current_line_inc = 1, processed = 0;
......
This diff is collapsed.
......@@ -143,6 +143,7 @@ our $glob_use_running_server= 0;
our $glob_use_running_ndbcluster= 0;
our $glob_use_running_ndbcluster_slave= 0;
our $glob_use_embedded_server= 0;
our $glob_mysqld_restart= 0;
our @glob_test_mode;
our $using_ndbcluster_master= 0;
......@@ -162,6 +163,7 @@ our $path_mysqltest_log;
our $path_my_basedir;
our $opt_vardir; # A path but set directly on cmd line
our $opt_tmpdir; # A path but set directly on cmd line
our $opt_restart_cleanup; # Source a file with SQL drop statements
our $opt_usage;
our $opt_suite;
......@@ -626,14 +628,15 @@ sub command_line_setup () {
# Misc
'big-test' => \$opt_big_test,
'comment=s' => \$opt_comment,
'debug' => \$opt_debug,
'fast' => \$opt_fast,
'comment=s' => \$opt_comment,
'local' => \$opt_local,
'local-master' => \$opt_local_master,
'netware' => \$opt_netware,
'old-master' => \$opt_old_master,
'reorder' => \$opt_reorder,
'restart-cleanup' => \$opt_restart_cleanup,
'script-debug' => \$opt_script_debug,
'sleep=i' => \$opt_sleep,
'socket=s' => \$opt_socket,
......@@ -2242,6 +2245,7 @@ sub report_failure_and_restart ($) {
{
stop_masters_slaves();
}
$glob_mysqld_restart= 1;
print "Resuming Tests\n\n";
}
......@@ -3063,6 +3067,12 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--sleep=%d", $opt_sleep);
}
if ( $opt_restart_cleanup and $glob_mysqld_restart )
{
mtr_add_arg($args, "--include=%s", "include/drop-on-restart.inc");
$glob_mysqld_restart= 0;
}
if ( $opt_debug )
{
mtr_add_arg($args, "--debug=d:t:A,%s/log/mysqltest.trace", $opt_vardir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment