|
Test case:
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (
|
pk int,
|
f1 varchar(255) CHARACTER SET ucs2,
|
f2 longtext CHARACTER SET ucs2,
|
f3 varchar(255),
|
f4 char(255),
|
f5 longtext CHARACTER SET ucs2,
|
f6 INT,
|
f7 INT,
|
f8 INT,
|
f9 INT,
|
f10 INT,
|
f11 INT,
|
f12 varchar(255) CHARACTER SET ucs2,
|
f13 char(255) CHARACTER SET ucs2,
|
f14 char(255) CHARACTER SET ucs2,
|
f15 varchar(255),
|
f16 longtext,
|
f17 char(255),
|
primary key (pk)
|
) ENGINE=InnoDB WITH SYSTEM VERSIONING;
|
|
INSERT INTO t1 VALUES
|
(1, 'a', 'e', 'f', 'a', 'generate', 1, 2, 3, 4, 5, 6, 'main', 'against', 'b', 'u', 'explode', 'tomorrow'),
|
(2, REPEAT('a',127), 'f', 'k', 'game', 'g', 2, 3, 4, 5, 6, 7, REPEAT('o',222), 'oven', 'flower', REPEAT('r',120), 'l', 'g'),
|
(3, 'weekly', 'x', 'v', 'r', 'c', 3, 4, 5, 6, 7, 8, 'validity', 'y', 'h', 'oxygen', 'venture', 'uncertainty'),
|
(4, 'r', 't', REPEAT('b',153), 'modern', 'h', 4, 5, 6, 7, 8, 9, REPEAT('g',128), 'a', 'w', 'f', 'b', 'b'),
|
(5, 'h', 'y', REPEAT('v',107), 'knife', 'profession', 5, 6, 7, 8, 9, 0, 'infection', 'u', 'likelihood', REPEAT('n',149), 'folk', 'd'),
|
(6, 'g', 'violent', REPEAT('o',28), 'capital', 'p', 6, 7, 8, 9, 0, 1, 'w', 'patron', 'd', 'y', 'originally', 'k'),
|
(7, 'k', 'uncomfortable', REPEAT('v',248), 'y', 'link', 7, 8, 9, 0, 1, 2, REPEAT('j',204), 'j', 'statute', 'emphasis', 'u', 'water'),
|
(8, 'preparation', 'water', 'suck', 'silver', 'a', 8, 9, 0, 1, 2, 3, 'h', 'q', 'o', 't', 'k', 'y'),
|
(9, 'y', 'f', 'e', 'a', 'dawn', 9, 0, 1, 2, 3, 4, 'peak', 'parking', 'b', 't', 'timber', 'c'),
|
(10, REPEAT('h',78), 'apologize', 'direct', 'u', 'frankly', 0, 1, 2, 3, 4, 5, 'h', 'exhibit', 'f', 'd', 'effective', 'c'),
|
(11, 'i', 'h', 'a', 'y', 'u', 1, 2, 3, 4, 5, 6, 'l', 'b', 'm', 'respond', 'ideological', 'credibility');
|
|
CREATE TABLE t2 (
|
pk int,
|
f char(255) CHARACTER SET ucs2,
|
primary key (pk),
|
key(f)
|
) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1,'against'),(2,'q');
|
|
SET SQL_MODE= '';
|
SELECT * FROM t1 INTO OUTFILE 't1.data';
|
UPDATE t1 SET f13 = 'q';
|
LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1;
|
SELECT * FROM t1 INTO OUTFILE 't1.data.2' ;
|
LOAD DATA INFILE 't1.data.2' REPLACE INTO TABLE t1;
|
SELECT * FROM t2 INTO OUTFILE 't2.data';
|
LOAD DATA INFILE 't2.data' REPLACE INTO TABLE t2;
|
SET FOREIGN_KEY_CHECKS = OFF;
|
ALTER TABLE t1 ADD FOREIGN KEY (f13) REFERENCES t2 (f) ON DELETE SET NULL;
|
LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1;
|
SET FOREIGN_KEY_CHECKS = ON;
|
|
SET SESSION SQL_MODE= 'NO_BACKSLASH_ESCAPES';
|
LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1;
|
REPLACE INTO t2 SELECT * FROM t2;
|
|
# Cleanup
|
DROP TABLE t1, t2;
|
--let $datadir= `select @@datadir`
|
--remove_file $datadir/test/t1.data
|
--remove_file $datadir/test/t1.data.2
|
--remove_file $datadir/test/t2.data
|
|
10.3 51e48b9f
|
2019-03-20 0:34:32 9 [ERROR] InnoDB: Records in wrong order on space 5 page 11 index `PRIMARY`
|
|
InnoDB: previous record PHYSICAL RECORD: n_fields 22; compact format; info bits 0
|
0: len 4; hex 80000008; asc ;;
|
1: len 7; hex 5c916e780b7982; asc \ nx y ;;
|
2: len 6; hex 000000000000; asc ;;
|
3: len 7; hex 80000000000000; asc ;;
|
4: len 30; hex 000000700000007200000065000000700000006100000072000000610000; asc p r e p a r a ; (total 44 bytes);
|
5: len 20; hex 0000007700000061000000740000006500000072; asc w a t e r;;
|
6: len 4; hex 7375636b; asc suck;;
|
7: len 30; hex 73696c766572202020202020202020202020202020202020202020202020; asc silver ; (total 255 bytes);
|
8: len 4; hex 00000061; asc a;;
|
9: len 4; hex 80000008; asc ;;
|
10: len 4; hex 80000009; asc ;;
|
11: len 4; hex 80000000; asc ;;
|
12: len 4; hex 80000001; asc ;;
|
13: len 4; hex 80000002; asc ;;
|
14: len 4; hex 80000003; asc ;;
|
15: len 4; hex 00000068; asc h;;
|
16: len 30; hex 000000710020002000200020002000200020002000200020002000200020; asc q ; (total 510 bytes);
|
17: len 30; hex 0000006f0020002000200020002000200020002000200020002000200020; asc o ; (total 510 bytes);
|
18: len 1; hex 74; asc t;;
|
19: len 1; hex 6b; asc k;;
|
20: len 30; hex 792020202020202020202020202020202020202020202020202020202020; asc y ; (total 255 bytes);
|
21: len 7; hex 5c916e780b53e0; asc \ nx S ;;
|
|
InnoDB: record PHYSICAL RECORD: n_fields 22; compact format; info bits 0
|
0: len 4; hex 20202020; asc ;;
|
1: len 7; hex 5c916e780b9987; asc \ nx ;;
|
2: len 6; hex 00000000003b; asc ;;;
|
3: len 7; hex 8f000001410c69; asc A i;;
|
4: len 30; hex 202020202020202020202020202020202020202020202020202020202020; asc ; (total 44 bytes);
|
5: len 20; hex 2020202020202020202020202020202020202020; asc ;;
|
6: len 4; hex 20202020; asc ;;
|
7: len 30; hex 202020202020202020202020202020202020202020202020202020202020; asc ; (total 255 bytes);
|
8: len 4; hex 00000000; asc ;;
|
9: len 4; hex 00000000; asc ;;
|
10: len 4; hex 00000000; asc ;;
|
11: len 4; hex 00000000; asc ;;
|
12: len 4; hex 00000000; asc ;;
|
13: len 4; hex 00000000; asc ;;
|
14: len 4; hex 00000000; asc ;;
|
15: len 4; hex 00000000; asc ;;
|
16: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 510 bytes);
|
17: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 510 bytes);
|
18: len 1; hex 00; asc ;;
|
19: len 1; hex 00; asc ;;
|
20: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 255 bytes);
|
21: len 7; hex 00000000000000; asc ;;
|
|
2019-03-20 0:34:32 9 [ERROR] InnoDB: Apparent corruption in space 5 page 11 index `PRIMARY`
|
2019-03-20 0:34:32 9 [ERROR] InnoDB: Records in wrong order on space 5 page 11 index `PRIMARY`
|
|
InnoDB: previous record PHYSICAL RECORD: n_fields 22; compact format; info bits 0
|
0: len 4; hex 80000008; asc ;;
|
1: len 7; hex 5c916e780b7982; asc \ nx y ;;
|
2: len 6; hex 000000000000; asc ;;
|
3: len 7; hex 80000000000000; asc ;;
|
4: len 30; hex 000000700000007200000065000000700000006100000072000000610000; asc p r e p a r a ; (total 44 bytes);
|
5: len 20; hex 0000007700000061000000740000006500000072; asc w a t e r;;
|
6: len 4; hex 7375636b; asc suck;;
|
7: len 30; hex 73696c766572202020202020202020202020202020202020202020202020; asc silver ; (total 255 bytes);
|
8: len 4; hex 00000061; asc a;;
|
9: len 4; hex 80000008; asc ;;
|
10: len 4; hex 80000009; asc ;;
|
11: len 4; hex 80000000; asc ;;
|
12: len 4; hex 80000001; asc ;;
|
13: len 4; hex 80000002; asc ;;
|
14: len 4; hex 80000003; asc ;;
|
15: len 4; hex 00000068; asc h;;
|
16: len 30; hex 000000710020002000200020002000200020002000200020002000200020; asc q ; (total 510 bytes);
|
17: len 30; hex 0000006f0020002000200020002000200020002000200020002000200020; asc o ; (total 510 bytes);
|
18: len 1; hex 74; asc t;;
|
19: len 1; hex 6b; asc k;;
|
20: len 30; hex 792020202020202020202020202020202020202020202020202020202020; asc y ; (total 255 bytes);
|
21: len 7; hex 5c916e780b53e0; asc \ nx S ;;
|
|
InnoDB: record PHYSICAL RECORD: n_fields 22; compact format; info bits 0
|
0: len 4; hex 20202020; asc ;;
|
1: len 7; hex 5c916e780b9987; asc \ nx ;;
|
2: len 6; hex 00000000003b; asc ;;;
|
3: len 7; hex 8f000001410c69; asc A i;;
|
4: len 30; hex 202020202020202020202020202020202020202020202020202020202020; asc ; (total 44 bytes);
|
5: len 20; hex 2020202020202020202020202020202020202020; asc ;;
|
6: len 4; hex 20202020; asc ;;
|
7: len 30; hex 202020202020202020202020202020202020202020202020202020202020; asc ; (total 255 bytes);
|
8: len 4; hex 00000000; asc ;;
|
9: len 4; hex 00000000; asc ;;
|
10: len 4; hex 00000000; asc ;;
|
11: len 4; hex 00000000; asc ;;
|
12: len 4; hex 00000000; asc ;;
|
13: len 4; hex 00000000; asc ;;
|
14: len 4; hex 00000000; asc ;;
|
15: len 4; hex 00000000; asc ;;
|
16: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 510 bytes);
|
17: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 510 bytes);
|
18: len 1; hex 00; asc ;;
|
19: len 1; hex 00; asc ;;
|
20: len 30; hex 000000000000000000000000000000000000000000000000000000000000; asc ; (total 255 bytes);
|
21: len 7; hex 00000000000000; asc ;;
|
2019-03-20 0:34:32 9 [ERROR] InnoDB: Apparent corruption in space 5 page 11 index `PRIMARY`
|
mysqld: /data/src/10.3/storage/innobase/btr/btr0btr.cc:3320: rec_t* btr_page_split_and_insert(ulint, btr_cur_t*, ulint**, mem_heap_t**, const dtuple_t*, ulint, mtr_t*): Assertion `page_validate(buf_block_get_frame(left_block), cursor->index)' failed.
|
190320 0:34:32 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fbe5e4ceee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x00005572c1dc748e in btr_page_split_and_insert (flags=0, cursor=0x7fbe58070770, offsets=0x7fbe58070708, heap=0x7fbe58070700, tuple=0x7fbe04172e18, n_ext=0, mtr=0x7fbe58070b90) at /data/src/10.3/storage/innobase/btr/btr0btr.cc:3320
|
#11 0x00005572c1cc370d in row_ins_clust_index_entry (index=0x7fbe041756a8, entry=0x7fbe04172e18, thr=0x7fbe040430d8, n_ext=0, dup_chk_only=false) at /data/src/10.3/storage/innobase/row/row0ins.cc:3298
|
#12 0x00005572c1cc3ad2 in row_ins_index_entry (index=0x7fbe041756a8, entry=0x7fbe04172e18, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3406
|
#13 0x00005572c1cc4094 in row_ins_index_entry_step (node=0x7fbe04058bf8, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3556
|
#14 0x00005572c1cc44ce in row_ins (node=0x7fbe04058bf8, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3699
|
#15 0x00005572c1cc4cd3 in row_ins_step (thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3944
|
#16 0x00005572c1ce7248 in row_update_vers_insert (thr=0x7fbe040430d8, node=0x7fbe041732f8) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2185
|
#17 0x00005572c1ce73d0 in row_update_cascade_for_mysql (thr=0x7fbe040430d8, node=0x7fbe041732f8, table=0x7fbe04038018) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2240
|
#18 0x00005572c1cbead1 in row_ins_foreign_check_on_constraint (thr=0x7fbe040430d8, foreign=0x7fbe04055028, pcur=0x7fbe580716a0, entry=0x7fbe04172210, mtr=0x7fbe58071ac0) at /data/src/10.3/storage/innobase/row/row0ins.cc:1448
|
#19 0x00005572c1cbf988 in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7fbe04055028, table=0x7fbe040737f8, entry=0x7fbe04172210, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0ins.cc:1850
|
#20 0x00005572c1d3c40b in row_upd_check_references_constraints (node=0x7fbe0403c9a8, pcur=0x7fbe58072150, table=0x7fbe040737f8, index=0x7fbe040a7cc8, offsets=0x7fbe04171bf0, thr=0x7fbe040430d8, mtr=0x7fbe58072670) at /data/src/10.3/storage/innobase/row/row0upd.cc:297
|
#21 0x00005572c1d4143e in row_upd_sec_index_entry (node=0x7fbe0403c9a8, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2516
|
#22 0x00005572c1d4170d in row_upd_sec_step (node=0x7fbe0403c9a8, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2563
|
#23 0x00005572c1d43efc in row_upd (node=0x7fbe0403c9a8, thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3331
|
#24 0x00005572c1d44264 in row_upd_step (thr=0x7fbe040430d8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3446
|
#25 0x00005572c1ce66e0 in row_update_for_mysql (prebuilt=0x7fbe0403bcc8) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1889
|
#26 0x00005572c1b8f3b9 in ha_innobase::delete_row (this=0x7fbe0406fb98, record=0x7fbe04070550 "\245\002") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9002
|
#27 0x00005572c18779ea in handler::ha_delete_row (this=0x7fbe0406fb98, buf=0x7fbe04070550 "\245\002") at /data/src/10.3/sql/handler.cc:6407
|
#28 0x00005572c153177b in write_record (thd=0x7fbe04000b00, table=0x7fbe0406ef50, info=0x7fbe04016460) at /data/src/10.3/sql/sql_insert.cc:1968
|
#29 0x00005572c1536cb4 in select_insert::send_data (this=0x7fbe04016418, values=...) at /data/src/10.3/sql/sql_insert.cc:3851
|
#30 0x00005572c15e5628 in end_send (join=0x7fbe040164c8, join_tab=0x7fbe04018018, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20580
|
#31 0x00005572c15e2e38 in evaluate_join_record (join=0x7fbe040164c8, join_tab=0x7fbe04017c68, error=0) at /data/src/10.3/sql/sql_select.cc:19616
|
#32 0x00005572c15f7e36 in AGGR_OP::end_send (this=0x7fbe04018568) at /data/src/10.3/sql/sql_select.cc:27447
|
#33 0x00005572c15e21c3 in sub_select_postjoin_aggr (join=0x7fbe040164c8, join_tab=0x7fbe04017c68, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:19112
|
#34 0x00005572c15e24f0 in sub_select (join=0x7fbe040164c8, join_tab=0x7fbe040178b8, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:19347
|
#35 0x00005572c15e1cb8 in do_select (join=0x7fbe040164c8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18938
|
#36 0x00005572c15ba821 in JOIN::exec_inner (this=0x7fbe040164c8) at /data/src/10.3/sql/sql_select.cc:4040
|
#37 0x00005572c15b9c62 in JOIN::exec (this=0x7fbe040164c8) at /data/src/10.3/sql/sql_select.cc:3834
|
#38 0x00005572c15baf02 in mysql_select (thd=0x7fbe04000b00, tables=0x7fbe04015590, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x7fbe04016418, unit=0x7fbe040049c8, select_lex=0x7fbe04005138) at /data/src/10.3/sql/sql_select.cc:4239
|
#39 0x00005572c15ace22 in handle_select (thd=0x7fbe04000b00, lex=0x7fbe04004900, result=0x7fbe04016418, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:385
|
#40 0x00005572c15711f2 in mysql_execute_command (thd=0x7fbe04000b00) at /data/src/10.3/sql/sql_parse.cc:4884
|
#41 0x00005572c157b7e0 in mysql_parse (thd=0x7fbe04000b00, rawbuf=0x7fbe04014cf8 "REPLACE INTO t2 SELECT * FROM t2", length=32, parser_state=0x7fbe580745f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8142
|
#42 0x00005572c15688cb in dispatch_command (command=COM_QUERY, thd=0x7fbe04000b00, packet=0x7fbe041622e1 "REPLACE INTO t2 SELECT * FROM t2", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1854
|
#43 0x00005572c15672b5 in do_command (thd=0x7fbe04000b00) at /data/src/10.3/sql/sql_parse.cc:1396
|
#44 0x00005572c16cfb2b in do_handle_one_connection (connect=0x5572c59d3110) at /data/src/10.3/sql/sql_connect.cc:1403
|
#45 0x00005572c16cf8af in handle_one_connection (arg=0x5572c59d3110) at /data/src/10.3/sql/sql_connect.cc:1309
|
#46 0x00005572c1b6c207 in pfs_spawn_thread (arg=0x5572c5918400) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#47 0x00007fbe601a5494 in start_thread (arg=0x7fbe58075700) at pthread_create.c:333
|
#48 0x00007fbe5e58b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
The test case uses system versioning, so I cannot confirm whether earlier versions are affected or not.
|