diff options
author | unknown <mskold@mysql.com> | 2004-08-18 19:13:39 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2004-08-18 19:13:39 +0200 |
commit | 86fdb8b977a57d074d245df4b5a9df4a79b42394 (patch) | |
tree | 764eb99748f0aa1f80e444f8414e9f863d704904 /mysql-test/t/ndb_basic.test | |
parent | 2b6b61642b73095385f47dbc37ffbd7da4a85b1d (diff) | |
download | mariadb-git-86fdb8b977a57d074d245df4b5a9df4a79b42394.tar.gz |
Fix for WL#1731 Handler: multiple databases
Diffstat (limited to 'mysql-test/t/ndb_basic.test')
-rw-r--r-- | mysql-test/t/ndb_basic.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test index c3c296113c3..ea2a70e1837 100644 --- a/mysql-test/t/ndb_basic.test +++ b/mysql-test/t/ndb_basic.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 # @@ -319,3 +320,36 @@ delete from t7 where b=23; select * from t7; drop table t7; + +# +# Test multiple databases in one statement +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); + +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; + +insert into t2 select pk1,attr1,attr2 from test.t1; +select * from t2 order by a; +select b from test.t1, t2 where c = test.t1.attr2; +select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; + +drop table test.t1, t2; + +drop database test2; + + |