Below is the list of changes that have just been committed into a local
5.1 repository of ksm. When ksm does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-04-28 23:00:43+04:00, skozlov@stripped +28 -0
WL#3702 REP: Remove my.cnf replication options testing
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +17 -1
updated
mysql-test/extra/rpl_tests/rpl_loaddata.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +1 -0
updated
mysql-test/extra/rpl_tests/rpl_log.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +1 -0
updated
mysql-test/extra/rpl_tests/rpl_max_relay_size.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +6 -1
updated
mysql-test/extra/rpl_tests/rpl_relayrotate.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +1 -0
updated
mysql-test/extra/rpl_tests/rpl_reset_slave.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +3 -0
updated
mysql-test/extra/rpl_tests/rpl_row_001.test@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +1 -1
updated
mysql-test/extra/rpl_tests/rpl_stm_000001.test@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +1 -1
updated
mysql-test/extra/rpl_tests/rpl_truncate_helper.test@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +2 -0
updated
mysql-test/include/change_master.inc@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +8 -0
define slave options
mysql-test/include/change_master.inc@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +0 -0
mysql-test/include/master-slave-reset.inc@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +11 -0
updated
mysql-test/lib/mtr_cases.pl@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +20 -2
updated
mysql-test/lib/mtr_process.pl@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +26 -26
updated
mysql-test/lib/mtr_report.pl@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +12 -0
updated
mysql-test/mysql-test-run.pl@stripped, 2007-04-28 23:00:33+04:00, skozlov@stripped +172 -144
updated
mysql-test/r/rpl_row_until.result@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +5 -5
updated
mysql-test/t/disabled.def@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +2 -0
updated
mysql-test/t/rpl_dual_pos_advance.test@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +1 -0
updated
mysql-test/t/rpl_known_bugs_detection.test@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +1 -0
updated
mysql-test/t/rpl_ndb_bank.test@stripped, 2007-04-28 23:00:34+04:00, skozlov@stripped +1 -0
updated
mysql-test/t/rpl_ndb_dd_advance.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +2 -0
updated
mysql-test/t/rpl_ndb_idempotent.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +1 -1
updated
mysql-test/t/rpl_relayspace.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +2 -0
updated
mysql-test/t/rpl_row_create_table.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +2 -1
updated
mysql-test/t/rpl_row_mysqlbinlog.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +3 -0
updated
mysql-test/t/rpl_row_until.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +1 -1
updated
mysql-test/t/rpl_trigger.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +2 -1
updated
mysql-test/t/rpl_truncate_7ndb.test@stripped, 2007-04-28 23:00:35+04:00, skozlov@stripped +2 -0
updated
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: skozlov
# Host: virtop.localdomain
# Root: /home/ksm/commits/mysql-5.2-rpl
--- 1.2/mysql-test/t/rpl_known_bugs_detection.test 2007-04-28 23:01:07 +04:00
+++ 1.3/mysql-test/t/rpl_known_bugs_detection.test 2007-04-28 23:01:07 +04:00
@@ -35,6 +35,7 @@
# restart replication for the next testcase
stop slave;
reset slave;
+--source include/change_master.inc
connection master;
reset master;
drop table t1;
--- 1.1/mysql-test/t/rpl_dual_pos_advance.test 2007-04-28 23:01:07 +04:00
+++ 1.2/mysql-test/t/rpl_dual_pos_advance.test 2007-04-28 23:01:07 +04:00
@@ -99,6 +99,7 @@
stop slave;
reset slave;
+--source include/change_master.inc
drop table t1,t4,t5,t6; # add t2 and t3 later
save_master_pos;
--- 1.21/mysql-test/extra/rpl_tests/rpl_max_relay_size.test 2007-04-28 23:01:07 +04:00
+++ 1.22/mysql-test/extra/rpl_tests/rpl_max_relay_size.test 2007-04-28 23:01:07 +04:00
@@ -29,7 +29,7 @@
save_master_pos;
connection slave;
reset slave;
-
+--source include/change_master.inc
--echo #
--echo # Test 1
--echo #
@@ -51,6 +51,8 @@
stop slave;
reset slave;
+--source include/change_master.inc
+
set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
start slave;
@@ -66,6 +68,7 @@
stop slave;
reset slave;
+--source include/change_master.inc
set global max_relay_log_size=0;
select @@global.max_relay_log_size;
start slave;
@@ -81,6 +84,7 @@
stop slave;
reset slave;
+--source include/change_master.inc
# test of relay log rotation when the slave is stopped
# (to make sure it does not crash).
flush logs;
@@ -94,6 +98,7 @@
--echo #
reset slave;
+--source include/change_master.inc
start slave;
sync_with_master;
# test of relay log rotation when the slave is started
--- 1.5/mysql-test/t/rpl_relayspace.test 2007-04-28 23:01:07 +04:00
+++ 1.6/mysql-test/t/rpl_relayspace.test 2007-04-28 23:01:07 +04:00
@@ -12,12 +12,14 @@
drop table t1;
connection slave;
reset slave;
+--source include/change_master.inc
start slave io_thread;
# Give the I/O thread time to block.
sleep 2;
# A bug caused the I/O thread to refuse stopping.
stop slave io_thread;
reset slave;
+--source include/change_master.inc
start slave;
# The I/O thread stops filling the relay log when
# it's >10b. And the SQL thread cannot purge this relay log
--- 1.12/mysql-test/extra/rpl_tests/rpl_reset_slave.test 2007-04-28 23:01:07 +04:00
+++ 1.13/mysql-test/extra/rpl_tests/rpl_reset_slave.test 2007-04-28 23:01:07 +04:00
@@ -24,6 +24,7 @@
show slave status;
reset slave;
+--source include/change_master.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
@@ -38,6 +39,7 @@
# (test to see if RESET SLAVE clears temp tables in memory and disk)
stop slave;
reset slave;
+--source include/change_master.inc
start slave;
connection master;
create temporary table t1 (a int);
@@ -46,6 +48,7 @@
sync_with_master;
stop slave;
reset slave;
+--source include/change_master.inc
start slave;
sync_with_master;
show status like 'slave_open_temp_tables';
--- 1.1/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test 2007-04-28 23:01:07 +04:00
+++ 1.2/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test 2007-04-28 23:01:07 +04:00
@@ -30,7 +30,7 @@
sync_slave_with_master;
STOP SLAVE;
RESET SLAVE;
-
+--source include/change_master.inc
eval CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(4) DEFAULT 'TEST')
@@ -71,6 +71,7 @@
#--echo *** Create t2 on slave ***
#STOP SLAVE;
#RESET SLAVE;
+#--source include/change_master.inc
#eval CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
# d FLOAT DEFAULT '2.00',
# e CHAR(5) DEFAULT 'TEST2')
@@ -108,6 +109,7 @@
--echo *** Create t3 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -155,6 +157,7 @@
--echo *** Create t4 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
@@ -200,6 +203,7 @@
--echo *** Create t5 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE=$engine_type;
@@ -247,6 +251,7 @@
--echo *** Create t6 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE=$engine_type;
@@ -308,6 +313,7 @@
--echo *** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
@@ -350,6 +356,7 @@
--echo *** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE=$engine_type;
@@ -397,6 +404,7 @@
#--echo *** Create t9 on slave ***
#STOP SLAVE;
#RESET SLAVE;
+#--source include/change_master.inc
#eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
# d TIMESTAMP,
# e INT DEFAULT '1')ENGINE=$engine_type;
@@ -443,6 +451,7 @@
--echo *** Create t10 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE=$engine_type;
@@ -487,6 +496,7 @@
--echo *** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
@@ -531,6 +541,7 @@
--echo *** Create t12 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
@@ -570,6 +581,7 @@
--echo *** Create t13 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -618,6 +630,7 @@
--echo *** Create t14 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
@@ -681,6 +694,7 @@
--echo *** Create t15 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -750,6 +764,7 @@
--echo *** Create t16 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1',
@@ -805,6 +820,7 @@
--echo *** Create t17 on slave ***
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
eval CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2')
--- 1.11/mysql-test/t/rpl_ndb_dd_advance.test 2007-04-28 23:01:07 +04:00
+++ 1.12/mysql-test/t/rpl_ndb_dd_advance.test 2007-04-28 23:01:07 +04:00
@@ -179,6 +179,7 @@
connection slave;
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
connection master;
RESET MASTER;
connection slave;
@@ -386,6 +387,7 @@
--connection slave
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
DROP PROCEDURE IF EXISTS tpcb.load;
DROP PROCEDURE IF EXISTS tpcb.trans;
DROP TABLE IF EXISTS tpcb.account;
--- 1.2/mysql-test/t/rpl_row_mysqlbinlog.test 2007-04-28 23:01:07 +04:00
+++ 1.3/mysql-test/t/rpl_row_mysqlbinlog.test 2007-04-28 23:01:07 +04:00
@@ -121,6 +121,7 @@
reset master;
connection slave;
reset slave;
+--source include/change_master.inc
start slave;
--require r/slave-running.result
show status like 'Slave_running';
@@ -210,6 +211,7 @@
#reset master;
#connection slave;
#reset slave;
+#--source include/change_master.inc
#start slave;
#--require r/slave-running.result
#show status like 'Slave_running';
@@ -283,6 +285,7 @@
reset master;
connection slave;
reset slave;
+--source include/change_master.inc
start slave;
--require r/slave-running.result
show status like 'Slave_running';
--- 1.54/mysql-test/lib/mtr_cases.pl 2007-04-28 23:01:07 +04:00
+++ 1.55/mysql-test/lib/mtr_cases.pl 2007-04-28 23:01:07 +04:00
@@ -354,6 +354,13 @@
next;
}
+ $value= mtr_match_prefix($opt, "--slave-num=");
+ if ( defined $value )
+ {
+ $tinfo->{'slave_num'}= $value;
+ next;
+ }
+
$value= mtr_match_prefix($opt, "--result-file=");
if ( defined $value )
{
@@ -498,6 +505,17 @@
{
mtr_options_from_test_file($tinfo,"$testdir/${tname}.test");
+ if ( defined $::used_default_engine )
+ {
+ # Different default engine is used
+ # tag test to require that engine
+ $tinfo->{'ndb_test'}= 1
+ if ( $::used_default_engine =~ /^ndb/i );
+
+ $tinfo->{'innodb_test'}= 1
+ if ( $::used_default_engine =~ /^innodb/i );
+ }
+
if ( $tinfo->{'big_test'} and ! $::opt_big_test )
{
$tinfo->{'skip'}= 1;
@@ -523,7 +541,7 @@
! ( $tinfo->{'binlog_format'} eq $::used_binlog_format ) )
{
$tinfo->{'skip'}= 1;
- $tinfo->{'comment'}= "Not running with binlog format '$tinfo->{'binlog_format'}'";
+ $tinfo->{'comment'}= "Requiring binlog format '$tinfo->{'binlog_format'}'";
return;
}
@@ -588,7 +606,7 @@
(
["include/have_innodb.inc", "innodb_test", 1],
["include/have_binlog_format_row.inc", "binlog_format", "row"],
- ["include/have_binlog_format_statement.inc", "binlog_format", "stmt"],
+ ["include/have_binlog_format_statement.inc", "binlog_format", "statement"],
["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"],
["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1],
--- 1.70/mysql-test/lib/mtr_process.pl 2007-04-28 23:01:07 +04:00
+++ 1.71/mysql-test/lib/mtr_process.pl 2007-04-28 23:01:07 +04:00
@@ -38,8 +38,8 @@
sub mtr_ping_with_timeout($);
sub mtr_ping_port ($);
-# static in C
-sub spawn_impl ($$$$$$$$);
+# Local function
+sub spawn_impl ($$$$$$$);
##############################################################################
#
@@ -47,18 +47,16 @@
#
##############################################################################
-# This function try to mimic the C version used in "netware/mysql_test_run.c"
-
sub mtr_run ($$$$$$;$) {
my $path= shift;
my $arg_list_t= shift;
my $input= shift;
my $output= shift;
my $error= shift;
- my $pid_file= shift;
+ my $pid_file= shift; # Not used
my $spawn_opts= shift;
- return spawn_impl($path,$arg_list_t,'run',$input,$output,$error,$pid_file,
+ return spawn_impl($path,$arg_list_t,'run',$input,$output,$error,
$spawn_opts);
}
@@ -68,10 +66,10 @@
my $input= shift;
my $output= shift;
my $error= shift;
- my $pid_file= shift;
+ my $pid_file= shift; # Not used
my $spawn_opts= shift;
- return spawn_impl($path,$arg_list_t,'test',$input,$output,$error,$pid_file,
+ return spawn_impl($path,$arg_list_t,'test',$input,$output,$error,
$spawn_opts);
}
@@ -81,28 +79,22 @@
my $input= shift;
my $output= shift;
my $error= shift;
- my $pid_file= shift;
+ my $pid_file= shift; # Not used
my $spawn_opts= shift;
- return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error,$pid_file,
+ return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error,
$spawn_opts);
}
-##############################################################################
-#
-# If $join is set, we return the error code, else we return the PID
-#
-##############################################################################
-sub spawn_impl ($$$$$$$$) {
+sub spawn_impl ($$$$$$$) {
my $path= shift;
my $arg_list_t= shift;
my $mode= shift;
my $input= shift;
my $output= shift;
my $error= shift;
- my $pid_file= shift; # FIXME
my $spawn_opts= shift;
if ( $::opt_script_debug )
@@ -155,10 +147,6 @@
else
{
# Child, redirect output and exec
- # FIXME I tried POSIX::setsid() here to detach and, I hoped,
- # avoid zombies. But everything went wild, somehow the parent
- # became a deamon as well, and was hard to kill ;-)
- # Need to catch SIGCHLD and do waitpid or something instead......
$SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't
@@ -196,7 +184,15 @@
}
else
{
- if ( ! open(STDERR,$log_file_open_mode,$error) )
+ if ( $::glob_win32_perl )
+ {
+ # Don't redirect stdout on ActiveState perl since this is
+ # just another thread in the same process.
+ # Should be fixed so that the thread that is created with fork
+ # executes the exe in another process and wait's for it to return.
+ # In the meanwhile, we get all the output from mysqld's to screen
+ }
+ elsif ( ! open(STDERR,$log_file_open_mode,$error) )
{
mtr_child_error("can't redirect STDERR to \"$error\": $!");
}
@@ -259,9 +255,7 @@
# We do blocking waitpid() until we get the return from the
# "mysqltest" call. But if a mysqld process dies that we
# started, we take this as an error, and kill mysqltest.
- #
- # FIXME is this as it should be? Can't mysqld terminate
- # normally from running a test case?
+
my $exit_value= -1;
my $saved_exit_value;
@@ -450,7 +444,6 @@
# We scan the "var/run/" directory for other process id's to kill
- # FIXME $path_run_dir or something
my $rundir= "$::opt_vardir/run";
mtr_debug("Processing PID files in directory '$rundir'...");
@@ -1106,6 +1099,13 @@
foreach my $pid (@$pids)
{
+
+ if ($pid <= 0)
+ {
+ mtr_warning("Trying to kill illegal pid: $pid");
+ next;
+ }
+
foreach my $sig (15, 9)
{
last if mtr_im_kill_process([ $pid ], $sig, 10, 1);
--- 1.45/mysql-test/lib/mtr_report.pl 2007-04-28 23:01:07 +04:00
+++ 1.46/mysql-test/lib/mtr_report.pl 2007-04-28 23:01:07 +04:00
@@ -296,6 +296,18 @@
}
}
}
+
+ if ( $::opt_check_testcases )
+ {
+ # Look for warnings produced by mysqltest in testname.warnings
+ foreach my $test_warning_file
+ ( glob("$::glob_mysql_test_dir/r/*.warnings") )
+ {
+ $found_problems= 1;
+ print WARN "Check myqltest warnings in $test_warning_file\n";
+ }
+ }
+
if ( $found_problems )
{
mtr_warning("Got errors/warnings while running tests, please examine",
--- 1.283/mysql-test/mysql-test-run.pl 2007-04-28 23:01:08 +04:00
+++ 1.284/mysql-test/mysql-test-run.pl 2007-04-28 23:01:08 +04:00
@@ -305,6 +305,7 @@
our @data_dir_lst;
our $used_binlog_format;
+our $used_default_engine;
our $debug_compiled_binaries;
our $glob_tot_real_time= 0;
@@ -354,7 +355,7 @@
sub ndbd_start ($$$);
sub ndb_mgmd_start ($);
sub mysqld_start ($$$);
-sub mysqld_arguments ($$$$$);
+sub mysqld_arguments ($$$$);
sub stop_all_servers ();
sub run_mysqltest ($);
sub usage ($);
@@ -520,7 +521,7 @@
'compress' => \$opt_compress,
'bench' => \$opt_bench,
'small-bench' => \$opt_small_bench,
- 'with-ndbcluster' => \$opt_with_ndbcluster,
+ 'with-ndbcluster|ndb' => \$opt_with_ndbcluster,
'vs-config' => \$opt_vs_config,
# Control what test suites or cases to run
@@ -570,6 +571,7 @@
'manual-debug' => \$opt_manual_debug,
'ddd' => \$opt_ddd,
'client-ddd' => \$opt_client_ddd,
+ 'manual-ddd' => \$opt_manual_ddd,
'debugger=s' => \$opt_debugger,
'client-debugger=s' => \$opt_client_debugger,
'strace-client' => \$opt_strace_client,
@@ -724,8 +726,6 @@
{
$mysqld_variables{'port'}= 3306;
$mysqld_variables{'master-port'}= 3306;
- $opt_skip_ndbcluster= 1;
- $opt_skip_im= 1;
}
if ( $opt_comment )
@@ -777,6 +777,26 @@
mtr_report("Using binlog format '$used_binlog_format'");
}
+
+ # --------------------------------------------------------------------------
+ # Find out default storage engine being used(if any)
+ # --------------------------------------------------------------------------
+ if ( $opt_with_ndbcluster )
+ {
+ # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster
+ push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster");
+ }
+
+ foreach my $arg ( @opt_extra_mysqld_opt )
+ {
+ if ( $arg =~ /default-storage-engine=(\S+)/ )
+ {
+ $used_default_engine= $1;
+ }
+ }
+ mtr_report("Using default engine '$used_default_engine'")
+ if defined $used_default_engine;
+
# --------------------------------------------------------------------------
# Check if we should speed up tests by trying to run on tmpfs
# --------------------------------------------------------------------------
@@ -849,20 +869,22 @@
# --------------------------------------------------------------------------
# Check im suport
# --------------------------------------------------------------------------
- if (!$opt_extern)
+ if ($opt_extern)
{
- if ( $mysql_version_id < 50000 ) {
- # Instance manager is not supported until 5.0
- $opt_skip_im= 1;
-
- }
-
- if ( $glob_win32 ) {
- mtr_report("Disable Instance manager - not supported on Windows");
- $opt_skip_im= 1;
- }
-
+ mtr_report("Disable instance manager when running with extern mysqld");
+ $opt_skip_im= 1;
+ }
+ elsif ( $mysql_version_id < 50000 )
+ {
+ # Instance manager is not supported until 5.0
+ $opt_skip_im= 1;
+ }
+ elsif ( $glob_win32 )
+ {
+ mtr_report("Disable Instance manager - testing not supported on Windows");
+ $opt_skip_im= 1;
}
+
# --------------------------------------------------------------------------
# Record flag
# --------------------------------------------------------------------------
@@ -900,10 +922,6 @@
# --------------------------------------------------------------------------
# Ndb cluster flags
# --------------------------------------------------------------------------
- if ( $opt_with_ndbcluster and !$opt_bench)
- {
- mtr_error("Can only use --with-ndbcluster togheter with --bench");
- }
if ( $opt_ndbconnectstring )
{
@@ -1054,9 +1072,7 @@
# On some operating systems, there is a limit to the length of a
# UNIX domain socket's path far below PATH_MAX, so try to avoid long
# socket path names.
- $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
-
- # Put this into a hash, will be a C struct
+ $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) >= 80 );
$master->[0]=
{
@@ -1065,7 +1081,6 @@
idx => 0,
path_myddir => "$opt_vardir/master-data",
path_myerr => "$opt_vardir/log/master.err",
- path_mylog => "$opt_vardir/log/master.log",
path_pid => "$opt_vardir/run/master.pid",
path_sock => "$sockdir/master.sock",
port => $opt_master_myport,
@@ -1081,7 +1096,6 @@
idx => 1,
path_myddir => "$opt_vardir/master1-data",
path_myerr => "$opt_vardir/log/master1.err",
- path_mylog => "$opt_vardir/log/master1.log",
path_pid => "$opt_vardir/run/master1.pid",
path_sock => "$sockdir/master1.sock",
port => $opt_master_myport + 1,
@@ -1097,7 +1111,6 @@
idx => 0,
path_myddir => "$opt_vardir/slave-data",
path_myerr => "$opt_vardir/log/slave.err",
- path_mylog => "$opt_vardir/log/slave.log",
path_pid => "$opt_vardir/run/slave.pid",
path_sock => "$sockdir/slave.sock",
port => $opt_slave_myport,
@@ -1114,7 +1127,6 @@
idx => 1,
path_myddir => "$opt_vardir/slave1-data",
path_myerr => "$opt_vardir/log/slave1.err",
- path_mylog => "$opt_vardir/log/slave1.log",
path_pid => "$opt_vardir/run/slave1.pid",
path_sock => "$sockdir/slave1.sock",
port => $opt_slave_myport + 1,
@@ -1130,7 +1142,6 @@
idx => 2,
path_myddir => "$opt_vardir/slave2-data",
path_myerr => "$opt_vardir/log/slave2.err",
- path_mylog => "$opt_vardir/log/slave2.log",
path_pid => "$opt_vardir/run/slave2.pid",
path_sock => "$sockdir/slave2.sock",
port => $opt_slave_myport + 2,
@@ -1224,6 +1235,7 @@
{
# Turn off features not supported when running with extern server
$opt_skip_rpl= 1;
+ $opt_skip_ndbcluster= 1;
# Setup master->[0] with the settings for the extern server
$master->[0]->{'path_sock'}= $opt_socket ? $opt_socket : "/tmp/mysql.sock";
@@ -1334,7 +1346,7 @@
#
# Execute "mysqld --no-defaults --help --verbose" to get a
- # of all features and settings
+ # list of all features and settings
#
my $list= `$exe_mysqld --no-defaults --verbose --help`;
@@ -1398,6 +1410,40 @@
}
+sub run_query($$) {
+ my ($mysqld, $query)= @_;
+
+ my $args;
+ mtr_init_args(\$args);
+
+ mtr_add_arg($args, "--no-defaults");
+ mtr_add_arg($args, "--user=%s", $opt_user);
+ mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
+ mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'});
+ mtr_add_arg($args, "--silent"); # Tab separated output
+ mtr_add_arg($args, "-e '%s'", $query);
+
+ my $cmd= "$exe_mysql " . join(' ', @$args);
+ mtr_verbose("cmd: $cmd");
+ return `$cmd`;
+}
+
+
+sub collect_mysqld_features_from_running_server ()
+{
+ my $list= run_query($master->[0], "use mysql; SHOW VARIABLES");
+
+ foreach my $line (split('\n', $list))
+ {
+ # Put variables into hash
+ if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ )
+ {
+ print "$1=\"$2\"\n";
+ $mysqld_variables{$1}= $2;
+ }
+ }
+}
+
sub executable_setup_im () {
# Look for instance manager binary - mysqlmanager
@@ -1495,9 +1541,17 @@
if (!$opt_extern)
{
- # Look for SQL scripts directory
- $path_sql_dir= mtr_path_exists("$glob_basedir/share",
- "$glob_basedir/scripts");
+ # Look for SQL scripts directory
+ if ( mtr_file_exists("$path_share/mysql_system_tables.sql") ne "")
+ {
+ # The SQL scripts are in path_share
+ $path_sql_dir= $path_share;
+ }
+ else
+ {
+ $path_sql_dir= mtr_path_exists("$glob_basedir/share",
+ "$glob_basedir/scripts");
+ }
if ( $mysql_version_id >= 50100 )
{
@@ -1877,8 +1931,7 @@
mtr_native_path($exe_mysqlslap) .
" -uroot " .
"--port=$master->[0]->{'port'} " .
- "--socket=$master->[0]->{'path_sock'} --password= " .
- "--lock-directory=$opt_tmpdir";
+ "--socket=$master->[0]->{'path_sock'} --password= ";
if ( $opt_debug )
{
@@ -1926,7 +1979,7 @@
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
mtr_native_path($exe_mysqlbinlog) .
- " --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
+ " --no-defaults --disable-force-if-open --debug-info";
if ( !$opt_extern && $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -1978,10 +2031,7 @@
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
}
- if (!$opt_extern)
- {
- $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
- }
+ $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
@@ -2795,10 +2845,7 @@
}
else
{
- if ($opt_verbose)
- {
- mtr_report("No need to create '$opt_vardir' it already exists");
- }
+ mtr_verbose("No need to create '$opt_vardir' it already exists");
}
}
else
@@ -3228,9 +3275,9 @@
}
-sub run_testcase_mark_logs($)
+sub run_testcase_mark_logs($$)
{
- my ($log_msg)= @_;
+ my ($tinfo, $log_msg)= @_;
# Write a marker to all log files
@@ -3243,6 +3290,12 @@
mtr_tofile($mysqld->{path_myerr}, $log_msg);
}
+ if ( $tinfo->{'component_id'} eq 'im')
+ {
+ mtr_tofile($instance_manager->{path_err}, $log_msg);
+ mtr_tofile($instance_manager->{path_log}, $log_msg);
+ }
+
# ndbcluster log file
mtr_tofile($path_ndb_testrun_log, $log_msg);
@@ -3369,7 +3422,7 @@
}
# Write to all log files to indicate start of testcase
- run_testcase_mark_logs("CURRENT_TEST: $tinfo->{name}\n");
+ run_testcase_mark_logs($tinfo, "CURRENT_TEST: $tinfo->{name}\n");
my $died= mtr_record_dead_children();
if ($died or $master_restart or $slave_restart)
@@ -3443,7 +3496,7 @@
# Stop Instance Manager if we are processing an IM-test case.
# ----------------------------------------------------------------------
if ( $tinfo->{'component_id'} eq 'im' and
- !mtr_im_stop($instance_manager, $tinfo->{'name'}) )
+ !mtr_im_stop($instance_manager, $tinfo->{'name'}))
{
mtr_error("Failed to stop Instance Manager.")
}
@@ -3628,21 +3681,20 @@
}
-sub mysqld_arguments ($$$$$) {
+sub mysqld_arguments ($$$$) {
my $args= shift;
- my $type= shift;
- my $idx= shift;
+ my $mysqld= shift;
my $extra_opt= shift;
my $slave_master_info= shift;
+ my $idx= $mysqld->{'idx'};
my $sidx= ""; # Index as string, 0 is empty string
- if ( $idx > 0 )
+ if ( $idx> 0 )
{
- $sidx= "$idx";
+ $sidx= $idx;
}
my $prefix= ""; # If mysqltest server arg
-
if ( $glob_use_embedded_server )
{
$prefix= "--server-arg=";
@@ -3656,8 +3708,16 @@
if ( $mysql_version_id >= 50036)
{
- # Prevent the started mysqld to access files outside of vardir
- mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
+ # By default, prevent the started mysqld to access files outside of vardir
+ my $secure_file_dir= $opt_vardir;
+ if ( $opt_suite ne "main" )
+ {
+ # When running a suite other than default allow the mysqld
+ # access to subdirs of mysql-test/ in order to make it possible
+ # to "load data" from the suites data/ directory.
+ $secure_file_dir= $glob_mysql_test_dir;
+ }
+ mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $secure_file_dir);
}
if ( $mysql_version_id >= 50000 )
@@ -3679,36 +3739,55 @@
}
}
+ mtr_add_arg($args, "%s--pid-file=%s", $prefix,
+ $mysqld->{'path_pid'});
+
+ mtr_add_arg($args, "%s--port=%d", $prefix,
+ $mysqld->{'port'});
+
+ mtr_add_arg($args, "%s--socket=%s", $prefix,
+ $mysqld->{'path_sock'});
+
+ mtr_add_arg($args, "%s--datadir=%s", $prefix,
+ $mysqld->{'path_myddir'});
+
+
+ if ( $mysql_version_id >= 50106 )
+ {
+ # Turn on logging to bothe tables and file
+ mtr_add_arg($args, "%s--log-output=table,file", $prefix);
+ }
+
+ my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx";
+ mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path);
+ mtr_add_arg($args,
+ "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path);
+
# Check if "extra_opt" contains --skip-log-bin
my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt);
- if ( $type eq 'master' )
+ if ( $mysqld->{'type'} eq 'master' )
{
- my $id= $idx > 0 ? $idx + 101 : 1;
-
if (! ($opt_skip_master_binlog || $skip_binlog) )
{
mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix,
$opt_vardir, $sidx);
}
- mtr_add_arg($args, "%s--pid-file=%s", $prefix,
- $master->[$idx]->{'path_pid'});
- mtr_add_arg($args, "%s--port=%d", $prefix,
- $master->[$idx]->{'port'});
- mtr_add_arg($args, "%s--server-id=%d", $prefix, $id);
- mtr_add_arg($args, "%s--socket=%s", $prefix,
- $master->[$idx]->{'path_sock'});
- mtr_add_arg($args, "%s--innodb_data_file_path=ibdata1:10M:autoextend", $prefix);
+
+ mtr_add_arg($args, "%s--server-id=%d", $prefix,
+ $idx > 0 ? $idx + 101 : 1);
+
+ mtr_add_arg($args, "%s--innodb_data_file_path=ibdata1:10M:autoextend",
+ $prefix);
+
mtr_add_arg($args, "%s--local-infile", $prefix);
- mtr_add_arg($args, "%s--datadir=%s", $prefix,
- $master->[$idx]->{'path_myddir'});
if ( $idx > 0 or !$use_innodb)
{
mtr_add_arg($args, "%s--skip-innodb", $prefix);
}
- my $cluster= $clusters->[$master->[$idx]->{'cluster'}];
+ my $cluster= $clusters->[$mysqld->{'cluster'}];
if ( $opt_skip_ndbcluster ||
!$cluster->{'pid'})
{
@@ -3719,34 +3798,22 @@
mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$cluster->{'connect_string'});
+# mtr_add_arg($args, "%s--ndb-wait-connected=20", $prefix);
+# mtr_add_arg($args, "%s--ndb-cluster-connection-pool=3", $prefix);
if ( $mysql_version_id >= 50100 )
{
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
}
- if ( $mysql_version_id <= 50106 )
- {
- # Force mysqld to use log files up until 5.1.6
- mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
- }
- else
- {
- # 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' )
+ else
{
- my $slave_server_id= 2 + $idx;
- my $slave_rpl_rank= $slave_server_id;
+ mtr_error("unknown mysqld type")
+ unless $mysqld->{'type'} eq 'slave';
- mtr_add_arg($args, "%s--datadir=%s", $prefix,
- $slave->[$idx]->{'path_myddir'});
mtr_add_arg($args, "%s--init-rpl-role=slave", $prefix);
if (! ( $opt_skip_slave_binlog || $skip_binlog ))
{
@@ -3755,19 +3822,13 @@
mtr_add_arg($args, "%s--log-slave-updates", $prefix);
}
- mtr_add_arg($args, "%s--master-retry-count=10", $prefix);
- mtr_add_arg($args, "%s--pid-file=%s", $prefix,
- $slave->[$idx]->{'path_pid'});
- mtr_add_arg($args, "%s--port=%d", $prefix,
- $slave->[$idx]->{'port'});
mtr_add_arg($args, "%s--relay-log=%s/log/slave%s-relay-bin", $prefix,
$opt_vardir, $sidx);
mtr_add_arg($args, "%s--report-host=127.0.0.1", $prefix);
mtr_add_arg($args, "%s--report-port=%d", $prefix,
- $slave->[$idx]->{'port'});
+ $mysqld->{'port'});
mtr_add_arg($args, "%s--report-user=root", $prefix);
mtr_add_arg($args, "%s--skip-innodb", $prefix);
- mtr_add_arg($args, "%s--skip-ndbcluster", $prefix);
mtr_add_arg($args, "%s--skip-slave-start", $prefix);
# Directory where slaves find the dumps generated by "load data"
@@ -3776,8 +3837,6 @@
my $slave_load_path= "../tmp";
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
$slave_load_path);
- mtr_add_arg($args, "%s--socket=%s", $prefix,
- $slave->[$idx]->{'path_sock'});
mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix);
if ( @$slave_master_info )
@@ -3789,19 +3848,15 @@
}
else
{
- mtr_add_arg($args, "%s--master-user=root", $prefix);
- mtr_add_arg($args, "%s--master-connect-retry=1", $prefix);
- mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix);
- mtr_add_arg($args, "%s--master-password=", $prefix);
- mtr_add_arg($args, "%s--master-port=%d", $prefix,
- $master->[0]->{'port'}); # First master
+ my $slave_server_id= 2 + $idx;
+ my $slave_rpl_rank= $slave_server_id;
mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id);
mtr_add_arg($args, "%s--rpl-recovery-rank=%d", $prefix, $slave_rpl_rank);
}
if ( $opt_skip_ndbcluster_slave ||
- $slave->[$idx]->{'cluster'} == -1 ||
- !$clusters->[$slave->[$idx]->{'cluster'}]->{'pid'} )
+ $mysqld->{'cluster'} == -1 ||
+ !$clusters->[$mysqld->{'cluster'}]->{'pid'} )
{
mtr_add_arg($args, "%s--skip-ndbcluster", $prefix);
}
@@ -3809,41 +3864,22 @@
{
mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
- $clusters->[$slave->[$idx]->{'cluster'}]->{'connect_string'});
+ $clusters->[$mysqld->{'cluster'}]->{'connect_string'});
+# mtr_add_arg($args, "%s--ndb-wait-connected=20", $prefix);
+# mtr_add_arg($args, "%s--ndb-cluster-connection-pool=3", $prefix);
if ( $mysql_version_id >= 50100 )
{
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
}
-
- if ( $mysql_version_id <= 50106 )
- {
- # Force mysqld to use log files up until 5.1.6
- mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
- }
- else
- {
- # Turn on logging, will be sent to tables
- mtr_add_arg($args, "%s--log=", $prefix);
- }
-
} # end slave
if ( $opt_debug )
{
- if ( $type eq 'master' )
- {
- mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/master%s.trace",
- $prefix, $path_vardir_trace, $sidx);
- }
- if ( $type eq 'slave' )
- {
- mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/slave%s.trace",
- $prefix, $path_vardir_trace, $sidx);
- }
+ mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/%s%s.trace",
+ $prefix, $path_vardir_trace, $mysqld->{'type'}, $sidx);
}
- # FIXME always set nowdays??? SMALL_SERVER
mtr_add_arg($args, "%s--key_buffer_size=1M", $prefix);
mtr_add_arg($args, "%s--sort_buffer=256K", $prefix);
mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix);
@@ -3869,18 +3905,10 @@
mtr_add_arg($args, "%s--gdb", $prefix);
}
- # If we should run all tests cases, we will use a local server for that
-
- if ( -w "/" )
- {
- # We are running as root; We need to add the --root argument
- mtr_add_arg($args, "%s--user=root", $prefix);
- }
-
my $found_skip_core= 0;
foreach my $arg ( @opt_extra_mysqld_opt, @$extra_opt )
{
- # Allow --skip-core-file to be set in master.opt file
+ # Allow --skip-core-file to be set in <testname>-[master|slave].opt file
if ($arg eq "--skip-core-file")
{
$found_skip_core= 1;
@@ -3904,7 +3932,7 @@
mtr_add_arg($args, "%s--rpl-recovery-rank=1", $prefix);
mtr_add_arg($args, "%s--init-rpl-role=master", $prefix);
}
- elsif ( $type eq 'master' )
+ elsif ( $mysqld->{'type'} eq 'master' )
{
mtr_add_arg($args, "%s--open-files-limit=1024", $prefix);
}
@@ -3955,7 +3983,7 @@
valgrind_arguments($args, \$exe);
}
- mysqld_arguments($args,$type,$idx,$extra_opt,$slave_master_info);
+ mysqld_arguments($args,$mysqld,$extra_opt,$slave_master_info);
if ( $opt_gdb || $opt_manual_gdb)
{
@@ -4700,7 +4728,7 @@
if ( $glob_use_embedded_server )
{
- mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]);
+ mysqld_arguments($args,$master->[0],$tinfo->{'master_opt'},[]);
}
# ----------------------------------------------------------------------
@@ -4820,8 +4848,7 @@
if ( $opt_manual_gdb )
{
print "\nTo start gdb for $type, type in another window:\n";
- print "cd $glob_mysql_test_dir;\n";
- print "gdb -x $gdb_init_file $$exe\n";
+ print "gdb -cd $glob_mysql_test_dir -x $gdb_init_file $$exe\n";
# Indicate the exe should not be started
$$exe= undef;
@@ -4885,8 +4912,7 @@
if ( $opt_manual_ddd )
{
print "\nTo start ddd for $type, type in another window:\n";
- print "cd $glob_mysql_test_dir;\n";
- print "ddd -x $gdb_init_file $$exe\n";
+ print "ddd -cd $glob_mysql_test_dir -x $gdb_init_file $$exe\n";
# Indicate the exe should not be started
$$exe= undef;
@@ -5030,7 +5056,7 @@
skip-ssl Dont start server with support for ssl connections
bench Run the benchmark suite
small-bench Run the benchmarks with --small-tests --small-tables
- with-ndbcluster Use cluster as default table type for benchmark
+ ndb|with-ndbcluster Use cluster as default table type
vs-config Visual Studio configuration used to create executables
(default: MTR_VS_CONFIG environment variable)
@@ -5104,6 +5130,8 @@
manual-debug Let user manually start mysqld in debugger, before
running test(s)
manual-gdb Let user manually start mysqld in gdb, before running
+ test(s)
+ manual-ddd Let user manually start mysqld in ddd, before running
test(s)
master-binary=PATH Specify the master "mysqld" to use
slave-binary=PATH Specify the slave "mysqld" to use
--- 1.237/mysql-test/t/disabled.def 2007-04-28 23:01:08 +04:00
+++ 1.238/mysql-test/t/disabled.def 2007-04-28 23:01:08 +04:00
@@ -39,3 +39,5 @@
rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
ndb_alter_table : Bug##25774 ndb_alter_table.test fails in DBUG_ASSERT() on Linux x64
ndb_single_user : Bug#27021 Error codes in mysqld in single user mode varies
+
+rpl_load_from_master : LOAD FROM MASTER deprecated in 5.2
--- 1.6/mysql-test/extra/rpl_tests/rpl_loaddata.test 2007-04-28 23:01:08 +04:00
+++ 1.7/mysql-test/extra/rpl_tests/rpl_loaddata.test 2007-04-28 23:01:08 +04:00
@@ -120,6 +120,7 @@
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
stop slave;
reset slave;
+--source include/change_master.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
--- 1.1/mysql-test/extra/rpl_tests/rpl_relayrotate.test 2007-04-28 23:01:08 +04:00
+++ 1.2/mysql-test/extra/rpl_tests/rpl_relayrotate.test 2007-04-28 23:01:08 +04:00
@@ -32,6 +32,7 @@
save_master_pos;
connection slave;
reset slave;
+--source include/change_master.inc
start slave;
# We wait 1 sec for the SQL thread to be somewhere in
# the middle of the transaction, hopefully not in
--- 1.3/mysql-test/extra/rpl_tests/rpl_row_001.test 2007-04-28 23:01:08 +04:00
+++ 1.4/mysql-test/extra/rpl_tests/rpl_row_001.test 2007-04-28 23:01:08 +04:00
@@ -50,7 +50,7 @@
connection slave;
STOP SLAVE;
RESET SLAVE;
-
+--source include/change_master.inc
connection master;
let $1=5000;
# Generate 16K of relay log
--- 1.1/mysql-test/r/rpl_row_until.result 2007-04-28 23:01:08 +04:00
+++ 1.2/mysql-test/r/rpl_row_until.result 2007-04-28 23:01:08 +04:00
@@ -21,7 +21,7 @@
4
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-bin.000001 311 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000003 # master-bin.000001 # No 0 0 311 # Master master-bin.000001 311 No #
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
@@ -31,21 +31,21 @@
4
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-no-such-bin.000001 291 No #
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000003 # master-bin.000001 # No 0 0 311 # Master master-no-such-bin.000001 291 No #
+start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=728;
select * from t2;
n
1
2
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 586 # Relay slave-relay-bin.000004 728 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000003 # master-bin.000001 # No 0 0 586 # Relay slave-relay-bin.000003 728 No #
start slave;
stop slave;
start slave until master_log_file='master-bin.000001', master_log_pos=740;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 740 # Master master-bin.000001 740 No #
+# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000003 # master-bin.000001 Yes No 0 0 740 # Master master-bin.000001 740 No #
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
--- 1.9/mysql-test/t/rpl_row_create_table.test 2007-04-28 23:01:08 +04:00
+++ 1.10/mysql-test/t/rpl_row_create_table.test 2007-04-28 23:01:08 +04:00
@@ -127,6 +127,7 @@
connection slave;
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
connection master;
RESET MASTER;
connection slave;
@@ -178,7 +179,7 @@
connection slave;
STOP SLAVE;
RESET SLAVE;
-
+--source include/change_master.inc
connection master;
RESET MASTER;
--- 1.2/mysql-test/t/rpl_row_until.test 2007-04-28 23:01:08 +04:00
+++ 1.3/mysql-test/t/rpl_row_until.test 2007-04-28 23:01:08 +04:00
@@ -46,7 +46,7 @@
show slave status;
# try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=728;
sleep 2;
wait_for_slave_to_stop;
select * from t2;
--- 1.5/mysql-test/extra/rpl_tests/rpl_truncate_helper.test 2007-04-28 23:01:08 +04:00
+++ 1.6/mysql-test/extra/rpl_tests/rpl_truncate_helper.test 2007-04-28 23:01:08 +04:00
@@ -9,6 +9,8 @@
connection slave;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
+--source include/change_master.inc
+--disable_query_log
START SLAVE;
--enable_warnings
--enable_query_log
--- 1.1/mysql-test/include/master-slave-reset.inc 2007-04-28 23:01:08 +04:00
+++ 1.2/mysql-test/include/master-slave-reset.inc 2007-04-28 23:01:08 +04:00
@@ -5,6 +5,7 @@
stop slave;
--wait_for_slave_to_stop
--enable_warnings
+--enable_query_log
connection master;
--disable_warnings
--disable_query_log
@@ -14,7 +15,17 @@
--enable_warnings
reset master;
connection slave;
+--disable_warnings
reset slave;
+--enable_warnings
+--disable_query_log
+eval change master to
+ master_host = '127.0.0.1',
+ master_user = 'root',
+ master_password = '',
+ master_port = $MASTER_MYPORT,
+ master_connect_retry = 1;
+--enable_query_log
# Clean up old test tables
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
--- 1.7/mysql-test/t/rpl_truncate_7ndb.test 2007-04-28 23:01:08 +04:00
+++ 1.8/mysql-test/t/rpl_truncate_7ndb.test 2007-04-28 23:01:08 +04:00
@@ -13,6 +13,8 @@
connection slave;
DROP TABLE IF EXISTS t1;
RESET SLAVE;
+--source include/change_master.inc
+--disable_query_log
START SLAVE;
--enable_warnings
--enable_query_log
--- 1.12/mysql-test/t/rpl_trigger.test 2007-04-28 23:01:08 +04:00
+++ 1.13/mysql-test/t/rpl_trigger.test 2007-04-28 23:01:08 +04:00
@@ -303,6 +303,7 @@
connection slave;
RESET SLAVE;
+--source include/change_master.inc
START SLAVE;
SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
@@ -330,7 +331,7 @@
STOP SLAVE;
RESET SLAVE;
-
+--source include/change_master.inc
# The master should be clean.
connection master;
--- 1.47/mysql-test/extra/rpl_tests/rpl_stm_000001.test 2007-04-28 23:01:08 +04:00
+++ 1.48/mysql-test/extra/rpl_tests/rpl_stm_000001.test 2007-04-28 23:01:08 +04:00
@@ -52,7 +52,7 @@
connection slave;
stop slave;
reset slave;
-
+--source include/change_master.inc
connection master;
let $1=5000;
# Generate 16K of relay log
--- 1.42/mysql-test/extra/rpl_tests/rpl_log.test 2007-04-28 23:01:08 +04:00
+++ 1.43/mysql-test/extra/rpl_tests/rpl_log.test 2007-04-28 23:01:08 +04:00
@@ -16,6 +16,7 @@
stop slave;
reset master;
reset slave;
+--source include/change_master.inc
# We are going to read the slave's binlog which contains file_id (for some LOAD
# DATA INFILE); to make it repeatable (not influenced by other tests), we need
# to stop and start the slave, to be sure file_id will start from 1.
--- New file ---
+++ mysql-test/include/change_master.inc 07/04/28 23:00:35
--disable_query_log
eval change master to
master_host = '127.0.0.1',
master_user = 'root',
master_password = '',
master_port = $MASTER_MYPORT,
master_connect_retry = 1;
--enable_query_log
--- 1.9/mysql-test/t/rpl_ndb_bank.test 2007-04-28 23:01:08 +04:00
+++ 1.10/mysql-test/t/rpl_ndb_bank.test 2007-04-28 23:01:08 +04:00
@@ -102,6 +102,7 @@
--connection slave
STOP SLAVE;
RESET SLAVE;
+--source include/change_master.inc
# to make sure we drop any ndbcluster tables
CREATE DATABASE IF NOT EXISTS BANK;
DROP DATABASE BANK;
--- 1.6/mysql-test/t/rpl_ndb_idempotent.test 2007-04-28 23:01:08 +04:00
+++ 1.7/mysql-test/t/rpl_ndb_idempotent.test 2007-04-28 23:01:08 +04:00
@@ -81,7 +81,7 @@
--connection slave
DROP TABLE t1;
RESET slave;
-
+--source include/change_master.inc
START SLAVE;
#
| Thread |
|---|
| • bk commit into 5.1 tree (skozlov:1.2478) | Serge Kozlov | 28 Apr |