summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2006-04-20 22:15:38 -0700
committerigor@rurik.mysql.com <>2006-04-20 22:15:38 -0700
commitfc7514151f9daf5af9df7abd7abb61574bdebc80 (patch)
tree3e4a0a6b006e1b415ec3f8cac40152485b84e281 /sql/sql_union.cc
parentbc1f457194b0b28a16b69f1a367ea66462a4608c (diff)
downloadmariadb-git-fc7514151f9daf5af9df7abd7abb61574bdebc80.tar.gz
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.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 8bb53f7b573..0948602bbb4 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -184,7 +184,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
thd_arg->lex->current_select= sl= first_select= first_select_in_union();
found_rows_for_union= first_select->options & OPTION_FOUND_ROWS;
- is_union= test(first_select->next_select());
+ is_union= test(first_select->next_select() || fake_select_lex);
/* Global option */