Bug #103030 Insert into table with multi-valued indexes cause crash
Submitted: 18 Mar 7:56 Modified: 18 Apr 8:47
Reporter: George Ma Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.18 OS:Any
Assigned to: CPU Architecture:Any

[18 Mar 7:56] George Ma
Description:
I encounter a crash when inserting into a table with multi-valued indexes, the core stack is bellow:

#0  0x00007fc1d6db3741 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000020cac97 in my_write_core (sig=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/mysys/stacktrace.cc:305
#2  0x000000000118872d in handle_fatal_signal (sig=11) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/signal_handler.cc:169
#3  <signal handler called>
#4  0x00000000024c0b0a in multi_value_data::has (this=this@entry=0x7fc19a39e700, mtype=12, prtype=20279311, data=0x7fc1c3f202fe "\"Kyunki... Saas Bhi Kabhi Bahu Thi...\"\200", len=38) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/data/data0data.cc:845
#5  0x00000000024c0bb9 in multi_value_data::has (this=this@entry=0x7fc19a39e700, type=<optimized out>, data=<optimized out>, len=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/data/data0data.cc:839
#6  0x0000000002316339 in cmp_dtuple_rec_with_match_low (dtuple=dtuple@entry=0x7fc1a4da53d8, rec=0x7fc1c3f202fe "\"Kyunki... Saas Bhi Kabhi Bahu Thi...\"\200", index=index@entry=0x7fc19a09a608, offsets=<optimized out>, n_cmp=2, matched_fields=matched_fields@entry=0x7fc1ceceb380)
    at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/rem/rem0cmp.cc:670
#7  0x00000000023163e1 in dtuple_t::compare (this=this@entry=0x7fc1a4da53d8, rec=<optimized out>, index=index@entry=0x7fc19a09a608, offsets=<optimized out>, matched_fields=matched_fields@entry=0x7fc1ceceb380)
    at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/rem/rem0cmp.cc:1117
#8  0x00000000022f0e5a in page_cur_search_with_match (block=block@entry=0x7fc1bd97bb60, index=index@entry=0x7fc19a09a608, tuple=tuple@entry=0x7fc1a4da53d8, mode=mode@entry=PAGE_CUR_LE, iup_matched_fields=iup_matched_fields@entry=0x7fc1ceceb850, 
    ilow_matched_fields=ilow_matched_fields@entry=0x7fc1ceceb860, cursor=0x7fc1cecec6d8, rtr_info=0x0) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/page/page0cur.cc:490
#9  0x00000000024497dd in btr_cur_search_to_nth_level (index=index@entry=0x7fc19a09a608, level=level@entry=0, tuple=tuple@entry=0x7fc1a4da53d8, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=2562, cursor=cursor@entry=0x7fc1cecec6d0, 
    has_search_latch=<optimized out>, file=<optimized out>, line=<optimized out>, mtr=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/btr/btr0cur.cc:1263
#10 0x0000000002335ebd in row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x7fc19a09a608, offsets_heap=<optimized out>, offsets_heap@entry=0x7fc19a044d18, heap=heap@entry=0x7fc19a044318, entry=entry@entry=0x7fc1a4da53d8, trx_id=<optimized out>, 
    thr=<optimized out>, dup_chk_only=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:2884
#11 0x000000000233b3a9 in row_ins_sec_index_entry (index=0x7fc19a09a608, entry=0x7fc1a4da53d8, thr=0x7fc19d7008a0, dup_chk_only=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3200
#12 0x000000000233bc8e in row_ins_sec_index_multi_value_entry (thr=0x7fc19d7008a0, multi_val_pos=@0x7fc199c09378: 0, entry=0x7fc1a4da53d8, index=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3258
#13 row_ins_index_entry (thr=0x7fc19d7008a0, multi_val_pos=@0x7fc199c09378: 0, entry=0x7fc1a4da53d8, index=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3298
#14 row_ins_index_entry_step (thr=0x7fc19d7008a0, node=0x7fc199c092c0) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3432
#15 row_ins (thr=0x7fc19d7008a0, node=0x7fc199c092c0) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3551
#16 row_ins_step (thr=thr@entry=0x7fc19d7008a0) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0ins.cc:3675
#17 0x000000000234d46c in row_insert_for_mysql_using_ins_graph (mysql_rec=mysql_rec@entry=0x7fc1b9f16428 "D\006\001�X�", prebuilt=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0mysql.cc:1580
#18 0x000000000234fcf4 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7fc1b9f16428 "D\006\001�X�", prebuilt=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/row/row0mysql.cc:1706
#19 0x0000000002230029 in ha_innobase::write_row (this=0x7fc1a4e44828, record=0x7fc1b9f16428 "D\006\001�X�") at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/innobase/handler/ha_innodb.cc:8638
#20 0x00000000012aefe9 in handler::ha_write_row (this=0x7fc1a4e44828, buf=0x7fc1b9f16428 "D\006\001�X�") at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/handler.cc:7807
#21 0x00000000014a0d6d in write_record (thd=thd@entry=0x7fc1bc258000, table=table@entry=0x7fc1b9e2ac20, info=info@entry=0x7fc1cecee0c0, update=update@entry=0x7fc1cecee140) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_insert.cc:1985
#22 0x00000000014a1fc1 in Sql_cmd_insert_values::execute_inner (this=0x7fc19b5b9a58, thd=0x7fc1bc258000) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_insert.cc:626
#23 0x000000000106b2a8 in Sql_cmd_dml::execute (this=0x7fc19b5b9a58, thd=0x7fc1bc258000) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_select.cc:704
#24 0x000000000101c49d in mysql_execute_command (thd=thd@entry=0x7fc1bc258000, first_level=first_level@entry=true) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_parse.cc:3556
#25 0x000000000101f971 in mysql_parse (thd=thd@entry=0x7fc1bc258000, parser_state=parser_state@entry=0x7fc1cecefbe0) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_parse.cc:5404
#26 0x000000000102264d in dispatch_command (thd=thd@entry=0x7fc1bc258000, com_data=com_data@entry=0x7fc1d4e17730, command=command@entry=COM_QUERY) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/sql/sql_parse.cc:1822
#27 0x0000000002a9df1e in do_threadpool_command (connection=connection@entry=0x7fc1d4e176e0, com_data=0x7fc1d4e17730, command=COM_QUERY) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/plugin/thread_pool/threadpool_unix.cc:2547
#28 0x0000000002a9e17d in threadpool_process_request_unix (thd=0x7fc1bc258000, connection=connection@entry=0x7fc1d4e176e0, skip_io=skip_io@entry=0x7fc1cecf03fc) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/plugin/thread_pool/threadpool_unix.cc:1908
#29 0x0000000002a9e6dc in handle_event (connection=connection@entry=0x7fc1d4e176e0, this_thread=<optimized out>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/plugin/thread_pool/threadpool_unix.cc:1987
#30 0x0000000002a9efd7 in worker_main (param=param@entry=0x4661a00 <all_groups>) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/plugin/thread_pool/threadpool_unix.cc:2059
#31 0x00000000026523d9 in pfs_spawn_thread (arg=0x7fc1d4f06460) at /home/admin/110_20200914120105577_163556351_code/rpm_workspace/storage/perfschema/pfs.cc:2854
#32 0x00007fc1d6daedc5 in start_thread () from /lib64/libpthread.so.0
#33 0x00007fc1d581cced in clone () from /lib64/libc.so.6

It seems that I have triggered a bug of multi-valued indexes.

How to repeat:
Can not repeat yet.
[18 Mar 8:47] MySQL Verification Team
Please try version 8.0.23. Thanks.
[19 Apr 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".