mariadb/mysql-test/include/test_fieldsize.inc
Luis Soares ca151daf85 Bug #30703 SHOW STATUS LIKE 'Slave_running' is not compatible with `SHOW SLAVE
STATUS'
      
NOTE: this is the backport to next-mr.
            
SHOW SHOW STATUS LIKE 'Slave_running' command believes that
if active_mi->slave_running != 0, then io thread is running normally.
But it isn't so in fact. When some errors happen to make io thread
try to reconnect master, then it will become transitional status
(MYSQL_SLAVE_RUN_NOT_CONNECT == 1), which also doesn't equal 0.
Yet, "SHOW SLAVE STATUS" believes that only if
active_mi->slave_running == MYSQL_SLAVE_RUN_CONNECT, then io thread is running.
So "SHOW SLAVE STATUS" can get the correct result.
            
            
Fixed to make SHOW SHOW STATUS LIKE 'Slave_running' command have the same
check condition with "SHOW SLAVE STATUS". It only believe that the io thread
is running when active_mi->slave_running == MYSQL_SLAVE_RUN_CONNECT.
2009-09-29 15:10:37 +01:00

40 lines
786 B
PHP

#
# include/test_fieldsize.inc
#
# This include file is designed to create a table with one column
# whose size on the master is greater than that on the slave. The
# test should fail with an error on the slave.
#
connection master;
DROP TABLE IF EXISTS t1;
sync_slave_with_master;
STOP SLAVE;
RESET SLAVE;
eval $test_table_slave;
connection master;
eval $test_table_master;
RESET MASTER;
eval $test_insert;
connection slave;
START SLAVE;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
--query_vertical SHOW SLAVE STATUS
# The following should be 0
SELECT COUNT(*) FROM t1;
STOP SLAVE;
RESET SLAVE;
connection master;
RESET MASTER;
connection slave;
START SLAVE;