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:
@@ -196,7 +196,6 @@ init_lex_with_single_table(THD *thd, TABLE *table, LEX *lex)
|
|||||||
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VCOL_EXPR;
|
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VCOL_EXPR;
|
||||||
select_lex->cur_pos_in_select_list= UNDEF_POS;
|
select_lex->cur_pos_in_select_list= UNDEF_POS;
|
||||||
table->map= 1; //To ensure correct calculation of const item
|
table->map= 1; //To ensure correct calculation of const item
|
||||||
table->get_fields_in_item_tree= TRUE;
|
|
||||||
table_list->table= table;
|
table_list->table= table;
|
||||||
table_list->cacheable_table= false;
|
table_list->cacheable_table= false;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -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))
|
if (init_lex_with_single_table(thd, table, &lex))
|
||||||
goto end;
|
goto end;
|
||||||
|
table->get_fields_in_item_tree= true;
|
||||||
|
|
||||||
func_expr->walk(&Item::change_context_processor, 0, &lex.select_lex.context);
|
func_expr->walk(&Item::change_context_processor, 0, &lex.select_lex.context);
|
||||||
thd->where= "partition function";
|
thd->where= "partition function";
|
||||||
|
Reference in New Issue
Block a user