mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
3b10e8f80c
row_sel_sec_rec_is_for_clust_rec() treats empty BLOB prefix field in secondary index as a field equal to any external BLOB field in clustered index. Row_sel_get_clust_rec_for_mysql::operator() doesn't zerro out clustered record pointer in row_search_mvcc(), and row_search_mvcc() thinks that delete-marked secondary index record has visible for "CHECK TABLE"'s read view old-versioned clustered index record, and row_scan_index_for_mysql() counts it as a row. The fix is to execute row_sel_sec_rec_is_for_blob() in row_sel_sec_rec_is_for_clust_rec() if clustered field contains BLOB's reference.
19 lines
663 B
Text
19 lines
663 B
Text
connect prevent_purge,localhost,root,,;
|
|
start transaction with consistent snapshot;
|
|
connection default;
|
|
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
|
|
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
|
|
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
|
|
UPDATE t1 SET col_text='';
|
|
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
|
|
connect con1,localhost,root,,;
|
|
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
|
|
BEGIN;
|
|
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
|
|
connection default;
|
|
CHECK TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
disconnect con1;
|
|
disconnect prevent_purge;
|
|
DROP TABLE t1;
|