mirror of
https://github.com/MariaDB/server.git
synced 2025-11-22 17:44:29 +03:00
MWL#116: Efficient group commit: Fix bug that binlog pos stored by XtraDB during commit was wrong when more than one commit in group.
Now the actual binlog position for each commit is stored in THD, and XtraDB can fetch the correct value from within commit_ordered() or commit(). mysql-test/r/group_commit_binlog_pos.result: Test case for XtraDB binlog position. mysql-test/t/group_commit_binlog_pos-master.opt: Test case for XtraDB binlog position. mysql-test/t/group_commit_binlog_pos.test: Test case for XtraDB binlog position. sql/log.cc: Save binlog position corresponding to commit in THD, and make accessible to storage engine. sql/sql_parse.cc: Add generic crash point for use in test cases. storage/xtradb/handler/ha_innodb.cc: Update to use new method of getting current binlog position that works with group commit. storage/xtradb/handler/ha_innodb.h: Update to use new method of getting current binlog position that works with group commit.
This commit is contained in:
35
mysql-test/r/group_commit_binlog_pos.result
Normal file
35
mysql-test/r/group_commit_binlog_pos.result
Normal file
@@ -0,0 +1,35 @@
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SET DEBUG_SYNC= "commit_after_get_LOCK_group_commit SIGNAL con1_waiting WAIT_FOR con3_queued";
|
||||
SET DEBUG_SYNC= "commit_loop_entry_commit_ordered SIGNAL con1_loop WAIT_FOR con1_loop_cont EXECUTE 3";
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_waiting";
|
||||
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL con2_queued";
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con2_queued";
|
||||
SET DEBUG_SYNC= "commit_after_prepare_ordered SIGNAL con3_queued";
|
||||
INSERT INTO t1 VALUES (3);
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_loop";
|
||||
SET DEBUG_SYNC= "now SIGNAL con1_loop_cont";
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_loop";
|
||||
SET DEBUG_SYNC= "now SIGNAL con1_loop_cont";
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_loop";
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
SET SESSION debug="+d,crash_dispatch_command_before";
|
||||
SELECT 1;
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
ERROR HY000: Lost connection to MySQL server during query
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
InnoDB: Last MySQL binlog file position 0 767, file name ./master-bin.000001
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
Reference in New Issue
Block a user