diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2018-11-28 12:38:52 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2018-11-28 12:39:36 +0300 |
commit | 0485e51935ab3e6fa85ed88e1cf980ae1c415924 (patch) | |
tree | 49fb6fc34e87f0cb520bde55869b8d2e43c1437f | |
parent | 4a92165ff04d6c0557eb99cc21ff88998337e376 (diff) | |
download | mariadb-git-0485e51935ab3e6fa85ed88e1cf980ae1c415924.tar.gz |
MDEV-13155: XA recovery not supported for RocksDB
Added a testcase
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/xa.result | 32 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt | 1 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/xa.test | 38 |
3 files changed, 71 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/xa.result b/storage/rocksdb/mysql-test/rocksdb/r/xa.result new file mode 100644 index 00000000000..30cfe94e0b7 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/r/xa.result @@ -0,0 +1,32 @@ +# +# MDEV-13155: XA recovery not supported for RocksDB (Just a testcase) +# +call mtr.add_suppression("Found .* prepared XA transactions"); +connect con1,localhost,root,,test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT) ENGINE=RocksDB; +XA START 'xa1'; +INSERT INTO t1 (a) VALUES (1),(2); +XA END 'xa1'; +XA PREPARE 'xa1'; +connect con2,localhost,root,,test; +XA START 'xa2'; +INSERT INTO t1 (a) VALUES (3); +INSERT INTO t1 (a) VALUES (4); +XA END 'xa2'; +XA PREPARE 'xa2'; +connection default; +SELECT * FROM t1; +a +connect con3,localhost,root,,test; +XA RECOVER; +formatID gtrid_length bqual_length data +1 3 0 xa1 +1 3 0 xa2 +XA ROLLBACK 'xa1'; +XA COMMIT 'xa2'; +SELECT a FROM t1; +a +3 +4 +DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt b/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt new file mode 100644 index 00000000000..70c120604f6 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt @@ -0,0 +1 @@ +--rocksdb_flush_log_at_trx_commit=1 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/xa.test b/storage/rocksdb/mysql-test/rocksdb/t/xa.test new file mode 100644 index 00000000000..f8f381f0580 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/xa.test @@ -0,0 +1,38 @@ +--echo # +--echo # MDEV-13155: XA recovery not supported for RocksDB (Just a testcase) +--echo # + +call mtr.add_suppression("Found .* prepared XA transactions"); + +--connect (con1,localhost,root,,test) +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT) ENGINE=RocksDB; + +XA START 'xa1'; +INSERT INTO t1 (a) VALUES (1),(2); +XA END 'xa1'; +XA PREPARE 'xa1'; + +--connect (con2,localhost,root,,test) +XA START 'xa2'; +INSERT INTO t1 (a) VALUES (3); +INSERT INTO t1 (a) VALUES (4); +XA END 'xa2'; +XA PREPARE 'xa2'; + +--connection default +SELECT * FROM t1; + +--let $shutdown_timeout= 0 +--source include/restart_mysqld.inc + +--connect (con3,localhost,root,,test) +--disable_abort_on_error +XA RECOVER; +XA ROLLBACK 'xa1'; +XA COMMIT 'xa2'; +SELECT a FROM t1; +DROP TABLE t1; |