1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Fix for BUG#21774: Column count doesn't match value count at row x

The cause of the bug was an incomplete fix for bug 18080.
The problem was that setup_tables() unconditionally reset the
name resolution context to its 'tables' argument, which pointed
to the first table of an SQL statement.

The bug fix limits resetting of the name resolution context in
setup_tables() only in the cases when the context was not set
by earlier parser/optimizer phases.
This commit is contained in:
timour/timka@lamia.home
2006-09-12 17:50:24 +03:00
parent 4761ea5c82
commit 38a450b44a
5 changed files with 51 additions and 3 deletions

View File

@@ -3344,8 +3344,6 @@ end_with_restore_list:
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if ((res= insert_precheck(thd, all_tables)))
break;
/* Skip first table, which is the table we are inserting in */
select_lex->context.table_list= first_table->next_local;
if (!thd->locked_tables &&
!(need_start_waiting= !wait_if_global_read_lock(thd, 0, 1)))