mirror of
https://github.com/MariaDB/server.git
synced 2025-02-20 20:33:15 +01:00
BUG#22583 (RBR between MyISAM and non-MyISAM tables does not work):
Post-merge fixes.
This commit is contained in:
parent
3306196a7a
commit
844131937f
16 changed files with 135 additions and 121 deletions
mysql-test
extra/binlog_tests
binlog.testbinlog_insert_delayed.testctype_cp932_binlog.testctype_ucs_binlog.testmix_innodb_myisam_binlog.test
r
binlog_row_binlog.resultbinlog_row_ctype_ucs.resultbinlog_row_insert_select.resultbinlog_row_mix_innodb_myisam.resultctype_cp932_binlog_row.resultflush_block_commit_notembedded.resultrpl_row_create_table.resultrpl_row_delayed_ins.result
t
sql
|
@ -22,7 +22,7 @@ commit;
|
||||||
# first COMMIT must be Query_log_event, second - Xid_log_event
|
# first COMMIT must be Query_log_event, second - Xid_log_event
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -44,10 +44,10 @@ commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events in 'master-bin.000001' from 102;
|
show binlog events in 'master-bin.000001' from 105;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events in 'master-bin.000002' from 102;
|
show binlog events in 'master-bin.000002' from 105;
|
||||||
|
|
||||||
# Test of a too big SET INSERT_ID: see if the truncated value goes
|
# Test of a too big SET INSERT_ID: see if the truncated value goes
|
||||||
# into binlog (right), or the too big value (wrong); we look at the
|
# into binlog (right), or the too big value (wrong); we look at the
|
||||||
|
@ -69,7 +69,7 @@ create table if not exists t3 like tt1;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
drop table t1,t2,t3,tt1;
|
drop table t1,t2,t3,tt1;
|
||||||
|
|
||||||
-- source extra/binlog_tests/binlog_insert_delayed.test
|
-- source extra/binlog_tests/binlog_insert_delayed.test
|
||||||
|
|
|
@ -25,7 +25,7 @@ inc $count;
|
||||||
# the way
|
# the way
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
insert delayed into t1 values (null),(null),(null),(null);
|
insert delayed into t1 values (null),(null),(null),(null);
|
||||||
inc $count; inc $count; inc $count; inc $count;
|
inc $count; inc $count; inc $count; inc $count;
|
||||||
|
|
|
@ -28,7 +28,7 @@ SET @var1= x'8300';
|
||||||
EXECUTE stmt1 USING @var1;
|
EXECUTE stmt1 USING @var1;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 102;
|
SHOW BINLOG EVENTS FROM 105;
|
||||||
SELECT HEX(f1) FROM t1;
|
SELECT HEX(f1) FROM t1;
|
||||||
DROP table t1;
|
DROP table t1;
|
||||||
# end test for bug#11338
|
# end test for bug#11338
|
||||||
|
|
|
@ -10,7 +10,7 @@ set @v=convert('abc' using ucs2);
|
||||||
reset master;
|
reset master;
|
||||||
insert into t2 values (@v);
|
insert into t2 values (@v);
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
||||||
# absolutely need variables names to be quoted and strings to be
|
# absolutely need variables names to be quoted and strings to be
|
||||||
# escaped).
|
# escaped).
|
||||||
|
|
|
@ -31,7 +31,7 @@ commit;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -45,7 +45,7 @@ rollback;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -61,7 +61,7 @@ commit;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -79,7 +79,7 @@ select a from t1 order by a; # check that savepoints work :)
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
# and when ROLLBACK is not explicit?
|
# and when ROLLBACK is not explicit?
|
||||||
delete from t1;
|
delete from t1;
|
||||||
|
@ -101,7 +101,7 @@ connection con2;
|
||||||
select get_lock("a",10);
|
select get_lock("a",10);
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
# and when not in a transact1on?
|
# and when not in a transact1on?
|
||||||
delete from t1;
|
delete from t1;
|
||||||
|
@ -113,7 +113,7 @@ insert into t2 select * from t1;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
# Check that when the query updat1ng the MyISAM table is the first in the
|
# Check that when the query updat1ng the MyISAM table is the first in the
|
||||||
# transaction, we log it immediately.
|
# transaction, we log it immediately.
|
||||||
|
@ -126,13 +126,13 @@ begin;
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
insert into t1 values(11);
|
insert into t1 values(11);
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
|
|
||||||
# Check that things work like before this BEGIN/ROLLBACK code was added,
|
# Check that things work like before this BEGIN/ROLLBACK code was added,
|
||||||
|
@ -151,7 +151,7 @@ commit;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -164,7 +164,7 @@ rollback;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -180,7 +180,7 @@ commit;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -198,7 +198,7 @@ select a from t1 order by a; # check that savepoints work :)
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
# Test for BUG#5714, where a MyISAM update in the transaction used to
|
# Test for BUG#5714, where a MyISAM update in the transaction used to
|
||||||
# release row-level locks in InnoDB
|
# release row-level locks in InnoDB
|
||||||
|
@ -259,7 +259,7 @@ connection con3;
|
||||||
select get_lock("lock1",60);
|
select get_lock("lock1",60);
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
do release_lock("lock1");
|
do release_lock("lock1");
|
||||||
drop table t0,t2;
|
drop table t0,t2;
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ SELECT * from t2;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
--replace_column 2 # 5 #
|
--replace_column 2 # 5 #
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
|
|
||||||
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
|
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
|
||||||
# binlog). Has to be here and not earlier, as the SELECTs influence
|
# binlog). Has to be here and not earlier, as the SELECTs influence
|
||||||
|
|
|
@ -8,7 +8,7 @@ commit;
|
||||||
begin;
|
begin;
|
||||||
insert t2 values (5);
|
insert t2 values (5);
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
|
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
|
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
|
||||||
|
@ -26,7 +26,7 @@ create table t1 (n int) engine=innodb;
|
||||||
begin;
|
begin;
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
show binlog events in 'master-bin.000001' from 102;
|
show binlog events in 'master-bin.000001' from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
|
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
|
||||||
master-bin.000001 # Query 1 # use `test`; BEGIN
|
master-bin.000001 # Query 1 # use `test`; BEGIN
|
||||||
|
@ -232,7 +232,7 @@ master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Xid 1 # COMMIT /* xid= */
|
master-bin.000001 # Xid 1 # COMMIT /* xid= */
|
||||||
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
|
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
|
||||||
show binlog events in 'master-bin.000002' from 102;
|
show binlog events in 'master-bin.000002' from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000002 # Query 1 # use `test`; drop table t1
|
master-bin.000002 # Query 1 # use `test`; drop table t1
|
||||||
reset master;
|
reset master;
|
||||||
|
@ -249,7 +249,7 @@ create table t1 (a int);
|
||||||
create table if not exists t2 select * from t1;
|
create table if not exists t2 select * from t1;
|
||||||
create temporary table tt1 (a int);
|
create temporary table tt1 (a int);
|
||||||
create table if not exists t3 like tt1;
|
create table if not exists t3 like tt1;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -268,7 +268,7 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||||
insert delayed into t1 values (207);
|
insert delayed into t1 values (207);
|
||||||
insert delayed into t1 values (null);
|
insert delayed into t1 values (null);
|
||||||
insert delayed into t1 values (300);
|
insert delayed into t1 values (300);
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
|
|
@ -3,10 +3,10 @@ create table t2 (c char(30)) charset=ucs2;
|
||||||
set @v=convert('abc' using ucs2);
|
set @v=convert('abc' using ucs2);
|
||||||
reset master;
|
reset master;
|
||||||
insert into t2 values (@v);
|
insert into t2 values (@v);
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 102 Table_map 1 141 table_id: # (test.t2)
|
master-bin.000001 105 Table_map 1 144 table_id: # (test.t2)
|
||||||
master-bin.000001 141 Write_rows 1 231 table_id: # flags: STMT_END_F
|
master-bin.000001 144 Write_rows 1 234 table_id: # flags: STMT_END_F
|
||||||
flush logs;
|
flush logs;
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||||
|
|
|
@ -8,9 +8,9 @@ insert into t1 select * from t2;
|
||||||
ERROR 23000: Duplicate entry '2' for key 'a'
|
ERROR 23000: Duplicate entry '2' for key 'a'
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
|
||||||
master-bin.000001 102 Table_map 1 141 table_id: # (test.t1)
|
master-bin.000001 105 Table_map 1 144 table_id: # (test.t1)
|
||||||
master-bin.000001 141 Write_rows 1 175 table_id: # flags: STMT_END_F
|
master-bin.000001 144 Write_rows 1 178 table_id: # flags: STMT_END_F
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
|
@ -23,5 +23,5 @@ create table t2(unique(a)) select a from t1;
|
||||||
ERROR 23000: Duplicate entry '1' for key 'a'
|
ERROR 23000: Duplicate entry '1' for key 'a'
|
||||||
show binlog events;
|
show binlog events;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
|
@ -6,7 +6,7 @@ begin;
|
||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -23,7 +23,7 @@ insert into t2 select * from t1;
|
||||||
rollback;
|
rollback;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -43,7 +43,7 @@ rollback to savepoint my_savepoint;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -72,7 +72,7 @@ select a from t1 order by a;
|
||||||
a
|
a
|
||||||
5
|
5
|
||||||
7
|
7
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -98,7 +98,7 @@ insert into t2 select * from t1;
|
||||||
select get_lock("a",10);
|
select get_lock("a",10);
|
||||||
get_lock("a",10)
|
get_lock("a",10)
|
||||||
1
|
1
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -111,7 +111,7 @@ delete from t2;
|
||||||
reset master;
|
reset master;
|
||||||
insert into t1 values(9);
|
insert into t1 values(9);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
|
@ -124,7 +124,7 @@ reset master;
|
||||||
insert into t1 values(10);
|
insert into t1 values(10);
|
||||||
begin;
|
begin;
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
|
@ -133,7 +133,7 @@ master-bin.000001 # Table_map 1 # table_id: # (test.t2)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
insert into t1 values(11);
|
insert into t1 values(11);
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
|
@ -152,7 +152,7 @@ begin;
|
||||||
insert into t1 values(12);
|
insert into t1 values(12);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -167,7 +167,7 @@ begin;
|
||||||
insert into t1 values(13);
|
insert into t1 values(13);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
rollback;
|
rollback;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
|
@ -179,7 +179,7 @@ insert into t1 values(15);
|
||||||
insert into t2 select * from t1;
|
insert into t2 select * from t1;
|
||||||
rollback to savepoint my_savepoint;
|
rollback to savepoint my_savepoint;
|
||||||
commit;
|
commit;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -200,7 +200,7 @@ select a from t1 order by a;
|
||||||
a
|
a
|
||||||
16
|
16
|
||||||
18
|
18
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -252,7 +252,7 @@ insert into t2 values (3);
|
||||||
select get_lock("lock1",60);
|
select get_lock("lock1",60);
|
||||||
get_lock("lock1",60)
|
get_lock("lock1",60)
|
||||||
1
|
1
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
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`; BEGIN
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
@ -355,7 +355,7 @@ SELECT * from t2;
|
||||||
a b
|
a b
|
||||||
100 100
|
100 100
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
show binlog events from 102;
|
show binlog events from 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||||
|
|
|
@ -6,7 +6,7 @@ CREATE TABLE t1(f1 blob);
|
||||||
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
||||||
SET @var1= x'8300';
|
SET @var1= x'8300';
|
||||||
EXECUTE stmt1 USING @var1;
|
EXECUTE stmt1 USING @var1;
|
||||||
SHOW BINLOG EVENTS FROM 102;
|
SHOW BINLOG EVENTS FROM 105;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
|
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
|
||||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||||
|
|
|
@ -5,11 +5,11 @@ insert t1 values (1);
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 102
|
master-bin.000001 105
|
||||||
commit;
|
commit;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 102
|
master-bin.000001 105
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set autocommit=1;
|
set autocommit=1;
|
||||||
|
|
|
@ -13,25 +13,25 @@ Log_name #
|
||||||
Pos 215
|
Pos 215
|
||||||
Event_type Query
|
Event_type Query
|
||||||
Server_id #
|
Server_id #
|
||||||
End_log_pos #
|
End_log_pos 308
|
||||||
Info use `test`; CREATE TABLE t1 (a INT, b INT)
|
Info use `test`; CREATE TABLE t1 (a INT, b INT)
|
||||||
Log_name #
|
Log_name #
|
||||||
Pos 308
|
Pos 308
|
||||||
Event_type Query
|
Event_type Query
|
||||||
Server_id #
|
Server_id #
|
||||||
End_log_pos #
|
End_log_pos 414
|
||||||
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
|
Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
|
||||||
Log_name #
|
Log_name #
|
||||||
Pos 414
|
Pos 414
|
||||||
Event_type Query
|
Event_type Query
|
||||||
Server_id #
|
Server_id #
|
||||||
End_log_pos #
|
End_log_pos 520
|
||||||
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
|
Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
|
||||||
Log_name #
|
Log_name #
|
||||||
Pos 520
|
Pos 520
|
||||||
Event_type Query
|
Event_type Query
|
||||||
Server_id #
|
Server_id #
|
||||||
End_log_pos #
|
End_log_pos 639
|
||||||
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
|
Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
|
||||||
**** On Master ****
|
**** On Master ****
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
|
@ -127,7 +127,7 @@ NULL 5 10
|
||||||
NULL 6 12
|
NULL 6 12
|
||||||
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||||
ERROR 23000: Duplicate entry '2' for key 'b'
|
ERROR 23000: Duplicate entry '2' for key 'b'
|
||||||
SHOW BINLOG EVENTS FROM 959;
|
SHOW BINLOG EVENTS FROM 1097;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||||
INSERT INTO t7 SELECT a,b FROM tt3;
|
INSERT INTO t7 SELECT a,b FROM tt3;
|
||||||
|
@ -139,9 +139,9 @@ a b
|
||||||
3 6
|
3 6
|
||||||
SHOW BINLOG EVENTS FROM 1097;
|
SHOW BINLOG EVENTS FROM 1097;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 1097 Query 1 1197 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
# 1097 Query # 1197 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||||
master-bin.000001 1197 Table_map 1 1237 table_id: # (test.t7)
|
# 1197 Table_map # 1237 table_id: # (test.t7)
|
||||||
master-bin.000001 1237 Write_rows 1 1293 table_id: # flags: STMT_END_F
|
# 1237 Write_rows # 1293 table_id: # flags: STMT_END_F
|
||||||
SELECT * FROM t7 ORDER BY a,b;
|
SELECT * FROM t7 ORDER BY a,b;
|
||||||
a b
|
a b
|
||||||
1 2
|
1 2
|
||||||
|
@ -156,8 +156,8 @@ Warnings:
|
||||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||||
SHOW BINLOG EVENTS FROM 1293;
|
SHOW BINLOG EVENTS FROM 1293;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 1293 Table_map 1 1333 table_id: # (test.t7)
|
# 1293 Table_map # 1333 table_id: # (test.t7)
|
||||||
master-bin.000001 1333 Write_rows 1 1389 table_id: # flags: STMT_END_F
|
# 1333 Write_rows # 1389 table_id: # flags: STMT_END_F
|
||||||
SELECT * FROM t7 ORDER BY a,b;
|
SELECT * FROM t7 ORDER BY a,b;
|
||||||
a b
|
a b
|
||||||
1 2
|
1 2
|
||||||
|
@ -194,8 +194,8 @@ Create Table CREATE TABLE `t9` (
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
SHOW BINLOG EVENTS FROM 1389;
|
SHOW BINLOG EVENTS FROM 1389;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 1389 Query 1 1475 use `test`; CREATE TABLE t8 LIKE t4
|
# 1389 Query # 1475 use `test`; CREATE TABLE t8 LIKE t4
|
||||||
master-bin.000001 1475 Query 1 1614 use `test`; CREATE TABLE `t9` (
|
# 1475 Query # 1614 use `test`; CREATE TABLE `t9` (
|
||||||
`a` int(11) DEFAULT NULL,
|
`a` int(11) DEFAULT NULL,
|
||||||
`b` int(11) DEFAULT NULL
|
`b` int(11) DEFAULT NULL
|
||||||
)
|
)
|
||||||
|
@ -274,33 +274,33 @@ a
|
||||||
3
|
3
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
|
# 4 Format_desc # 105 Server ver: #, Binlog ver: #
|
||||||
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
|
# 105 Query # 191 use `test`; CREATE TABLE t1 (a INT)
|
||||||
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
|
# 191 Table_map # 230 table_id: # (test.t1)
|
||||||
master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
|
# 230 Write_rows # 274 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 271 Query 1 339 use `test`; BEGIN
|
# 274 Query # 342 use `test`; BEGIN
|
||||||
master-bin.000001 339 Query 1 125 use `test`; CREATE TABLE `t2` (
|
# 342 Query # 125 use `test`; CREATE TABLE `t2` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB
|
) ENGINE=InnoDB
|
||||||
master-bin.000001 464 Table_map 1 164 table_id: # (test.t2)
|
# 467 Table_map # 164 table_id: # (test.t2)
|
||||||
master-bin.000001 503 Write_rows 1 208 table_id: # flags: STMT_END_F
|
# 506 Write_rows # 208 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 547 Xid 1 574 COMMIT /* XID */
|
# 550 Xid # 577 COMMIT /* XID */
|
||||||
master-bin.000001 574 Query 1 642 use `test`; BEGIN
|
# 577 Query # 645 use `test`; BEGIN
|
||||||
master-bin.000001 642 Query 1 125 use `test`; CREATE TABLE `t3` (
|
# 645 Query # 125 use `test`; CREATE TABLE `t3` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB
|
) ENGINE=InnoDB
|
||||||
master-bin.000001 767 Table_map 1 164 table_id: # (test.t3)
|
# 770 Table_map # 164 table_id: # (test.t3)
|
||||||
master-bin.000001 806 Write_rows 1 208 table_id: # flags: STMT_END_F
|
# 809 Write_rows # 208 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 850 Xid 1 877 COMMIT /* XID */
|
# 853 Xid # 880 COMMIT /* XID */
|
||||||
master-bin.000001 877 Query 1 945 use `test`; BEGIN
|
# 880 Query # 948 use `test`; BEGIN
|
||||||
master-bin.000001 945 Query 1 125 use `test`; CREATE TABLE `t4` (
|
# 948 Query # 125 use `test`; CREATE TABLE `t4` (
|
||||||
`a` int(11) DEFAULT NULL
|
`a` int(11) DEFAULT NULL
|
||||||
) ENGINE=InnoDB
|
) ENGINE=InnoDB
|
||||||
master-bin.000001 1070 Table_map 1 164 table_id: # (test.t4)
|
# 1073 Table_map # 164 table_id: # (test.t4)
|
||||||
master-bin.000001 1109 Write_rows 1 208 table_id: # flags: STMT_END_F
|
# 1112 Write_rows # 208 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 1153 Xid 1 1180 COMMIT /* XID */
|
# 1156 Xid # 1183 COMMIT /* XID */
|
||||||
master-bin.000001 1180 Table_map 1 1219 table_id: # (test.t1)
|
# 1183 Table_map # 1222 table_id: # (test.t1)
|
||||||
master-bin.000001 1219 Write_rows 1 1263 table_id: # flags: STMT_END_F
|
# 1222 Write_rows # 1266 table_id: # flags: STMT_END_F
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t1
|
t1
|
||||||
|
@ -365,17 +365,17 @@ a
|
||||||
9
|
9
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
|
# 4 Format_desc # 105 Server ver: #, Binlog ver: #
|
||||||
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
|
# 105 Query # 191 use `test`; CREATE TABLE t1 (a INT)
|
||||||
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
|
# 191 Table_map # 230 table_id: # (test.t1)
|
||||||
master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
|
# 230 Write_rows # 274 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 271 Query 1 371 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
|
# 274 Query # 374 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
|
||||||
master-bin.000001 371 Query 1 439 use `test`; BEGIN
|
# 374 Query # 442 use `test`; BEGIN
|
||||||
master-bin.000001 439 Table_map 1 39 table_id: # (test.t2)
|
# 442 Table_map # 39 table_id: # (test.t2)
|
||||||
master-bin.000001 478 Write_rows 1 83 table_id: # flags: STMT_END_F
|
# 481 Write_rows # 83 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 522 Table_map 1 122 table_id: # (test.t2)
|
# 525 Table_map # 122 table_id: # (test.t2)
|
||||||
master-bin.000001 561 Write_rows 1 161 table_id: # flags: STMT_END_F
|
# 564 Write_rows # 161 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 600 Xid 1 627 COMMIT /* XID */
|
# 603 Xid # 630 COMMIT /* XID */
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
|
@ -394,10 +394,10 @@ INSERT INTO t2 SELECT a+2 FROM tt2;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
a
|
a
|
||||||
SHOW BINLOG EVENTS FROM 627;
|
SHOW BINLOG EVENTS FROM 630;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 627 Query 1 80 use `test`; TRUNCATE TABLE t2
|
# 630 Query # 80 use `test`; TRUNCATE TABLE t2
|
||||||
master-bin.000001 707 Xid 1 734 COMMIT /* XID */
|
# 710 Xid # 737 COMMIT /* XID */
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
a
|
a
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
|
|
@ -5,7 +5,9 @@ reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
create table t1(a int not null primary key) engine=myisam;
|
create table t1(a int not null primary key) engine=myisam;
|
||||||
insert delayed into t1 values (1),(2),(3);
|
insert delayed into t1 values (1);
|
||||||
|
insert delayed into t1 values (2);
|
||||||
|
insert delayed into t1 values (3);
|
||||||
flush tables;
|
flush tables;
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
a
|
a
|
||||||
|
@ -19,8 +21,10 @@ master-bin.000001 105 Query 1 225 use `test`; create table t1(a int not null pri
|
||||||
master-bin.000001 225 Table_map 1 264 table_id: # (test.t1)
|
master-bin.000001 225 Table_map 1 264 table_id: # (test.t1)
|
||||||
master-bin.000001 264 Write_rows 1 298 table_id: # flags: STMT_END_F
|
master-bin.000001 264 Write_rows 1 298 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 298 Table_map 1 337 table_id: # (test.t1)
|
master-bin.000001 298 Table_map 1 337 table_id: # (test.t1)
|
||||||
master-bin.000001 337 Write_rows 1 376 table_id: # flags: STMT_END_F
|
master-bin.000001 337 Write_rows 1 371 table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 376 Query 1 451 use `test`; flush tables
|
master-bin.000001 371 Table_map 1 410 table_id: # (test.t1)
|
||||||
|
master-bin.000001 410 Write_rows 1 444 table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 444 Query 1 519 use `test`; flush tables
|
||||||
SELECT * FROM t1 ORDER BY a;
|
SELECT * FROM t1 ORDER BY a;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
|
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
|
||||||
# and does not make slave to stop)
|
# and does not make slave to stop)
|
||||||
flush logs;
|
flush logs;
|
||||||
--exec $MYSQL_BINLOG --start-position=516 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
|
--exec $MYSQL_BINLOG --start-position=519 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
eval select
|
eval select
|
||||||
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
|
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
|
||||||
|
|
|
@ -34,7 +34,7 @@ CREATE TABLE t1 (a INT, b INT);
|
||||||
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
|
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
|
||||||
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
|
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
|
||||||
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
|
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
|
||||||
--replace_column 1 # 4 # 5 #
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||||
--query_vertical SHOW BINLOG EVENTS FROM 215
|
--query_vertical SHOW BINLOG EVENTS FROM 215
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
|
@ -70,8 +70,9 @@ connection master;
|
||||||
--error 1062
|
--error 1062
|
||||||
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||||
# Shouldn't be written to the binary log
|
# Shouldn't be written to the binary log
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 959;
|
SHOW BINLOG EVENTS FROM 1097;
|
||||||
|
|
||||||
# Test that INSERT-SELECT works the same way as for SBR.
|
# Test that INSERT-SELECT works the same way as for SBR.
|
||||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||||
|
@ -79,6 +80,7 @@ CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||||
INSERT INTO t7 SELECT a,b FROM tt3;
|
INSERT INTO t7 SELECT a,b FROM tt3;
|
||||||
SELECT * FROM t7 ORDER BY a,b;
|
SELECT * FROM t7 ORDER BY a,b;
|
||||||
# Should be written to the binary log
|
# Should be written to the binary log
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 1097;
|
SHOW BINLOG EVENTS FROM 1097;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -90,6 +92,7 @@ INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
|
||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO t7 SELECT a,b FROM tt4;
|
INSERT INTO t7 SELECT a,b FROM tt4;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 1293;
|
SHOW BINLOG EVENTS FROM 1293;
|
||||||
SELECT * FROM t7 ORDER BY a,b;
|
SELECT * FROM t7 ORDER BY a,b;
|
||||||
|
@ -105,6 +108,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
--query_vertical SHOW CREATE TABLE t8
|
--query_vertical SHOW CREATE TABLE t8
|
||||||
--query_vertical SHOW CREATE TABLE t9
|
--query_vertical SHOW CREATE TABLE t9
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 1389;
|
SHOW BINLOG EVENTS FROM 1389;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -156,6 +160,7 @@ SELECT * FROM t1 ORDER BY a;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
SELECT * FROM t3 ORDER BY a;
|
SELECT * FROM t3 ORDER BY a;
|
||||||
SELECT * FROM t4 ORDER BY a;
|
SELECT * FROM t4 ORDER BY a;
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -201,6 +206,7 @@ INSERT INTO t2 SELECT a+2 FROM tt1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -219,8 +225,9 @@ INSERT INTO t2 SELECT a+2 FROM tt2;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
|
--replace_column 1 # 4 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS FROM 627;
|
SHOW BINLOG EVENTS FROM 630;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
|
|
||||||
|
|
|
@ -5601,8 +5601,7 @@ unpack_row(RELAY_LOG_INFO *rli,
|
||||||
MY_BITMAP* const rw_set, Log_event_type const event_type)
|
MY_BITMAP* const rw_set, Log_event_type const event_type)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("unpack_row");
|
DBUG_ENTER("unpack_row");
|
||||||
DBUG_ASSERT(record && row_data);
|
DBUG_ASSERT(row_data);
|
||||||
my_ptrdiff_t const offset= record - (byte*) table->record[0];
|
|
||||||
my_size_t const master_null_byte_count= (bitmap_bits_set(cols) + 7) / 8;
|
my_size_t const master_null_byte_count= (bitmap_bits_set(cols) + 7) / 8;
|
||||||
int error= 0;
|
int error= 0;
|
||||||
|
|
||||||
|
@ -5611,7 +5610,7 @@ unpack_row(RELAY_LOG_INFO *rli,
|
||||||
|
|
||||||
bitmap_clear_all(rw_set);
|
bitmap_clear_all(rw_set);
|
||||||
|
|
||||||
memcpy(record, table->s->default_values, table->s->null_bytes);
|
memcpy(table->record[0], table->s->default_values, table->s->null_bytes);
|
||||||
|
|
||||||
Field **const begin_ptr = table->field;
|
Field **const begin_ptr = table->field;
|
||||||
Field **field_ptr;
|
Field **field_ptr;
|
||||||
|
@ -5642,17 +5641,15 @@ unpack_row(RELAY_LOG_INFO *rli,
|
||||||
DBUG_ASSERT(pack_ptr != NULL);
|
DBUG_ASSERT(pack_ptr != NULL);
|
||||||
|
|
||||||
if ((null_bits & null_mask) && f->maybe_null())
|
if ((null_bits & null_mask) && f->maybe_null())
|
||||||
f->set_null(offset);
|
f->set_null();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
f->set_notnull(offset);
|
f->set_notnull();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We only unpack the field if it was non-null
|
We only unpack the field if it was non-null
|
||||||
*/
|
*/
|
||||||
f->move_field_offset(offset);
|
|
||||||
pack_ptr= f->unpack(f->ptr, pack_ptr);
|
pack_ptr= f->unpack(f->ptr, pack_ptr);
|
||||||
f->move_field_offset(-offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bitmap_set_bit(rw_set, field_ptr - begin_ptr);
|
bitmap_set_bit(rw_set, field_ptr - begin_ptr);
|
||||||
|
@ -6994,15 +6991,19 @@ static int find_and_fetch_row(TABLE *table, byte *key)
|
||||||
while (record_compare(table))
|
while (record_compare(table))
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We need to set the null bytes to ensure that the filler bit
|
We need to set the null bytes to ensure that the filler bit
|
||||||
are all set when returning. There are storage engines that
|
are all set when returning. There are storage engines that
|
||||||
just set the necessary bits on the bytes and don't set the
|
just set the necessary bits on the bytes and don't set the
|
||||||
filler bits correctly.
|
filler bits correctly.
|
||||||
*/
|
*/
|
||||||
my_ptrdiff_t const pos=
|
if (table->s->null_bytes > 0)
|
||||||
table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
|
{
|
||||||
table->record[1][pos]= 0xFF;
|
table->record[1][table->s->null_bytes - 1]|=
|
||||||
|
256U - (1U << table->s->last_null_bit_pos);
|
||||||
|
}
|
||||||
|
|
||||||
if ((error= table->file->index_next(table->record[1])))
|
if ((error= table->file->index_next(table->record[1])))
|
||||||
{
|
{
|
||||||
table->file->print_error(error, MYF(0));
|
table->file->print_error(error, MYF(0));
|
||||||
|
@ -7028,15 +7029,17 @@ static int find_and_fetch_row(TABLE *table, byte *key)
|
||||||
/* Continue until we find the right record or have made a full loop */
|
/* Continue until we find the right record or have made a full loop */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
error= table->file->rnd_next(table->record[1]);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Patching the returned record since some storage engines do
|
Patching the record before calling rnd_next() since some
|
||||||
not set the filler bits correctly.
|
storage engines do not set the filler bits correctly.
|
||||||
*/
|
*/
|
||||||
my_ptrdiff_t const pos=
|
if (table->s->null_bytes > 0)
|
||||||
table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
|
{
|
||||||
table->record[1][pos]|= 256U - (1U << table->s->last_null_bit_pos);
|
table->record[1][table->s->null_bytes - 1]|=
|
||||||
|
256U - (1U << table->s->last_null_bit_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
error= table->file->rnd_next(table->record[1]);
|
||||||
|
|
||||||
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
|
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
|
||||||
DBUG_DUMP("record[1]", table->record[1], table->s->reclength);
|
DBUG_DUMP("record[1]", table->record[1], table->s->reclength);
|
||||||
|
|
Loading…
Add table
Reference in a new issue