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

MDEV-16929 Assertion ... in close_thread_tables upon killing connection

Problem was that the code didn't handle a transaction created in innodb
as part of a failed mysql_lock_tables()
This commit is contained in:
Monty
2020-07-21 15:12:53 +03:00
parent af83ed9f0e
commit e26c822aa0
3 changed files with 36 additions and 0 deletions

View File

@ -485,6 +485,10 @@ int SEQUENCE::read_initial_values(TABLE *table)
if (mdl_lock_used)
thd->mdl_context.release_lock(mdl_request.ticket);
write_unlock(table);
if (!has_active_transaction && !thd->transaction.stmt.is_empty() &&
!thd->in_sub_stmt)
trans_commit_stmt(thd);
DBUG_RETURN(HA_ERR_LOCK_WAIT_TIMEOUT);
}
DBUG_ASSERT(table->reginfo.lock_type == TL_READ);