1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug#38821: Assert table->auto_increment_field_not_null failed

in open_table()

Problem: repeating "CREATE... ( AUTOINCREMENT) ... SELECT" may lead to
an assertion failure.

Fix: reset table->auto_increment_field_not_null after each record 
writing.
This commit is contained in:
Ramil Kalimullin
2008-09-03 15:17:19 +05:00
parent 0e3bc47fb4
commit ef13c12c0a
3 changed files with 34 additions and 1 deletions

View File

@ -2897,7 +2897,11 @@ bool select_insert::send_data(List<Item> &values)
DBUG_RETURN(1);
}
}
if (!(error= write_record(thd, table, &info)))
error= write_record(thd, table, &info);
table->auto_increment_field_not_null= FALSE;
if (!error)
{
if (table->triggers || info.handle_duplicates == DUP_UPDATE)
{