diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-04-28 14:52:24 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-04-28 14:52:24 +0200 |
commit | b1e00b6be81c80b09d11085d77d86978e26df988 (patch) | |
tree | bb1fdd7363fbf2580572ac9a56dbd4c933cc4c0d /mysql-test/extra | |
parent | 1f683a7270e63abfadce20c6f51370621ff065e1 (diff) | |
parent | c9cfd2df5f2f58c2cdf716999ebea252c307333f (diff) | |
download | mariadb-git-b1e00b6be81c80b09d11085d77d86978e26df988.tar.gz |
Merge MySQL 5.1.46 into MariaDB.
Still two test failures to be solved: main.myisam and main.subselect.
Diffstat (limited to 'mysql-test/extra')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test | 53 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_loaddata.test | 13 |
2 files changed, 57 insertions, 9 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test index 89c136d8893..c392686454d 100644 --- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test +++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test @@ -3,26 +3,53 @@ # The common part of the "rpl_get_master_version_and_clock" test. # Restart slave under network disconnection between slave and master # following the steps: -# 1 - Got DBUG_SYNC_POINT lock -# 2 - Set DBUG_SYNC_POINT before call mysql_real_query(...) function in get_master_version_and_clock(...) function and hang here -# 3 - shutdown master server for simulating network disconnection -# 4 - Release DBUG_SYNC_POINT lock -# 5 - Check if the slave I/O thread tries to reconnect to master. +# 0 - Set DEBUG_SYNC_ACTION to wait +# before call mysql_real_query(...) function in get_master_version_and_clock(...) +# function and hang here +# 1 - activate a sync-point through the $dbug_sync_point argument of the test +# 2 - shutdown master server for simulating network disconnection +# 3 - signal to the IO thread through $debug_sync_action to unhold from the sync-point +# 4 - check if the slave I/O thread tries to reconnect to master. # -# Note: Please make sure initialize the $debug_lock when call the test script. +# Note: make sure to initialize the $debug_sync_action and $dbug_sync_point +# before calling the test script. # +# Pattern of usage: +# +# The caller test supplies the DBUG_EXECUTE_IF name +# +# let $dbug_sync_point = 'dbug_execute_if_name'; +# +# as well as the action list for DEBUG_SYNC +# +# let $debug_sync_action= 'now signal signal_name'; +# +# The $dbug_sync_point becomes the value of @@global.debug generating +# a newly started IO-slave thread's session value. +# Notice incremental operations to add and remove dbug_execute_if_name +# from the global variable allows propagation more dbug arguments +# out of mtr. +# The action list is to fire at proper time according to test logics +# (see pp 0-4 above). +# + connection slave; -if (`SELECT '$debug_lock' = ''`) +if (`SELECT $debug_sync_action = ''`) { - --die Cannot continue. Please set value for $debug_lock. + --die Cannot continue. Please set value for debug_sync_action. } # Restart slave --disable_warnings stop slave; source include/wait_for_slave_to_stop.inc; + +eval SET @@global.debug= "+d,$dbug_sync_point"; + start slave; source include/wait_for_slave_to_start.inc; +--echo slave is going to hang in get_master_version_and_clock + connection master; # Write file to make mysql-test-run.pl expect the "crash", but don't start # it until it's told to @@ -35,7 +62,9 @@ EOF shutdown_server 10; connection slave; -eval SELECT RELEASE_LOCK($debug_lock); +--echo slave is unblocked + +eval SET DEBUG_SYNC=$debug_sync_action; # Show slave last IO errno connection slave; @@ -53,6 +82,12 @@ if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST --echo NETWORK ERROR } +# deactivate the sync point of get_master_version_and_clock() +# now to avoid restarting IO-thread to re-enter it. +# There will be a new IO thread forked out with its @@session.debug +# unset. +eval set @@global.debug = "-d,$dbug_sync_point"; + # Write file to make mysql-test-run.pl start up the server again --append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 3f3c3624fa6..1ae17398596 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -219,6 +219,19 @@ connect (conn2,localhost,root,,*NO-ONE*); -- echo ### assertion: works without stating the default database -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1 + +# We cannot disconnect right away because when inserting +# concurrently in a MyISAM table, the server is sending an OK +# to the client before updating the table state (where the +# number of records is kept). See: BUG#37521 and BUG#29334. +# So we need to wait, otherwise we would be having sporadic +# failures as reported here: BUG#50451. + +# 12 = 3 rows per each LOAD DATA executed x 4 +-- let $count= 12 +-- let $table= $db1.t1 +--source include/wait_until_rows_count.inc + -- echo ### disconnect and switch back to master connection -- disconnect conn2 -- connection master |