Commit 11f38f56 authored by unknown's avatar unknown

Bug#28369 rpl test cases fail with binlog disabled

- Backport include/show_binlog_events.inc from 5.1 and use it to make
the test output consistent results


mysql-test/r/mix_innodb_myisam_binlog.result:
  Backport include/show_binlog_events.inc from 5.1 and use it to make
  the test output consistent results
mysql-test/t/mix_innodb_myisam_binlog.test:
  Backport include/show_binlog_events.inc from 5.1 and use it to make
  the test output consistent results
mysql-test/include/show_binlog_events.inc:
  New BitKeeper file ``mysql-test/include/show_binlog_events.inc''
parent ea0dbb4d
--let $binlog_start=98
--replace_column 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
--eval show binlog events from $binlog_start
......@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 347 Xid 1 # COMMIT /* xid=8 */
master-bin.000001 347 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
reset master;
......@@ -47,7 +47,7 @@ master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4)
master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 616 Xid 1 # COMMIT /* xid=25 */
master-bin.000001 616 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
reset master;
......@@ -74,7 +74,7 @@ master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6)
master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7)
master-bin.000001 703 Xid 1 # COMMIT /* xid=37 */
master-bin.000001 703 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
reset master;
......@@ -101,7 +101,7 @@ insert into t2 select * from t1;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 185 Xid 1 # COMMIT /* xid=60 */
master-bin.000001 185 Xid 1 # COMMIT /* XID */
master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1
delete from t1;
delete from t2;
......@@ -112,18 +112,18 @@ insert into t2 select * from t1;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */
master-bin.000001 186 Xid 1 # COMMIT /* XID */
master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
commit;
show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */
master-bin.000001 186 Xid 1 # COMMIT /* XID */
master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 307 Query 1 # use `test`; BEGIN
master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11)
master-bin.000001 463 Xid 1 # COMMIT /* xid=68 */
master-bin.000001 463 Xid 1 # COMMIT /* XID */
alter table t2 engine=INNODB;
delete from t1;
delete from t2;
......@@ -137,7 +137,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 348 Xid 1 # COMMIT /* xid=78 */
master-bin.000001 348 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
reset master;
......@@ -161,7 +161,7 @@ show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 254 Xid 1 # COMMIT /* xid=94 */
master-bin.000001 254 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
reset master;
......@@ -182,7 +182,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */
master-bin.000001 342 Xid 1 # COMMIT /* XID */
delete from t1;
delete from t2;
alter table t2 type=MyISAM;
......@@ -234,19 +234,19 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */
master-bin.000001 342 Xid 1 # COMMIT /* XID */
master-bin.000001 369 Query 1 # use `test`; delete from t1
master-bin.000001 446 Xid 1 # COMMIT /* xid=114 */
master-bin.000001 446 Xid 1 # COMMIT /* XID */
master-bin.000001 473 Query 1 # use `test`; delete from t2
master-bin.000001 550 Xid 1 # COMMIT /* xid=115 */
master-bin.000001 550 Xid 1 # COMMIT /* XID */
master-bin.000001 577 Query 1 # use `test`; alter table t2 type=MyISAM
master-bin.000001 666 Query 1 # use `test`; insert into t1 values (1)
master-bin.000001 754 Xid 1 # COMMIT /* xid=117 */
master-bin.000001 754 Xid 1 # COMMIT /* XID */
master-bin.000001 781 Query 1 # use `test`; insert into t2 values (20)
master-bin.000001 870 Query 1 # use `test`; drop table t1,t2
master-bin.000001 949 Query 1 # use `test`; create temporary table ti (a int) engine=innodb
master-bin.000001 1059 Query 1 # use `test`; insert into ti values(1)
master-bin.000001 1146 Xid 1 # COMMIT /* xid=132 */
master-bin.000001 1146 Xid 1 # COMMIT /* XID */
master-bin.000001 1173 Query 1 # use `test`; create temporary table t1 (a int) engine=myisam
master-bin.000001 1283 Query 1 # use `test`; insert t1 values (1)
master-bin.000001 1366 Query 1 # use `test`; create table t0 (n int)
......
......@@ -26,9 +26,7 @@ insert into t1 values(1);
insert into t2 select * from t1;
commit;
--replace_column 5 #
--replace_result "xid=14" "xid=8"
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -40,8 +38,7 @@ insert into t2 select * from t1;
# should say some changes to non-transact1onal tables couldn't be rolled back
rollback;
--replace_column 5 #
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -55,9 +52,7 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
--replace_column 5 #
--replace_result "xid=47" "xid=25"
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -73,9 +68,7 @@ insert into t1 values(7);
commit;
select a from t1 order by a; # check that savepoints work :)
--replace_column 5 #
--replace_result "xid=69" "xid=37"
show binlog events from 98;
source include/show_binlog_events.inc;
# and when ROLLBACK is not explicit?
delete from t1;
......@@ -95,8 +88,7 @@ connection con2;
# so SHOW BINLOG EVENTS may come before con1 does the loggin. To be sure that
# logging has been done, we use a user lock.
select get_lock("a",10);
--replace_column 5 #
show binlog events from 98;
source include/show_binlog_events.inc;
# and when not in a transact1on?
delete from t1;
......@@ -106,9 +98,7 @@ reset master;
insert into t1 values(9);
insert into t2 select * from t1;
--replace_column 5 #
--replace_result "xid=117" "xid=60"
show binlog events from 98;
source include/show_binlog_events.inc;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
......@@ -119,16 +109,11 @@ reset master;
insert into t1 values(10); # first make t1 non-empty
begin;
insert into t2 select * from t1;
--replace_column 5 #
--replace_result "xid=131" "xid=66"
show binlog events from 98;
source include/show_binlog_events.inc;
insert into t1 values(11);
commit;
--replace_column 5 #
--replace_result "xid=131" "xid=66" "xid=134" "xid=68"
show binlog events from 98;
source include/show_binlog_events.inc;
# Check that things work like before this BEGIN/ROLLBACK code was added,
# when t2 is INNODB
......@@ -144,9 +129,7 @@ insert into t1 values(12);
insert into t2 select * from t1;
commit;
--replace_column 5 #
--replace_result "xid=153" "xid=78"
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -157,8 +140,7 @@ insert into t1 values(13);
insert into t2 select * from t1;
rollback;
--replace_column 5 #
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -172,9 +154,7 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
--replace_column 5 #
--replace_result "xid=185" "xid=94"
show binlog events from 98;
source include/show_binlog_events.inc;
delete from t1;
delete from t2;
......@@ -190,9 +170,7 @@ insert into t1 values(18);
commit;
select a from t1 order by a; # check that savepoints work :)
--replace_column 5 #
--replace_result "xid=206" "xid=105"
show binlog events from 98;
source include/show_binlog_events.inc;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
......@@ -251,9 +229,7 @@ insert into t2 values (3);
disconnect con2;
connection con3;
select get_lock("lock1",60);
--replace_column 5 #
--replace_result "xid=206" "xid=105" "xid=224" "xid=114" "xid=227" "xid=115" "xid=231" "xid=117" "xid=258" "xid=132"
show binlog events from 98;
source include/show_binlog_events.inc;
do release_lock("lock1");
drop table t0,t2;
......
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