diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-10 11:53:59 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-10 14:01:23 +0200 |
commit | 3bc98a4ec4e7e7493ee93048dddfad87ceb3d8ff (patch) | |
tree | ad189995a78fdc6068059e65b8455d3d4e61e719 /sql/sql_base.cc | |
parent | f4d671bff2c4dcfe1bb2af6d40122576e4fcfa91 (diff) | |
parent | fe3d07cab82b2215dc64f52ac93122072c33d021 (diff) | |
download | mariadb-git-3bc98a4ec4e7e7493ee93048dddfad87ceb3d8ff.tar.gz |
Merge branch '10.5' into 10.6
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 04b205cd4fc..ed21f5ab3e2 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -808,7 +808,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 || @@ -8399,9 +8406,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)); @@ -8454,7 +8463,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; |