diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 16bc92cb711..5acab254511 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -39,3 +39,12 @@ Unknown table 'T1' in field list select count(bags.a) from t1 as Bags; Unknown table 'bags' in field list drop table t1; +create database foo; +use foo; +create table t1 (a int); +select FOO.t1.* from FOO.t1; +a +alter table t1 rename to T1; +select FOO.t1.* from FOO.t1; +a +drop database FOO; diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test index 5bc19f26c0e..d52c60baea7 100644 --- a/mysql-test/t/lowercase_table.test +++ b/mysql-test/t/lowercase_table.test @@ -30,3 +30,14 @@ select count(T1.a) from t1; --error 1109 select count(bags.a) from t1 as Bags; drop table t1; + +# +# Test all caps database name +# +create database foo; +use foo; +create table t1 (a int); +select FOO.t1.* from FOO.t1; +alter table t1 rename to T1; +select FOO.t1.* from FOO.t1; +drop database FOO;