Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5.4, 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
USE test;
|
SET @@SESSION.COLLATION_CONNECTION=utf16_hungarian_ci;
|
CREATE TABLE t(c ENUM('aaaaaaaa') CHARACTER SET 'Binary',d JSON); # ERROR 1064 (42000): You have an error in your SQL syntax
|
CREATE TABLE t(c ENUM('aaaaaaaaa') CHARACTER SET 'Binary',d JSON); # ERROR 1033 (HY000): Incorrect information in file: './test/t.frm'
|
CREATE TABLE t(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON); # Sig 11
|
All three queries succeed on MySQL 8.0 without warnings (opt+dbg tested).
Sig 11 (from last query) backtrace;
Core was generated by `/data/MD180320-mariadb-10.5.2-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
|
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 0x7f82aa6a6700 (LWP 4464))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x0000564ed4087877 in my_write_core (sig=sig@entry=11)
|
at /data/git/10.5_opt/mysys/stacktrace.c:518
|
#2 0x0000564ed3a4615a in handle_fatal_signal (sig=11) at /data/git/10.5_opt/sql/signal_handler.cc:325
|
#3 <signal handler called>
|
#4 0x0000564ed390b2d0 in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0x7f82aa6a3c80,
|
thd=thd@entry=0x7f8272c12018, write=<optimized out>, frm_image=<optimized out>,
|
frm_length=<optimized out>) at /data/git/10.5_opt/sql/table.cc:3031
|
#5 0x0000564ed3a4fc20 in ha_create_table (thd=thd@entry=0x7f8272c12018,
|
path=path@entry=0x7f82aa6a4940 "./test/t", db=0x7f8272c47850 "test",
|
table_name=0x7f8272c47148 "t", create_info=create_info@entry=0x7f82aa6a4d20,
|
frm=frm@entry=0x7f82aa6a4930) at /data/git/10.5_opt/sql/handler.cc:5300
|
#6 0x0000564ed38e52ea in create_table_impl (thd=thd@entry=0x7f8272c12018, orig_db=...,
|
orig_table_name=..., db=..., table_name=..., path=path@entry=0x7f82aa6a4940 "./test/t",
|
options=..., create_info=0x7f82aa6a4d20, alter_info=0x7f82aa6a4c50, create_table_mode=0,
|
is_trans=0x7f82aa6a4bc7, key_info=0x7f82aa6a4928, key_count=0x7f82aa6a4924, frm=0x7f82aa6a4930)
|
at /data/git/10.5_opt/sql/sql_table.cc:5084
|
#7 0x0000564ed38e568b in mysql_create_table_no_lock (thd=thd@entry=0x7f8272c12018,
|
db=db@entry=0x7f8272c47198, table_name=table_name@entry=0x7f8272c471a8,
|
create_info=create_info@entry=0x7f82aa6a4d20, alter_info=0x7f82aa6a4c50,
|
is_trans=is_trans@entry=0x7f82aa6a4bc7, create_table_mode=0, table_list=0x7f8272c47180)
|
at /data/git/10.5_opt/sql/sql_table.cc:5168
|
#8 0x0000564ed38e58a1 in mysql_create_table (thd=thd@entry=0x7f8272c12018,
|
create_table=create_table@entry=0x7f8272c47180, create_info=create_info@entry=0x7f82aa6a4d20,
|
alter_info=alter_info@entry=0x7f82aa6a4c50) at /data/git/10.5_opt/sql/sql_table.cc:5260
|
#9 0x0000564ed38e6c46 in Sql_cmd_create_table_like::execute (this=<optimized out>,
|
thd=0x7f8272c12018) at /data/git/10.5_opt/sql/sql_table.cc:11592
|
#10 0x0000564ed38511b4 in mysql_execute_command (thd=thd@entry=0x7f8272c12018)
|
at /data/git/10.5_opt/sql/sql_parse.cc:5887
|
#11 0x0000564ed38590bc in mysql_parse (thd=thd@entry=0x7f8272c12018, rawbuf=<optimized out>,
|
length=66, parser_state=parser_state@entry=0x7f82aa6a54d0, is_com_multi=is_com_multi@entry=false,
|
is_next_command=is_next_command@entry=false) at /data/git/10.5_opt/sql/sql_parse.cc:7926
|
#12 0x0000564ed384e049 in dispatch_command (command=command@entry=COM_QUERY,
|
thd=thd@entry=0x7f8272c12018,
|
packet=packet@entry=0x7f8272c3a019 "CREATE TABLE t(c ENUM('aaaaaaaaaa') CHARACTER SET 'Binary',d JSON)", packet_length=packet_length@entry=66, is_com_multi=is_com_multi@entry=false,
|
is_next_command=is_next_command@entry=false) at /data/git/10.5_opt/sql/sql_parse.cc:1839
|
#13 0x0000564ed384c3c0 in do_command (thd=0x7f8272c12018) at /data/git/10.5_opt/sql/sql_parse.cc:1358
|
#14 0x0000564ed39403ae in do_handle_one_connection (connect=<optimized out>,
|
connect@entry=0x7f82a78329b8, put_in_cache=put_in_cache@entry=true)
|
at /data/git/10.5_opt/sql/sql_connect.cc:1422
|
#15 0x0000564ed3940554 in handle_one_connection (arg=arg@entry=0x7f82a78329b8)
|
at /data/git/10.5_opt/sql/sql_connect.cc:1319
|
#16 0x0000564ed3caf02a in pfs_spawn_thread (arg=0x7f82a784b018)
|
at /data/git/10.5_opt/storage/perfschema/pfs.cc:2201
|
#17 0x00007f82a91596db in start_thread (arg=0x7f82aa6a6700) at pthread_create.c:463
|
#18 0x00007f82a855788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.13 (opt), 10.5.2 (opt), 10.5.4 (opt)
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 (dbg), 10.5.2 (dbg)
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)
Attachments
Issue Links
- is duplicated by
-
MDEV-22499 Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed in TABLE_SHARE::init_from_binary_frm_image
-
- Closed
-
- relates to
-
MDEV-20902 Table with two UCS2 ENUM or SET fields is created wrongly
-
- Open
-
-
MDEV-28498 Incorrect information in file: './test/t0.frm' on CREATE TABLE
-
- In Review
-
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)