diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-04-23 14:16:49 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-04-23 14:16:49 +0300 |
commit | ae5865ff430cc6939f5e94abc1645e27899ab823 (patch) | |
tree | bf0ead26b838299751590c7caa8b4b169f004997 /sql/sql_union.cc | |
parent | 48039ab277838024be85836cc3378a903ad2794b (diff) | |
download | mariadb-git-ae5865ff430cc6939f5e94abc1645e27899ab823.tar.gz |
- addendum of the fix for bug 27786:
applied the new function is_union() to places
in the code that check the same condition.
- 5.0->5.1 merge fixes
mysql-test/r/subselect3.result:
merge 5.0->5.1 : updated explain.
sql/item_subselect.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
sql/sql_derived.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
sql/sql_parse.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
sql/sql_select.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to places
in the code that check the same condition.
sql/sql_union.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
sql/sql_view.cc:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
sql/sql_yacc.yy:
addendum of the fix for bug 27786:
applied the new function is_union() to the applicable places.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index bc81679a7fd..2a1db422058 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -165,7 +165,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, SELECT_LEX *lex_select_save= thd_arg->lex->current_select; SELECT_LEX *sl, *first_sl= first_select(); select_result *tmp_result; - bool is_union; + bool is_union_select; TABLE *empty_table= 0; DBUG_ENTER("st_select_lex_unit::prepare"); @@ -203,11 +203,11 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, thd_arg->lex->current_select= sl= first_sl; found_rows_for_union= first_sl->options & OPTION_FOUND_ROWS; - is_union= first_sl->next_select() || fake_select_lex; + is_union_select= is_union() || fake_select_lex; /* Global option */ - if (is_union) + if (is_union_select) { if (!(tmp_result= union_result= new select_union)) goto err; @@ -238,7 +238,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, thd_arg->lex->current_select= sl; - can_skip_order_by= is_union && !(sl->braces && sl->explicit_limit); + can_skip_order_by= is_union_select && !(sl->braces && sl->explicit_limit); saved_error= join->prepare(&sl->ref_pointer_array, (TABLE_LIST*) sl->table_list.first, @@ -251,7 +251,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, (ORDER*) 0 : (ORDER *)sl->order_list.first, (ORDER*) sl->group_list.first, sl->having, - (is_union ? (ORDER*) 0 : + (is_union_select ? (ORDER*) 0 : (ORDER*) thd_arg->lex->proc_list.first), sl, this); /* There are no * in the statement anymore (for PS) */ @@ -264,7 +264,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, Use items list of underlaid select for derived tables to preserve information about fields lengths and exact types */ - if (!is_union) + if (!is_union_select) types= first_sl->item_list; else if (sl == first_sl) { @@ -307,7 +307,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } } - if (is_union) + if (is_union_select) { /* Check that it was possible to aggregate @@ -639,7 +639,7 @@ void st_select_lex_unit::reinit_exec_mechanism() { prepared= optimized= executed= 0; #ifndef DBUG_OFF - if (first_select()->next_select()) + if (is_union()) { List_iterator_fast<Item> it(item_list); Item *field; @@ -706,7 +706,6 @@ bool st_select_lex_unit::change_result(select_subselect *new_result, List<Item> *st_select_lex_unit::get_unit_column_types() { SELECT_LEX *sl= first_select(); - bool is_union= test(sl->next_select()); bool is_procedure= test(sl->join->procedure); if (is_procedure) @@ -717,7 +716,7 @@ List<Item> *st_select_lex_unit::get_unit_column_types() } - if (is_union) + if (is_union()) { DBUG_ASSERT(prepared); /* Types are generated during prepare */ |