mysqld: /home/mysql/mariadb/sql/item_cmpfunc.cc:2584: virtual bool Item_func_nullif::fix_length_and_dec(): Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed. 220827 9:22:06 [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=2 max_threads=153 thread_count=2 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: 0x7f7044000db8 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 = 0x7f70900dbd98 thread_stack 0x49000 mysys/stacktrace.c:212(my_print_stacktrace)[0x563e243d1f7e] sql/signal_handler.cc:226(handle_fatal_signal)[0x563e23b1fbd0] ??:0(__restore_rt)[0x7f7090d18420] ??:0(gsignal)[0x7f709080100b] ??:0(abort)[0x7f70907e0859] /lib/x86_64-linux-gnu/libc.so.6(+0x22729)[0x7f70907e0729] ??:0(__assert_fail)[0x7f70907f1fd6] sql/item_cmpfunc.cc:2585(Item_func_nullif::fix_length_and_dec())[0x563e23b79208] sql/item_func.cc:359(Item_func::fix_fields(THD*, Item**))[0x563e23baf3a8] sql/item.h:1144(Item::fix_fields_if_needed(THD*, Item**))[0x563e236315ae] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x563e23baf286] sql/item_strfunc.cc:127(Item_str_func::fix_fields(THD*, Item**))[0x563e23bf0f17] sql/item.h:1144(Item::fix_fields_if_needed(THD*, Item**))[0x563e236315ae] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x563e23baf286] sql/item.h:1144(Item::fix_fields_if_needed(THD*, Item**))[0x563e236315ae] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x563e23baf286] sql/sql_select.cc:2173(JOIN::optimize_inner())[0x563e237c6af1] sql/sql_select.cc:1818(JOIN::optimize())[0x563e237c571d] sql/sql_derived.cc:1064(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x563e236ff146] sql/sql_derived.cc:200(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x563e236fc9dd] sql/sql_select.cc:2294(JOIN::optimize_inner())[0x563e237c7452] sql/sql_select.cc:1818(JOIN::optimize())[0x563e237c571d] sql/sql_lex.cc:4942(st_select_lex::optimize_unflattened_subqueries(bool))[0x563e23728107] sql/sql_insert.cc:852(mysql_insert(THD*, TABLE_LIST*, List&, List >&, List&, List&, enum_duplicates, bool, select_result*))[0x563e2370ac7d] sql/sql_parse.cc:4562(mysql_execute_command(THD*, bool))[0x563e23760d66] sql/sql_parse.cc:8027(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x563e2376c7c2] sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x563e23758cae] sql/sql_parse.cc:1407(do_command(THD*, bool))[0x563e2375768f] sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x563e23930df1] sql/sql_connect.cc:1314(handle_one_connection)[0x563e23930a81] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x563e23e41123] ??:0(start_thread)[0x7f7090d0c609] ??:0(clone)[0x7f70908dd133] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7f7044014090): insert into t_nva8p (wkey, pkey, c_k6oesd, c_zwobic) values (69, 41000, case when exists ( select subq_0.c0 as c0, subq_0.c3 as c1, subq_0.c1 as c2, subq_0.c0 as c3 from (select distinct ref_0.c_sygi8d as c0, ref_0.c_edvqhb as c1, ref_0.c_sygi8d as c2, ref_0.c_ans1a as c3 from t__d8k3c as ref_0 ) as subq_0 where instr( subq_0.c1, subq_0.c1) < FIELD( subq_0.c1, nullif('h7hmnc', subq_0.c1), subq_0.c1, subq_0.c1)) then 86.38 else 24.15 end , 52.43) Connection ID (thread ID): 5 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 unlimited unlimited 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