Details
-
Bug
-
Status: Stalled (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
-
None
Description
Set priority to minor, as it's a debug-only problem on an artificial use case involving CHAR(0). I couldn't replace it with a more meaningful data type.
CREATE TABLE t (a INT, b CHAR(8), id INT AUTO_INCREMENT, PRIMARY KEY(a,id), KEY(b)) ENGINE=MyISAM; |
INSERT INTO t (b,a) VALUES ('',1); |
ALTER TABLE t MODIFY b CHAR(0); |
|
# Cleanup
|
DROP TABLE t; |
10.4 9856bb42 |
mysqld: /data/src/10.4/storage/myisam/mi_key.c:649: retrieve_auto_increment: Assertion `0' failed.
|
230710 2:57:25 [ERROR] mysqld got signal 6 ;
|
|
#9 0x00007f91e4574df2 in __GI___assert_fail (assertion=0x55ed8cdfaa80 "0", file=0x55ed8cdfa7c0 "/data/src/10.4/storage/myisam/mi_key.c", line=649, function=0x55ed8cdfab40 <__PRETTY_FUNCTION__.0> "retrieve_auto_increment") at ./assert/assert.c:101
|
#10 0x000055ed8be798c4 in retrieve_auto_increment (info=0x61f000015e88, record=0x61900008b1b8 "\375\001") at /data/src/10.4/storage/myisam/mi_key.c:649
|
#11 0x000055ed8becfe7b in mi_write (info=0x61f000015e88, record=0x61900008b1b8 "\375\001") at /data/src/10.4/storage/myisam/mi_write.c:151
|
#12 0x000055ed8be065ce in ha_myisam::write_row (this=0x61c0000188a8, buf=0x61900008b1b8 "\375\001") at /data/src/10.4/storage/myisam/ha_myisam.cc:984
|
#13 0x000055ed8abd249a in handler::ha_write_row (this=0x61c0000188a8, buf=0x61900008b1b8 "\375\001") at /data/src/10.4/sql/handler.cc:6833
|
#14 0x000055ed8a685c11 in copy_data_between_tables (thd=0x62b00005b208, from=0x62000003c088, to=0x620000040088, create=..., ignore=false, order_num=0, order=0x0, copied=0x7f91dc802110, deleted=0x7f91dc802130, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7f91dc803660) at /data/src/10.4/sql/sql_table.cc:11130
|
#15 0x000055ed8a680eb1 in mysql_alter_table (thd=0x62b00005b208, new_db=0x62b00005fa10, new_name=0x62b00005fe68, create_info=0x7f91dc805250, table_list=0x62b000062338, recreate_info=0x7f91dc8050b0, alter_info=0x7f91dc805150, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10551
|
#16 0x000055ed8a806e3a in Sql_cmd_alter_table::execute (this=0x62b000062b88, thd=0x62b00005b208) at /data/src/10.4/sql/sql_alter.cc:531
|
#17 0x000055ed8a410d15 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:6216
|
#18 0x000055ed8a41c517 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "ALTER TABLE t MODIFY b CHAR(0)", length=30, parser_state=0x7f91dc807860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
|
#19 0x000055ed8a3f285a in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "ALTER TABLE t MODIFY b CHAR(0)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
|
#20 0x000055ed8a3ef3c9 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
|
#21 0x000055ed8a7ee1c6 in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
|
#22 0x000055ed8a7edadd in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
|
#23 0x000055ed8b45bf28 in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
|
#24 0x00007f91e45c8fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#25 0x00007f91e46495bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Stack trace with Aria instead of MyISAM:
mysqld: /data/src/10.4/storage/maria/ma_key.c:775: ma_retrieve_auto_increment: Assertion `0' failed.
|
230710 3:01:18 [ERROR] mysqld got signal 6 ;
|
|
#9 0x00007fe880a33df2 in __GI___assert_fail (assertion=0x56020c31d460 "0", file=0x56020c31cfe0 "/data/src/10.4/storage/maria/ma_key.c", line=775, function=0x56020c31d560 <__PRETTY_FUNCTION__.0> "ma_retrieve_auto_increment") at ./assert/assert.c:101
|
#10 0x000056020ac27a36 in ma_retrieve_auto_increment (key=0x61900008c5bd "\001", key_type=1 '\001') at /data/src/10.4/storage/maria/ma_key.c:775
|
#11 0x000056020ac86c39 in maria_write (info=0x629000258208, record=0x61900008c5b8 "\375\001") at /data/src/10.4/storage/maria/ma_write.c:294
|
#12 0x000056020ab246da in ha_maria::write_row (this=0x61d00021a2a8, buf=0x61900008c5b8 "\375\001") at /data/src/10.4/storage/maria/ha_maria.cc:1258
|
#13 0x000056020a5ac49a in handler::ha_write_row (this=0x61d00021a2a8, buf=0x61900008c5b8 "\375\001") at /data/src/10.4/sql/handler.cc:6833
|
#14 0x000056020a05fc11 in copy_data_between_tables (thd=0x62b00005b208, from=0x62000003c088, to=0x620000040088, create=..., ignore=false, order_num=0, order=0x0, copied=0x7fe878c3d110, deleted=0x7fe878c3d130, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7fe878c3e660) at /data/src/10.4/sql/sql_table.cc:11130
|
#15 0x000056020a05aeb1 in mysql_alter_table (thd=0x62b00005b208, new_db=0x62b00005fa10, new_name=0x62b00005fe68, create_info=0x7fe878c40250, table_list=0x62b000062338, recreate_info=0x7fe878c400b0, alter_info=0x7fe878c40150, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10551
|
#16 0x000056020a1e0e3a in Sql_cmd_alter_table::execute (this=0x62b000062b88, thd=0x62b00005b208) at /data/src/10.4/sql/sql_alter.cc:531
|
#17 0x0000560209dead15 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:6216
|
#18 0x0000560209df6517 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "ALTER TABLE t MODIFY b CHAR(0)", length=30, parser_state=0x7fe878c42860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
|
#19 0x0000560209dcc85a in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "ALTER TABLE t MODIFY b CHAR(0)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
|
#20 0x0000560209dc93c9 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
|
#21 0x000056020a1c81c6 in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
|
#22 0x000056020a1c7add in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
|
#23 0x000056020ae35f28 in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
|
#24 0x00007fe880a87fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#25 0x00007fe880b085bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Reproducible with MyISAM and Aria as shown above. The test case is not applicable to InnoDB as the auto-increment column is not the first one in the multi-part index, and it seems to be important for the failure to happen.
Reproducible on all existing versions, including earlier minor releases.
No obvious problem on a non-debug build.