218
213
our $opt_master_myport;
219
214
our $opt_slave_myport;
220
our $opt_ndbcluster_port;
221
our $opt_ndbconnectstring;
222
our $opt_ndbcluster_port_slave;
223
our $opt_ndbconnectstring_slave;
226
216
my $opt_report_features;
227
217
our $opt_check_testcases;
271
261
our $opt_warnings;
273
our $opt_skip_ndbcluster= 0;
274
our $opt_skip_ndbcluster_slave= 0;
275
our $opt_with_ndbcluster= 0;
276
our $opt_with_ndbcluster_only= 0;
277
our $glob_ndbcluster_supported= 0;
278
our $opt_ndb_extra_test= 0;
279
263
our $opt_skip_master_binlog= 0;
280
264
our $opt_skip_slave_binlog= 0;
284
our $path_ndb_tools_dir;
285
our $path_ndb_examples_dir;
286
our $exe_ndb_example;
287
our $path_ndb_testrun_log;
289
266
our $path_sql_dir;
291
268
our @data_dir_lst;
317
294
sub kill_running_servers ();
318
295
sub remove_stale_vardir ();
319
296
sub setup_vardir ();
320
sub check_ssl_support ($);
321
297
sub check_running_as_root();
322
sub check_ndbcluster_support ($);
323
sub rm_ndbcluster_tables ($);
324
sub ndbcluster_start_install ($);
325
sub ndbcluster_start ($$);
326
sub ndbcluster_wait_started ($$);
327
298
sub mysqld_wait_started($);
328
299
sub run_benchmarks ($);
329
300
sub initialize_servers ();
393
362
$opt_suites= $opt_suites_default;
395
364
# Check for any extra suites to enable based on the path name
398
"mysql-5.1-new-ndb" => "ndb_team",
399
"mysql-5.1-new-ndb-merge" => "ndb_team",
400
"mysql-5.1-telco-6.2" => "ndb_team",
401
"mysql-5.1-telco-6.2-merge" => "ndb_team",
402
"mysql-5.1-telco-6.3" => "ndb_team",
403
"mysql-6.0-ndb" => "ndb_team",
365
my %extra_suites= ();
406
367
foreach my $dir ( reverse splitdir($glob_basedir) )
417
378
my $tests= collect_test_cases($opt_suites);
419
380
# Turn off NDB and other similar options if no tests use it
420
my ($need_ndbcluster);
421
381
foreach my $test (@$tests)
423
383
next if $test->{skip};
425
385
if (!$opt_extern)
427
$need_ndbcluster||= $test->{ndb_test};
429
387
# Count max number of slaves used by a test case
430
388
if ( $test->{slave_num} > $max_slave_num) {
431
389
$max_slave_num= $test->{slave_num};
442
400
$use_innodb||= $test->{'innodb_test'};
445
# Check if cluster can be skipped
446
if ( !$need_ndbcluster )
448
$opt_skip_ndbcluster= 1;
449
$opt_skip_ndbcluster_slave= 1;
452
# Check if slave cluster can be skipped
453
if ($max_slave_num == 0)
455
$opt_skip_ndbcluster_slave= 1;
458
403
initialize_servers();
460
405
if ( $opt_report_features ) {
535
480
'sp-protocol' => \$opt_sp_protocol,
536
481
'view-protocol' => \$opt_view_protocol,
537
482
'cursor-protocol' => \$opt_cursor_protocol,
538
'ssl|with-openssl' => \$opt_ssl,
539
'skip-ssl' => \$opt_skip_ssl,
540
483
'compress' => \$opt_compress,
541
484
'bench' => \$opt_bench,
542
485
'small-bench' => \$opt_small_bench,
543
'with-ndbcluster|ndb' => \$opt_with_ndbcluster,
544
486
'vs-config' => \$opt_vs_config,
546
488
# Control what test suites or cases to run
547
489
'force' => \$opt_force,
548
'with-ndbcluster-only' => \$opt_with_ndbcluster_only,
549
'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
550
'skip-ndbcluster-slave|skip-ndb-slave'
551
=> \$opt_skip_ndbcluster_slave,
552
'ndb-extra-test' => \$opt_ndb_extra_test,
553
490
'skip-master-binlog' => \$opt_skip_master_binlog,
554
491
'skip-slave-binlog' => \$opt_skip_slave_binlog,
555
492
'do-test=s' => \$opt_do_test,
565
502
'master_port=i' => \$opt_master_myport,
566
503
'slave_port=i' => \$opt_slave_myport,
567
'ndbcluster-port|ndbcluster_port=i' => \$opt_ndbcluster_port,
568
'ndbcluster-port-slave=i' => \$opt_ndbcluster_port_slave,
569
504
'mtr-build-thread=i' => \$opt_mtr_build_thread,
571
506
# Test case authoring
579
514
# Run test on running server
580
515
'extern' => \$opt_extern,
581
'ndb-connectstring=s' => \$opt_ndbconnectstring,
582
'ndb-connectstring-slave=s' => \$opt_ndbconnectstring_slave,
585
518
'gdb' => \$opt_gdb,
816
749
# --------------------------------------------------------------------------
817
750
# Find out default storage engine being used(if any)
818
751
# --------------------------------------------------------------------------
819
if ( $opt_with_ndbcluster )
821
# --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster
822
push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster");
825
752
foreach my $arg ( @opt_extra_mysqld_opt )
827
754
if ( $arg =~ /default-storage-engine=(\S+)/ )
1121
my $data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port";
1126
port => "$opt_ndbcluster_port",
1127
data_dir => "$data_dir",
1128
connect_string => "host=localhost:$opt_ndbcluster_port",
1129
path_pid => "$data_dir/ndb_3.pid", # Nodes + 1
1130
pid => 0, # pid of ndb_mgmd
1134
$data_dir= "$opt_vardir/ndbcluster-$opt_ndbcluster_port_slave";
1139
port => "$opt_ndbcluster_port_slave",
1140
data_dir => "$data_dir",
1141
connect_string => "host=localhost:$opt_ndbcluster_port_slave",
1142
path_pid => "$data_dir/ndb_2.pid", # Nodes + 1
1143
pid => 0, # pid of ndb_mgmd
1147
# Init pids of ndbd's
1148
foreach my $cluster ( @{$clusters} )
1150
for ( my $idx= 0; $idx < $cluster->{'nodes'}; $idx++ )
1153
$cluster->{'ndbds'}->[$idx]=
1157
path_pid => "$cluster->{'data_dir'}/ndb_${nodeid}.pid",
1158
path_fs => "$cluster->{'data_dir'}/ndb_${nodeid}_fs",
1163
1048
# --------------------------------------------------------------------------
1165
1050
# --------------------------------------------------------------------------
1184
# --------------------------------------------------------------------------
1185
# ndbconnectstring and ndbconnectstring_slave
1186
# --------------------------------------------------------------------------
1187
if ( $opt_ndbconnectstring )
1189
# ndbconnectstring was supplied by user, the tests shoudl be run
1190
# against an already started cluster, change settings
1191
my $cluster= $clusters->[0]; # Master cluster
1192
$cluster->{'connect_string'}= $opt_ndbconnectstring;
1193
$cluster->{'use_running'}= 1;
1195
mtr_error("Can't specify --ndb-connectstring and --skip-ndbcluster")
1196
if $opt_skip_ndbcluster;
1198
$ENV{'NDB_CONNECTSTRING'}= $clusters->[0]->{'connect_string'};
1201
if ( $opt_ndbconnectstring_slave )
1203
# ndbconnectstring-slave was supplied by user, the tests should be run
1204
# agains an already started slave cluster, change settings
1205
my $cluster= $clusters->[1]; # Slave cluster
1206
$cluster->{'connect_string'}= $opt_ndbconnectstring_slave;
1207
$cluster->{'use_running'}= 1;
1209
mtr_error("Can't specify ndb-connectstring_slave and " .
1210
"--skip-ndbcluster-slave")
1211
if $opt_skip_ndbcluster_slave;
1215
1068
$path_timefile= "$opt_vardir/log/mysqltest-time";
1216
1069
$path_mysqltest_log= "$opt_vardir/log/mysqltest.log";
1217
1070
$path_current_test_log= "$opt_vardir/log/current_test";
1218
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
1220
1072
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
1262
1114
# A magic value in command_line_setup depends on these equations.
1263
1115
$opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1
1264
1116
$opt_slave_myport= $opt_master_myport + 2; # and 3 4
1265
$opt_ndbcluster_port= $opt_master_myport + 5;
1266
$opt_ndbcluster_port_slave= $opt_master_myport + 6;
1268
1118
if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
1408
sub executable_setup_ndb () {
1410
# Look for ndb tols and binaries
1411
my $ndb_path= mtr_file_exists("$glob_basedir/ndb",
1412
"$glob_basedir/storage/ndb",
1413
"$glob_basedir/bin");
1416
mtr_exe_maybe_exists("$ndb_path/src/kernel/ndbd",
1419
mtr_exe_maybe_exists("$ndb_path/src/mgmclient/ndb_mgm",
1420
"$ndb_path/ndb_mgm");
1422
mtr_exe_maybe_exists("$ndb_path/src/mgmsrv/ndb_mgmd",
1423
"$ndb_path/ndb_mgmd");
1425
mtr_exe_maybe_exists("$ndb_path/tools/ndb_waiter",
1426
"$ndb_path/ndb_waiter");
1429
$path_ndb_tools_dir= mtr_file_exists("$ndb_path/tools",
1432
$path_ndb_examples_dir=
1433
mtr_file_exists("$ndb_path/ndbapi-examples",
1434
"$ndb_path/examples");
1437
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
1439
return ( $exe_ndbd eq "" or
1440
$exe_ndb_mgm eq "" or
1441
$exe_ndb_mgmd eq "" or
1442
$exe_ndb_waiter eq "");
1445
1257
sub executable_setup () {
1485
1297
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
1489
if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
1491
mtr_warning("Could not find all required ndb binaries, " .
1492
"all ndb tests will fail, use --skip-ndbcluster to " .
1493
"skip testing it.");
1495
foreach my $cluster (@{$clusters})
1497
$cluster->{"executable_setup_failed"}= 1;
1502
# Look for the udf_example library
1504
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
1505
"$glob_basedir/sql/.libs/udf_example.so",);
1507
# Look for the ha_example library
1508
$lib_example_plugin=
1509
mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
1510
"$glob_basedir/storage/example/.libs/ha_example.so",);
1514
1301
# Look for mysqltest executable
1629
1416
push(@ld_library_paths, "$glob_basedir/lib");
1632
# --------------------------------------------------------------------------
1633
# Add the path where libndbclient can be found
1634
# --------------------------------------------------------------------------
1635
if ( $glob_ndbcluster_supported )
1637
push(@ld_library_paths, "$glob_basedir/storage/ndb/src/.libs");
1640
1419
# --------------------------------------------------------------------------
1641
1420
# Valgrind need to be run with debug libraries otherwise it's almost
1642
1421
# impossible to add correct supressions, that means if "/usr/lib/debug"
1718
1497
$ENV{'EXE_MYSQL'}= $exe_mysql;
1721
# ----------------------------------------------------
1723
# ----------------------------------------------------
1724
if ( ! $opt_skip_ndbcluster )
1726
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
1728
$ENV{'NDBCLUSTER_PORT'}= $opt_ndbcluster_port;
1729
$ENV{'NDBCLUSTER_PORT_SLAVE'}= $opt_ndbcluster_port_slave;
1731
$ENV{'NDB_EXTRA_TEST'}= $opt_ndb_extra_test;
1733
$ENV{'NDB_BACKUP_DIR'}= $clusters->[0]->{'data_dir'};
1734
$ENV{'NDB_DATA_DIR'}= $clusters->[0]->{'data_dir'};
1735
$ENV{'NDB_TOOLS_DIR'}= $path_ndb_tools_dir;
1736
$ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
1738
if ( $mysql_version_id >= 50000 )
1740
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
1741
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
1743
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
1746
1499
# ----------------------------------------------------
1747
1500
# Setup env so childs can execute mysqlcheck
1748
1501
# ----------------------------------------------------
2188
sub check_ssl_support ($) {
2189
my $mysqld_variables= shift;
2191
if ($opt_skip_ssl || $opt_extern)
2195
mtr_report("Skipping SSL");
2197
$opt_ssl_supported= 0;
2202
if ( ! $mysqld_variables->{'ssl'} )
2206
mtr_error("Couldn't find support for SSL");
2209
mtr_report("Skipping SSL, mysqld not compiled with SSL");
2210
$opt_ssl_supported= 0;
2214
mtr_report("Setting mysqld to support SSL connections");
2215
$opt_ssl_supported= 1;
2219
1941
sub check_debug_support ($) {
2220
1942
my $mysqld_variables= shift;
2290
2012
mtr_add_arg($args, "--small-tables");
2293
if ( $opt_with_ndbcluster )
2295
mtr_add_arg($args, "--create-options=TYPE=ndb");
2298
2015
chdir($glob_mysql_bench_dir)
2299
2016
or mtr_error("Couldn't chdir to '$glob_mysql_bench_dir': $!");
2439
2156
copy_install_db("slave".($idx+1), $slave->[$idx]->{'path_myddir'});
2442
my $cluster_started_ok= 1; # Assume it can be started
2444
my $cluster= $clusters->[0]; # Master cluster
2445
if ($opt_skip_ndbcluster ||
2446
$cluster->{'use_running'} ||
2447
$cluster->{executable_setup_failed})
2449
# Don't install master cluster
2451
elsif (ndbcluster_start_install($cluster))
2453
mtr_warning("Failed to start install of $cluster->{name}");
2454
$cluster_started_ok= 0;
2457
$cluster= $clusters->[1]; # Slave cluster
2458
if ($max_slave_num == 0 ||
2459
$opt_skip_ndbcluster_slave ||
2460
$cluster->{'use_running'} ||
2461
$cluster->{executable_setup_failed})
2463
# Don't install slave cluster
2465
elsif (ndbcluster_start_install($cluster))
2467
mtr_warning("Failed to start install of $cluster->{name}");
2468
$cluster_started_ok= 0;
2471
foreach $cluster (@{$clusters})
2474
next if !$cluster->{'pid'};
2476
$cluster->{'installed_ok'}= 1; # Assume install suceeds
2478
if (ndbcluster_wait_started($cluster, ""))
2480
# failed to install, disable usage and flag that its no ok
2481
mtr_report("ndbcluster_install of $cluster->{'name'} failed");
2482
$cluster->{"installed_ok"}= 0;
2484
$cluster_started_ok= 0;
2488
if ( ! $cluster_started_ok )
2492
# Continue without cluster
2496
mtr_error("To continue, re-run with '--force'.");
2597
if ($tinfo->{'ndb_test'})
2599
foreach my $cluster (@{$clusters})
2601
# Slave cluster is skipped and thus not
2602
# installed, no need to perform checks
2603
last if ($opt_skip_ndbcluster_slave and
2604
$cluster->{'name'} eq 'Slave');
2606
# Using running cluster - no need
2607
# to check if test should be skipped
2608
# will be done by test itself
2609
last if ($cluster->{'use_running'});
2611
# If test needs this cluster, check binaries was found ok
2612
if ( $cluster->{'executable_setup_failed'} )
2614
mtr_report_test_name($tinfo);
2616
"Failed to find cluster binaries";
2617
mtr_report_test_failed($tinfo);
2621
# If test needs this cluster, check it was installed ok
2622
if ( !$cluster->{'installed_ok'} )
2624
mtr_report_test_name($tinfo);
2626
"Cluster $cluster->{'name'} was not installed ok";
2627
mtr_report_test_failed($tinfo);
2922
2541
mtr_rmtree("$data_dir");
2923
2542
mtr_copy_dir("$path_snapshot/$name", "$data_dir");
2926
# Remove the ndb_*_fs dirs for all ndbd nodes
2927
# forcing a clean start of ndb
2928
foreach my $cluster (@{$clusters})
2930
foreach my $ndbd (@{$cluster->{'ndbds'}})
2932
mtr_rmtree("$ndbd->{'path_fs'}" );
3151
2760
mtr_add_arg($args, "%s--loose-skip-innodb", $prefix);
3154
my $cluster= $clusters->[$mysqld->{'cluster'}];
3155
if ( $cluster->{'pid'} || # Cluster is started
3156
$cluster->{'use_running'} ) # Using running cluster
3158
mtr_add_arg($args, "%s--ndbcluster", $prefix);
3159
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
3160
$cluster->{'connect_string'});
3161
mtr_add_arg($args, "%s--ndb-wait-connected=20", $prefix);
3162
mtr_add_arg($args, "%s--ndb-cluster-connection-pool=3", $prefix);
3163
mtr_add_arg($args, "%s--slave-allow-batching", $prefix);
3164
if ( $mysql_version_id >= 50100 )
3166
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
3167
mtr_add_arg($args, "%s--ndb-log-orig", $prefix);
3172
mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix);
3218
2806
mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id);
3219
2807
# mtr_add_arg($args, "%s--rpl-recovery-rank=%d", $prefix, $slave_rpl_rank);
3222
my $cluster= $clusters->[$mysqld->{'cluster'}];
3223
if ( $cluster->{'pid'} || # Slave cluster is started
3224
$cluster->{'use_running'} ) # Using running slave cluster
3226
mtr_add_arg($args, "%s--ndbcluster", $prefix);
3227
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
3228
$cluster->{'connect_string'});
3229
mtr_add_arg($args, "%s--ndb-wait-connected=20", $prefix);
3230
mtr_add_arg($args, "%s--ndb-cluster-connection-pool=3", $prefix);
3231
mtr_add_arg($args, "%s--slave-allow-batching", $prefix);
3232
if ( $mysql_version_id >= 50100 )
3234
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
3235
mtr_add_arg($args, "%s--ndb-log-orig", $prefix);
3240
mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix);
3244
2811
if ( $opt_debug )
3251
2818
mtr_add_arg($args, "%s--sort_buffer=256K", $prefix);
3252
2819
mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix);
3254
if ( $opt_ssl_supported )
3256
mtr_add_arg($args, "%s--ssl-ca=%s/std_data/cacert.pem", $prefix,
3257
$glob_mysql_test_dir);
3258
mtr_add_arg($args, "%s--ssl-cert=%s/std_data/server-cert.pem", $prefix,
3259
$glob_mysql_test_dir);
3260
mtr_add_arg($args, "%s--ssl-key=%s/std_data/server-key.pem", $prefix,
3261
$glob_mysql_test_dir);
3264
2821
if ( $opt_warnings )
3266
2823
mtr_add_arg($args, "%s--log-warnings", $prefix);
3447
# Start shutdown of clusters
3448
foreach my $cluster (@{$clusters})
3450
if ( $cluster->{'pid'} )
3452
$pid= mtr_ndbmgm_start($cluster, "shutdown");
3453
$admin_pids{$pid}= 1;
3456
pid => $cluster->{'pid'},
3457
pidfile => $cluster->{'path_pid'}
3460
$cluster->{'pid'}= 0; # Assume we are done with it
3462
foreach my $ndbd (@{$cluster->{'ndbds'}})
3464
if ( $ndbd->{'pid'} )
3467
pid => $ndbd->{'pid'},
3468
pidfile => $ndbd->{'path_pid'},
3476
3004
# Wait blocking until all shutdown processes has completed
3477
3005
mtr_wait_blocking(\%admin_pids);
3503
3031
$do_restart= 1; # Always restart if --force-restart in -opt file
3504
3032
mtr_verbose("Restart master: Restart forced with --force-restart");
3506
elsif ( ! $opt_skip_ndbcluster and
3507
!$tinfo->{'ndb_test'} and
3508
$clusters->[0]->{'pid'} != 0 )
3510
$do_restart= 1; # Restart without cluster
3511
mtr_verbose("Restart master: Test does not need cluster");
3513
elsif ( ! $opt_skip_ndbcluster and
3514
$tinfo->{'ndb_test'} and
3515
$clusters->[0]->{'pid'} == 0 )
3517
$do_restart= 1; # Restart with cluster
3518
mtr_verbose("Restart master: Test need cluster");
3520
3034
elsif( $tinfo->{'component_id'} eq 'im' )
3522
3036
$do_restart= 1;
3655
3169
$mysqld->{'pid'}= 0; # Assume we are done with it
3659
# Start shutdown of master cluster
3660
my $cluster= $clusters->[0];
3661
if ( $cluster->{'pid'} )
3663
$pid= mtr_ndbmgm_start($cluster, "shutdown");
3664
$admin_pids{$pid}= 1;
3667
pid => $cluster->{'pid'},
3668
pidfile => $cluster->{'path_pid'}
3671
$cluster->{'pid'}= 0; # Assume we are done with it
3673
foreach my $ndbd (@{$cluster->{'ndbds'}})
3676
pid => $ndbd->{'pid'},
3677
pidfile => $ndbd->{'path_pid'},
3679
$ndbd->{'pid'}= 0; # Assume we are done with it
3684
3174
if ( $do_restart || $do_slave_restart )
3708
3198
$mysqld->{'pid'}= 0; # Assume we are done with it
3712
# Start shutdown of slave cluster
3713
my $cluster= $clusters->[1];
3714
if ( $cluster->{'pid'} )
3716
$pid= mtr_ndbmgm_start($cluster, "shutdown");
3718
$admin_pids{$pid}= 1;
3721
pid => $cluster->{'pid'},
3722
pidfile => $cluster->{'path_pid'}
3725
$cluster->{'pid'}= 0; # Assume we are done with it
3727
foreach my $ndbd (@{$cluster->{'ndbds'}} )
3730
pid => $ndbd->{'pid'},
3731
pidfile => $ndbd->{'path_pid'},
3733
$ndbd->{'pid'}= 0; # Assume we are done with it
3738
3203
# ----------------------------------------------------------------------
3766
3231
if ( $tinfo->{'component_id'} eq 'mysqld' )
3768
if ( ! $opt_skip_ndbcluster and
3769
!$clusters->[0]->{'pid'} and
3770
$tinfo->{'ndb_test'} )
3772
# Test need cluster, cluster is not started, start it
3773
ndbcluster_start($clusters->[0], "");
3776
3233
if ( !$master->[0]->{'pid'} )
3778
3235
# Master mysqld is not started
3785
if ( $clusters->[0]->{'pid'} || $clusters->[0]->{'use_running'}
3786
and ! $master->[1]->{'pid'} and
3787
$tinfo->{'master_num'} > 1 )
3789
# Test needs cluster, start an extra mysqld connected to cluster
3791
if ( $mysql_version_id >= 50100 )
3793
# First wait for first mysql server to have created ndb system
3794
# tables ok FIXME This is a workaround so that only one mysqld
3796
if ( ! sleep_until_file_created(
3797
"$master->[0]->{'path_myddir'}/mysql/ndb_apply_status.ndb",
3798
$master->[0]->{'start_timeout'},
3799
$master->[0]->{'pid'}))
3802
$tinfo->{'comment'}= "Failed to create 'mysql/ndb_apply_status' table";
3806
mysqld_start($master->[1],$tinfo->{'master_opt'},[]);
3809
3242
# Save this test case information, so next can examine it
3810
3243
$master->[0]->{'running_master_options'}= $tinfo;
3820
3253
do_before_start_slave($tinfo);
3822
if ( ! $opt_skip_ndbcluster_slave and
3823
!$clusters->[1]->{'pid'} and
3824
$tinfo->{'ndb_test'} )
3826
# Test need slave cluster, cluster is not started, start it
3827
ndbcluster_start($clusters->[1], "");
3830
3255
for ( my $idx= 0; $idx < $tinfo->{'slave_num'}; $idx++ )
3832
3257
if ( ! $slave->[$idx]->{'pid'} )
3841
3266
$slave->[0]->{'running_slave_options'}= $tinfo;
3844
# Wait for clusters to start
3845
foreach my $cluster (@{$clusters})
3848
next if !$cluster->{'pid'};
3850
if (ndbcluster_wait_started($cluster, ""))
3853
$tinfo->{'comment'}= "Start of $cluster->{'name'} cluster failed";
3858
3269
# Wait for mysqld's to start
3859
3270
foreach my $mysqld (@{$master},@{$slave})
4038
3449
$path_vardir_trace);
4041
if ( $opt_ssl_supported )
4043
mtr_add_arg($args, "--ssl-ca=%s/std_data/cacert.pem",
4044
$glob_mysql_test_dir);
4045
mtr_add_arg($args, "--ssl-cert=%s/std_data/client-cert.pem",
4046
$glob_mysql_test_dir);
4047
mtr_add_arg($args, "--ssl-key=%s/std_data/client-key.pem",
4048
$glob_mysql_test_dir);
4053
# Turn on SSL for _all_ test cases if option --ssl was used
4054
mtr_add_arg($args, "--ssl");
4056
elsif ( $opt_ssl_supported )
4058
mtr_add_arg($args, "--skip-ssl");
4061
3452
# ----------------------------------------------------------------------
4062
3453
# If embedded server, we create server args to give mysqltest to pass on
4063
3454
# ----------------------------------------------------------------------
4408
3799
view-protocol Create a view to execute all non updating queries
4409
3800
sp-protocol Create a stored procedure to execute all queries
4410
3801
compress Use the compressed protocol between client and server
4411
ssl Use ssl protocol between client and server
4412
skip-ssl Dont start server with support for ssl connections
4413
3802
bench Run the benchmark suite
4414
3803
small-bench Run the benchmarks with --small-tests --small-tables
4415
3804
ndb|with-ndbcluster Use cluster as default table type