| 1 |
# Test need anonymous user when connection are made as "zedjzlcsjhd" |
| 2 |
|
| 3 |
-- source include/master-slave.inc |
| 4 |
-- source include/force_myisam_default.inc |
| 5 |
-- source include/have_myisam.inc |
| 6 |
|
| 7 |
# Clean up old slave's binlogs. |
| 8 |
# The slave is started with --log-replica-updates |
| 9 |
# and this test does SHOW BINLOG EVENTS on the slave's |
| 10 |
# binlog. But previous tests can influence the current test's |
| 11 |
# binlog (e.g. a temporary table in the previous test has not |
| 12 |
# been explicitly deleted, or it has but the slave hasn't had |
| 13 |
# enough time to catch it before STOP SLAVE, |
| 14 |
# and at the beginning of the current |
| 15 |
# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). |
| 16 |
# We wait for the slave to have written all he wants to the binlog |
| 17 |
# (otherwise RESET MASTER may come too early). |
| 18 |
save_master_pos; |
| 19 |
connection slave; |
| 20 |
|
| 21 |
# Add suppression for expected warning(s) in slaves error log |
| 22 |
call mtr.add_suppression("Replica: Can\'t find record in \'user\' Error_code: 1032"); |
| 23 |
|
| 24 |
sync_with_master; |
| 25 |
reset master; |
| 26 |
|
| 27 |
# ################################################################## |
| 28 |
# BUG#41725: slave crashes when inserting into temporary table after |
| 29 |
# stop/start slave |
| 30 |
# |
| 31 |
# This test checks that both reported issues (assertion failure and |
| 32 |
# crash) go away. It is implemented as follows: |
| 33 |
# |
| 34 |
# case 2: crash (SIGSEV) |
| 35 |
# i) create and insert into temporary table on master (insert |
| 36 |
# produces warnings) |
| 37 |
# ii) sync slave with master |
| 38 |
# iii) stop and restart slave |
| 39 |
# iv) insert into master more values |
| 40 |
# v) sync slave with master |
| 41 |
|
| 42 |
connection master; |
| 43 |
|
| 44 |
--disable_query_log ONCE |
| 45 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 46 |
|
| 47 |
# case 2: crash on sp_rcontext::find_handler because it used |
| 48 |
# reference to invalid THD object after slave restart |
| 49 |
|
| 50 |
connection master; |
| 51 |
|
| 52 |
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam; |
| 53 |
INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; |
| 54 |
|
| 55 |
--source include/sync_slave_sql_with_master.inc |
| 56 |
|
| 57 |
# Temporary table `t1` open when stop slave is done. So we will have a warning here. |
| 58 |
# But this warning is NOT generated in RBR. So the results will be different in |
| 59 |
# SBR and RBR if we dont disable warnings here. |
| 60 |
--disable_warnings |
| 61 |
source include/stop_slave.inc; |
| 62 |
--enable_warnings |
| 63 |
|
| 64 |
source include/start_slave.inc; |
| 65 |
|
| 66 |
connection master; |
| 67 |
INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; |
| 68 |
--source include/sync_slave_sql_with_master.inc |
| 69 |
|
| 70 |
# cleanup |
| 71 |
|
| 72 |
connection master; |
| 73 |
DROP TABLE t1; |
| 74 |
--source include/sync_slave_sql_with_master.inc |
| 75 |
|
| 76 |
--let $rpl_only_running_threads= 1 |
| 77 |
--source include/rpl_end.inc |