summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/insert_into_empty.test
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-12-23 12:50:00 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-12-24 14:40:52 +0530
commit9f2a6bbe6ba03ca5297cd37b75301d05eb44e044 (patch)
tree8cc0afb6b482cc0348d981c3f4fcdddbc80a15c2 /mysql-test/suite/innodb/t/insert_into_empty.test
parent1b8f0d4b674dd7f9414778054ef714f0fed71ccc (diff)
downloadmariadb-git-9f2a6bbe6ba03ca5297cd37b75301d05eb44e044.tar.gz
MDEV-27316 Assertion `!(index)->is_spatial()' failedbb-10.7-MDEV-27316
This issue is caused by MDEV-24621 (commit 045757af4c301757ba449269351cc27b1691a7d6). InnoDB tries to insert the number of rows into an empty spatial index table, but it fails to apply the buffered insert. InnoDB should insert into the spatial index directly instead of buffering the insert operation.
Diffstat (limited to 'mysql-test/suite/innodb/t/insert_into_empty.test')
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index 7719ae68d7b..bfcf96d854c 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+
--source include/have_sequence.inc
--source include/maybe_debug.inc
--source include/have_partition.inc
@@ -233,3 +234,11 @@ ALTER TABLE t1 ADD COLUMN row_start BIGINT UNSIGNED AS ROW START,
ADD COLUMN row_end BIGINT UNSIGNED AS ROW END,
ADD PERIOD FOR SYSTEM_TIME(row_start,row_end), WITH SYSTEM VERSIONING;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-27316 Assertion `!(index)->is_spatial()' failed.
+--echo #
+CREATE TABLE t (c POINT NOT NULL, SPATIAL INDEX(c)) ENGINE=InnoDB;
+INSERT INTO t VALUES (POINT(1, 1));
+SELECT COUNT(*) FROM t WHERE MBRWithin(t.c, POINT(1,1));
+DROP TABLE t;