diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-03-07 13:43:53 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-03-07 14:00:19 +0400 |
commit | 7b91d3088301badc6617663565ea6fc8c4b88e3f (patch) | |
tree | d1d20bb1b8c21632f75e03419a7b6e611b44e317 /sql/event_queue.h | |
parent | 2d34713294d5339d1459911a46fa20395443b3c7 (diff) | |
download | mariadb-git-bb-10.0-svoj.tar.gz |
MDEV-17595 - ALTER TABLE ADD FOREIGN KEY crashbb-10.0-svoj
ALTER TABLE ... ADD FOREIGN KEY may trigger assertion failure when
it has LOCK=EXCLUSIVE clause or concurrent FLUSH TABLES is being
executed.
In both cases being altered table is marked as flushed, which forces
subsequent attempt to open parent table to re-open. Which in turn is
not allowed while transaction is running.
Rather than opening parent table, just take appropriate MDL lock.
Also removed table_already_fk_prelocked() check: MDL itself has much
better methods to handle duplicate locks. E.g. the former won't acquire
MDL_SHARED_NO_WRITE if it already has MDL_SHARED_READ.
Diffstat (limited to 'sql/event_queue.h')
0 files changed, 0 insertions, 0 deletions