diff options
author | unknown <monty@mashka.mysql.fi> | 2003-06-27 16:29:10 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-06-27 16:29:10 +0300 |
commit | 02cc6d67067e2b6e80475f71a204989f237a735b (patch) | |
tree | 6b5d59568d6e947e831d51f3d5d09a4a0d8328d6 /mysql-test/t/merge.test | |
parent | 284c97eaee274628bc422ee6ef311c5f4b7da195 (diff) | |
download | mariadb-git-02cc6d67067e2b6e80475f71a204989f237a735b.tar.gz |
Allow one to use MERGE tables with tables from different databases
Added command 'replace_column' to mysqltest
client/mysqltest.c:
Added user command replace_column
mysql-test/r/merge.result:
Update of tests
mysql-test/t/innodb.test:
User replace_column to make tests repeatable
mysql-test/t/merge.test:
New tests for testing MERGE tables with multiple databases
scripts/mysql_create_system_tables.sh:
Fixed syntax error
sql/ha_myisammrg.cc:
Allow one to use MERGE tables with tables from different databases
sql/mysql_priv.h:
Added function
sql/sql_parse.cc:
Allow one to use MERGE tables with tables from different databases
sql/sql_show.cc:
Extended append_identifier()
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r-- | mysql-test/t/merge.test | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 7a7678afca1..473e8aa9d00 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -4,6 +4,7 @@ --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6; +drop database if exists mysqltest; --enable_warnings create table t1 (a int not null primary key auto_increment, message char(20)); @@ -48,13 +49,23 @@ show create table t3; create table t4 (a int not null, b char(10), key(a)) type=MERGE UNION=(t1,t2); --error 1016 select * from t4; ---error 1212 -create table t5 (a int not null, b char(10), key(a)) type=MERGE UNION=(test.t1,test_2.t2); +--error 1016 +alter table t4 add column c int; -# Because of windows, it's important that we drop the merge tables first! -# This should give a warning on table t5 -drop table if exists t5,t4,t3,t1,t2; +# +# Test tables in different databases +# +create database mysqltest; +create table mysqltest.t6 (a int not null primary key auto_increment, message char(20)); +create table t5 (a int not null, b char(20), key(a)) type=MERGE UNION=(test.t1,mysqltest.t6); +show create table t5; +alter table t5 type=myisam; +drop table t5, mysqltest.t6; +drop database mysqltest; +# Because of windows, it's important that we drop the merge tables first! +drop table if exists t4,t3,t1,t2; + create table t1 (c char(10)) type=myisam; create table t2 (c char(10)) type=myisam; create table t3 (c char(10)) union=(t1,t2) type=merge; |