From d6ed077fc82c2f4d20895db9a6b16ca295f23c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 4 Feb 2018 13:11:49 +0200 Subject: Clarify a comment after MDEV-15061 --- storage/innobase/lock/lock0lock.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index d8d01f88a05..3d66e50cce9 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -5853,8 +5853,11 @@ lock_rec_block_validate( buf_block_t* block; mtr_t mtr; - /* Make sure that the tablespace is not deleted while we are - trying to access the page. */ + /* Transactional locks should never refer to dropped + tablespaces, because all DDL operations that would drop or + discard or rebuild a tablespace do hold an exclusive table + lock, which would conflict with any locks referring to the + tablespace from other transactions. */ if (fil_space_t* space = fil_space_acquire(space_id)) { dberr_t err = DB_SUCCESS; mtr_start(&mtr); -- cgit v1.2.1