summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-05-29 12:58:44 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-05-29 12:58:44 +0400
commit5cd18326c2167ddf1fe989154c519809cd26f175 (patch)
tree0166109cba0ae1b9b6bfa81d8c38ecd1a0fe2276 /sql/sql_union.cc
parent8ce2e1bcbe1f00b6030b1c82ea62b3a64b1d0de9 (diff)
parent4efe046352f61cc7b8a44a604f96f8b68cf155c0 (diff)
downloadmariadb-git-5cd18326c2167ddf1fe989154c519809cd26f175.tar.gz
Merge 5.3->main -> 5.3-mwl90
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 192ea31c610..a8c829c1c5d 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -137,6 +137,11 @@ select_union::create_result_table(THD *thd_arg, List<Item> *column_types,
(ORDER*) 0, is_union_distinct, 1,
options, HA_POS_ERROR, (char*) alias)))
return TRUE;
+ //psergey-merge-fix:
+ table->keys_in_use_for_query.clear_all();
+ for (uint i=0; i < table->s->fields; i++)
+ table->field[i]->flags &= ~PART_KEY_FLAG;
+
table->file->extra(HA_EXTRA_WRITE_CACHE);
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
return FALSE;
@@ -712,7 +717,8 @@ bool st_select_lex_unit::cleanup()
if ((join= fake_select_lex->join))
{
join->tables_list= 0;
- join->tables= 0;
+ join->table_count= 0;
+ join->top_join_tab_count= 0;
}
error|= fake_select_lex->cleanup();
/*