1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

bugfix: table->get_fields_in_item_tree=true

partitioning was setting subj as a partitioning-specific
hack (GET_FIXED_FIELDS_FLAG field flag to detect partitioning fields)
inside init_lex_with_single_table(). But vcols also use
init_lex_with_single_table(), they run fix_fields()
in open_table_from_share() before partitioning and this messes up
partitioning GET_FIXED_FIELDS_FLAG logic.
This commit is contained in:
Sergei Golubchik
2016-11-16 20:33:45 +01:00
parent f73bdb685d
commit 56c1f8da4b
2 changed files with 1 additions and 1 deletions

View File

@@ -196,7 +196,6 @@ init_lex_with_single_table(THD *thd, TABLE *table, LEX *lex)
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VCOL_EXPR;
select_lex->cur_pos_in_select_list= UNDEF_POS;
table->map= 1; //To ensure correct calculation of const item
table->get_fields_in_item_tree= TRUE;
table_list->table= table;
table_list->cacheable_table= false;
return FALSE;

View File

@@ -936,6 +936,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
if (init_lex_with_single_table(thd, table, &lex))
goto end;
table->get_fields_in_item_tree= true;
func_expr->walk(&Item::change_context_processor, 0, &lex.select_lex.context);
thd->where= "partition function";