[MDEV-25578] table with too much redundant key coz 10.5.9 crash signal kill 11 Created: 2021-05-03  Updated: 2021-05-03  Resolved: 2021-05-03

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.5.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: densin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

ubuntu 20.04 and also mariadb docker


Attachments: HTML File log     File test_creat.sql     File test_kill.sql     File test_notkill.sql    
Issue Links:
Duplicate
duplicates MDEV-24953 10.5.9 crashes with large IN() list Closed

 Description   

after migrate to mariadb 10.5.9. docker ( default config)
I found some sql can crash database (got signal 11).
after scrutinize , found that coz old table with too much redundant key index and
long IN condition sql.

attachment
1. sample of tables create (test_creat.sql)
2. sql which got signal 11 ( test_kill.sql)
3. similar sql just reduce IN one array which no problem ( test_notkill.sql)



 Comments   
Comment by densin [ 2021-05-03 ]

I also test with 10.2 , 10.3 , this bug not happen.

Comment by Alice Sherepa [ 2021-05-03 ]

Thanks for the report!
I repeated on 10.5.9, the bug is the same as MDEV-24953 (MDEV-24995).

210503  9:57:12 [ERROR] mysqld got signal 11 ;
 
Server version: 10.5.9-MariaDB
 
sigaction.c:0(__restore_rt)[0x7f0f5371f3c0]
sql/opt_range.cc:9816(and_all_keys(RANGE_OPT_PARAM*, SEL_ARG*, SEL_ARG*, unsigned int))[0x564c694ad8fd]
sql/opt_range.cc:10066(and_range_trees(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*, SEL_TREE*))[0x564c694b6c5c]
sql/opt_range.cc:9263(tree_and(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*))[0x564c694b8f5a]
sql/opt_range.cc:8316(Item_cond_and::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x564c694bd64f]
sql/opt_range.cc:2880(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x564c694b9be1]
sql/sql_select.cc:4763(JOIN::optimize_inner())[0x564c691d9f35]
sql/sql_select.cc:1629(JOIN::optimize())[0x564c691dab35]
sql/sql_select.cc:4705(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*))[0x564c691dabf8]
sql/sql_select.cc:429(handle_select(THD*, LEX*, select_result*, unsigned long))[0x564c691db7da]
sql/sql_parse.cc:6283(execute_sqlcom_select(THD*, TABLE_LIST*))[0x564c6903fb65]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x564c691800c4]
sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x564c69183169]
sql/sql_audit.h:169(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x564c69185215]
sql/sql_parse.cc:1375(do_command(THD*))[0x564c69186bdb]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x564c69271bc2]
sql/sql_connect.cc:1318(handle_one_connection)[0x564c69271e84]
perfschema/pfs.cc:2204(pfs_spawn_thread)[0x564c695f528d]
nptl/pthread_create.c:478(start_thread)[0x7f0f53713609]
x86_64/clone.S:97(__GI___clone)[0x7f0f532b7293]
 
Query (0x7f0ed80128d0): select * from `test`.`content` where `user_id` = 96 and (content_type, content_id) in (('PRODUCT', 5497), ('PRODUCT', 73344), ('PRODUCT', 83916), ('PRODUCT', 89140), ('PRODUCT', 90144), ('PRODUCT', 99079), ('REVIEW', 45251), ('REVIEW', 45758), ('REVIEW', 47700), ('REVIEW', 48645), ('REVIEW', 48651), ('REVIEW', 48790), ('REVIEW', 48898), ('REVIEW', 49003), ....

Generated at Thu Feb 08 09:38:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.