diff options
author | Magne Mahre <magne.mahre@sun.com> | 2009-10-15 14:53:06 +0200 |
---|---|---|
committer | Magne Mahre <magne.mahre@sun.com> | 2009-10-15 14:53:06 +0200 |
commit | a363c06ed079fa30a9aca48f783d563d130ac2dd (patch) | |
tree | 2d9f2b83f7ff41ff3f5a967d646d1a5a3bc092af /sql/sql_insert.cc | |
parent | 7e895de84f257b3cf143fd87f0f206c1504e6292 (diff) | |
download | mariadb-git-a363c06ed079fa30a9aca48f783d563d130ac2dd.tar.gz |
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
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index fd19a025429..e9b8254aeb3 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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 |