diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-11-03 16:54:38 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-11-03 16:54:38 +0100 |
commit | a2d921be3634ceff4ab4c67f57b27a481d4a28df (patch) | |
tree | 185ffa3eca496e25d564ef89359cb82f9cc197ad /mysql-test/suite/pbxt | |
parent | 805f009360288ac6a98572218f2f8cb2402fcf08 (diff) | |
download | mariadb-git-a2d921be3634ceff4ab4c67f57b27a481d4a28df.tar.gz |
MWL#116: Add two more test cases:
- Test internal 2-phase commit when binlog is enabled globally, but disabled in the session
- Test crashing at various points during commit
Diffstat (limited to 'mysql-test/suite/pbxt')
-rw-r--r-- | mysql-test/suite/pbxt/r/pbxt_xa_binlog.result | 31 | ||||
-rw-r--r-- | mysql-test/suite/pbxt/t/pbxt_xa_binlog.test | 31 |
2 files changed, 62 insertions, 0 deletions
diff --git a/mysql-test/suite/pbxt/r/pbxt_xa_binlog.result b/mysql-test/suite/pbxt/r/pbxt_xa_binlog.result new file mode 100644 index 00000000000..ec12a8a48ae --- /dev/null +++ b/mysql-test/suite/pbxt/r/pbxt_xa_binlog.result @@ -0,0 +1,31 @@ +drop table if exists t1, t2; +SET binlog_format = 'mixed'; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=pbxt; +BEGIN; +SELECT @@log_bin; +@@log_bin +1 +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (2); +COMMIT; +select * from t1; +a +1 +select * from t2; +b +2 +SET sql_log_bin = 0; +INSERT INTO t1 VALUES (3); +INSERT INTO t2 VALUES (4); +COMMIT; +select * from t1 order by a; +a +1 +3 +select * from t2 order by b; +b +2 +4 +drop table t1, t2; +drop database pbxt; diff --git a/mysql-test/suite/pbxt/t/pbxt_xa_binlog.test b/mysql-test/suite/pbxt/t/pbxt_xa_binlog.test new file mode 100644 index 00000000000..e327c5a7b40 --- /dev/null +++ b/mysql-test/suite/pbxt/t/pbxt_xa_binlog.test @@ -0,0 +1,31 @@ +--source include/have_innodb.inc +--source include/have_log_bin.inc + +--disable_warnings +drop table if exists t1, t2; +--enable_warnings + +SET binlog_format = 'mixed'; + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=pbxt; +BEGIN; +# verify that binlog is on +SELECT @@log_bin; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (2); +COMMIT; +select * from t1; +select * from t2; + +# Test 2-phase commit when we disable binlogging. +SET sql_log_bin = 0; +INSERT INTO t1 VALUES (3); +INSERT INTO t2 VALUES (4); +COMMIT; +select * from t1 order by a; +select * from t2 order by b; + +drop table t1, t2; +drop database pbxt; + |