summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index c08deedea72..b70d11e4b26 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -411,6 +411,15 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table= table_list->table;
context= &thd->lex->select_lex.context;
+ /*
+ These three asserts test the hypothesis that the resetting of the name
+ resolution context below is not necessary at all since the list of local
+ tables for INSERT always consists of one table.
+ */
+ DBUG_ASSERT(!table_list->next_local);
+ DBUG_ASSERT(!context->table_list->next_local);
+ DBUG_ASSERT(!context->first_name_resolution_table->next_name_resolution_table);
+
/* Save the state of the current name resolution context. */
ctx_state.save_state(context, table_list);