mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
row_vers_impl_x_locked_low(): If a secondary index record points to a clustered index record that carries the current transaction identifier, then there cannot possibly be any implicit locks to that secondary index record, because those would have been checked before the current transaction got the implicit lock (modified the clustered index record) in the first place. This fix will avoid unnecessary access to undo log and possible BLOB pages, which may already have been freed in a purge operation. buf_page_get_zip(): Assert that the page is not marked as freed in the tablespace. This assertion could fire in a scenario like the test case when the table is created in ROW_FORMAT=COMPRESSED.
34 lines
987 B
Plaintext
34 lines
987 B
Plaintext
--source include/have_innodb.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-37753 lock_sec_rec_some_has_impl() unnecessarily fetches history
|
|
--echo #
|
|
CREATE TABLE t(a INT PRIMARY KEY, b TEXT, UNIQUE(b(1)))
|
|
ENGINE=InnoDB STATS_PERSISTENT=0;
|
|
|
|
connect (purge_control,localhost,root,,);
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
connection default;
|
|
SET GLOBAL innodb_max_purge_lag_wait=1;
|
|
|
|
INSERT INTO t VALUES
|
|
(1,REPEAT('x',@@innodb_page_size/2)),(2,REPEAT('z',@@innodb_page_size/2));
|
|
DELETE FROM t;
|
|
|
|
SELECT variable_value INTO @reads
|
|
FROM information_schema.global_status
|
|
WHERE variable_name = 'INNODB_BUFFER_POOL_READ_REQUESTS';
|
|
|
|
INSERT INTO t VALUES(0,'y'),(1,'x'),(2,'z');
|
|
|
|
SELECT variable_value-@reads INTO @diff
|
|
FROM information_schema.global_status
|
|
WHERE variable_name = 'INNODB_BUFFER_POOL_READ_REQUESTS';
|
|
|
|
# Typically, this reports 24 pages accessed.
|
|
# If the fix is absent, we would access at least 26 pages.
|
|
SELECT if(@diff between 22 and 25,'ok',@diff);
|
|
disconnect purge_control;
|
|
|
|
DROP TABLE t;
|