[MDEV-30711] The mysqld service core occurs when the query statement executes the execution plan Created: 2023-02-22  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.5.16, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 11.0
Fix Version/s: 10.4, 10.5, 10.6, 11.0, 11.1, 11.2

Type: Bug Priority: Major
Reporter: guozhentang Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None
Environment:

centos 7.6


Attachments: PNG File image-2023-02-22-20-44-48-747.png     File mdev30711.test     File mdev30711_initial.test     File sql_file.rar    
Issue Links:
Duplicate
is duplicated by MDEV-32607 Server crash on query Closed
Relates
relates to MDEV-30081 Crash with splitting from constant me... Closed
relates to MDEV-14999 [Draft] Server crashes in optimize_ke... Closed

 Description   

Step 1: Create a table and insert data
1. Create database sqltester
create database sqltester
2. Execute the attachment file to create a table and insert data
source sqltester_ for_ parallel_ with_ index.2k_ dp_ 210col.index_ desc.sql
3. Execute the attachment file to create a table and insert data
source sqltester_ for_ parallel_ with_ index_ view_ part_ tab.sql
Step 2: Execute the query plan
source explain_ temp_ sql.sql



 Comments   
Comment by Alice Sherepa [ 2023-02-27 ]

Thanks!
I repeated on 10.3-10.11,11.0 with the attached test mdev30711.test

230227 17:57:56 [ERROR] mysqld got signal 11 ;
 
Server version: 10.3.38-MariaDB-debug-log source revision: 2743a510a156456fe57429032bf41c0da0f11198
 
sql/signal_handler.cc:233(handle_fatal_signal)[0x556ce507ac37]
sigaction.c:0(__restore_rt)[0x7faa8ea0c420]
sql/sql_select.cc:6648(optimize_keyuse(JOIN*, st_dynamic_array*))[0x556ce49dd97a]
sql/opt_split.cc:777(JOIN::add_keyuses_for_splitting())[0x556ce4e66e27]
sql/opt_split.cc:803(st_join_table::add_keyuses_for_splitting())[0x556ce4e672a6]
sql/sql_select.cc:5090(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x556ce49cf384]
sql/sql_select.cc:2000(JOIN::optimize_inner())[0x556ce49afbac]
sql/sql_select.cc:1542(JOIN::optimize())[0x556ce49ab086]
sql/sql_lex.cc:4107(st_select_lex::optimize_unflattened_subqueries(bool))[0x556ce489db72]
sql/opt_subselect.cc:5445(JOIN::optimize_constant_subqueries())[0x556ce4db04c6]
sql/sql_select.cc:1741(JOIN::optimize_inner())[0x556ce49acc6b]
sql/sql_select.cc:1542(JOIN::optimize())[0x556ce49ab086]
sql/sql_select.cc:4379(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*))[0x556ce49c883b]
sql/sql_select.cc:372(handle_select(THD*, LEX*, select_result*, unsigned long))[0x556ce499ea1f]
sql/sql_parse.cc:6340(execute_sqlcom_select(THD*, TABLE_LIST*))[0x556ce490f708]
sql/sql_parse.cc:3871(mysql_execute_command(THD*))[0x556ce48fd72e]
sql/sql_parse.cc:7855(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x556ce49193ea]
sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x556ce48f03a7]
sql/sql_parse.cc:1398(do_command(THD*))[0x556ce48ecec6]
sql/sql_connect.cc:1404(do_handle_one_connection(CONNECT*))[0x556ce4cc362d]
sql/sql_connect.cc:1310(handle_one_connection)[0x556ce4cc2ee7]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x556ce62fa201]
nptl/pthread_create.c:478(start_thread)[0x7faa8ea00609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7faa8e925133]
 
Query (0x62b000000290): SELECT 1
FROM
(SELECT 1
FROM v6
LEFT JOIN tt2 ON (v6.c_credit = tt2.c_chartwo)
JOIN t0
JOIN v7 ON 0 ON 0
LEFT JOIN tt4 AS ref_7 ON (ref_7.date_col IS NOT NULL)
JOIN t0 AS ref_8
JOIN v5 ON 0 ON (v5.c_middle IS NOT NULL)) AS subq_0
JOIN v8 ON 1
WHERE (EXISTS
(SELECT 1
FROM v1
LEFT JOIN v2
JOIN v3 ON (v2.c3 = v3.c0)
JOIN tt2 AS ref_31
JOIN v4
LEFT JOIN v3 AS ref_33
JOIN tt7 ON 0 ON 1 ON (ref_33.c0 IS NULL) ON 1 ON (v1.c_credit_lim = ref_31.c_decimal)
WHERE tt7.c_timestamp IS NULL))
OR 1

Please check mdev30711_initial.test after the fix.

Generated at Thu Feb 08 10:18:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.