mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-15326 preparation: Test slow shutdown after XA PREPARE
We were missing a test that would exercise trx_free_prepared() with innodb_fast_shutdown=0. Add a test. Note: if shutdown hangs due to the XA PREPARE transactions, in MariaDB 10.2 the test would unfortunately pass, but take 2*60 seconds longer, because of two shutdown_server statements timing out after 60 seconds. Starting with MariaDB 10.3, the hung server would be killed with SIGABRT, and the test could fail thanks to a backtrace message.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
FLUSH TABLES;
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
#
|
||||
# MDEV-13797 InnoDB may hang if shutdown is initiated soon after startup
|
||||
# while rolling back recovered incomplete transactions
|
||||
@@ -7,10 +9,12 @@ BEGIN;
|
||||
COMMIT;
|
||||
connect con$c,localhost,root,,;
|
||||
CREATE TABLE t8 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
XA START 'x';
|
||||
INSERT INTO t8 (a) SELECT NULL FROM t;
|
||||
UPDATE t8 SET a=a+100, b=a;
|
||||
DELETE FROM t8;
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
connect con$c,localhost,root,,;
|
||||
CREATE TABLE t7 (a SERIAL, b INT UNIQUE, c INT UNIQUE) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
@@ -62,4 +66,7 @@ connection default;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
CREATE TABLE u(a SERIAL) ENGINE=INNODB;
|
||||
FLUSH TABLES;
|
||||
XA RECOVER;
|
||||
formatID gtrid_length bqual_length data
|
||||
1 1 0 x
|
||||
DROP TABLE t,u;
|
||||
|
Reference in New Issue
Block a user