diff options
author | monty@mysql.com <> | 2004-09-01 04:12:09 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-09-01 04:12:09 +0300 |
commit | 054cea4ca8c1c86bd4434d5d068cf21e8623a5ff (patch) | |
tree | 4ad5995c2fe0e62dfd3c25bcb2a946ad44728c19 /mysql-test | |
parent | ba4d4ce97ab4287dd0c3da55f1bae0aaa963a309 (diff) | |
parent | 3f0f1a4fb2b3b1b8e60471a5ef8a83e2b978acda (diff) | |
download | mariadb-git-054cea4ca8c1c86bd4434d5d068cf21e8623a5ff.tar.gz |
Merge with 4.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/lowercase_table.result | 18 | ||||
-rw-r--r-- | mysql-test/t/lowercase_table.test | 28 |
2 files changed, 36 insertions, 10 deletions
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 2f71e4c2f57..dc8fffa0f90 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -1,4 +1,5 @@ drop table if exists t1,t2,t3,t4; +drop database if exists mysqltest; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); @@ -42,6 +43,23 @@ select count(bags.a) from t1 as Bags; count(bags.a) 0 drop table t1; +create database mysqltest; +use MYSQLTEST; +select T1.a from MYSQLTEST.T1; +a +select t1.a from MYSQLTEST.T1; +Unknown table 't1' in field list +select mysqltest.t1.* from MYSQLTEST.t1; +a +select MYSQLTEST.t1.* from MYSQLTEST.t1; +a +select MYSQLTEST.T1.* from MYSQLTEST.T1; +a +select MYSQLTEST.T1.* from T1; +a +alter table t1 rename to T1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +drop database mysqltest; create table t1 (a int); create table t2 (a int); delete p1.*,P2.* from t1 as p1, t2 as p2 where p1.a=P2.a; diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test index bdfa8dfc132..602a05a7848 100644 --- a/mysql-test/t/lowercase_table.test +++ b/mysql-test/t/lowercase_table.test @@ -4,6 +4,7 @@ --disable_warnings drop table if exists t1,t2,t3,t4; +drop database if exists mysqltest; --enable_warnings create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); @@ -32,6 +33,23 @@ select count(bags.a) from t1 as Bags; drop table t1; # +# Test all caps database name +# +create database mysqltest; +use MYSQLTEST; +create table t1 (a int); +select T1.a from MYSQLTEST.T1; +--error 1109 +select t1.a from MYSQLTEST.T1; +select mysqltest.t1.* from MYSQLTEST.t1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +select MYSQLTEST.T1.* from MYSQLTEST.T1; +select MYSQLTEST.T1.* from T1; +alter table t1 rename to T1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +drop database mysqltest; + +# # multiupdate/delete & --lower-case-table-names # create table t1 (a int); @@ -54,13 +72,3 @@ select C.a, c.a from t1 c, t2 C; drop table t1, t2; show tables; - -# -# Test all caps database name -# -create table t1 (a int); -select TEST.t1.* from TEST.t1; -alter table t1 rename to T1; -select TEST.t1.* from TEST.t1; -drop table t1; - |