|
Further research shows the bug also, in another way, reproduces in 10.4 debug. Here it immediately raises an assertion on the first query.
mysqld: /data/git/10.4_dbg/sql/table.cc:2934: int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t): Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed.
|
Core was generated by `/data/MD140320-mariadb-10.4.13-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
57 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
|
[Current thread is 1 (Thread 0x7f44c7ccc700 (LWP 826))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x00005615766021ed in my_write_core (sig=sig@entry=6) at /data/git/10.4_dbg/mysys/stacktrace.c:481
|
#2 0x0000561575d90e7c in handle_fatal_signal (sig=6) at /data/git/10.4_dbg/sql/signal_handler.cc:343
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007f44c618d801 in __GI_abort () at abort.c:79
|
#6 0x00007f44c617d39a in __assert_fail_base (
|
fmt=0x7f44c63047d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
|
assertion=assertion@entry=0x5615766f5100 "(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)",
|
file=file@entry=0x5615766f4ab8 "/data/git/10.4_dbg/sql/table.cc", line=line@entry=2934,
|
function=function@entry=0x5615766f8340 <TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long)::__PRETTY_FUNCTION__> "int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t)") at assert.c:92
|
#7 0x00007f44c617d412 in __GI___assert_fail (
|
assertion=assertion@entry=0x5615766f5100 "(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)",
|
file=file@entry=0x5615766f4ab8 "/data/git/10.4_dbg/sql/table.cc", line=line@entry=2934,
|
function=function@entry=0x5615766f8340 <TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long)::__PRETTY_FUNCTION__> "int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t)") at assert.c:101
|
#8 0x0000561575bb9f5c in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0x7f44c7cc7150,
|
thd=thd@entry=0x7f4481c15070, write=<optimized out>, frm_image=<optimized out>,
|
frm_length=<optimized out>) at /data/git/10.4_dbg/sql/table.cc:2932
|
#9 0x0000561575da028d in ha_create_table (thd=thd@entry=0x7f4481c15070,
|
path=path@entry=0x7f44c7cc7fa0 "./test/t", db=0x7f4481c6d890 "test",
|
table_name=0x7f4481c6d198 "t", create_info=create_info@entry=0x7f44c7cc83e0,
|
frm=frm@entry=0x7f44c7cc7f90) at /data/git/10.4_dbg/sql/handler.cc:5172
|
#10 0x0000561575b89df2 in create_table_impl (thd=thd@entry=0x7f4481c15070, orig_db=...,
|
orig_table_name=..., db=..., table_name=..., path=path@entry=0x7f44c7cc7fa0 "./test/t",
|
options=..., create_info=0x7f44c7cc83e0, alter_info=0x7f44c7cc8320, create_table_mode=0,
|
is_trans=0x7f44c7cc8227, key_info=0x7f44c7cc7f88, key_count=0x7f44c7cc7f84, frm=0x7f44c7cc7f90)
|
at /data/git/10.4_dbg/sql/sql_table.cc:5065
|
#11 0x0000561575b8a38a in mysql_create_table_no_lock (thd=thd@entry=0x7f4481c15070,
|
db=db@entry=0x7f4481c6d1e8, table_name=table_name@entry=0x7f4481c6d1f8,
|
create_info=create_info@entry=0x7f44c7cc83e0, alter_info=alter_info@entry=0x7f44c7cc8320,
|
is_trans=is_trans@entry=0x7f44c7cc8227, create_table_mode=0, table_list=0x7f4481c6d1d0)
|
at /data/git/10.4_dbg/sql/sql_table.cc:5149
|
#12 0x0000561575b8a6d1 in mysql_create_table (thd=thd@entry=0x7f4481c15070,
|
create_table=create_table@entry=0x7f4481c6d1d0, create_info=create_info@entry=0x7f44c7cc83e0,
|
alter_info=alter_info@entry=0x7f44c7cc8320) at /data/git/10.4_dbg/sql/sql_table.cc:5241
|
#13 0x0000561575b8c00d in Sql_cmd_create_table_like::execute (this=0x7f4481c6d170, thd=0x7f4481c15070)
|
at /data/git/10.4_dbg/sql/sql_table.cc:11450
|
#14 0x0000561575acef29 in mysql_execute_command (thd=thd@entry=0x7f4481c15070)
|
at /data/git/10.4_dbg/sql/sql_parse.cc:6101
|
#15 0x0000561575ad1848 in mysql_parse (thd=thd@entry=0x7f4481c15070, rawbuf=<optimized out>,
|
length=<optimized out>, parser_state=parser_state@entry=0x7f44c7cca8c0,
|
is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)
|
at /data/git/10.4_dbg/sql/sql_parse.cc:7900
|
#16 0x0000561575ad44ea in dispatch_command (command=command@entry=COM_QUERY,
|
thd=thd@entry=0x7f4481c15070,
|
packet=packet@entry=0x7f4481c57071 "CREATE TABLE t(c ENUM('aaaaaaaa') CHARACTER SET 'Binary',d JSON)", packet_length=packet_length@entry=64, is_com_multi=is_com_multi@entry=false,
|
is_next_command=is_next_command@entry=false) at /data/git/10.4_dbg/sql/sql_parse.cc:1841
|
#17 0x0000561575ad847c in do_command (thd=0x7f4481c15070) at /data/git/10.4_dbg/sql/sql_parse.cc:1359
|
#18 0x0000561575c02d42 in do_handle_one_connection (connect=connect@entry=0x7f44c5435790)
|
at /data/git/10.4_dbg/sql/sql_connect.cc:1412
|
#19 0x0000561575c02e62 in handle_one_connection (arg=0x7f44c5435790)
|
at /data/git/10.4_dbg/sql/sql_connect.cc:1316
|
#20 0x00007f44c6e706db in start_thread (arg=0x7f44c7ccc700) at pthread_create.c:463
|
#21 0x00007f44c626e88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
This secondary issue confirmed present in:
MariaDB: 10.4.13 (dbg), 10.5.2 (dbg)
This secondary issue confirmed not present in:
MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
|
|
Additional testcase
USE test;
|
SET @@SESSION.collation_connection=utf32_bin;
|
CREATE TABLE t(c1 ENUM('a','b','ac') CHARACTER SET 'Binary',c2 JSON,c3 INT) ENGINE=InnoDB;
|
Leads to:
|
10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f
|
mysqld: /test/10.5_dbg/sql/table.cc:3131: int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t, const uchar*, size_t): Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed.
|
|
10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f
|
Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
[Current thread is 1 (Thread 0x7f36bcd09700 (LWP 2324979))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x000055685687b03d in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
|
#2 0x0000556856020d7b in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007f36bb44d801 in __GI_abort () at abort.c:79
|
#6 0x00007f36bb43d39a in __assert_fail_base (fmt=0x7f36bb5c47d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x556856a16930 "(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)", file=file@entry=0x556856a13f69 "/test/10.5_dbg/sql/table.cc", line=line@entry=3131, function=function@entry=0x556856a182c0 <TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long, unsigned char const*, unsigned long)::__PRETTY_FUNCTION__> "int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t, const uchar*, size_t)") at assert.c:92
|
#7 0x00007f36bb43d412 in __GI___assert_fail (assertion=assertion@entry=0x556856a16930 "(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)", file=file@entry=0x556856a13f69 "/test/10.5_dbg/sql/table.cc", line=line@entry=3131, function=function@entry=0x556856a182c0 <TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long, unsigned char const*, unsigned long)::__PRETTY_FUNCTION__> "int TABLE_SHARE::init_from_binary_frm_image(THD*, bool, const uchar*, size_t, const uchar*, size_t)") at assert.c:101
|
#8 0x0000556855e8e4ca in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0x7f36bcd06730, thd=thd@entry=0x7f368e815088, write=<optimized out>, frm_image=<optimized out>, frm_length=<optimized out>, par_image=par_image@entry=0x0, par_length=0) at /test/10.5_dbg/sql/table.cc:3129
|
#9 0x0000556856030377 in ha_create_table (thd=thd@entry=0x7f368e815088, path=path@entry=0x7f36bcd07530 "./test/t", db=0x7f368e8748e8 "test", table_name=0x7f368e8741e0 "t", create_info=create_info@entry=0x7f36bcd07980, frm=frm@entry=0x7f36bcd07520) at /test/10.5_dbg/sql/handler.cc:5332
|
#10 0x0000556855e47158 in create_table_impl (thd=thd@entry=0x7f368e815088, orig_db=..., orig_table_name=..., db=..., table_name=..., path=path@entry=0x7f36bcd07530 "./test/t", options=..., create_info=0x7f36bcd07980, alter_info=0x7f36bcd078b0, create_table_mode=0, is_trans=0x7f36bcd077b7, key_info=0x7f36bcd07518, key_count=0x7f36bcd07514, frm=0x7f36bcd07520) at /test/10.5_dbg/sql/sql_table.cc:5177
|
#11 0x0000556855e4763d in mysql_create_table_no_lock (thd=thd@entry=0x7f368e815088, db=db@entry=0x7f368e874230, table_name=table_name@entry=0x7f368e874240, create_info=create_info@entry=0x7f36bcd07980, alter_info=alter_info@entry=0x7f36bcd078b0, is_trans=is_trans@entry=0x7f36bcd077b7, create_table_mode=0, table_list=0x7f368e874218) at /test/10.5_dbg/sql/sql_table.cc:5261
|
#12 0x0000556855e47984 in mysql_create_table (thd=thd@entry=0x7f368e815088, create_table=create_table@entry=0x7f368e874218, create_info=create_info@entry=0x7f36bcd07980, alter_info=alter_info@entry=0x7f36bcd078b0) at /test/10.5_dbg/sql/sql_table.cc:5353
|
#13 0x0000556855e492e7 in Sql_cmd_create_table_like::execute (this=0x7f368e8741b8, thd=0x7f368e815088) at /test/10.5_dbg/sql/sql_table.cc:11879
|
#14 0x0000556855d7c422 in mysql_execute_command (thd=thd@entry=0x7f368e815088) at /test/10.5_dbg/sql/sql_parse.cc:5912
|
#15 0x0000556855d83f2b in mysql_parse (thd=thd@entry=0x7f368e815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f36bcd08450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
|
#16 0x0000556855d6fc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f368e815088, packet=packet@entry=0x7f368e867089 "CREATE TABLE t(c1 ENUM('a','b','ac') CHARACTER SET 'Binary',c2 JSON,c3 INT) ENGINE=InnoDB", packet_length=packet_length@entry=89, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
|
#17 0x0000556855d6e49b in do_command (thd=0x7f368e815088) at /test/10.5_dbg/sql/sql_parse.cc:1358
|
#18 0x0000556855ec9415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f369afc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
|
#19 0x0000556855ec9744 in handle_one_connection (arg=arg@entry=0x7f369afc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
|
#20 0x0000556856329fb0 in pfs_spawn_thread (arg=0x7f36ba845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#21 0x00007f36bc1306db in start_thread (arg=0x7f36bcd09700) at pthread_create.c:463
|
#22 0x00007f36bb52e88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)
Bug confirmed not present in:
MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
|