Skip to content

Commit e928fdb

Browse files
committed
Merge 10.2 into 10.3
2 parents a6ef239 + e777645 commit e928fdb

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
connect prevent_purge,localhost,root,,;
2+
start transaction with consistent snapshot;
3+
connection default;
4+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
5+
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
6+
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
7+
UPDATE t1 SET col_text='';
8+
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
9+
connect con1,localhost,root,,;
10+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
11+
BEGIN;
12+
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
13+
connection default;
14+
CHECK TABLE t1;
15+
Table Op Msg_type Msg_text
16+
test.t1 check status OK
17+
disconnect con1;
18+
disconnect prevent_purge;
19+
DROP TABLE t1;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--source include/innodb_row_format.inc
2+
--source include/count_sessions.inc
3+
--connect(prevent_purge,localhost,root,,)
4+
start transaction with consistent snapshot;
5+
6+
--connection default
7+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
8+
CREATE TABLE t1 (col_text TEXT NOT NULL, KEY (col_text(9))) ENGINE=InnoDB;
9+
10+
INSERT INTO t1 (col_text) VALUES (REPEAT('x', @fill_amount));
11+
UPDATE t1 SET col_text='';
12+
UPDATE t1 SET col_text=REPEAT('y', @fill_amount);
13+
14+
--connect(con1,localhost,root,,)
15+
SET @fill_amount = (@@innodb_page_size / 2 ) + 1;
16+
BEGIN;
17+
INSERT INTO t1 (col_text) VALUES (REPEAT('z', @fill_amount));
18+
19+
--connection default
20+
# If the bug is not fixed, CHECK TABLE will complain about wrong secondary index
21+
# rows count
22+
CHECK TABLE t1;
23+
--disconnect con1
24+
--disconnect prevent_purge
25+
DROP TABLE t1;
26+
--source include/wait_until_count_sessions.inc

mysql-test/suite/innodb_gis/disabled.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212

1313
rtree_concurrent_srch : MDEV-15284 COUNT(*) mismatch
1414
rtree_recovery : MDEV-15284 COUNT(*) mismatch
15+
rtree_compress2 : MDEV-16269 CHECK TABLE reports wrong count

storage/innobase/row/row0sel.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,16 @@ row_sel_sec_rec_is_for_clust_rec(
354354
}
355355

356356
len = clust_len;
357+
ulint prefix_len = ifield->prefix_len;
357358
if (rec_offs_nth_extern(clust_offs, clust_pos)) {
359+
/* BLOB can contain prefix. */
358360
len -= BTR_EXTERN_FIELD_REF_SIZE;
361+
if (!len) {
362+
goto compare_blobs;
363+
}
359364
}
360365

361-
if (ulint prefix_len = ifield->prefix_len) {
366+
if (prefix_len) {
362367
len = dtype_get_at_most_n_mbchars(
363368
col->prtype, col->mbminlen,
364369
col->mbmaxlen, prefix_len, len,
@@ -371,6 +376,7 @@ row_sel_sec_rec_is_for_clust_rec(
371376
check_for_blob:
372377
if (rec_offs_nth_extern(clust_offs,
373378
clust_pos)) {
379+
compare_blobs:
374380
if (!row_sel_sec_rec_is_for_blob(
375381
col->mtype, col->prtype,
376382
col->mbminlen,

0 commit comments

Comments
 (0)