summaryrefslogtreecommitdiff
path: root/storage/innobase/lock
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-09-12 09:27:46 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-09-12 09:27:46 +0300
commit667df98c3e0f32d391af4eb65c618043720b6a2f (patch)
tree55a77f8e16ef1c08d36f0d67fed784f6caa67380 /storage/innobase/lock
parent43745b7e17e2889c0e2891a2ffaf4ec203aa5c7b (diff)
downloadmariadb-git-667df98c3e0f32d391af4eb65c618043720b6a2f.tar.gz
MDEV-29507 InnoDB: Failing assertion: table->n_rec_locks == 0
lock_place_prdt_page_lock(): Do not place locks on temporary tables. Temporary tables can only be accessed from one connection, so it does not make any sense to acquire any transactional locks on them.
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r--storage/innobase/lock/lock0prdt.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/innobase/lock/lock0prdt.cc b/storage/innobase/lock/lock0prdt.cc
index 9827243177d..11c1de7a1ef 100644
--- a/storage/innobase/lock/lock0prdt.cc
+++ b/storage/innobase/lock/lock0prdt.cc
@@ -916,6 +916,9 @@ lock_place_prdt_page_lock(
ut_ad(!dict_index_is_clust(index));
ut_ad(!dict_index_is_online_ddl(index));
+ if (index->table->is_temporary()) {
+ return DB_SUCCESS;
+ }
/* Another transaction cannot have an implicit lock on the record,
because when we come here, we already have modified the clustered