mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
WL#3023 (RBR: Use locks in a statement-like manner):
Adaptions to make it work with NDB.
This commit is contained in:
parent
43bc3c4068
commit
101edab125
53 changed files with 647 additions and 503 deletions
|
|
@ -21,6 +21,7 @@ insert t2 values (5);
|
|||
commit;
|
||||
# first COMMIT must be Query_log_event, second - Xid_log_event
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
drop table t1,t2;
|
||||
|
||||
|
|
@ -42,6 +43,8 @@ while ($1)
|
|||
commit;
|
||||
drop table t1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'master-bin.000001' from 102;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'master-bin.000002' from 102;
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ select * from t3;
|
|||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
|
@ -143,4 +144,5 @@ rollback;
|
|||
set autocommit=1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ SET @var1= x'8300';
|
|||
# code (and I have used it to test the fix) until there is some way to
|
||||
# exercise this code from mysql-test-run.
|
||||
EXECUTE stmt1 USING @var1;
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 102;
|
||||
SELECT HEX(f1) FROM t1;
|
||||
DROP table t1;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ SET @var1= x'8300';
|
|||
# exercise this code from mysql-test-run.
|
||||
EXECUTE stmt1 USING @var1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 102;
|
||||
SELECT HEX(f1) FROM t1;
|
||||
DROP table t1;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ create table t2 (c char(30)) charset=ucs2;
|
|||
set @v=convert('abc' using ucs2);
|
||||
reset master;
|
||||
insert into t2 values (@v);
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
|
||||
# absolutely need variables names to be quoted and strings to be
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ select get_lock("a",10);
|
|||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
drop database `drop-temp+table-test`;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ insert into t1 select * from t2;
|
|||
# verify the binlog :
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
select * from t1;
|
||||
drop table t1, t2;
|
||||
|
|
@ -29,6 +30,7 @@ create table t2(unique(a)) select a from t1;
|
|||
# The above should produce an error, *and* not appear in the binlog
|
||||
let $VERSION=`select version()`;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
drop table t1;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ insert into t2 select * from t1;
|
|||
commit;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -43,6 +44,7 @@ insert into t2 select * from t1;
|
|||
rollback;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -58,6 +60,7 @@ rollback to savepoint my_savepoint;
|
|||
commit;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -75,6 +78,7 @@ commit;
|
|||
select a from t1 order by a; # check that savepoints work :)
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
# and when ROLLBACK is not explicit?
|
||||
|
|
@ -96,6 +100,7 @@ connection con2;
|
|||
# logging has been done, we use a user lock.
|
||||
select get_lock("a",10);
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
# and when not in a transact1on?
|
||||
|
|
@ -107,6 +112,7 @@ insert into t1 values(9);
|
|||
insert into t2 select * from t1;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
# Check that when the query updat1ng the MyISAM table is the first in the
|
||||
|
|
@ -119,11 +125,13 @@ insert into t1 values(10); # first make t1 non-empty
|
|||
begin;
|
||||
insert into t2 select * from t1;
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
insert into t1 values(11);
|
||||
commit;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
|
||||
|
|
@ -142,6 +150,7 @@ insert into t2 select * from t1;
|
|||
commit;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -154,6 +163,7 @@ insert into t2 select * from t1;
|
|||
rollback;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -169,6 +179,7 @@ rollback to savepoint my_savepoint;
|
|||
commit;
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
delete from t1;
|
||||
|
|
@ -186,6 +197,7 @@ commit;
|
|||
select a from t1 order by a; # check that savepoints work :)
|
||||
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
|
||||
# Test for BUG#5714, where a MyISAM update in the transaction used to
|
||||
|
|
@ -246,6 +258,7 @@ disconnect con2;
|
|||
connection con3;
|
||||
select get_lock("lock1",60);
|
||||
--replace_column 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
do release_lock("lock1");
|
||||
drop table t0,t2;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ flush no_write_to_binlog tables;
|
|||
# Check that it's not in the binlog.
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
||||
# Check that the master is not confused.
|
||||
select * from t3;
|
||||
|
|
@ -27,6 +28,7 @@ flush tables;
|
|||
# Check that it's in the binlog.
|
||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ select count(*) from t1;
|
|||
drop table t1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102 limit 1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102 limit 2;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102 limit 2,1;
|
||||
flush logs;
|
||||
|
||||
|
|
@ -91,11 +91,11 @@ insert into t1 values (1);
|
|||
drop table t1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'master-bin.000002';
|
||||
show binary logs;
|
||||
save_master_pos;
|
||||
|
|
@ -105,11 +105,11 @@ sync_with_master;
|
|||
show binary logs;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ sync_slave_with_master;
|
|||
select * from mysqltest.t1;
|
||||
connection master;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
drop database mysqltest;
|
||||
sync_slave_with_master;
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ connection master;
|
|||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
|
@ -162,7 +163,7 @@ select hex(c1), hex(c2) from t1;
|
|||
|
||||
connection master;
|
||||
# Let's have a look at generated SETs.
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
#--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ sync_slave_with_master;
|
|||
|
||||
connection master;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events;
|
||||
sync_slave_with_master;
|
||||
select * from t1;
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ connection master;
|
|||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||
show binlog events from 102;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue