Skip to content

Commit

Permalink
fix(tianmu):issue1090.test occasionally fails to run(stoneatom#1234)
Browse files Browse the repository at this point in the history
Cause of the problem:
There is a problem in the method of waiting for the master/slave synchronization to complete,
which leads to the data not being synchronized, and then proceed to the next step

Modify scheme:
Use the correct method to determine whether the slave database is synchronized
  • Loading branch information
konghaiya committed Mar 7, 2023
1 parent d0aeebe commit e0bd7cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions mysql-test/suite/tianmu/r/issue1090.result
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ t_issue1090 CREATE TABLE `t_issue1090` (
`c3` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
[on slave]
include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
Variable_name Value
sql_mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Expand Down Expand Up @@ -98,6 +99,7 @@ t_issue1090_2 CREATE TABLE `t_issue1090_2` (
`c3` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
[on slave]
include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
Variable_name Value
sql_mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU
Expand Down Expand Up @@ -155,6 +157,7 @@ t_issue1090_3 CREATE TABLE `t_issue1090_3` (
`c3` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
[on slave]
include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
Variable_name Value
sql_mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Expand Down Expand Up @@ -210,6 +213,7 @@ t_issue1090_4 CREATE TABLE `t_issue1090_4` (
`c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
[on slave]
include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
Variable_name Value
sql_mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,MANDATORY_TIANMU
Expand Down
12 changes: 4 additions & 8 deletions mysql-test/suite/tianmu/t/issue1090.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ connection master;
alter table t_issue1090 add c3 int;
show create table t_issue1090;
--echo [on slave]
connection slave;
sleep 1;
--source include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
show global variables like '%_engine';
show create table t_issue1090;
Expand Down Expand Up @@ -61,8 +60,7 @@ connection master;
alter table t_issue1090_2 add c3 int;
show create table t_issue1090_2;
--echo [on slave]
connection slave;
sleep 1;
--source include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
show global variables like '%_engine';
show create table t_issue1090_2;
Expand Down Expand Up @@ -94,8 +92,7 @@ connection master;
alter table t_issue1090_3 add c3 int;
show create table t_issue1090_3;
--echo [on slave]
connection slave;
sleep 1;
--source include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
show global variables like '%_engine';
show create table t_issue1090_3;
Expand Down Expand Up @@ -129,8 +126,7 @@ connection master;
alter table t_issue1090_4 DROP COLUMN c2;
show create table t_issue1090_4;
--echo [on slave]
connection slave;
sleep 1;
--source include/sync_slave_sql_with_master.inc
show global variables like 'sql_mode';
show global variables like '%_engine';
show create table t_issue1090_4;
Expand Down

0 comments on commit e0bd7cf

Please sign in to comment.