|
Here is a special variation of apparently the same use case which produces a SIGSEGV in optimize_keyuse instead of the reported assertion.
Given that any changes to the test case convert it back to the reported assertion, and that again only 10.4 is affected, I assume it's the same or a closely related problem.
CREATE TABLE t1 (a INT, b INT, c INT, d INT, KEY(d));
|
INSERT INTO t1 VALUES (1,2,3,4),(5,6,7,8);
|
CREATE TABLE t2 (e INT, f INT, g INT, h INT, KEY (f));
|
INSERT INTO t2 VALUES (1,2,3,4),(5,6,7,8);
|
CREATE VIEW v AS SELECT a, b, c, d FROM t1, t2 WHERE t1.d <=> t2.g AND t2.e <=> 215;
|
|
EXPLAIN INSERT INTO v (a, b, c, d) SELECT * FROM t2 WHERE h > 0 ORDER BY e, f, g, h;
|
|
# Cleanup
|
DROP VIEW v;
|
DROP TABLE t1, t2;
|
|
10.4 f5dceafd
|
#3 <signal handler called>
|
#4 0x00005641cad66837 in optimize_keyuse (join=0x62900024bd20, keyuse_array=0x62900024c010) at /data/src/10.4/sql/sql_select.cc:7119
|
#5 0x00005641cad599ee in make_join_statistics (join=0x62900024bd20, tables_list=..., keyuse_array=0x62900024c010) at /data/src/10.4/sql/sql_select.cc:5686
|
#6 0x00005641cad377da in JOIN::optimize_inner (this=0x62900024bd20) at /data/src/10.4/sql/sql_select.cc:2368
|
#7 0x00005641cad30791 in JOIN::optimize (this=0x62900024bd20) at /data/src/10.4/sql/sql_select.cc:1711
|
#8 0x00005641cad51665 in mysql_select (thd=0x62b00005b208, tables=0x629000249228, wild_num=0, fields=..., conds=0x62900024aba8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184068, result=0x62900024c988, unit=0x62b000065370, select_lex=0x62b000066f28) at /data/src/10.4/sql/sql_select.cc:4812
|
#9 0x00005641cadf7f7a in mysql_explain_union (thd=0x62b00005b208, unit=0x62b000065370, result=0x62900024c988) at /data/src/10.4/sql/sql_select.cc:27707
|
#10 0x00005641cadf74a9 in select_describe (join=0x62900024ca40, need_tmp_table=false, need_order=true, distinct=false, message=0x0) at /data/src/10.4/sql/sql_select.cc:27661
|
#11 0x00005641cad4fb42 in JOIN::exec_inner (this=0x62900024ca40) at /data/src/10.4/sql/sql_select.cc:4567
|
#12 0x00005641cad4d7c4 in JOIN::exec (this=0x62900024ca40) at /data/src/10.4/sql/sql_select.cc:4387
|
#13 0x00005641cad51856 in mysql_select (thd=0x62b00005b208, tables=0x62b0000635f8, wild_num=1, fields=..., conds=0x62b000063ee8, og_num=4, order=0x62b000064ac0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184068, result=0x62900024c988, unit=0x62b00005f140, select_lex=0x62b000062fb0) at /data/src/10.4/sql/sql_select.cc:4826
|
#14 0x00005641cadf7f7a in mysql_explain_union (thd=0x62b00005b208, unit=0x62b00005f140, result=0x62900024c988) at /data/src/10.4/sql/sql_select.cc:27707
|
#15 0x00005641cac846e8 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:4725
|
#16 0x00005641cac9b463 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "EXPLAIN INSERT INTO v (a, b, c, d) SELECT * FROM t2 WHERE h > 0 ORDER BY e, f, g, h", length=83, parser_state=0x7fc5d08c2860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
|
#17 0x00005641cac717a6 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "EXPLAIN INSERT INTO v (a, b, c, d) SELECT * FROM t2 WHERE h > 0 ORDER BY e, f, g, h", packet_length=83, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
|
#18 0x00005641cac6e315 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
|
#19 0x00005641cb06d0ba in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
|
#20 0x00005641cb06c9d1 in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
|
#21 0x00005641cbcd9aee in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
|
#22 0x00007fc5d86a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#23 0x00007fc5d87285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|