Browse Source
MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)' failed in cmp_rec_rec_simple_field
MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)' failed in cmp_rec_rec_simple_field
Problem: ======= InnoDB wrongly stores the primary key field in externally stored off page during bulk insert operation. This leads to assert failure. Solution: ======== row_merge_buf_blob(): Should store the primary key fields inline. Store the variable length field data externally based on the row format of the table.10.11-MDEV-34575
14 changed files with 445 additions and 73 deletions
-
24mysql-test/suite/innodb/r/alter_copy_bulk.result
-
8mysql-test/suite/innodb/r/innodb-64k-crash,dynamic.rdiff
-
52mysql-test/suite/innodb/r/innodb-64k-crash,redundant.rdiff
-
50mysql-test/suite/innodb/r/innodb-64k-crash.result
-
8mysql-test/suite/innodb/r/insert_into_empty,32k.rdiff
-
34mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
-
8mysql-test/suite/innodb/r/insert_into_empty,64k.rdiff
-
38mysql-test/suite/innodb/r/insert_into_empty,8k.rdiff
-
23mysql-test/suite/innodb/r/insert_into_empty.result
-
25mysql-test/suite/innodb/t/alter_copy_bulk.test
-
1mysql-test/suite/innodb/t/innodb-64k-crash.opt
-
62mysql-test/suite/innodb/t/innodb-64k-crash.test
-
28mysql-test/suite/innodb/t/insert_into_empty.test
-
157storage/innobase/row/row0merge.cc
@ -0,0 +1,8 @@ |
|||
--- innodb-64k-crash.result 2024-11-28 10:37:26.491384671 +0530 |
|||
+++ innodb-64k-crash.reject 2024-11-28 11:05:46.461405444 +0530 |
|||
@@ -334,5 +334,4 @@ |
|||
REPEAT('s', 1024), REPEAT('t', 1024), |
|||
REPEAT('u', 1024), REPEAT('v', 1024), |
|||
REPEAT('w', 1024), REPEAT('x', 1024)); |
|||
-ERROR 42000: Row size too large (> 16383). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
DROP TABLE t1; |
@ -0,0 +1,52 @@ |
|||
--- innodb-64k-crash.result 2024-11-28 10:37:26.491384671 +0530 |
|||
+++ innodb-64k-crash.reject 2024-11-28 11:10:13.381250612 +0530 |
|||
@@ -290,49 +290,3 @@ |
|||
# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)' |
|||
# failed in cmp_rec_rec_simple_field |
|||
# |
|||
-CREATE TABLE t1(f1 int not null, f2 text, f3 text, f4 text, |
|||
-f5 text, f6 text, f7 text, f8 text, |
|||
-f9 text, f10 text, f11 text, f12 text, |
|||
-f13 text, f14 text, f15 text, f16 text, |
|||
-f17 text, f18 text, f19 text, f20 text, |
|||
-f21 text, f22 text, f23 text, f24 text, |
|||
-f25 text, PRIMARY KEY(f1))ENGINE=InnoDB; |
|||
-SET STATEMENT unique_checks=0,foreign_key_checks=0 FOR |
|||
-INSERT INTO t1 VALUES(1, REPEAT('a', 1024), REPEAT('b', 1024), |
|||
-REPEAT('c', 1024), REPEAT('d', 1024), |
|||
-REPEAT('e', 1024), REPEAT('f', 1024), |
|||
-REPEAT('g', 4096), REPEAT('h', 1024), |
|||
-REPEAT('i', 1024), REPEAT('j', 1024), |
|||
-REPEAT('k', 1024), REPEAT('l', 1024), |
|||
-REPEAT('m', 1024), REPEAT('n', 1024), |
|||
-REPEAT('o', 1024), REPEAT('p', 1024), |
|||
-REPEAT('q', 1024), REPEAT('r', 1024), |
|||
-REPEAT('s', 1024), REPEAT('t', 1024), |
|||
-REPEAT('u', 1024), REPEAT('v', 1024), |
|||
-REPEAT('w', 1024), REPEAT('x', 1024)), |
|||
-(2, REPEAT('a', 1024), REPEAT('b', 1024), |
|||
-REPEAT('c', 1024), REPEAT('d', 1024), |
|||
-REPEAT('e', 1024), REPEAT('f', 1024), |
|||
-REPEAT('g', 4096), REPEAT('h', 1024), |
|||
-REPEAT('i', 1024), REPEAT('j', 1024), |
|||
-REPEAT('k', 1024), REPEAT('l', 1024), |
|||
-REPEAT('m', 1024), REPEAT('n', 1024), |
|||
-REPEAT('o', 1024), REPEAT('p', 1024), |
|||
-REPEAT('q', 1024), REPEAT('r', 1024), |
|||
-REPEAT('s', 1024), REPEAT('t', 1024), |
|||
-REPEAT('u', 1024), REPEAT('v', 1024), |
|||
-REPEAT('w', 1024), REPEAT('x', 1024)), |
|||
-(3, REPEAT('a', 1024), REPEAT('b', 1024), |
|||
-REPEAT('c', 1024), REPEAT('d', 1024), |
|||
-REPEAT('e', 1024), REPEAT('f', 1024), |
|||
-REPEAT('g', 4096), REPEAT('h', 1024), |
|||
-REPEAT('i', 1024), REPEAT('j', 1024), |
|||
-REPEAT('k', 1024), REPEAT('l', 1024), |
|||
-REPEAT('m', 1024), REPEAT('n', 1024), |
|||
-REPEAT('o', 1024), REPEAT('p', 1024), |
|||
-REPEAT('q', 1024), REPEAT('r', 1024), |
|||
-REPEAT('s', 1024), REPEAT('t', 1024), |
|||
-REPEAT('u', 1024), REPEAT('v', 1024), |
|||
-REPEAT('w', 1024), REPEAT('x', 1024)); |
|||
-ERROR 42000: Row size too large (> 16383). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
-DROP TABLE t1; |
@ -1,10 +1,38 @@ |
|||
--- a/mysql-test/suite/innodb/r/insert_into_empty.result |
|||
+++ b/mysql-test/suite/innodb/r/insert_into_empty.result |
|||
@@ -430,6 +430,7 @@ |
|||
--- insert_into_empty.result |
|||
+++ insert_into_empty,4k.result |
|||
@@ -451,7 +451,7 @@ |
|||
INSERT IGNORE INTO t1 VALUES |
|||
(1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)), |
|||
(2, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)); |
|||
-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
+ERROR 42000: Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
CHECK TABLE t1; |
|||
Table Op Msg_type Msg_text |
|||
test.t1 check status OK |
|||
@@ -541,26 +541,4 @@ |
|||
DELETE FROM t1; |
|||
commit; |
|||
DROP TABLE t1; |
|||
-# |
|||
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)' |
|||
-# failed in cmp_rec_rec_simple_field |
|||
-# |
|||
-CREATE TABLE t1(a BLOB, b VARCHAR(2048), PRIMARY KEY (b)) ENGINE=InnoDB; |
|||
-INSERT INTO t1 VALUES (REPEAT('x',4805),'a'), (REPEAT('x',16111),'b'), |
|||
-(REPEAT('x',65535),'c'), (REPEAT('x',11312),'d'), |
|||
-(REPEAT('x',35177),'e'), (REPEAT('x',65535),'f'), |
|||
-(REPEAT('x',1988),'g'), (NULL,REPEAT('x',2048)), |
|||
-(REPEAT('x',2503),'h'), (REPEAT('x',33152),'i'), |
|||
-(REPEAT('x',65535),'j'), (REPEAT('x',1988),'k'), |
|||
-(REPEAT('x',65535),'l'), (REPEAT('x',65535),'m'), |
|||
-(REPEAT('x',65535),'n'), (REPEAT('x',65535),'o'), |
|||
-(REPEAT('x',1988),'p'), (REPEAT('x',2503),'q'), |
|||
-(REPEAT('x',65535),'r'), (REPEAT('x',65535),'s'), |
|||
-(REPEAT('x',65535),'t'), (REPEAT('x',3169),'u'), |
|||
-(REPEAT('x',7071),'v'), (REPEAT('x',16111),'w'), |
|||
-(REPEAT('x',2325),'x'), (REPEAT('x',33152),'y'), |
|||
-(REPEAT('x',65535),'z'), (REPEAT('x',65535),'aa'), |
|||
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'), |
|||
-(REPEAT('x',65535),'dd'); |
|||
-DROP TABLE t1; |
|||
# End of 10.11 tests |
@ -0,0 +1,38 @@ |
|||
--- insert_into_empty.result |
|||
+++ insert_into_empty,8k.result |
|||
@@ -451,7 +451,7 @@ |
|||
INSERT IGNORE INTO t1 VALUES |
|||
(1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)), |
|||
(2, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)); |
|||
-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
+ERROR 42000: Row size too large (> 4030). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. |
|||
CHECK TABLE t1; |
|||
Table Op Msg_type Msg_text |
|||
test.t1 check status OK |
|||
@@ -541,26 +541,4 @@ |
|||
DELETE FROM t1; |
|||
commit; |
|||
DROP TABLE t1; |
|||
-# |
|||
-# MDEV-35475 Assertion `!rec_offs_nth_extern(offsets1, n)' |
|||
-# failed in cmp_rec_rec_simple_field |
|||
-# |
|||
-CREATE TABLE t1(a BLOB, b VARCHAR(2048), PRIMARY KEY (b)) ENGINE=InnoDB; |
|||
-INSERT INTO t1 VALUES (REPEAT('x',4805),'a'), (REPEAT('x',16111),'b'), |
|||
-(REPEAT('x',65535),'c'), (REPEAT('x',11312),'d'), |
|||
-(REPEAT('x',35177),'e'), (REPEAT('x',65535),'f'), |
|||
-(REPEAT('x',1988),'g'), (NULL,REPEAT('x',2048)), |
|||
-(REPEAT('x',2503),'h'), (REPEAT('x',33152),'i'), |
|||
-(REPEAT('x',65535),'j'), (REPEAT('x',1988),'k'), |
|||
-(REPEAT('x',65535),'l'), (REPEAT('x',65535),'m'), |
|||
-(REPEAT('x',65535),'n'), (REPEAT('x',65535),'o'), |
|||
-(REPEAT('x',1988),'p'), (REPEAT('x',2503),'q'), |
|||
-(REPEAT('x',65535),'r'), (REPEAT('x',65535),'s'), |
|||
-(REPEAT('x',65535),'t'), (REPEAT('x',3169),'u'), |
|||
-(REPEAT('x',7071),'v'), (REPEAT('x',16111),'w'), |
|||
-(REPEAT('x',2325),'x'), (REPEAT('x',33152),'y'), |
|||
-(REPEAT('x',65535),'z'), (REPEAT('x',65535),'aa'), |
|||
-(REPEAT('x',16111),'bb'), (REPEAT('x',4805),'cc'), |
|||
-(REPEAT('x',65535),'dd'); |
|||
-DROP TABLE t1; |
|||
# End of 10.11 tests |
@ -0,0 +1 @@ |
|||
--innodb_sort_buffer_size=65536 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue