diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 15:04:50 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-19 14:07:55 +0200 |
commit | bf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d (patch) | |
tree | 615e56754c44190551cea0381494b675108b6ae9 /sql/sql_base.cc | |
parent | 5dba54bfef31d91c082362065cd091086e20ee9a (diff) | |
parent | b7ffccf49b5563d3078359bddf438c9d20674513 (diff) | |
download | mariadb-git-bf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d.tar.gz |
Merge branch '10.8' into 10.9mariadb-10.9.1
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 50371b3e722..18ffdc9e174 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -819,7 +819,14 @@ int close_thread_tables(THD *thd) table->s->table_name.str, (ulong) table->query_id)); if (thd->locked_tables_mode) + { +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (table->part_info && table->part_info->vers_require_hist_part(thd) && + !thd->stmt_arena->is_stmt_prepare()) + table->part_info->vers_check_limit(thd); +#endif table->vcol_cleanup_expr(thd); + } /* Detach MERGE children after every statement. Even under LOCK TABLES. */ if (thd->locked_tables_mode <= LTM_LOCK_TABLES || @@ -8664,9 +8671,11 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves, thd->lex->which_check_option_applicable(); bool save_is_item_list_lookup= select_lex->is_item_list_lookup; TABLE_LIST *derived= select_lex->master_unit()->derived; + bool save_resolve_in_select_list= select_lex->context.resolve_in_select_list; DBUG_ENTER("setup_conds"); select_lex->is_item_list_lookup= 0; + select_lex->context.resolve_in_select_list= false; thd->column_usage= MARK_COLUMNS_READ; DBUG_PRINT("info", ("thd->column_usage: %d", thd->column_usage)); @@ -8719,7 +8728,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves, select_lex->where= *conds; } thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup; - DBUG_RETURN(MY_TEST(thd->is_error())); + select_lex->context.resolve_in_select_list= save_resolve_in_select_list; + DBUG_RETURN(thd->is_error()); err_no_arena: select_lex->is_item_list_lookup= save_is_item_list_lookup; |