summaryrefslogtreecommitdiff
path: root/mysql-test/t/derived.test
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-11-08 16:43:16 +0400
committerunknown <hf@deer.(none)>2003-11-08 16:43:16 +0400
commite2661bdbba9d81f00fb6ef5bdfeee343b3496ee2 (patch)
treeb3bef5ea5879046bbe3d4c422f4ead884d7e33cd /mysql-test/t/derived.test
parentb036800ee04fb4c15f47305ba83a55d0246921f6 (diff)
downloadmariadb-git-e2661bdbba9d81f00fb6ef5bdfeee343b3496ee2.tar.gz
Fix for bug #1727 ( Crash in EXPLAIN & UNION & derived)
another version of the fix. Here i removed a loop that seems to be superfluous mysql-test/r/derived.result: appropriate test result added mysql-test/t/derived.test: test case for the bug 1727 sql/sql_lex.cc: we don't need loop here
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r--mysql-test/t/derived.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 80b131ac6fe..ca881f73a4f 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -132,3 +132,9 @@ insert into t1 VALUES(1,1,1), (2,2,1);
select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2;
explain select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2;
drop table t1;
+
+create table t1 (a int);
+insert into t1 values (1),(2);
+select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
+explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
+drop table t1;