diff options
author | mskold@mysql.com <> | 2004-08-18 19:13:39 +0200 |
---|---|---|
committer | mskold@mysql.com <> | 2004-08-18 19:13:39 +0200 |
commit | 3e1493b84b780658754c2fe14be88fdd9b7980e4 (patch) | |
tree | 764eb99748f0aa1f80e444f8414e9f863d704904 /mysql-test/t/ndb_transaction.test | |
parent | 4fe6ab1fc67507bbe366244e5e315b1d0555cfc4 (diff) | |
download | mariadb-git-3e1493b84b780658754c2fe14be88fdd9b7980e4.tar.gz |
Fix for WL#1731 Handler: multiple databases
Diffstat (limited to 'mysql-test/t/ndb_transaction.test')
-rw-r--r-- | mysql-test/t/ndb_transaction.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_transaction.test b/mysql-test/t/ndb_transaction.test index 4d9d90c21df..9d06d949b2e 100644 --- a/mysql-test/t/ndb_transaction.test +++ b/mysql-test/t/ndb_transaction.test @@ -2,6 +2,7 @@ --disable_warnings DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists test2; --enable_warnings # @@ -253,3 +254,45 @@ drop table t2; drop table t3; drop table t4; +# +# Test multiple databases in one transaction +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=ndbcluster; + +create database test2; +use test2; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +begin; +insert into test.t1 values(1,1); +insert into t2 values(1,1,1); +insert into test.t1 values(2,2); +insert into t2 values(2,2,2); +select count(*) from test.t1; +select count(*) from t2; +select * from test.t1 where pk1 = 1; +select * from t2 where a = 1; +select test.t1.attr1 +from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; +select t2.a +from t2, t2 as t2x where t2.a = t2x.a + 1; +select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; +rollback; + +select count(*) from test.t1; +select count(*) from t2; + +drop table test.t1, t2; + +drop database test2; + + |