Author: George Ma Date: Wed Sep 2 20:00:45 2026 +0800 bug #121211 test case diff --git a/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro-master.opt b/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro-master.opt new file mode 100644 index 00000000000..67c8423cf2a --- /dev/null +++ b/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro-master.opt @@ -0,0 +1 @@ +--innodb_buffer_pool_size=5M diff --git a/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro.test b/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro.test new file mode 100644 index 00000000000..36c5c51db49 --- /dev/null +++ b/mysql-test/suite/innodb/t/rtree_rebuild_sync_lob_repro.test @@ -0,0 +1,40 @@ +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE t1 ( + id INT NOT NULL AUTO_INCREMENT, + c LONGBLOB, + pad CHAR(60) NOT NULL, + g LINESTRING NOT NULL, + PRIMARY KEY (id), + SPATIAL KEY sp_g (g) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t1 (c, pad, g) +VALUES + (REPEAT('x', 6 * 1024 * 1024), REPEAT('a', 60), + ST_GeomFromText('LINESTRING(0 0, 1 1, 2 2)')), + (REPEAT('x', 6 * 1024 * 1024), REPEAT('b', 60), + ST_GeomFromText('LINESTRING(0 0, 1 1, 2 2)')), + (REPEAT('x', 6 * 1024 * 1024), REPEAT('c', 60), + ST_GeomFromText('LINESTRING(0 0, 1 1, 2 2)')); + +--connect (con1, localhost, root,,) +# Force the clustered-index builder to flush after two spatial tuples are cached. +SET DEBUG='+d,ddl_buf_add_two'; +# Stop only after savepoint() has released the source-page latch. +SET DEBUG_SYNC='ddl_bulk_inserter_latches_released SIGNAL ddl_latches_released WAIT_FOR ddl_continue'; +--send ALTER TABLE t1 ENGINE=InnoDB, ALGORITHM=INPLACE + +--connection default +SET DEBUG_SYNC='now WAIT_FOR ddl_latches_released'; +SET DEBUG_SYNC='now SIGNAL ddl_continue'; + +--connection con1 +--reap +CHECK TABLE t1; +SET DEBUG='-d,ddl_buf_add_two'; + +--connection default +SET DEBUG_SYNC='RESET'; +DROP TABLE t1;