Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
Logging this bug separate from MDEV-18163. Though the assert is the same, in this case Aria is required, no LATER is used, the crash is on EXPLAIN and in an altogether different function. It may still be related, needs review by developers.
USE test;
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Aria ROW_FORMAT=COMPRESSED;
|
INSERT INTO t1 VALUES(1);
|
CREATE TEMPORARY TABLE t2(b INT);
|
EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT MAX(a) FROM t2);
|
Leads to:
10.5.5 e1013725ce0f3f947e728491eef75d9985e8db2f |
mysqld: /test/10.5_dbg/sql/handler.cc:3205: int handler::ha_index_last(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed.
|
10.5.5 e1013725ce0f3f947e728491eef75d9985e8db2f |
Core was generated by `/test/MD250620-mariadb-10.5.5-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 0x153af324f700 (LWP 201980))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x000055c54c95d7d0 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
|
#2 0x000055c54c11647a in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x0000153af14e58b1 in __GI_abort () at abort.c:79
|
#6 0x0000153af14d542a in __assert_fail_base (fmt=0x153af165ca38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55c54cc6ff58 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=file@entry=0x55c54cc6e7c2 "/test/10.5_dbg/sql/handler.cc", line=line@entry=3205, function=function@entry=0x55c54cc72d00 <handler::ha_index_last(unsigned char*)::__PRETTY_FUNCTION__> "int handler::ha_index_last(uchar*)") at assert.c:92
|
#7 0x0000153af14d54a2 in __GI___assert_fail (assertion=assertion@entry=0x55c54cc6ff58 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2", file=file@entry=0x55c54cc6e7c2 "/test/10.5_dbg/sql/handler.cc", line=line@entry=3205, function=function@entry=0x55c54cc72d00 <handler::ha_index_last(unsigned char*)::__PRETTY_FUNCTION__> "int handler::ha_index_last(uchar*)") at assert.c:101
|
#8 0x000055c54c121363 in handler::ha_index_last (this=0x153acec38aa0, buf=0x153acec511a8 "\377\001") at /test/10.5_dbg/sql/handler.cc:3204
|
#9 0x000055c54c2bc3d4 in get_index_max_value (range_fl=<optimized out>, ref=0x153af324bdf0, table=0x153acecaf088) at /test/10.5_dbg/sql/opt_sum.cc:205
|
#10 opt_sum_query (thd=0x153acec15088, tables=@0x153acec751e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153acec78630, last = 0x153acec78630, elements = 1}, <No data fields>}, all_fields=@0x153acec783e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153acec756c0, last = 0x153acec756c0, elements = 1}, <No data fields>}, conds=0x0) at /test/10.5_dbg/sql/opt_sum.cc:404
|
#11 0x000055c54bee53fd in JOIN::optimize_inner (this=this@entry=0x153acec780b8) at /test/10.5_dbg/sql/sql_select.cc:2147
|
#12 0x000055c54bee80a6 in JOIN::optimize (this=this@entry=0x153acec780b8) at /test/10.5_dbg/sql/sql_select.cc:1612
|
#13 0x000055c54be433cb in st_select_lex::optimize_unflattened_subqueries (this=0x153acec74180, const_only=const_only@entry=false) at /test/10.5_dbg/sql/sql_lex.cc:4792
|
#14 0x000055c54c01b7a3 in JOIN::optimize_unflattened_subqueries (this=this@entry=0x153acec778b0) at /test/10.5_dbg/sql/opt_subselect.cc:5547
|
#15 0x000055c54bee3446 in JOIN::optimize_stage2 (this=this@entry=0x153acec778b0) at /test/10.5_dbg/sql/sql_select.cc:2807
|
#16 0x000055c54bee7d83 in JOIN::optimize_inner (this=this@entry=0x153acec778b0) at /test/10.5_dbg/sql/sql_select.cc:2262
|
#17 0x000055c54bee80a6 in JOIN::optimize (this=this@entry=0x153acec778b0) at /test/10.5_dbg/sql/sql_select.cc:1612
|
#18 0x000055c54bee8a33 in mysql_select (thd=thd@entry=0x153acec15088, tables=<optimized out>, fields=@0x153acec742d0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153acec74730, last = 0x153acec74730, elements = 1}, <No data fields>}, conds=0x153acec76608, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2147748612, result=0x153acec77190, unit=0x153acec190a0, select_lex=0x153acec74180) at /test/10.5_dbg/sql/sql_select.cc:4635
|
#19 0x000055c54bee909d in mysql_explain_union (thd=thd@entry=0x153acec15088, unit=unit@entry=0x153acec190a0, result=result@entry=0x153acec77190) at /test/10.5_dbg/sql/sql_select.cc:27163
|
#20 0x000055c54be72412 in execute_sqlcom_select (thd=thd@entry=0x153acec15088, all_tables=0x153acec74778) at /test/10.5_dbg/sql/sql_parse.cc:6150
|
#21 0x000055c54be6b7c2 in mysql_execute_command (thd=thd@entry=0x153acec15088) at /test/10.5_dbg/sql/sql_parse.cc:3939
|
#22 0x000055c54be78638 in mysql_parse (thd=thd@entry=0x153acec15088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153af324e350, 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:7995
|
#23 0x000055c54be65110 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153acec15088, packet=packet@entry=0x153acec67089 "", packet_length=packet_length@entry=59, 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:1874
|
#24 0x000055c54be638ea in do_command (thd=0x153acec15088) at /test/10.5_dbg/sql/sql_parse.cc:1355
|
#25 0x000055c54bfbf15f in do_handle_one_connection (connect=<optimized out>, connect@entry=0x153ad20d2808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
|
#26 0x000055c54bfbf87b in handle_one_connection (arg=arg@entry=0x153ad20d2808) at /test/10.5_dbg/sql/sql_connect.cc:1313
|
#27 0x000055c54c42211c in pfs_spawn_thread (arg=0x153af0046508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#28 0x0000153af21c86db in start_thread (arg=0x153af324f700) at pthread_create.c:463
|
#29 0x0000153af15c6a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.1.46 (dbg), 10.1.46 (opt), 10.2.33 (dbg), 10.2.33 (opt), 10.3.24 (dbg), 10.3.24 (opt), 10.4.14 (dbg), 10.4.14 (opt), 10.5.5 (dbg)
Bug confirmed not present in:
MariaDB: 10.5.5 (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)
Attachments
Issue Links
- relates to
-
MDEV-7034 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::ha_rnd_next on EXPLAIN INSERT .. SELECT
- Closed
-
MDEV-18163 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::ha_rnd_next(); / Assertion `table_list->table' failed in find_field_in_table_ref / ERROR 1901 (on optimized builds)
- Closed