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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user