#11 0x000055c923810816 in cmp_dtuple_rec_with_match_low (dtuple=0x7f37101a60a8, rec=0x7f376313007e "foo \200", offsets=0x7f37680a9480, n_cmp=2, matched_fields=0x7f37680a8ea8) at /data/src/10.4/storage/innobase/rem/rem0cmp.cc:669
#12 0x000055c923811362 in cmp_dtuple_rec (dtuple=0x7f37101a60a8, rec=0x7f376313007e "foo \200", offsets=0x7f37680a9480) at /data/src/10.4/storage/innobase/rem/rem0cmp.cc:914
#13 0x000055c9239835dd in page_cur_tuple_insert (cursor=0x7f37680a93e8, tuple=0x7f37101a60a8, index=0x7f3710042670, offsets=0x7f37680a9388, heap=0x7f37680a9360, n_ext=0, mtr=0x7f37680a96e0) at /data/src/10.4/storage/innobase/include/page0cur.ic:289
#14 0x000055c923991bca in btr_cur_optimistic_insert (flags=0, cursor=0x7f37680a93e0, offsets=0x7f37680a9388, heap=0x7f37680a9360, entry=0x7f37101a60a8, rec=0x7f37680a9390, big_rec=0x7f37680a9398, n_ext=0, thr=0x7f3710174bd0, mtr=0x7f37680a96e0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:3609
#15 0x000055c9238510ce in row_ins_sec_index_entry_low (flags=0, mode=2, index=0x7f3710042670, offsets_heap=0x7f37100565c0, heap=0x7f3710056a50, entry=0x7f37101a60a8, trx_id=0, thr=0x7f3710174bd0) at /data/src/10.4/storage/innobase/row/row0ins.cc:3095
#16 0x000055c9238519b8 in row_ins_sec_index_entry (index=0x7f3710042670, entry=0x7f37101a60a8, thr=0x7f3710174bd0, check_foreign=true) at /data/src/10.4/storage/innobase/row/row0ins.cc:3297
#17 0x000055c923851bd9 in row_ins_index_entry (index=0x7f3710042670, entry=0x7f37101a60a8, thr=0x7f3710174bd0) at /data/src/10.4/storage/innobase/row/row0ins.cc:3345
#18 0x000055c923852483 in row_ins_index_entry_step (node=0x7f3710174988, thr=0x7f3710174bd0) at /data/src/10.4/storage/innobase/row/row0ins.cc:3512
#19 0x000055c92385299a in row_ins (node=0x7f3710174988, thr=0x7f3710174bd0) at /data/src/10.4/storage/innobase/row/row0ins.cc:3671
#20 0x000055c9238532db in row_ins_step (thr=0x7f3710174bd0) at /data/src/10.4/storage/innobase/row/row0ins.cc:3821
#21 0x000055c923878897 in row_insert_for_mysql (mysql_rec=0x7f3710170090 "\375\001", prebuilt=0x7f3710174460, ins_mode=ROW_INS_NORMAL) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1401
#22 0x000055c9236caad6 in ha_innobase::write_row (this=0x7f3710173c68, record=0x7f3710170090 "\375\001") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8112
#23 0x000055c923300706 in handler::ha_write_row (this=0x7f3710173c68, buf=0x7f3710170090 "\375\001") at /data/src/10.4/sql/handler.cc:6771
#24 0x000055c922f70276 in write_record (thd=0x7f3710000d90, table=0x7f3710172e00, info=0x7f37680aaad0) at /data/src/10.4/sql/sql_insert.cc:2072
#25 0x000055c922f6d101 in mysql_insert (thd=0x7f3710000d90, table_list=0x7f3710014890, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1078
#26 0x000055c922fbaf75 in mysql_execute_command (thd=0x7f3710000d90) at /data/src/10.4/sql/sql_parse.cc:4598
#27 0x000055c922fc66c0 in mysql_parse (thd=0x7f3710000d90, rawbuf=0x7f3710014798 "INSERT INTO t1 VALUES (1,'foo'),(2,'bar')", length=41, parser_state=0x7f37680ab550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7995
#28 0x000055c922fb2b39 in dispatch_command (command=COM_QUERY, thd=0x7f3710000d90, packet=0x7f371000abf1 "INSERT INTO t1 VALUES (1,'foo'),(2,'bar')", packet_length=41, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#29 0x000055c922fb13c6 in do_command (thd=0x7f3710000d90) at /data/src/10.4/sql/sql_parse.cc:1373
#30 0x000055c92313f52f in do_handle_one_connection (connect=0x55c926ca4cf0) at /data/src/10.4/sql/sql_connect.cc:1420
#31 0x000055c92313f1d7 in handle_one_connection (arg=0x55c926ca4cf0) at /data/src/10.4/sql/sql_connect.cc:1316
#32 0x000055c92365a989 in pfs_spawn_thread (arg=0x55c926c85260) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#33 0x00007f376dfb1ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#34 0x00007f376dbaedef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The failure stared happening on 10.4 after this commit:
commit e9aac091537a7aaf18543c6abc228f0cbd0ec58f
Author: Marko Mäkelä
Date: Wed Jan 26 12:42:17 2022 +0200
MDEV-25440: Indexed CHAR columns are broken with NO_PAD collations
No obvious immediate effect on a non-debug build.
Attachments
Issue Links
is duplicated by
MDEV-27768MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
Closed
relates to
MDEV-25904New collation functions to compare InnoDB style trimmed NO PAD strings
Closed
MDEV-30034UNIQUE USING HASH accepts duplicate entries for tricky collations
Closed
MDEV-30048Prefix keys for CHAR work differently for MyISAM vs InnoDB
Closed
MDEV-30050Inconsistent results of DISTINCT with NOPAD
Closed
MDEV-30072Wrong ORDER BY for a partitioned prefix key + NOPAD
Alexander Barkov
added a comment - - edited A similar crash happens with these scripts:
CREATE OR REPLACE TABLE t1
(
a VARCHAR (250) COLLATE tis620_thai_nopad_ci,
UNIQUE KEY (a(100)) USING HASH
) ENGINE=MyISAM;
INSERT INTO t1 VALUES ( 'a' ),( 'A' );
CREATE OR REPLACE TABLE t1
(
a CHAR (250) COLLATE tis620_thai_nopad_ci,
UNIQUE KEY (a(100)) USING HASH
) ENGINE=MyISAM;
INSERT INTO t1 VALUES ( 'a' ),( 'A' );
The fix appeared to be quite simple, but it required a lot of investigation,
which helped to find and report a number of new bugs.
Alexander Barkov
added a comment - The fix appeared to be quite simple, but it required a lot of investigation,
which helped to find and report a number of new bugs.
Not raising to a blocker since the commit doesn't seem to be present in bb-10.4-release.