summaryrefslogtreecommitdiffstats
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sql/sql_base.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index a0656e48..7b9ffc2e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -74,7 +74,9 @@ No_such_table_error_handler::handle_condition(THD *,
*cond_hdl= NULL;
if (!first_error)
first_error= sql_errno;
- if (sql_errno == ER_NO_SUCH_TABLE || sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE)
+ if (sql_errno == ER_NO_SUCH_TABLE
+ || sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE
+ || sql_errno == ER_UNKNOWN_SEQUENCES)
{
m_handled_errors++;
return TRUE;
@@ -2288,6 +2290,7 @@ retry_share:
if (thd->has_read_only_protection())
{
MYSQL_UNBIND_TABLE(table->file);
+ table->vcol_cleanup_expr(thd);
tc_release_table(table);
DBUG_RETURN(TRUE);
}
@@ -2307,6 +2310,7 @@ retry_share:
if (result)
{
MYSQL_UNBIND_TABLE(table->file);
+ table->vcol_cleanup_expr(thd);
tc_release_table(table);
DBUG_RETURN(TRUE);
}
@@ -7202,6 +7206,7 @@ set_new_item_local_context(THD *thd, Item_ident *item, TABLE_LIST *table_ref)
if (!(context= new (thd->mem_root) Name_resolution_context))
return TRUE;
context->init();
+ context->select_lex= table_ref->select_lex;
context->first_name_resolution_table=
context->last_name_resolution_table= table_ref;
item->context= context;
@@ -8020,7 +8025,7 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
while ((item= it++))
{
if (make_pre_fix)
- pre_fix->push_back(item, thd->stmt_arena->mem_root);
+ pre_fix->push_back(item, thd->active_stmt_arena_to_use()->mem_root);
if (item->fix_fields_if_needed_for_scalar(thd, it.ref()))
{