Skip to content

Commit 4a97e25

Browse files
committed
minor fixes of rpl_start_stop_slave and rpl_slave_grp_exec tests, expanding rpl_gtid_delete_domain for easier later analysis
1 parent 52dad6f commit 4a97e25

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

mysql-test/suite/rpl/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fa
1515
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
1616
rpl_row_binlog_max_cache_size : MDEV-11092
1717
rpl_row_index_choice : MDEV-11666
18-
rpl_slave_grp_exec: MDEV-10514

mysql-test/suite/rpl/r/rpl_start_stop_slave.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
55
[Time before the query]
66
[Connection ID of the slave I/O thread found]
77
kill <connection_id>;
8+
include/wait_for_slave_io_to_stop.inc
89
set @time_after_kill := (select CURRENT_TIMESTAMP);
910
[Time after the query]
1011
[Killing of the slave IO thread was successful]
1112
START SLAVE IO_THREAD;
13+
include/wait_for_slave_io_to_start.inc
1214
connection master;
1315
create table t1 (a int primary key);
1416
connection slave;

mysql-test/suite/rpl/t/rpl_gtid_delete_domain.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@ FLUSH BINARY LOGS;
5555
--let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
5656
--eval PURGE BINARY LOGS TO '$purge_to_binlog';
5757
# with final removal of the extra domain
58+
###adding to debug info to catch the failure (1076):
59+
--error 0,1076
5860
--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID=($extra_domain_id)
61+
62+
if ($mysql_errno == 1076) {
63+
--echo ### Failure "Could not delete gtid domain"
64+
--source include/show_rpl_debug_info.inc
65+
}
66+
5967
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
68+
6069
--connection slave
6170
SELECT @@global.gtid_slave_pos;
6271
# start the slave sucessfully

mysql-test/suite/rpl/t/rpl_slave_grp_exec.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ TRUNCATE t3;
100100
ALTER TABLE t1 ADD PRIMARY KEY (a);
101101
ALTER TABLE t2 ADD PRIMARY KEY (a);
102102
ALTER TABLE t3 ADD PRIMARY KEY (a);
103-
--sync_slave_with_master
103+
104+
#--sync_slave_with_master
105+
--connection slave
104106
RENAME TABLE t3 TO t3_bak;
105107

106108
--connection master
@@ -145,7 +147,7 @@ ALTER TABLE t1 ENGINE=InnoDB;
145147
ALTER TABLE t2 ENGINE=InnoDB;
146148
ALTER TABLE t3 ENGINE=InnoDB;
147149

148-
--connection slave
150+
--sync_slave_with_master
149151
RENAME TABLE t3 TO t3_bak;
150152

151153
--connection master

mysql-test/suite/rpl/t/rpl_start_stop_slave.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
3838

3939
--replace_regex /kill [0-9]*/kill <connection_id>/
4040
--eval kill $connection_id
41-
let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id;
42-
--source include/wait_condition.inc
41+
--source include/wait_for_slave_io_to_stop.inc
42+
4343
set @time_after_kill := (select CURRENT_TIMESTAMP);
4444

4545
--echo [Time after the query]
@@ -52,6 +52,7 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
5252
--echo [Killing of the slave IO thread was successful]
5353

5454
START SLAVE IO_THREAD;
55+
--source include/wait_for_slave_io_to_start.inc
5556

5657
# Ensure that the slave io thread started properly
5758
connection master;

mysys/my_error.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ void my_error(uint nr, myf MyFlags, ...)
113113
DBUG_ENTER("my_error");
114114
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
115115

116+
if (errno == 1213)
117+
DBUG_ASSERT(0);
118+
116119
if (!(format = my_get_err_msg(nr)))
117120
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
118121
else

0 commit comments

Comments
 (0)