diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2003-09-04 17:12:20 +0500 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2003-09-04 17:12:20 +0500 |
commit | 6f607d3aa6e2f59add1ebc4d0045fa73c009b79d (patch) | |
tree | 8ea687bd43f9b796927a8422267d6355895d3955 /mysql-test/t/derived.test | |
parent | d89b2a9f1d23fe6e3cc877c23b3235b0a0782323 (diff) | |
download | mariadb-git-6f607d3aa6e2f59add1ebc4d0045fa73c009b79d.tar.gz |
Fix for bug 1176
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r-- | mysql-test/t/derived.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index c3edbabcd53..3c735878e46 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -94,3 +94,16 @@ drop table t1,t2; # derived table reference # SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1; + +# +# Test for select if database is not selected. +# +# Connect without a database +create table a1 select 1 as a; +connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,master.sock); +connection con1; +--error 1046 +select 2 as a from (select * from a1) b; +use test; +select 2 as a from (select * from a1) b; +drop table a1; |