mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-28478: INSERT into SPATIAL INDEX in TEMPORARY table writes log
This is based on commit 20ae4816bb
with some adjustments for MDEV-12353.
row_ins_sec_index_entry_low(): If a separate mini-transaction is
needed to adjust the minimum bounding rectangle (MBR) in the parent
page, we must disable redo logging if the table is a temporary table.
For temporary tables, no log is supposed to be written, because
the temporary tablespace will be reinitialized on server restart.
rtr_update_mbr_field(), rtr_merge_and_update_mbr(): Changed the return
type to void and removed unreachable code. In older versions, these
used to return a different value for temporary tables.
page_id_t: Add constexpr to most member functions.
mtr_t::log_write(): Catch log writes to invalid tablespaces
so that the test case would crash without the fix to
row_ins_sec_index_entry_low().
This commit is contained in:
@ -73,11 +73,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
|
||||
|
||||
# Clean up.
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27417 Spatial index tries to update
|
||||
--echo # change buffer bookkeeping page
|
||||
--echo #
|
||||
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
|
||||
DROP TABLE t1;
|
||||
|
18
mysql-test/suite/innodb_gis/t/rtree_temporary.test
Normal file
18
mysql-test/suite/innodb_gis/t/rtree_temporary.test
Normal file
@ -0,0 +1,18 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27417 Spatial index tries to update
|
||||
--echo # change buffer bookkeeping page
|
||||
--echo #
|
||||
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28478 Assertion mtr->get_log_mode() == MTR_LOG_NO_REDO
|
||||
--echo #
|
||||
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;
|
Reference in New Issue
Block a user