mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
117 lines
8.7 KiB
Text
117 lines
8.7 KiB
Text
RESET MASTER;
|
|
connect con1,localhost,root,,;
|
|
connect con2,localhost,root,,;
|
|
connect con3,localhost,root,,;
|
|
connect con4,localhost,root,,;
|
|
connection default;
|
|
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
|
|
SHOW MASTER STATUS;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000001 <pos>
|
|
SHOW STATUS LIKE 'binlog_snapshot_%';
|
|
Variable_name Value
|
|
Binlog_snapshot_file master-bin.000001
|
|
Binlog_snapshot_position <pos>
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (0, "");
|
|
connection con1;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (1, "");
|
|
connection con2;
|
|
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (2, "first");
|
|
INSERT INTO t2 VALUES (2);
|
|
INSERT INTO t1 VALUES (2, "second");
|
|
connection default;
|
|
COMMIT;
|
|
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
connection con3;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (3, "");
|
|
INSERT INTO t2 VALUES (3);
|
|
connection con4;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (4, "");
|
|
COMMIT;
|
|
connection default;
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
0
|
|
SHOW STATUS LIKE 'binlog_snapshot_%';
|
|
Variable_name Value
|
|
Binlog_snapshot_file master-bin.000001
|
|
Binlog_snapshot_position <pos>
|
|
SHOW MASTER STATUS;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000001 <pos>
|
|
SELECT * FROM t2 ORDER BY a;
|
|
a
|
|
2
|
|
3
|
|
connection con1;
|
|
COMMIT;
|
|
connection con2;
|
|
COMMIT;
|
|
connection con3;
|
|
COMMIT;
|
|
FLUSH LOGS;
|
|
connection default;
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
0
|
|
SHOW STATUS LIKE 'binlog_snapshot_%';
|
|
Variable_name Value
|
|
Binlog_snapshot_file master-bin.000001
|
|
Binlog_snapshot_position <pos>
|
|
SHOW MASTER STATUS;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000002 <pos>
|
|
COMMIT;
|
|
SHOW STATUS LIKE 'binlog_snapshot_%';
|
|
Variable_name Value
|
|
Binlog_snapshot_file master-bin.000002
|
|
Binlog_snapshot_position <pos>
|
|
SHOW MASTER STATUS;
|
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
master-bin.000002 <pos>
|
|
include/show_binlog_events.inc
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Gtid # # GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb
|
|
master-bin.000001 # Gtid # # GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (2)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (0, "")
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4, "")
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1, "")
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "first")
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "second")
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3, "")
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
|
|
*** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit ***
|
|
SET @old_size= @@GLOBAL.max_binlog_size;
|
|
SET GLOBAL max_binlog_size=4096;
|
|
CREATE TABLE t3 (a INT PRIMARY KEY, b VARBINARY(8192)) ENGINE=MyISAM;
|
|
INSERT INTO t3 VALUES (10, '');
|
|
INSERT INTO t3 VALUES (11, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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