1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-29620 Assertion `next_insert_id == 0' failed in handler::ha_external_lock

ha_release_auto_increment() must be done before F_UNLCK.
Non-atomic case is handled by select_insert::binlog_query().
This commit is contained in:
Aleksey Midenkov
2022-09-27 13:44:30 +03:00
parent c579d66ba6
commit aa08a7442a
3 changed files with 13 additions and 0 deletions

View File

@ -4289,6 +4289,8 @@ bool select_insert::prepare_eof()
{
DBUG_ASSERT(table->s->tmp_table);
table->file->ha_release_auto_increment();
/*
Note: InnoDB does autocommit on external unlock.
We cannot do commit twice and we must commit after binlog