mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/51
into siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/51
This commit is contained in:
@ -160,6 +160,7 @@ our $exe_im;
|
||||
our $exe_my_print_defaults;
|
||||
our $exe_perror;
|
||||
our $lib_udf_example;
|
||||
our $lib_example_plugin;
|
||||
our $exe_libtool;
|
||||
|
||||
our $opt_bench= 0;
|
||||
@ -231,10 +232,12 @@ our $opt_ndbconnectstring_slave;
|
||||
our $opt_record;
|
||||
my $opt_report_features;
|
||||
our $opt_check_testcases;
|
||||
our $opt_mark_progress;
|
||||
|
||||
our $opt_skip;
|
||||
our $opt_skip_rpl;
|
||||
our $max_slave_num= 0;
|
||||
our $max_master_num= 1;
|
||||
our $use_innodb;
|
||||
our $opt_skip_test;
|
||||
our $opt_skip_im;
|
||||
@ -413,6 +416,15 @@ sub main () {
|
||||
$max_slave_num= $test->{slave_num};
|
||||
mtr_error("Too many slaves") if $max_slave_num > 3;
|
||||
}
|
||||
|
||||
# Count max number of masters used by a test case
|
||||
if ( $test->{master_num} > $max_master_num)
|
||||
{
|
||||
$max_master_num= $test->{master_num};
|
||||
mtr_error("Too many masters") if $max_master_num > 2;
|
||||
mtr_error("Too few masters") if $max_master_num < 1;
|
||||
}
|
||||
|
||||
$use_innodb||= $test->{'innodb_test'};
|
||||
}
|
||||
|
||||
@ -536,6 +548,7 @@ sub command_line_setup () {
|
||||
# Test case authoring
|
||||
'record' => \$opt_record,
|
||||
'check-testcases' => \$opt_check_testcases,
|
||||
'mark-progress' => \$opt_mark_progress,
|
||||
|
||||
# Extra options used when starting mysqld
|
||||
'mysqld=s' => \@opt_extra_mysqld_opt,
|
||||
@ -1211,6 +1224,19 @@ sub command_line_setup () {
|
||||
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
|
||||
|
||||
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
|
||||
|
||||
if ( $opt_valgrind and $opt_debug )
|
||||
{
|
||||
# When both --valgrind and --debug is selected, send
|
||||
# all output to the trace file, making it possible to
|
||||
# see the exact location where valgrind complains
|
||||
foreach my $mysqld (@{$master}, @{$slave})
|
||||
{
|
||||
my $sidx= $mysqld->{idx} ? "$mysqld->{idx}" : "";
|
||||
$mysqld->{path_myerr}=
|
||||
"$opt_vardir/log/" . $mysqld->{type} . "$sidx.trace";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@ -1259,9 +1285,10 @@ sub set_mtr_build_thread_ports($) {
|
||||
sub datadir_list_setup () {
|
||||
|
||||
# Make a list of all data_dirs
|
||||
@data_dir_lst = (
|
||||
$master->[0]->{'path_myddir'},
|
||||
$master->[1]->{'path_myddir'});
|
||||
for (my $idx= 0; $idx < $max_master_num; $idx++)
|
||||
{
|
||||
push(@data_dir_lst, $master->[$idx]->{'path_myddir'});
|
||||
}
|
||||
|
||||
for (my $idx= 0; $idx < $max_slave_num; $idx++)
|
||||
{
|
||||
@ -1499,6 +1526,11 @@ sub executable_setup () {
|
||||
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
|
||||
"$glob_basedir/sql/.libs/udf_example.so",);
|
||||
|
||||
# Look for the ha_example library
|
||||
$lib_example_plugin=
|
||||
mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
|
||||
"$glob_basedir/storage/example/.libs/ha_example.so",);
|
||||
|
||||
# Look for mysqltest executable
|
||||
if ( $glob_use_embedded_server )
|
||||
{
|
||||
@ -1654,6 +1686,14 @@ sub environment_setup () {
|
||||
push(@ld_library_paths, dirname($lib_udf_example));
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Add the path where mysqld will find ha_example.so
|
||||
# --------------------------------------------------------------------------
|
||||
if ( $lib_example_plugin )
|
||||
{
|
||||
push(@ld_library_paths, dirname($lib_example_plugin));
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Valgrind need to be run with debug libraries otherwise it's almost
|
||||
# impossible to add correct supressions, that means if "/usr/lib/debug"
|
||||
@ -1928,10 +1968,11 @@ sub environment_setup () {
|
||||
$ENV{'UDF_EXAMPLE_LIB'}=
|
||||
($lib_udf_example ? basename($lib_udf_example) : "");
|
||||
|
||||
$ENV{'LD_LIBRARY_PATH'}=
|
||||
($lib_udf_example ? dirname($lib_udf_example) : "") .
|
||||
($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Add the path where mysqld will find ha_example.so
|
||||
# ----------------------------------------------------
|
||||
$ENV{'EXAMPLE_PLUGIN'}=
|
||||
($lib_example_plugin ? basename($lib_example_plugin) : "");
|
||||
|
||||
# ----------------------------------------------------
|
||||
# We are nice and report a bit about our settings
|
||||
@ -2730,8 +2771,10 @@ sub mysql_install_db () {
|
||||
|
||||
install_db('master', $master->[0]->{'path_myddir'});
|
||||
|
||||
# FIXME check if testcase really is using second master
|
||||
copy_install_db('master', $master->[1]->{'path_myddir'});
|
||||
if ($max_master_num)
|
||||
{
|
||||
copy_install_db('master', $master->[1]->{'path_myddir'});
|
||||
}
|
||||
|
||||
# Install the number of slave databses needed
|
||||
for (my $idx= 0; $idx < $max_slave_num; $idx++)
|
||||
@ -3540,11 +3583,10 @@ sub mysqld_arguments ($$$$$) {
|
||||
if ( $glob_use_embedded_server )
|
||||
{
|
||||
$prefix= "--server-arg=";
|
||||
} else {
|
||||
# We can't pass embedded server --no-defaults
|
||||
mtr_add_arg($args, "--no-defaults");
|
||||
}
|
||||
|
||||
mtr_add_arg($args, "%s--no-defaults", $prefix);
|
||||
|
||||
mtr_add_arg($args, "%s--console", $prefix);
|
||||
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
|
||||
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
|
||||
@ -3623,6 +3665,9 @@ sub mysqld_arguments ($$$$$) {
|
||||
# Turn on logging, will be sent to tables
|
||||
mtr_add_arg($args, "%s--log=", $prefix);
|
||||
}
|
||||
|
||||
mtr_add_arg($args, "%s--plugin_dir=%s", $prefix,
|
||||
dirname($lib_example_plugin));
|
||||
}
|
||||
|
||||
if ( $type eq 'slave' )
|
||||
@ -4273,7 +4318,8 @@ sub run_testcase_start_servers($) {
|
||||
|
||||
}
|
||||
|
||||
if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
|
||||
if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} and
|
||||
$tinfo->{'master_num'} > 1 )
|
||||
{
|
||||
# Test needs cluster, start an extra mysqld connected to cluster
|
||||
|
||||
@ -4485,6 +4531,10 @@ sub run_mysqltest ($) {
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
|
||||
|
||||
# Log line number and time for each line in .test file
|
||||
mtr_add_arg($args, "--mark-progress")
|
||||
if $opt_mark_progress;
|
||||
|
||||
if ($tinfo->{'component_id'} eq 'im')
|
||||
{
|
||||
mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'});
|
||||
@ -4940,6 +4990,7 @@ Options for test case authoring
|
||||
|
||||
record TESTNAME (Re)genereate the result file for TESTNAME
|
||||
check-testcases Check testcases for sideeffects
|
||||
mark-progress Log line number and elapsed time to <testname>.progress
|
||||
|
||||
Options that pass on options
|
||||
|
||||
|
Reference in New Issue
Block a user