1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-30024 InnoDB: tried to purge non-delete-marked of a virtual column prefix

row_vers_vc_matches_cluster(): Invoke dtype_get_at_most_n_mbchars()
to extract the correct number of bytes corresponding to the number
of characters in a virtual column prefix index, just like we do in
row_sel_sec_rec_is_for_clust_rec().

The test case would occasionally reproduce the failure when this
fix is not present.
This commit is contained in:
Marko Mäkelä
2023-09-19 09:31:34 +03:00
parent 68353dc92a
commit 76b688f100
3 changed files with 38 additions and 3 deletions

View File

@@ -159,4 +159,18 @@ UNIQUE(pk),
KEY(e)
) ENGINE=InnoDB;
DROP TABLE t1, t2;
#
# MDEV-30024 InnoDB: tried to purge non-delete-marked record
# of an index on a virtual column prefix
#
CREATE TABLE t(a BINARY(8), b CHAR(8) AS (a) VIRTUAL, KEY(b(4)))
CHARACTER SET utf8 ENGINE=InnoDB;
INSERT INTO t (a) VALUES (''),('');
UPDATE t SET a = 'x';
UPDATE t SET a = '';
SET GLOBAL innodb_max_purge_lag_wait=0;
CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TABLE t;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;