summaryrefslogtreecommitdiff
path: root/plugin/server_audit/server_audit.c
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-03-07 13:43:53 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-03-11 22:46:12 +0400
commit149b75476837fb96c28739d5368e977e39fd671b (patch)
treebcd2f7f80870032d0e3fcff82b472f4a7a3537f8 /plugin/server_audit/server_audit.c
parent0a0eed80164dac0d3bfb7dcc57eb416cfba89386 (diff)
downloadmariadb-git-149b75476837fb96c28739d5368e977e39fd671b.tar.gz
MDEV-17595 - ALTER TABLE ADD FOREIGN KEY crash
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 'plugin/server_audit/server_audit.c')
0 files changed, 0 insertions, 0 deletions