From 0697ee265fa4fe4d617dc96194fcf2532fd73402 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Jun 2012 11:46:28 +0200 Subject: MDEV-181: XID crash recovery across binlog boundaries Keep track of how many pending XIDs (transactions that are prepared in storage engine and written into binlog, but not yet durably committed on disk in the engine) there are in each binlog. When the count of one binlog drops to zero, write a new binlog checkpoint event, telling which is the oldest binlog with pending XIDs. When doing XA recovery after a crash, check the last binlog checkpoint event, and scan all binlog files from that point onwards for XIDs that must be committed if found in prepared state inside engine. Remove the code in binlog rotation that waits for all prepared XIDs to be committed before writing a new binlog file (this is no longer necessary when recovery can scan multiple binlog files). --- mysql-test/t/xa_binlog.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/xa_binlog.test') diff --git a/mysql-test/t/xa_binlog.test b/mysql-test/t/xa_binlog.test index 48f1dc6dfaa..430d45ab86a 100644 --- a/mysql-test/t/xa_binlog.test +++ b/mysql-test/t/xa_binlog.test @@ -27,6 +27,6 @@ SELECT * FROM t1 ORDER BY a; --replace_column 2 # 5 # --replace_regex /xid=[0-9]+/xid=XX/ -SHOW BINLOG EVENTS LIMIT 1,9; +SHOW BINLOG EVENTS LIMIT 2,9; DROP TABLE t1; -- cgit v1.2.1