diff options
author | bell@sanja.is.com.ua <> | 2003-08-12 15:04:49 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2003-08-12 15:04:49 +0300 |
commit | b6a8d68ae43ee84be6fcc34a8aed1c0275d04eba (patch) | |
tree | 9b6eb05bbb347e1704e9fe0036f80dc793830074 /mysql-test/t/derived.test | |
parent | c767f0b2a0d0accd837a350074df8d8b561f09f0 (diff) | |
download | mariadb-git-b6a8d68ae43ee84be6fcc34a8aed1c0275d04eba.tar.gz |
fixed problem with reference on derived table fields (BUG#1031)
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r-- | mysql-test/t/derived.test | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index c998de7ae6e..c3edbabcd53 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -88,5 +88,9 @@ SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matint explain SELECT d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; explain SELECT d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; +drop table t1,t2; -drop table t1,t2 +# +# derived table reference +# +SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1; |