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