Details
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (f BINARY(0), KEY (f)) ENGINE=InnoDB; |
INSERT IGNORE INTO t1 (f) VALUES ('a'); |
|
# Cleanup
|
DROP TABLE t1; |
10.2 1d30b7b1 |
mysqld: /data/src/10.2/storage/innobase/btr/btr0cur.cc:794: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
|
190408 16:47:28 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f43d9401ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x0000558742ed0720 in btr_node_ptr_max_size (index=0x7f4388070168) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:791
|
#9 0x0000558742ed154a in btr_cur_search_to_nth_level (index=0x7f4388070168, level=0, tuple=0x7f438809ad00, mode=PAGE_CUR_LE, latch_mode=2, cursor=0x7f43d40c27f0, has_search_latch=0, file=0x5587433490b8 "/data/src/10.2/storage/innobase/row/row0ins.cc", line=2925, mtr=0x7f43d40c3300, autoinc=0) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:1165
|
#10 0x0000558742dbd404 in row_ins_sec_index_entry_low (flags=0, mode=2, index=0x7f4388070168, offsets_heap=0x7f438800c410, heap=0x7f4388074780, entry=0x7f438809ad00, trx_id=0, thr=0x7f4388072750, dup_chk_only=false) at /data/src/10.2/storage/innobase/row/row0ins.cc:2925
|
#11 0x0000558742dbe2c4 in row_ins_sec_index_entry (index=0x7f4388070168, entry=0x7f438809ad00, thr=0x7f4388072750, dup_chk_only=false) at /data/src/10.2/storage/innobase/row/row0ins.cc:3270
|
#12 0x0000558742dbe431 in row_ins_index_entry (index=0x7f4388070168, entry=0x7f438809ad00, thr=0x7f4388072750) at /data/src/10.2/storage/innobase/row/row0ins.cc:3316
|
#13 0x0000558742dbe91e in row_ins_index_entry_step (node=0x7f43880724f0, thr=0x7f4388072750) at /data/src/10.2/storage/innobase/row/row0ins.cc:3464
|
#14 0x0000558742dbed11 in row_ins (node=0x7f43880724f0, thr=0x7f4388072750) at /data/src/10.2/storage/innobase/row/row0ins.cc:3607
|
#15 0x0000558742dbf2ea in row_ins_step (thr=0x7f4388072750) at /data/src/10.2/storage/innobase/row/row0ins.cc:3833
|
#16 0x0000558742ddbf6b in row_insert_for_mysql (mysql_rec=0x7f438817e9e0 "\375", '\245' <repeats 15 times>, prebuilt=0x7f4388071fd8) at /data/src/10.2/storage/innobase/row/row0mysql.cc:1414
|
#17 0x0000558742ca33f4 in ha_innobase::write_row (this=0x7f438800a158, record=0x7f438817e9e0 "\375", '\245' <repeats 15 times>) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:8255
|
#18 0x0000558742999155 in handler::ha_write_row (this=0x7f438800a158, buf=0x7f438817e9e0 "\375", '\245' <repeats 15 times>) at /data/src/10.2/sql/handler.cc:6043
|
#19 0x00005587426ebbc1 in write_record (thd=0x7f4388000b00, table=0x7f43880713d0, info=0x7f43d40c44b0) at /data/src/10.2/sql/sql_insert.cc:1927
|
#20 0x00005587426e96cb in mysql_insert (thd=0x7f4388000b00, table_list=0x7f4388012550, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=true) at /data/src/10.2/sql/sql_insert.cc:1057
|
#21 0x0000558742710fba in mysql_execute_command (thd=0x7f4388000b00) at /data/src/10.2/sql/sql_parse.cc:4438
|
#22 0x000055874271c475 in mysql_parse (thd=0x7f4388000b00, rawbuf=0x7f4388012458 "INSERT IGNORE INTO t1 (f) VALUES ('a')", length=38, parser_state=0x7f43d40c5200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8013
|
#23 0x0000558742709f72 in dispatch_command (command=COM_QUERY, thd=0x7f4388000b00, packet=0x7f43880968b1 "INSERT IGNORE INTO t1 (f) VALUES ('a')", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1832
|
#24 0x000055874270888f in do_command (thd=0x7f4388000b00) at /data/src/10.2/sql/sql_parse.cc:1386
|
#25 0x000055874285bf79 in do_handle_one_connection (connect=0x5587453cfdf0) at /data/src/10.2/sql/sql_connect.cc:1335
|
#26 0x000055874285bd06 in handle_one_connection (arg=0x5587453cfdf0) at /data/src/10.2/sql/sql_connect.cc:1241
|
#27 0x0000558742c8400a in pfs_spawn_thread (arg=0x5587453d5c00) at /data/src/10.2/storage/perfschema/pfs.cc:1862
|
#28 0x00007f43db2f0494 in start_thread (arg=0x7f43d40c6700) at pthread_create.c:333
|
#29 0x00007f43d94be93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Not reproducible on 10.1.
No obvious problem on a non-debug build.
Attachments
Issue Links
- relates to
-
MDEV-14637 Latching order violation during btr_cur_pessimistic_delete()
-
- Closed
-
Activity
It looks like we will have to revise the MDEV-14637 fix for this special case.
The assertion expression mentions SYS_FOREIGN and SYS_FOREIGN_COLS as a special case, because I thought that those are the only tables that would misuse CHAR(0). (The InnoDB internal SQL parser does not enforce the maximum lengths of columns.)
Testcase leading to slightly different stack
SET sql_mode=''; |
CREATE TABLE t (a INT,b INT,c CHAR(0),d CHAR(0),e BINARY (0),f VARCHAR(0),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ENGINE=InnoDB; |
INSERT INTO t VALUES (0,0,0,0,0,0,0,0,0); |
Leads to:
10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug) |
mysqld: /test/10.11_dbg/storage/innobase/btr/btr0cur.cc:1156: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
|
10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug) |
Core was generated by `/test/MD221022-mariadb-10.11.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x15457812d700 (LWP 2085896))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x000015459ded0859 in __GI_abort () at abort.c:79
|
#2 0x000015459ded0729 in __assert_fail_base (fmt=0x15459e066588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55aa7f685290 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=0x55aa7f685140 "/test/10.11_dbg/storage/innobase/btr/btr0cur.cc", line=1156, function=<optimized out>) at assert.c:92
|
#3 0x000015459dee1fd6 in __GI___assert_fail (assertion=assertion@entry=0x55aa7f685290 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=file@entry=0x55aa7f685140 "/test/10.11_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=1156, function=function@entry=0x55aa7f685218 "ulint btr_node_ptr_max_size(const dict_index_t*)") at assert.c:101
|
#4 0x000055aa7f0a2ac9 in btr_node_ptr_max_size (index=index@entry=0x1544a8025060) at /test/10.11_dbg/storage/innobase/btr/btr0cur.cc:1156
|
#5 0x000055aa7f0bbaba in btr_cur_search_to_nth_level (index=index@entry=0x1544a8025060, level=level@entry=0, tuple=tuple@entry=0x1544a806d1c0, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=66, cursor=cursor@entry=0x15457812a2b0, mtr=0x15457812a820, autoinc=0) at /test/10.11_dbg/storage/innobase/btr/btr0cur.cc:1493
|
#6 0x000055aa7ef969b4 in row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x1544a8025060, offsets_heap=<optimized out>, offsets_heap@entry=0x1544a806d7c0, heap=heap@entry=0x1544a806dc50, entry=entry@entry=0x1544a806d1c0, trx_id=0, thr=0x1544a8029aa0) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:2943
|
#7 0x000055aa7ef988f9 in row_ins_sec_index_entry (index=index@entry=0x1544a8025060, entry=entry@entry=0x1544a806d1c0, thr=thr@entry=0x1544a8029aa0, check_foreign=check_foreign@entry=true) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:3252
|
#8 0x000055aa7ef9d63f in row_ins_index_entry (thr=0x1544a8029aa0, entry=0x1544a806d1c0, index=0x1544a8025060) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:3311
|
#9 row_ins_index_entry_step (thr=0x1544a8029aa0, node=<optimized out>) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:3477
|
#10 row_ins (thr=0x1544a8029aa0, node=<optimized out>) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:3623
|
#11 row_ins_step (thr=thr@entry=0x1544a8029aa0) at /test/10.11_dbg/storage/innobase/row/row0ins.cc:3763
|
#12 0x000055aa7efbfb96 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x1544a801eb48 "", prebuilt=0x1544a8029130, ins_mode=ROW_INS_NORMAL) at /test/10.11_dbg/storage/innobase/row/row0mysql.cc:1310
|
#13 0x000055aa7ee4d3a3 in ha_innobase::write_row (this=0x1544a80280b0, record=0x1544a801eb48 "") at /test/10.11_dbg/storage/innobase/handler/ha_innodb.cc:7842
|
#14 0x000055aa7eb5137d in handler::ha_write_row (this=0x1544a80280b0, buf=0x1544a801eb48 "") at /test/10.11_dbg/sql/handler.cc:7580
|
#15 0x000055aa7e81d91a in write_record (thd=thd@entry=0x1544a8000d48, table=table@entry=0x1544a8020dd8, info=info@entry=0x15457812baf0, sink=sink@entry=0x0) at /test/10.11_dbg/sql/sql_insert.cc:2191
|
#16 0x000055aa7e828660 in mysql_insert (thd=thd@entry=0x1544a8000d48, table_list=<optimized out>, fields=@0x1544a8005e68: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55aa7fdecea0 <end_of_list>, last = 0x1544a8005e68, elements = 0}, <No data fields>}, values_list=@0x1544a8005eb0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1544a80143e0, last = 0x1544a80143e0, elements = 1}, <No data fields>}, update_fields=@0x1544a8005e98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55aa7fdecea0 <end_of_list>, last = 0x1544a8005e98, elements = 0}, <No data fields>}, update_values=@0x1544a8005e80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55aa7fdecea0 <end_of_list>, last = 0x1544a8005e80, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.11_dbg/sql/sql_insert.cc:1146
|
#17 0x000055aa7e86951a in mysql_execute_command (thd=thd@entry=0x1544a8000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:4563
|
#18 0x000055aa7e855f90 in mysql_parse (thd=thd@entry=0x1544a8000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15457812c300) at /test/10.11_dbg/sql/sql_parse.cc:8023
|
#19 0x000055aa7e8634ac in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1544a8000d48, packet=packet@entry=0x1544a800af09 "INSERT INTO t VALUES (0,0,0,0,0,0,0,0,0)", packet_length=packet_length@entry=40, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1346
|
#20 0x000055aa7e8658f4 in do_command (thd=0x1544a8000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
|
#21 0x000055aa7e9c2067 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55aa82137938, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
|
#22 0x000055aa7e9c2536 in handle_one_connection (arg=0x55aa82137938) at /test/10.11_dbg/sql/sql_connect.cc:1318
|
#23 0x000015459e3e1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#24 0x000015459dfcd133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
I have also observed this stack, though no reduction was possible:
!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")|SIGABRT|btr_node_ptr_max_size|btr_cur_t::search_leaf|row_ins_sec_index_entry_low|row_ins_sec_index_entry
|
10.11.4 7c9f275ee4cd59212a85827626fbca2615d144d5 |
2023-05-15 22:20:23 0 [Note] /test/UBASAN_MD120523-mariadb-10.11.4-linux-x86_64-dbg/bin/mysqld: ready for connections.
|
Version: '10.11.4-MariaDB-debug-log' socket: '/dev/shm/073177/3906/socket.sock' port: 24534 MariaDB Server
|
2023-05-15 22:20:37 8 [Note] Master connection name: '' Master_info_file: 'master.info' Relay_info_file: 'relay-log.info'
|
2023-05-15 22:20:37 8 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MariaDB server acts as a replica and has its hostname changed. Please use '--log-basename=#' or '--relay-log=pid-relay-bin' to avoid this problem.
|
2023-05-15 22:20:37 8 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='', master_port='3306', master_log_file='', master_log_pos='4'. New state master_host='dummy', master_port='3306', master_log_file='', master_log_pos='4'.
|
2023-05-15 22:20:37 8 [Note] Previous Using_Gtid=Slave_Pos. New Using_Gtid=Slave_Pos
|
mysqld: /test/10.11_dbg_san/storage/innobase/btr/btr0cur.cc:880: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
|
230515 22:20:37 [ERROR] mysqld got signal 6 ;
|
This could be because you hit a bug. It is also possible that this binary
|
or one of the libraries it was linked against is corrupt, improperly built,
|
or misconfigured. This error can also be caused by malfunctioning hardware.
|
|
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
|
|
We will try our best to scrape up some info that will hopefully help
|
diagnose the problem, but since we have already crashed,
|
something is definitely wrong and this may fail.
|
|
Server version: 10.11.4-MariaDB-debug-log source revision: 7c9f275ee4cd59212a85827626fbca2615d144d5
|
key_buffer_size=134217728
|
read_buffer_size=131072
|
max_used_connections=1
|
max_threads=153
|
thread_count=1
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468070 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0x62b00016c218
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0x14a5904edac0 thread_stack 0x100000
|
asan_interceptors.o:0(__interceptor_backtrace.part.0)[0x56262051170e]
|
mysys/stacktrace.c:215(my_print_stacktrace)[0x562624cef2eb]
|
sql/signal_handler.cc:238(handle_fatal_signal)[0x56262258853a]
|
libc_sigaction.c:0(__restore_rt)[0x14a5b8042520]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x14a5b8096a7c]
|
posix/raise.c:27(__GI_raise)[0x14a5b8042476]
|
stdlib/abort.c:81(__GI_abort)[0x14a5b80287f3]
|
intl/loadmsgcat.c:1177(_nl_load_domain)[0x14a5b802871b]
|
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x14a5b8039e96]
|
btr/btr0cur.cc:884(btr_node_ptr_max_size(dict_index_t const*))[0x562624639c28]
|
btr/btr0cur.cc:1059(btr_cur_t::search_leaf(dtuple_t const*, page_cur_mode_t, btr_latch_mode, mtr_t*))[0x562624686ca1]
|
row/row0ins.cc:3036(row_ins_sec_index_entry_low(unsigned long, btr_latch_mode, dict_index_t*, mem_block_info_t*, mem_block_info_t*, dtuple_t*, unsigned long, que_thr_t*))[0x562624286659]
|
row/row0ins.cc:3357(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool))[0x56262428e3d6]
|
row/row0ins.cc:3402(row_ins_step(que_thr_t*))[0x56262429d070]
|
row/row0mysql.cc:1316(row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t))[0x562624325e2f]
|
handler/ha_innodb.cc:7847(ha_innobase::write_row(unsigned char const*))[0x562623d74052]
|
sql/handler.cc:7626(handler::ha_write_row(unsigned char const*))[0x56262260f980]
|
sql/sql_insert.cc:2204(write_record(THD*, TABLE*, st_copy_info*, select_result*))[0x562620c5dd09]
|
sql/sql_insert.cc:4184(select_insert::send_data(List<Item>&))[0x562620c652ee]
|
sql/sql_select.cc:23348(end_send(JOIN*, st_join_table*, bool))[0x562621205d90]
|
sql/sql_select.cc:22342(evaluate_join_record(JOIN*, st_join_table*, int))[0x56262107547f]
|
sql/sql_select.cc:22120(sub_select(JOIN*, st_join_table*, bool))[0x562621131fb9]
|
sql/sql_select.cc:21643(JOIN::exec_inner())[0x5626212d42a6]
|
sql/sql_select.cc:4619(JOIN::exec())[0x5626212d5a10]
|
sql/sql_select.cc:5100(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5626212c4427]
|
sql/sql_select.cc:586(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x5626212c88ca]
|
sql/sql_parse.cc:4718(mysql_execute_command(THD*, bool))[0x562620ec1e62]
|
sql/sql_parse.cc:8034(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x562620ee308f]
|
sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x562620ef2dff]
|
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x562620f00d41]
|
sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5626218b62ae]
|
sql/sql_connect.cc:1318(handle_one_connection)[0x5626218b77c9]
|
nptl/pthread_create.c:442(start_thread)[0x14a5b8094b43]
|
x86_64/clone3.S:83(__clone3)[0x14a5b8126a00]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0x6290000d7238): INSERT t SELECT SEQ FROM seq_1_to_100000
|
|
Connection ID (thread ID): 8
|
Status: NOT_KILLED
|
|
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=off,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=off,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off
|
|
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
|
information that should help you find out what is causing the crash.
|
Writing a core file...
|
Working directory at /dev/shm/073177/3906/data
|
Resource Limits:
|
Limit Soft Limit Hard Limit Units
|
Max cpu time unlimited unlimited seconds
|
Max file size unlimited unlimited bytes
|
Max data size unlimited unlimited bytes
|
Max stack size unlimited unlimited bytes
|
Max core file size unlimited unlimited bytes
|
Max resident set unlimited unlimited bytes
|
Max processes unlimited unlimited processes
|
Max open files 1048576 1048576 files
|
Max locked memory unlimited unlimited bytes
|
Max address space unlimited unlimited bytes
|
Max file locks unlimited unlimited locks
|
Max pending signals unlimited unlimited signals
|
Max msgqueue size unlimited unlimited bytes
|
Max nice priority 0 0
|
Max realtime priority 0 0
|
Max realtime timeout unlimited unlimited us
|
Core pattern: core
|
|
Kernel version: Linux version 5.19.0-1022-gcp (buildd@lcy02-amd64-054) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #24~22.04.1-Ubuntu SMP Sun Apr 23 09:51:08 UTC 2023
|
Adding it in case it helps with debugging. Resolved stack:
stack_bottom = 0x14a5904edac0 thread_stack 0x100000
|
asan_interceptors.o:0(__interceptor_backtrace.part.0)[0x56262051170e]
|
mysys/stacktrace.c:215(my_print_stacktrace)[0x562624cef2eb]
|
sql/signal_handler.cc:238(handle_fatal_signal)[0x56262258853a]
|
libc_sigaction.c:0(__restore_rt)[0x14a5b8042520]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x14a5b8096a7c]
|
posix/raise.c:27(__GI_raise)[0x14a5b8042476]
|
stdlib/abort.c:81(__GI_abort)[0x14a5b80287f3]
|
intl/loadmsgcat.c:1177(_nl_load_domain)[0x14a5b802871b]
|
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x14a5b8039e96]
|
btr/btr0cur.cc:884(btr_node_ptr_max_size(dict_index_t const*))[0x562624639c28]
|
btr/btr0cur.cc:1059(btr_cur_t::search_leaf(dtuple_t const*, page_cur_mode_t, btr_latch_mode, mtr_t*))[0x562624686ca1]
|
row/row0ins.cc:3036(row_ins_sec_index_entry_low(unsigned long, btr_latch_mode, dict_index_t*, mem_block_info_t*, mem_block_info_t*, dtuple_t*, unsigned long, que_thr_t*))[0x562624286659]
|
row/row0ins.cc:3357(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool))[0x56262428e3d6]
|
row/row0ins.cc:3402(row_ins_step(que_thr_t*))[0x56262429d070]
|
row/row0mysql.cc:1316(row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t))[0x562624325e2f]
|
handler/ha_innodb.cc:7847(ha_innobase::write_row(unsigned char const*))[0x562623d74052]
|
sql/handler.cc:7626(handler::ha_write_row(unsigned char const*))[0x56262260f980]
|
sql/sql_insert.cc:2204(write_record(THD*, TABLE*, st_copy_info*, select_result*))[0x562620c5dd09]
|
sql/sql_insert.cc:4184(select_insert::send_data(List<Item>&))[0x562620c652ee]
|
sql/sql_select.cc:23348(end_send(JOIN*, st_join_table*, bool))[0x562621205d90]
|
sql/sql_select.cc:22342(evaluate_join_record(JOIN*, st_join_table*, int))[0x56262107547f]
|
sql/sql_select.cc:22120(sub_select(JOIN*, st_join_table*, bool))[0x562621131fb9]
|
sql/sql_select.cc:21643(JOIN::exec_inner())[0x5626212d42a6]
|
sql/sql_select.cc:4619(JOIN::exec())[0x5626212d5a10]
|
sql/sql_select.cc:5100(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5626212c4427]
|
sql/sql_select.cc:586(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x5626212c88ca]
|
sql/sql_parse.cc:4718(mysql_execute_command(THD*, bool))[0x562620ec1e62]
|
sql/sql_parse.cc:8034(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x562620ee308f]
|
sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x562620ef2dff]
|
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x562620f00d41]
|
sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5626218b62ae]
|
sql/sql_connect.cc:1318(handle_one_connection)[0x5626218b77c9]
|
nptl/pthread_create.c:442(start_thread)[0x14a5b8094b43]
|
x86_64/clone3.S:83(__clone3)[0x14a5b8126a00]
|
I again saw the stack given in the last comment in 11.1 @ 3883eb63dc5e663558571c33d086c9fd3aa0cf8f, again without reduction being possible.
Both these cases were single threaded SQL trials. Either the given stack is highly sporadic or specific circumstance (timing, system load, state of InnoDB, shutdown...) are required for it to trigger.
In this case, it looks like only ~357 lines of SQL were required to trigger the bug, and the crash seems to clearly have happened on an INSERT statement using a sequence. The same is applicable for the last comment (note the query in the error log).
Note the # outcomes behind the queries.
ANALYZE TABLE t1;#NOERROR
|
INSERT t SELECT SEQ,SEQ+100000 FROM seq_1_to_100000;#ERROR: 2013 - Lost connection to server during query
|
DROP TABLE IF EXISTS d;#ERROR: 2006 - Server has gone away
|
Here is the resulting stack:
11.1.2 3883eb63dc5e663558571c33d086c9fd3aa0cf8f (Debug) |
mysqld: /test/11.1_dbg/storage/innobase/btr/btr0cur.cc:868: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
|
11.1.2 3883eb63dc5e663558571c33d086c9fd3aa0cf8f (Debug) |
Core was generated by `/test/MD220623-mariadb-11.1.2-linux-x86_64-dbg/bin/mysqld --no-defaults --max_a'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22819715925568)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x14c1210fc640 (LWP 1289223))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22819715925568) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=22819715925568) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=22819715925568, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x000014c144e42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x000014c144e287f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014c144e2871b in __assert_fail_base (fmt=0x14c144fdd150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562dde3886b0 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=0x562dde388640 "/test/11.1_dbg/storage/innobase/btr/btr0cur.cc", line=868, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x000014c144e39e96 in __GI___assert_fail (assertion=0x562dde3886b0 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=0x562dde388640 "/test/11.1_dbg/storage/innobase/btr/btr0cur.cc", line=868, function=0x562dde388608 "ulint btr_node_ptr_max_size(const dict_index_t*)") at ./assert/assert.c:101
|
#7 0x0000562dddddd9ae in btr_node_ptr_max_size (index=0x14c0881245c0) at /test/11.1_dbg/storage/innobase/btr/btr0cur.cc:868
|
#8 0x0000562ddddf4f6d in btr_cur_t::search_leaf (this=this@entry=0x14c1210f9210, tuple=tuple@entry=0x14c088106730, mode=mode@entry=PAGE_CUR_LE, latch_mode=BTR_MODIFY_TREE, latch_mode@entry=BTR_INSERT_TREE, mtr=mtr@entry=0x14c1210f9ac0) at /test/11.1_dbg/storage/innobase/include/btr0cur.h:719
|
#9 0x0000562dddcec742 in row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=BTR_INSERT_TREE, index=index@entry=0x14c0881245c0, offsets_heap=<optimized out>, offsets_heap@entry=0x14c08818c050, heap=heap@entry=0x14c08818c4e0, entry=entry@entry=0x14c088106730, trx_id=0, thr=0x14c088148df0) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3026
|
#10 0x0000562dddceef42 in row_ins_sec_index_entry (index=index@entry=0x14c0881245c0, entry=entry@entry=0x14c088106730, thr=thr@entry=0x14c088148df0, check_foreign=check_foreign@entry=true) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3332
|
#11 0x0000562dddcf3870 in row_ins_index_entry (thr=0x14c088148df0, entry=0x14c088106730, index=0x14c0881245c0) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3377
|
#12 row_ins_index_entry_step (thr=0x14c088148df0, node=0x14c088148bc0) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3543
|
#13 row_ins (thr=0x14c088148df0, node=0x14c088148bc0) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3660
|
#14 row_ins_step (thr=thr@entry=0x14c088148df0) at /test/11.1_dbg/storage/innobase/row/row0ins.cc:3789
|
#15 0x0000562dddd14e77 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14c088147a78 "\371\061", '\245' <repeats 14 times>, "\070{\024\210\300\024", prebuilt=0x14c0881486f0, ins_mode=ins_mode@entry=ROW_INS_NORMAL) at /test/11.1_dbg/storage/innobase/row/row0mysql.cc:1313
|
#16 0x0000562dddbc72e4 in ha_innobase::write_row (this=0x14c088147e90, record=0x14c088147a78 "\371\061", '\245' <repeats 14 times>, "\070{\024\210\300\024") at /test/11.1_dbg/storage/innobase/handler/ha_innodb.cc:7805
|
#17 0x0000562ddd8e0acb in handler::ha_write_row (this=0x14c088147e90, buf=0x14c088147a78 "\371\061", '\245' <repeats 14 times>, "\070{\024\210\300\024") at /test/11.1_dbg/sql/handler.cc:7798
|
#18 0x0000562ddd5add93 in write_record (thd=0x14c088000d58, table=0x14c088147678, info=info@entry=0x14c088016530, sink=0x0) at /test/11.1_dbg/sql/sql_insert.cc:2204
|
#19 0x0000562ddd5ae28e in select_insert::send_data (this=0x14c0880164e0, values=<optimized out>) at /test/11.1_dbg/sql/sql_insert.cc:4184
|
#20 0x0000562ddd6653e0 in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=@0x14c088013d20: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c088014050, last = 0x14c0880142d0, elements = 2}, <No data fields>}, this=<optimized out>) at /test/11.1_dbg/sql/sql_class.h:5755
|
#21 end_send (join=0x14c0880165a0, join_tab=0x14c08817e9f0, end_of_records=<optimized out>) at /test/11.1_dbg/sql/sql_select.cc:24697
|
#22 0x0000562ddd6321d7 in evaluate_join_record (join=join@entry=0x14c0880165a0, join_tab=join_tab@entry=0x14c08817e578, error=error@entry=0) at /test/11.1_dbg/sql/sql_select.cc:23664
|
#23 0x0000562ddd649b74 in sub_select (join=0x14c0880165a0, join_tab=0x14c08817e578, end_of_records=false) at /test/11.1_dbg/sql/sql_select.cc:23468
|
#24 0x0000562ddd6818ed in do_select (procedure=0x0, join=0x14c0880165a0) at /test/11.1_dbg/sql/sql_select.cc:22948
|
#25 JOIN::exec_inner (this=this@entry=0x14c0880165a0) at /test/11.1_dbg/sql/sql_select.cc:4933
|
#26 0x0000562ddd681e70 in JOIN::exec (this=this@entry=0x14c0880165a0) at /test/11.1_dbg/sql/sql_select.cc:4710
|
#27 0x0000562ddd67fcde in mysql_select (thd=thd@entry=0x14c088000d58, tables=<optimized out>, fields=@0x14c088013d20: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c088014050, last = 0x14c0880142d0, elements = 2}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=37385559870208, result=0x14c0880164e0, unit=0x14c088004fa8, select_lex=0x14c088013a68) at /test/11.1_dbg/sql/sql_select.cc:5239
|
#28 0x0000562ddd680464 in handle_select (thd=thd@entry=0x14c088000d58, lex=lex@entry=0x14c088004ec8, result=result@entry=0x14c0880164e0, setup_tables_done_option=setup_tables_done_option@entry=35184372088832) at /test/11.1_dbg/sql/sql_select.cc:627
|
#29 0x0000562ddd5f0f35 in mysql_execute_command (thd=thd@entry=0x14c088000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:4598
|
#30 0x0000562ddd5f5849 in mysql_parse (thd=thd@entry=0x14c088000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c1210fb240) at /test/11.1_dbg/sql/sql_parse.cc:7769
|
#31 0x0000562ddd5f79dd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c088000d58, packet=packet@entry=0x14c08800af09 "INSERT t SELECT SEQ,SEQ+100000 FROM seq_1_to_100000;", packet_length=packet_length@entry=52, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:242
|
#32 0x0000562ddd5f98bc in do_command (thd=0x14c088000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
|
#33 0x0000562ddd74f010 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562ddfc5dea8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
|
#34 0x0000562ddd74f26f in handle_one_connection (arg=0x562ddfc5dea8) at /test/11.1_dbg/sql/sql_connect.cc:1318
|
#35 0x000014c144e94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#36 0x000014c144f26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
And, the query in GDB:
(gdb) +t 1
|
[Switching to thread 1 (Thread 0x14c1210fc640 (LWP 1289223))]
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22819715925568) at ./nptl/pthread_kill.c:44
|
44 in ./nptl/pthread_kill.c
|
(gdb) +print do_command::thd->query_string.string.str
|
$1 = 0x14c088013240 "INSERT t SELECT SEQ,SEQ+100000 FROM seq_1_to_100000"
|
(gdb) +print dispatch_command::packet
|
$2 = 0x14c08800af09 "INSERT t SELECT SEQ,SEQ+100000 FROM seq_1_to_100000;"
|
I have attached the trace as MDEV-19216_trace.sql . Crashing statement is on line 357. NTS KEEP/740113/5003
It seems to me that the SQL layer is not correctly enforcing the maximum length of the BINARY(0) data type, if it actually refers to an empty binary string. The test case in the Description should have been enough to conclude this. The test in the Description did not fail for me in the branch that I tried.
Warnings:
|
Warning 1265 Data truncated for column 'f' at row 1
|
If I omit the IGNORE from the INSERT statement, the warning will be promoted into an error. Deep inside InnoDB, I am seeing a zero-length key being inserted into the secondary index:
#0 row_ins_sec_index_entry_low (flags=0, mode=BTR_MODIFY_LEAF,
|
index=0x7f6c00050c80, offsets_heap=0x7f6c00063520, heap=0x7f6c000639b0,
|
entry=0x7f6c000983c8, trx_id=0, thr=0x7f6c00026748)
|
at /mariadb/10.5/storage/innobase/row/row0ins.cc:2982
|
2982 if (index->table->is_temporary()) {
|
(rr) p *entry
|
$1 = {info_bits = 0, n_fields = 2, n_fields_cmp = 2, fields = 0x7f6c00098400,
|
n_v_fields = 0, v_fields = 0x0, magic_n = 65478679}
|
(rr) p *entry.fields@2
|
$2 = {{data = 0x7f6c00054a29, ext = 0, spatial_status = 0, len = 0, type = {
|
prtype = 4130046, mtype = 3, len = 0, mbminlen = 1, mbmaxlen = 1}}, {
|
data = 0x7f6c000265c0, ext = 0, spatial_status = 0, len = 6, type = {
|
prtype = 256, mtype = 8, len = 6, mbminlen = 0, mbmaxlen = 0}}}
|
Note the two len=0 for the first field and two len=6 for the second one (the 48-bit DB_ROW_ID because no PRIMARY KEY had been defined).
Roel, can you provide access to a core dump so that I can check the data and the metadata.
This should be an SQL layer bug, because InnoDB always assumed that the SQL layer is enforcing the maximum lengths of columns.
Here is a slightly simpler test that reproduces the failure on 10.4 and 10.5:
--source include/have_innodb.inc
|
CREATE TABLE t1 (f BINARY(0), KEY (f)) ENGINE=InnoDB; |
INSERT INTO t1 SET f=''; |
DROP TABLE t1; |
On 10.6 and later, I suspect that the refactoring in MDEV-30400 removed the call to this function except when a page split or merge is necessary. So, in 10.6 and later, the table would have to be larger so that the assertion failure could be triggered.
The problem is in the logic that tries to work around the bad system table definitions of SYS_FOREIGN and SYS_FOREIGN_COLS:
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
|
index d4e1497d9b3..0f6cdf25ca2 100644
|
--- a/storage/innobase/btr/btr0cur.cc
|
+++ b/storage/innobase/btr/btr0cur.cc
|
@@ -1148,10 +1148,13 @@ static ulint btr_node_ptr_max_size(const dict_index_t* index)
|
break;
|
}
|
/* fall through */
|
+ case DATA_FIXBINARY:
|
+ case DATA_BINARY:
|
case DATA_VARMYSQL:
|
case DATA_CHAR:
|
case DATA_MYSQL:
|
- /* CHAR(0) and VARCHAR(0) are possible
|
+ /* BINARY(0), VARBINARY(0),
|
+ CHAR(0) and VARCHAR(0) are possible
|
data type definitions in MariaDB.
|
The InnoDB internal SQL parser maps
|
CHAR to DATA_VARCHAR, so DATA_CHAR (or |
The assertion would fail also due to an indexed VARBINARY(0) column.
Also ran into this issue.
Leads to:
10.7.0 05e29e177df243b700392b797e26cae43fd3181e (Debug)
mysqld: /test/10.7_dbg/storage/innobase/btr/btr0cur.cc:1170: ulint btr_node_ptr_max_size(const dict_index_t*): Assertion `!strcmp(index->table->name.m_name, "SYS_FOREIGN") || !strcmp(index->table->name.m_name, "SYS_FOREIGN_COLS")' failed.
10.7.0 05e29e177df243b700392b797e26cae43fd3181e (Debug)
Core was generated by `/test/MD280821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14aac09b9700 (LWP 2664796))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000014aac3577859 in __GI_abort () at abort.c:79
#2 0x000014aac3577729 in __assert_fail_base (fmt=0x14aac370d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5586b3539940 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=0x5586b3539838 "/test/10.7_dbg/storage/innobase/btr/btr0cur.cc", line=1170, function=<optimized out>) at assert.c:92
#3 0x000014aac3588f36 in __GI___assert_fail (assertion=assertion@entry=0x5586b3539940 "!strcmp(index->table->name.m_name, \"SYS_FOREIGN\") || !strcmp(index->table->name.m_name, \"SYS_FOREIGN_COLS\")", file=file@entry=0x5586b3539838 "/test/10.7_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=1170, function=function@entry=0x5586b35398c8 "ulint btr_node_ptr_max_size(const dict_index_t*)") at assert.c:101
#4 0x00005586b2f19023 in btr_node_ptr_max_size (index=index@entry=0x14aa74075758) at /test/10.7_dbg/storage/innobase/btr/btr0cur.cc:1170
#5 0x00005586b2f31d23 in btr_cur_search_to_nth_level_func (index=index@entry=0x14aa74075758, level=level@entry=0, tuple=tuple@entry=0x14aa74023a08, mode=mode@entry=PAGE_CUR_LE, latch_mode=<optimized out>, latch_mode@entry=514, cursor=cursor@entry=0x14aac09b35c0, ahi_latch=0x0, mtr=0x14aac09b3b30, autoinc=0) at /test/10.7_dbg/storage/innobase/btr/btr0cur.cc:1536
#6 0x00005586b2e06b0d in row_ins_sec_index_entry_low (flags=flags@entry=3, mode=mode@entry=2, index=index@entry=0x14aa74075758, offsets_heap=<optimized out>, offsets_heap@entry=0x14aa74072b48, heap=heap@entry=0x14aa74079608, entry=entry@entry=0x14aa74023a08, trx_id=<optimized out>, thr=<optimized out>) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:2982
#7 0x00005586b2e08d8b in row_ins_sec_index_entry (index=index@entry=0x14aa74075758, entry=entry@entry=0x14aa74023a08, thr=thr@entry=0x14aa74078f68, check_foreign=check_foreign@entry=true) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:3305
#8 0x00005586b2e0a977 in row_ins_index_entry (thr=0x14aa74078f68, entry=0x14aa74023a08, index=0x14aa74075758) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:3353
#9 row_ins_index_entry_step (thr=0x14aa74078f68, node=0x14aa74078d38) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:3519
#10 row_ins (thr=0x14aa74078f68, node=0x14aa74078d38) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:3665
#11 row_ins_step (thr=thr@entry=0x14aa74078f68) at /test/10.7_dbg/storage/innobase/row/row0ins.cc:3811
#12 0x00005586b2e2e528 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14aa74071e78 <incomplete sequence \371>, prebuilt=0x14aa74078818, ins_mode=ROW_INS_NORMAL) at /test/10.7_dbg/storage/innobase/row/row0mysql.cc:1323
#13 0x00005586b2cb7a21 in ha_innobase::write_row (this=0x14aa74072300, record=0x14aa74071e78 <incomplete sequence \371>) at /test/10.7_dbg/storage/innobase/handler/ha_innodb.cc:7776
#14 0x00005586b291ab8d in handler::ha_write_row (this=0x14aa74072300, buf=0x14aa74071e78 <incomplete sequence \371>) at /test/10.7_dbg/sql/handler.cc:7514
#15 0x00005586b26fe316 in copy_data_between_tables (alter_ctx=0x14aac09b66b0, keys_onoff=<optimized out>, deleted=<synthetic pointer>, copied=<synthetic pointer>, order=<optimized out>, order_num=<optimized out>, ignore=<optimized out>, create=@0x14aac09b6960: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x2f747365742f2e00, elements = 1714303092}, <No data fields>}, to=0x14aa740719e8, from=0x14aa74020c58, thd=0x14aa74000db8) at /test/10.7_dbg/sql/sql_table.cc:11081
#16 mysql_alter_table (thd=thd@entry=0x14aa74000db8, new_db=new_db@entry=0x14aa740059b8, new_name=new_name@entry=0x14aa74005dd0, create_info=create_info@entry=0x14aac09b74d0, table_list=<optimized out>, table_list@entry=0x14aa74013d80, alter_info=alter_info@entry=0x14aac09b73e0, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/10.7_dbg/sql/sql_table.cc:10356
#17 0x00005586b278bf21 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14aa74000db8) at /test/10.7_dbg/sql/structs.h:568
#18 0x00005586b2614ee3 in mysql_execute_command (thd=thd@entry=0x14aa74000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5997
#19 0x00005586b25fbb83 in mysql_parse (thd=thd@entry=0x14aa74000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14aac09b8400) at /test/10.7_dbg/sql/sql_parse.cc:8030
#20 0x00005586b260a788 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14aa74000db8, packet=packet@entry=0x14aa7400b739 "ALTER TABLE t0 CHANGE COLUMN a a BINARY (0)", packet_length=packet_length@entry=43, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
#21 0x00005586b260db90 in do_command (thd=0x14aa74000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
#22 0x00005586b2783f2e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5586b5eaef68, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
#23 0x00005586b2784533 in handle_one_connection (arg=arg@entry=0x5586b5eaef68) at /test/10.7_dbg/sql/sql_connect.cc:1312
#24 0x00005586b2bed586 in pfs_spawn_thread (arg=0x5586b5d94f58) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#25 0x000014aac3a86609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#26 0x000014aac3674293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Bug confirmed present in:
MariaDB: 10.2.41 (dbg), 10.3.32 (dbg), 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.41 (opt), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt), 10.7.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)