mysqld: /home/mysql/mariadb/sql/opt_range.cc:15436: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed. 220804 7:52:29 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.8.3-MariaDB-debug key_buffer_size=134217728 read_buffer_size=131072 max_used_connections=3 max_threads=153 thread_count=3 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 468121 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x62b00016c288 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 = 0x7f7af0131cd0 thread_stack 0x100000 sanitizer_common/sanitizer_common_interceptors.inc:4022(__interceptor_backtrace.part.0)[0x7f7b134add40] mysys/stacktrace.c:212(my_print_stacktrace)[0x557ed56e1f2f] sql/signal_handler.cc:226(handle_fatal_signal)[0x557ed42c9db1] ??:0(__restore_rt)[0x7f7b12f1f420] ??:0(gsignal)[0x7f7b12a0800b] ??:0(abort)[0x7f7b129e7859] /lib/x86_64-linux-gnu/libc.so.6(+0x22729)[0x7f7b129e7729] ??:0(__assert_fail)[0x7f7b129f8fd6] sql/opt_range.cc:15440(QUICK_GROUP_MIN_MAX_SELECT::get_next())[0x557ed36dff28] sql/records.cc:403(rr_quick(READ_RECORD*))[0x557ed37283e6] sql/records.h:81(READ_RECORD::read_record())[0x557ed36f4840] sql/sql_select.cc:21182(sub_select(JOIN*, st_join_table*, bool))[0x557ed3b9538c] sql/sql_select.cc:20708(do_select(JOIN*, Procedure*))[0x557ed3b93116] sql/sql_select.cc:4759(JOIN::exec_inner())[0x557ed3b1f0a6] sql/sql_select.cc:4538(JOIN::exec())[0x557ed3b1c5a6] sql/item_subselect.cc:4141(subselect_single_select_engine::exec())[0x557ed457c51c] sql/item_subselect.cc:854(Item_subselect::exec())[0x557ed45586cb] sql/item_subselect.cc:1498(Item_singlerow_subselect::val_int())[0x557ed455e5c7] sql/item.cc:6814(Item::save_int_in_field(Field*, bool))[0x557ed435a2fd] sql/sql_type.cc:4364(Type_handler_int_result::Item_save_in_field(Item*, Field*, bool) const)[0x557ed406e032] sql/item.cc:6824(Item::save_in_field(Field*, bool))[0x557ed435a4e9] sql/item.cc:1519(Item::save_in_field_no_warnings(Field*, bool))[0x557ed432ef25] sql/opt_range.cc:8964(Field::get_mm_leaf_int(RANGE_OPT_PARAM*, KEY_PART*, Item_bool_func const*, scalar_comparison_op, Item*, bool))[0x557ed36b4126] sql/field.h:2529(Field_int::get_mm_leaf(RANGE_OPT_PARAM*, KEY_PART*, Item_bool_func const*, scalar_comparison_op, Item*))[0x557ed3e5f9a5] sql/opt_range.cc:8807(Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM*, Field*, KEY_PART*, Item_func::Functype, Item*))[0x557ed36b248c] sql/opt_range.cc:8642(Item_bool_func::get_mm_parts(RANGE_OPT_PARAM*, Field*, Item_func::Functype, Item*))[0x557ed36b06ed] sql/item_cmpfunc.h:499(Item_bool_func2_with_rev::get_func_mm_tree(RANGE_OPT_PARAM*, Field*, Item*))[0x557ed36f12e2] sql/opt_range.cc:8295(Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM*, Item_field*, Item*))[0x557ed36acf1e] sql/item_cmpfunc.h:208(Item_bool_func::get_full_func_mm_tree_for_args(RANGE_OPT_PARAM*, Item*, Item*))[0x557ed36f0b69] sql/item_cmpfunc.h:527(Item_bool_func2_with_rev::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x557ed36f16c7] sql/opt_range.cc:2886(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x557ed368939b] sql/sql_select.cc:5061(get_quick_record_count(THD*, SQL_SELECT*, TABLE*, Bitmap<64u> const*, unsigned long long))[0x557ed3b21217] sql/sql_select.cc:5788(make_join_statistics(JOIN*, List&, st_dynamic_array*))[0x557ed3b28058] sql/sql_select.cc:2476(JOIN::optimize_inner())[0x557ed3b06238] sql/sql_select.cc:1818(JOIN::optimize())[0x557ed3aff1e4] sql/sql_lex.cc:4942(st_select_lex::optimize_unflattened_subqueries(bool))[0x557ed398bda3] sql/sql_insert.cc:852(mysql_insert(THD*, TABLE_LIST*, List&, List >&, List&, List&, enum_duplicates, bool, select_result*))[0x557ed393c53a] sql/sql_parse.cc:4562(mysql_execute_command(THD*, bool))[0x557ed3a0955e] sql/sql_parse.cc:8027(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x557ed3a21c13] sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x557ed39f7ea9] sql/sql_parse.cc:1407(do_command(THD*, bool))[0x557ed39f4c1e] sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x557ed3e9f2e4] sql/sql_connect.cc:1314(handle_one_connection)[0x557ed3e9eb70] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x557ed4ab8bfe] ??:0(start_thread)[0x7f7b12f13609] ??:0(clone)[0x7f7b12ae4133] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x6290000fa2a8): insert into t_8fjoxb (wkey, pkey, c_yecif) values (110, 115000, case when exists ( select ref_0.wkey as c14 from t_swbayb as ref_0 where (ref_0.pkey > ( select distinct ref_1.wkey as c0 from t_swbayb as ref_1 ))) then 'vxg_w' else null end ) Connection ID (thread ID): 4 Status: NOT_KILLED 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 The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains information that should help you find out what is causing the crash. Writing a core file... Working directory at /usr/local/mysql/data Resource Limits: Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 0 bytes Max resident set unlimited unlimited bytes Max processes unlimited unlimited processes Max open files 1048576 1048576 files Max locked memory 67108864 67108864 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 1030209 1030209 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us Core pattern: core