Commit 5efbdc90 authored by unknown's avatar unknown

fix test failure


mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Remove unnecessary show master status, and replace the rest with show binlog events for checking
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  update result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  update result
parent a300bd53
......@@ -355,7 +355,6 @@ drop table t1, t2;
create temporary table tt (a int unique);
create table ti (a int) engine=innodb;
reset master;
show master status;
# action
......@@ -368,9 +367,7 @@ rollback;
# check
select count(*) from tt /* 2 */;
show master status;
--replace_column 2 # 5 #
show binlog events from 106;
source include/show_binlog_events.inc;
select count(*) from ti /* zero */;
insert into ti select * from tt;
select * from ti /* that is what slave would miss - a bug */;
......@@ -380,7 +377,6 @@ select * from ti /* that is what slave would miss - a bug */;
delete from ti;
delete from tt where a=1;
reset master;
show master status;
# action
......@@ -393,9 +389,7 @@ rollback;
# check
show master status;
--replace_column 2 # 5 #
show binlog events from 106;
source include/show_binlog_events.inc;
select count(*) from ti /* zero */;
insert into ti select * from tt;
select * from tt /* that is what otherwise slave missed - the bug */;
......@@ -439,14 +433,14 @@ reset master;
--error ER_DUP_ENTRY
insert into t2 values (bug27417(2));
show master status; /* only (!) with fixes for #23333 will show there is the query */;
source include/show_binlog_events.inc; /* only (!) with fixes for #23333 will show there is the query */;
select count(*) from t1 /* must be 3 */;
reset master;
select count(*) from t2;
delete from t2 where a=bug27417(3);
select count(*) from t2 /* nothing got deleted */;
show master status; /* the query must be in regardless of #23333 */;
source include/show_binlog_events.inc; /* the query must be in regardless of #23333 */;
select count(*) from t1 /* must be 5 */;
--enable_info
......@@ -488,7 +482,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
#
......@@ -508,7 +502,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 2 */;
#
......@@ -525,7 +519,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
update t3 set b=b+bug27417(1);
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 2 */;
## multi_update::send_eof() branch
......@@ -543,7 +537,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 4 */;
## send_error() branch of multi_update
......@@ -586,7 +580,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
--error ER_DUP_ENTRY
delete from t2;
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
# cleanup
......@@ -607,7 +601,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
delete t2.* from t2,t5 where t2.a=t5.a + 1;
# check
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
......@@ -627,7 +621,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
# check
select * from t4;
select count(*) from t1 /* must be 2 */;
show master status /* the offset must denote there is the query */;
source include/show_binlog_events.inc; /* the output must denote there is the query */;
#
# bug#23333 cleanup
......
......@@ -392,9 +392,6 @@ drop table t1, t2;
create temporary table tt (a int unique);
create table ti (a int) engine=innodb;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106
begin;
insert into ti values (1);
insert into ti values (2) ;
......@@ -405,16 +402,13 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
select count(*) from tt /* 2 */;
count(*)
2
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 515
show binlog events from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into ti values (1)
master-bin.000001 # Query 1 # use `test`; insert into ti values (2)
master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti
master-bin.000001 # Query 1 # use `test`; ROLLBACK
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; insert into ti values (1)
master-bin.000001 # Query # # use `test`; insert into ti values (2)
master-bin.000001 # Query # # use `test`; insert into tt select * from ti
master-bin.000001 # Query # # use `test`; ROLLBACK
select count(*) from ti /* zero */;
count(*)
0
......@@ -426,9 +420,6 @@ a
delete from ti;
delete from tt where a=1;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106
begin;
insert into ti values (1);
insert into ti values (2) /* to make the dup error in the following */;
......@@ -437,16 +428,13 @@ ERROR 23000: Duplicate entry '2' for key 'a'
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 589
show binlog events from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into ti values (1)
master-bin.000001 # Query 1 # use `test`; insert into ti values (2) /* to make the dup error in the following */
master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti /* one affected and error */
master-bin.000001 # Query 1 # use `test`; ROLLBACK
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; insert into ti values (1)
master-bin.000001 # Query # # use `test`; insert into ti values (2) /* to make the dup error in the following */
master-bin.000001 # Query # # use `test`; insert into tt select * from ti /* one affected and error */
master-bin.000001 # Query # # use `test`; ROLLBACK
select count(*) from ti /* zero */;
count(*)
0
......@@ -472,9 +460,11 @@ insert into t2 select bug27417(2);
reset master;
insert into t2 values (bug27417(2));
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 222
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
/* only (!) with fixes for #23333 will show there is the query */;
select count(*) from t1 /* must be 3 */;
count(*)
......@@ -487,9 +477,11 @@ delete from t2 where a=bug27417(3);
select count(*) from t2 /* nothing got deleted */;
count(*)
2
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 227
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
/* the query must be in regardless of #23333 */;
select count(*) from t1 /* must be 5 */;
count(*)
......@@ -509,9 +501,13 @@ insert into t2 values (1);
reset master;
insert into t2 values (bug27417(1));
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 371
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Intvar # # INSERT_ID=1
master-bin.000001 # Query # # use `test`; insert into t2 values (bug27417(1))
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -521,9 +517,13 @@ insert into t2 values (2);
reset master;
insert into t2 select bug27417(1) union select bug27417(2);
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 394
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Intvar # # INSERT_ID=2
master-bin.000001 # Query # # use `test`; insert into t2 select bug27417(1) union select bug27417(2)
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 2 */;
count(*)
2
......@@ -532,9 +532,11 @@ insert into t3 values (1,1),(2,3),(3,4);
reset master;
update t3 set b=b+bug27417(1);
ERROR 23000: Duplicate entry '4' for key 'b'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 226
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Intvar # # INSERT_ID=4
master-bin.000001 # Query # # use `test`; update t3 set b=b+bug27417(1)
/* the output must denote there is the query */;
select count(*) from t1 /* must be 2 */;
count(*)
2
......@@ -545,9 +547,13 @@ insert into t4 values (1,1),(2,2);
reset master;
UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */;
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 405
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Intvar # # INSERT_ID=6
master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 4 */;
count(*)
4
......@@ -573,9 +579,13 @@ insert into t3 values (bug27417(1), 2);
reset master;
delete from t2;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 350
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Intvar # # INSERT_ID=9
master-bin.000001 # Query # # use `test`; delete from t2
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -590,9 +600,12 @@ insert into t5 values (1),(2);
reset master;
delete t2.* from t2,t5 where t2.a=t5.a + 1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 350
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; delete t2.* from t2,t5 where t2.a=t5.a + 1
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 1 */;
count(*)
1
......@@ -608,9 +621,15 @@ a b
select count(*) from t1 /* must be 2 */;
count(*)
2
show master status /* the offset must denote there is the query */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 508
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Intvar # # INSERT_ID=10
master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=12
master-bin.000001 # Intvar # # INSERT_ID=10
master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t4 (a, @b) set b= @b + bug27417(2) ;file_id=1
master-bin.000001 # Query # # use `test`; ROLLBACK
/* the output must denote there is the query */;
drop trigger trg_del_t2;
drop table t1,t2,t3,t4,t5;
drop function bug27417;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment