From 49fcd90e6cec264030ef005396a7744aa9662d7e Mon Sep 17 00:00:00 2001 From: Zardosht Kasheff Date: Tue, 10 Apr 2012 15:04:28 +0000 Subject: [PATCH] [t:4297], another test git-svn-id: file:///svn/mysql/tests/mysql-test@41742 c7de825b-a66e-492c-adef-691d508d4ae1 --- mysql-test/suite/tokudb.bugs/r/xa-2.result | 40 ++++++++++++++++++++++ mysql-test/suite/tokudb.bugs/t/xa-2.test | 33 ++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 mysql-test/suite/tokudb.bugs/r/xa-2.result create mode 100644 mysql-test/suite/tokudb.bugs/t/xa-2.test diff --git a/mysql-test/suite/tokudb.bugs/r/xa-2.result b/mysql-test/suite/tokudb.bugs/r/xa-2.result new file mode 100644 index 00000000000..f908dc8e3e0 --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/r/xa-2.result @@ -0,0 +1,40 @@ +drop table if exists t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=tokudb; +xa begin 'a','ab'; +insert into t1 values (1); +select * from t1; +a +1 +xa end 'a','ab'; +select * from t1; +a +1 +xa prepare 'a','ab'; +select * from t1; +a +1 +xa commit 'a','ab'; +select * from t1; +a +1 +xa begin 'a','ab'; +insert into t1 values (2); +select * from t1; +a +1 +2 +xa end 'a','ab'; +select * from t1; +a +1 +2 +xa prepare 'a','ab'; +select * from t1; +a +1 +2 +xa rollback 'a','ab'; +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/suite/tokudb.bugs/t/xa-2.test b/mysql-test/suite/tokudb.bugs/t/xa-2.test new file mode 100644 index 00000000000..35adc359b3b --- /dev/null +++ b/mysql-test/suite/tokudb.bugs/t/xa-2.test @@ -0,0 +1,33 @@ +-- source include/have_tokudb.inc +--source include/not_5_5.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + + +# test that simple xa commands work with TokuDB +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=tokudb; + +xa begin 'a','ab'; +insert into t1 values (1); +select * from t1; +xa end 'a','ab'; +select * from t1; +xa prepare 'a','ab'; +select * from t1; +xa commit 'a','ab'; +select * from t1; + +xa begin 'a','ab'; +insert into t1 values (2); +select * from t1; +xa end 'a','ab'; +select * from t1; +xa prepare 'a','ab'; +select * from t1; +xa rollback 'a','ab'; +select * from t1; + +drop table t1; +