mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug #43054 Assertion `!table->auto_increment_field_not_null' failed when
redefining trigger The 'table->auto_increment_field_not_null' flag is only valid within processing of a single row, and should be set to FALSE before navigating to the next row, or exiting the operation. This bug was caused by an SQL error occuring while executing a trigger after the flag had been set, so the normal resetting was bypassed. The table object was then returned to the table share's cache in a dirty condition. When the table object was reused, an assert caught that the flag was set. This patch explicitly clears the flag on error/abort. Backported from mysql-6.0-codebase revid: 2617.52.1
This commit is contained in:
@@ -3843,6 +3843,7 @@ void select_create::abort()
|
||||
{
|
||||
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
|
||||
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
if (!create_info->table_existed)
|
||||
drop_open_table(thd, table, create_table->db, create_table->table_name);
|
||||
table=0; // Safety
|
||||
|
Reference in New Issue
Block a user