From e2661bdbba9d81f00fb6ef5bdfeee343b3496ee2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 8 Nov 2003 16:43:16 +0400 Subject: 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 --- mysql-test/r/derived.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/r/derived.result') diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 37742893c2b..c59b68e4c4d 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -228,3 +228,20 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using where 3 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 2 Using where 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; +a a +1 1 +2 1 +1 2 +2 2 +explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 +1 PRIMARY ALL NULL NULL NULL NULL 2 +4 DERIVED t1 ALL NULL NULL NULL NULL 2 +5 UNION t1 ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 +3 UNION t1 ALL NULL NULL NULL NULL 2 +drop table t1; -- cgit v1.2.1