1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
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:
igor@rurik.mysql.com
2006-04-20 22:15:38 -07:00
parent bc1f457194
commit fc7514151f
7 changed files with 127 additions and 22 deletions

View File

@@ -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,