From 667df98c3e0f32d391af4eb65c618043720b6a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 12 Sep 2022 09:27:46 +0300 Subject: 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. --- mysql-test/suite/innodb_gis/r/rtree_temporary.result | 10 ++++++++++ mysql-test/suite/innodb_gis/t/rtree_temporary.test | 13 +++++++++++++ 2 files changed, 23 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb_gis/r/rtree_temporary.result b/mysql-test/suite/innodb_gis/r/rtree_temporary.result index 5ce02c881cc..c34df7f2d9c 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_temporary.result +++ b/mysql-test/suite/innodb_gis/r/rtree_temporary.result @@ -12,3 +12,13 @@ CREATE TEMPORARY TABLE t1 (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB; INSERT INTO t1 SELECT POINT(0,0) FROM seq_1_to_366; INSERT INTO t1 VALUES (POINT(1e-270,1e-130)); DROP TABLE t1; +# +# MDEV-29507 InnoDB: Failing assertion: table->n_rec_locks == 0 +# +connect con1,localhost,root,,; +CREATE TEMPORARY TABLE t (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB; +INSERT INTO t SELECT POINTFROMTEXT ('POINT(0 0)') FROM seq_1_to_500; +XA BEGIN 'a'; +DELETE FROM t ORDER BY c; +disconnect con1; +# End of 10.3 tests diff --git a/mysql-test/suite/innodb_gis/t/rtree_temporary.test b/mysql-test/suite/innodb_gis/t/rtree_temporary.test index 5c4df251970..e541d7c2698 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_temporary.test +++ b/mysql-test/suite/innodb_gis/t/rtree_temporary.test @@ -16,3 +16,16 @@ CREATE TEMPORARY TABLE t1 (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB; INSERT INTO t1 SELECT POINT(0,0) FROM seq_1_to_366; INSERT INTO t1 VALUES (POINT(1e-270,1e-130)); DROP TABLE t1; + +--echo # +--echo # MDEV-29507 InnoDB: Failing assertion: table->n_rec_locks == 0 +--echo # + +connect con1,localhost,root,,; +CREATE TEMPORARY TABLE t (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB; +INSERT INTO t SELECT POINTFROMTEXT ('POINT(0 0)') FROM seq_1_to_500; +XA BEGIN 'a'; +DELETE FROM t ORDER BY c; +disconnect con1; + +--echo # End of 10.3 tests -- cgit v1.2.1