diff options
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index f2e9016aec3..dc372bcd0b5 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -331,6 +331,14 @@ int st_select_lex_unit::exec() */ setup_table_map(table_list->table, table_list, tablenr); } + /* + Mark that we are using all fields in the table. This is needed + for InnoDB when using the same table but different fields in + an UNION + QQ: Replace query_id with a bit map of used fields and + change this for each union part. After this change, + this code can be removed. + */ for (unsigned int i=0; i < table_list->table->fields; i++) table_list->table->field[i]->query_id= query_id; } |