| 1 |
# TBF - difference in row level logging |
| 2 |
# Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing |
| 3 |
|
| 4 |
# See SHOW SLAVE STATUS displays well after RESET SLAVE (it should display the |
| 5 |
# --master-* options from mysqld, as this is what is going to be used next time |
| 6 |
# slave threads will be started). In bug 985, it displayed old values (of before |
| 7 |
# RESET SLAVE). |
| 8 |
# See if slave crashes when doing a CREATE TEMPORARY TABLE twice, separated by |
| 9 |
# RESET SLAVE. |
| 10 |
|
| 11 |
-- source include/master-slave.inc |
| 12 |
sync_slave_with_master; |
| 13 |
--disable_query_log |
| 14 |
set sql_log_bin=0; |
| 15 |
call mtr.add_suppression('Slave I/O: Get master BINLOG_CHECKSUM failed with error'); |
| 16 |
set sql_log_bin=1; |
| 17 |
--enable_query_log |
| 18 |
let $status_items= Master_User, Master_Host; |
| 19 |
source include/show_slave_status.inc; |
| 20 |
|
| 21 |
source include/stop_slave.inc; |
| 22 |
change master to master_user='test'; |
| 23 |
source include/show_slave_status.inc; |
| 24 |
|
| 25 |
--source include/reset_slave.inc |
| 26 |
source include/show_slave_status.inc; |
| 27 |
|
| 28 |
change master to master_user='root'; |
| 29 |
source include/start_slave.inc; |
| 30 |
sync_with_master; |
| 31 |
source include/show_slave_status.inc; |
| 32 |
|
| 33 |
# test of crash with temp tables & RESET SLAVE |
| 34 |
# (test to see if RESET SLAVE clears temp tables in memory and disk) |
| 35 |
source include/stop_slave.inc; |
| 36 |
--source include/reset_slave.inc |
| 37 |
source include/start_slave.inc; |
| 38 |
connection master; |
| 39 |
create temporary table t1 (a int); |
| 40 |
sync_slave_with_master; |
| 41 |
source include/stop_slave.inc; |
| 42 |
--source include/reset_slave.inc |
| 43 |
source include/start_slave.inc; |
| 44 |
sync_with_master; |
| 45 |
show status like 'slave_open_temp_tables'; |
| 46 |
connection master; |
| 47 |
drop temporary table if exists t1; |
| 48 |
sync_slave_with_master; |
| 49 |
|
| 50 |
# |
| 51 |
#Bug#34654 RESET SLAVE does not clear LAST_IO_Err* |
| 52 |
# |
| 53 |
|
| 54 |
# clearing the status |
| 55 |
source include/stop_slave.inc; |
| 56 |
--source include/reset_slave.inc |
| 57 |
source include/check_slave_no_error.inc; |
| 58 |
|
| 59 |
# |
| 60 |
# verifying start slave resets Last_IO_Error and Last_IO_Errno. |
| 61 |
# |
| 62 |
|
| 63 |
change master to master_user='impossible_user_name'; |
| 64 |
start slave; |
| 65 |
let $slave_io_errno= 1045; |
| 66 |
--source include/wait_for_slave_io_error.inc |
| 67 |
--source include/stop_slave_sql.inc |
| 68 |
|
| 69 |
change master to master_user='root'; |
| 70 |
source include/start_slave.inc; |
| 71 |
source include/check_slave_no_error.inc; |
| 72 |
|
| 73 |
# |
| 74 |
# verifying reset slave resets Last_{IO,SQL}_Err{or,no} |
| 75 |
# |
| 76 |
|
| 77 |
stop slave; |
| 78 |
change master to master_user='impossible_user_name'; |
| 79 |
start slave; |
| 80 |
let $slave_io_errno= 1045; |
| 81 |
--source include/wait_for_slave_io_error.inc |
| 82 |
--source include/stop_slave_sql.inc |
| 83 |
|
| 84 |
--source include/reset_slave.inc |
| 85 |
source include/check_slave_no_error.inc; |
| 86 |
change master to master_user='root'; |
| 87 |
|
| 88 |
|
| 89 |
# |
| 90 |
# BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796 |
| 91 |
# |
| 92 |
|
| 93 |
--source include/reset_slave.inc |
| 94 |
--source include/start_slave.inc |
| 95 |
|
| 96 |
--source include/stop_slave.inc |
| 97 |
--let $_slave_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) |
| 98 |
--let $_slave_master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1) |
| 99 |
--let $_slave_master_port= query_get_value(SHOW SLAVE STATUS, Master_Port, 1) |
| 100 |
|
| 101 |
reset slave all; |
| 102 |
set @@global.gtid_slave_pos= ""; |
| 103 |
--error ER_BAD_SLAVE |
| 104 |
start slave; |
| 105 |
|
| 106 |
--let $_show_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) |
| 107 |
if ($_show_master_host != No such row) |
| 108 |
{ |
| 109 |
die; |
| 110 |
} |
| 111 |
|
| 112 |
--replace_result $_slave_master_host MASTER_HOST $_slave_master_user MASTER_USER $_slave_master_port MASTER_PORT |
| 113 |
--eval CHANGE MASTER TO MASTER_HOST= '$_slave_master_host', MASTER_USER= '$_slave_master_user', MASTER_PORT= $_slave_master_port |
| 114 |
--source include/start_slave.inc |
| 115 |
|
| 116 |
--source include/rpl_end.inc |