diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-11 11:25:33 +0200 |
commit | fd132be117e44318de04973e8bc825651b220792 (patch) | |
tree | a78222eeae060b5a605633a9f603e5e7528f12c3 /sql/sql_base.cc | |
parent | 7b05fc5cdd6058e91a26836ace54f45f37fa88b5 (diff) | |
parent | a917be3e7f07fc803fb04aba7173081550dcc7db (diff) | |
download | mariadb-git-fd132be117e44318de04973e8bc825651b220792.tar.gz |
Merge branch '10.6' into 10.7
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 bc16af59d8d..4f041c061c3 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; |