mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
code cleanup
fixed subselect error handling bug fixed subselect UNION ALL bug fixed thd->lex.select restoring explain UNION subselect bug mysql-test/r/subselect.result: test for: subselect UNION ALL bug subselect error handling bug explain UNION subselect bug mysql-test/t/subselect.test: test for: subselect UNION ALL bug subselect error handling bug explain UNION subselect bug sql/sql_lex.cc: fixed subselect UNION ALL bug sql/sql_lex.h: fixed subselect UNION ALL bug sql/sql_parse.cc: fixed subselect UNION ALL bug sql/sql_select.cc: fixed subselect error handling bug fixed explain UNION subselect bug sql/sql_union.cc: fixed thd->lex.select restoring code cleanup fixed subselect error handling bug fixed subselect UNION ALL bug sql/sql_yacc.yy: fixed subselect UNION ALL bug
This commit is contained in:
@ -204,4 +204,16 @@ date
|
||||
SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
|
||||
(SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03')
|
||||
2002-08-03
|
||||
SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1;
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1;
|
||||
Subselect returns more than 1 record
|
||||
EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY searchconthardwarefr3 index NULL topic 3 NULL 2 Using index
|
||||
2 SUBSELECT No tables used
|
||||
3 UNION No tables used
|
||||
drop table searchconthardwarefr3;
|
||||
|
@ -110,4 +110,8 @@ EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
|
||||
EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
|
||||
SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
|
||||
SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
|
||||
SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1;
|
||||
-- error 1240
|
||||
SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1;
|
||||
EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1);
|
||||
drop table searchconthardwarefr3;
|
Reference in New Issue
Block a user