Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.11.5, 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
-
None
Description
How to trigger
CREATE TABLE t0 ( c0 CHAR ( 10 ) ) ; |
SELECT ra3 . c0 FROM t0 ra2 STRAIGHT_JOIN t0 ra3 WHERE ra3 . c0 > ra3 . c0 HAVING ra3 . c0 IN ( SELECT ra3 . c0 ca0 FROM t0 ra4 WHERE ra4 . c0 = ( ra3 . c0 ) ) ; |
Server error log
Server version: 10.11.5-MariaDB source revision: 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c
|
key_buffer_size=134217728
|
read_buffer_size=131072
|
max_used_connections=1
|
max_threads=153
|
thread_count=21
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468037 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0x7f450c000c18
|
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 = 0x7f45d4082d98 thread_stack 0x49000
|
mysys/stacktrace.c:216(my_print_stacktrace)[0x55e9fb5dc25e]
|
sql/signal_handler.cc:241(handle_fatal_signal)[0x55e9fb14d765]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f45eb688980]
|
sql/sql_bitmap.h:211(add_key_field(JOIN*, KEY_FIELD**, unsigned int, Item_bool_func*, Field*, bool, Item**, unsigned int, unsigned long long, SARGABLE_PARAM**, unsigned int))[0x55e9faf5622a]
|
sql/sql_list.h:441(Item_equal::add_key_fields(JOIN*, KEY_FIELD**, unsigned int*, unsigned long long, SARGABLE_PARAM**))[0x55e9faf5ca1f]
|
sql/sql_select.cc:7274(update_ref_and_keys(THD*, st_dynamic_array*, st_join_table*, unsigned int, Item*, unsigned long long, st_select_lex*, SARGABLE_PARAM**) [clone .isra.508])[0x55e9faf5cd2f]
|
sql/sql_select.cc:5520(make_join_statistics)[0x55e9faf8ea63]
|
sql/sql_select.cc:1897(JOIN::optimize())[0x55e9faf90af3]
|
sql/sql_lex.cc:4876(st_select_lex::optimize_unflattened_subqueries(bool))[0x55e9faf0016e]
|
sql/sql_select.cc:3382(JOIN::optimize_stage2())[0x55e9faf8a5da]
|
sql/sql_select.cc:2585(JOIN::optimize_inner())[0x55e9faf8e906]
|
sql/sql_select.cc:1897(JOIN::optimize())[0x55e9faf90af3]
|
sql/sql_select.cc:5098(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*))[0x55e9faf90bd9]
|
sql/sql_select.cc:586(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x55e9faf913be]
|
sql/sql_parse.cc:6289(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55e9faf1ccee]
|
sql/sql_parse.cc:6025(mysql_execute_command(THD*, bool))[0x55e9faf263f1]
|
sql/sql_parse.cc:8051(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55e9faf183af]
|
sql/sql_parse.cc:1865(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55e9faf23104]
|
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x55e9faf2460b]
|
sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x55e9fb02ebbf]
|
sql/sql_connect.cc:1318(handle_one_connection)[0x55e9fb02eefd]
|
perfschema/pfs.cc:2204(pfs_spawn_thread)[0x55e9fb32ee85]
|
nptl/pthread_create.c:463(start_thread)[0x7f45eb67d6db]
|
x86_64/clone.S:97(clone)[0x7f45ea7df61f]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0x7f450c015390): SELECT ra3 . c0 FROM t0 ra2 STRAIGHT_JOIN t0 ra3 WHERE ra3 . c0 > ra3 . c0 HAVING ra3 . c0 IN ( SELECT ra3 . c0 ca0 FROM t0 ra4 WHERE ra4 . c0 = ( ra3 . c0 ) )
|
|
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=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,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
|
Attachments
Issue Links
- duplicates
-
MDEV-28509 Server crash via Item_func_ne::add_key_fields in /sql/sql_bitmap.h:196, member access within null pointer of type 'struct JOIN_TAB' in add_key_field
-
- In Review
-
- relates to
-
MDEV-22825 Server crashes in Bitmap<64u>::merge / add_key_field with condition_pushdown_for_subquery=on
-
- Confirmed
-
-
MDEV-29017 SIGSEGV in Bitmap<64u>::merge on SELECT
-
- Confirmed
-
Thanks! I repeated on 10.4-11.3 with Myisam/InnnoDB. THis is the same as MDEV-28509, I added the test case there
STRAIGHT_JOIN t0
Version: '10.4.32-MariaDB-debug-log'
230912 12:26:53 [ERROR] mysqld got signal 11 ;
Server version: 10.4.32-MariaDB-debug-log source revision: d762e9d943aa444695ebe845a7376fd9cbb0e3dc
sql/signal_handler.cc:238(handle_fatal_signal)[0x556bec8c2771]
sigaction.c:0(__restore_rt)[0x7f19156fe420]
sql/sql_bitmap.h:220(Bitmap<64u>::merge(Bitmap<64u> const&))[0x556bec2b1afb]
sql/sql_select.cc:6090(add_key_field(JOIN*, KEY_FIELD**, unsigned int, Item_bool_func*, Field*, bool, Item**, unsigned int, unsigned long long, SARGABLE_PARAM**, unsigned int))[0x556bec1e9499]
sql/sql_select.cc:6544(Item_equal::add_key_fields(JOIN*, KEY_FIELD**, unsigned int*, unsigned long long, SARGABLE_PARAM**))[0x556bec1ed7f8]
sql/sql_select.cc:6953(update_ref_and_keys(THD*, st_dynamic_array*, st_join_table*, unsigned int, Item*, unsigned long long, st_select_lex*, SARGABLE_PARAM**))[0x556bec1f153d]
sql/sql_select.cc:5206(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x556bec1e0b96]
sql/sql_select.cc:2368(JOIN::optimize_inner())[0x556bec1c37a3]
sql/sql_select.cc:1711(JOIN::optimize())[0x556bec1bc7b9]
sql/sql_lex.cc:4236(st_select_lex::optimize_unflattened_subqueries(bool))[0x556bec0951b2]
sql/opt_subselect.cc:5603(JOIN::optimize_unflattened_subqueries())[0x556bec606781]
sql/sql_select.cc:3165(JOIN::optimize_stage2())[0x556bec1cb9c6]
sql/sql_select.cc:2394(JOIN::optimize_inner())[0x556bec1c3aae]
sql/sql_select.cc:1711(JOIN::optimize())[0x556bec1bc7b9]
sql/sql_select.cc:4812(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x556bec1dd7ab]
sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x556bec1ae4b0]
sql/sql_parse.cc:6475(execute_sqlcom_select(THD*, TABLE_LIST*))[0x556bec11a2ba]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x556bec107a31]
sql/sql_parse.cc:8012(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x556bec123795]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x556bec0f9bbb]
sql/sql_parse.cc:1378(do_command(THD*))[0x556bec0f66e6]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x556bec50431b]
sql/sql_connect.cc:1325(handle_one_connection)[0x556bec503bbf]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x556bed1adce8]
nptl/pthread_create.c:478(start_thread)[0x7f19156f2609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f19152c3133]
Query (0x62b0000a1290): SELECT t0.id
FROM t0 ra2
STRAIGHT_JOIN t0
WHERE 0
HAVING t0 . id IN (SELECT t0.id FROM t0 ra4 WHERE ra4.id = t0.id)