fixed LIMIT clause printing (BUG#4839)
This commit is contained in:
parent
618e65cd28
commit
0264ade412
@ -1042,3 +1042,8 @@ SHOW TABLES;
|
|||||||
Tables_in_test table_type
|
Tables_in_test table_type
|
||||||
t2 BASE TABLE
|
t2 BASE TABLE
|
||||||
v4 VIEW
|
v4 VIEW
|
||||||
|
CREATE VIEW v1 AS SELECT EXISTS (SELECT 1 UNION SELECT 2);
|
||||||
|
select * from v1;
|
||||||
|
EXISTS (SELECT 1 UNION SELECT 2)
|
||||||
|
1
|
||||||
|
drop view v1;
|
||||||
|
@ -980,3 +980,10 @@ drop table t1;
|
|||||||
-- error 1096
|
-- error 1096
|
||||||
CREATE VIEW v02 AS SELECT * FROM DUAL;
|
CREATE VIEW v02 AS SELECT * FROM DUAL;
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
|
|
||||||
|
#
|
||||||
|
# EXISTS with UNION VIEW
|
||||||
|
#
|
||||||
|
CREATE VIEW v1 AS SELECT EXISTS (SELECT 1 UNION SELECT 2);
|
||||||
|
select * from v1;
|
||||||
|
drop view v1;
|
||||||
|
@ -1481,8 +1481,9 @@ void st_select_lex::print_order(String *str, ORDER *order)
|
|||||||
|
|
||||||
void st_select_lex::print_limit(THD *thd, String *str)
|
void st_select_lex::print_limit(THD *thd, String *str)
|
||||||
{
|
{
|
||||||
Item_subselect *item= master_unit()->item;
|
SELECT_LEX_UNIT *unit= master_unit();
|
||||||
if (item &&
|
Item_subselect *item= unit->item;
|
||||||
|
if (item && unit->global_parameters == this &&
|
||||||
(item->substype() == Item_subselect::EXISTS_SUBS ||
|
(item->substype() == Item_subselect::EXISTS_SUBS ||
|
||||||
item->substype() == Item_subselect::IN_SUBS ||
|
item->substype() == Item_subselect::IN_SUBS ||
|
||||||
item->substype() == Item_subselect::ALL_SUBS))
|
item->substype() == Item_subselect::ALL_SUBS))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user