diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-12-17 14:20:23 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-12-29 12:42:01 +0200 |
commit | f35c2e65a7a3df5ee71b0a48474835337f843872 (patch) | |
tree | 32ba52a10559b4123588f6badc1145da860229e5 /client/my_readline.h | |
parent | e59c1cef3bc4016f9fa9d7a0f6935463b7283a58 (diff) | |
download | mariadb-git-bb-10.3-MDEV-23536.tar.gz |
MDEV-23536 : Race condition between KILL and transaction commitbb-10.3-MDEV-23536
A race condition may occur between the execution of transaction commit,
and an execution of a KILL statement that would attempt to abort that
transaction.
MDEV-17092 worked around this race condition by modifying InnoDB code.
After that issue was closed, Sergey Vojtovich pointed out that this
race condition would better be fixed above the storage engine layer:
If you look carefully into the above, you can conclude that
thd->free_connection() can be called concurrently with
KILL/thd->awake(). Which is the bug. And it is partially fixed in
THD::~THD(), that is destructor waits for KILL completion:
Fix: Add necessary mutex operations to THD::free_connection()
and move WSREP specific code also there. This ensures that no
one is using THD while we do free_connection(). These mutexes
will also ensures that there can't be concurrent KILL/THD::awake().
innobase_kill_query
We can now remove usage of trx_sys_mutex introduced on MDEV-17092.
trx_t::free()
Poison trx->state and trx->mysql_thd
This patch is validated with an RQG run similar to the one that
reproduced MDEV-17092.
Diffstat (limited to 'client/my_readline.h')
0 files changed, 0 insertions, 0 deletions