summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 266f221ca78..12035326872 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -377,7 +377,7 @@ select_unit::create_result_table(THD *thd_arg, List<Item> *column_types,
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->field[i]->flags &= ~(PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG);
if (create_table)
{
@@ -413,7 +413,7 @@ select_union_recursive::create_result_table(THD *thd_arg,
incr_table->keys_in_use_for_query.clear_all();
for (uint i=0; i < table->s->fields; i++)
- incr_table->field[i]->flags &= ~PART_KEY_FLAG;
+ incr_table->field[i]->flags &= ~(PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG);
TABLE *rec_table= 0;
if (! (rec_table= create_tmp_table(thd_arg, &tmp_table_param, *column_types,
@@ -424,7 +424,7 @@ select_union_recursive::create_result_table(THD *thd_arg,
rec_table->keys_in_use_for_query.clear_all();
for (uint i=0; i < table->s->fields; i++)
- rec_table->field[i]->flags &= ~PART_KEY_FLAG;
+ rec_table->field[i]->flags &= ~(PART_KEY_FLAG | PART_INDIRECT_KEY_FLAG);
if (rec_tables.push_back(rec_table))
return true;