From 6f607d3aa6e2f59add1ebc4d0045fa73c009b79d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Sep 2003 17:12:20 +0500 Subject: Fix for bug 1176 --- mysql-test/t/derived.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/t/derived.test') 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; -- cgit v1.2.1