mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed bug #18767.
The bug caused wrong result sets for union constructs of the form (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2. For such queries order lists were concatenated and limit clause was completely neglected.
This commit is contained in:
@@ -171,7 +171,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
|
||||
register SELECT_LEX *select_lex = &lex->select_lex;
|
||||
DBUG_ENTER("handle_select");
|
||||
|
||||
if (select_lex->next_select())
|
||||
if (select_lex->next_select() || select_lex->master_unit()->fake_select_lex)
|
||||
res=mysql_union(thd, lex, result, &lex->unit);
|
||||
else
|
||||
res= mysql_select(thd, &select_lex->ref_pointer_array,
|
||||
|
||||
Reference in New Issue
Block a user