mariadbd: /home/ssr/research-project/dbms-test/target-dbms/mariadb-10.5.9/sql/item_subselect.cc:775: virtual bool Item_subselect::exec(): Assertion `!thd->lex->context_analysis_only' failed. 210813 3:55:02 [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.5.9-MariaDB-debug key_buffer_size=134217728 read_buffer_size=131072 max_used_connections=1 max_threads=153 thread_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467968 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x62b00009a288 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 = 0x7f11a9385580 thread_stack 0x5fc00 /usr/local/mysql/bin/mariadbd(__interceptor_backtrace+0x5b)[0x8dd7db] :0(_mi_get_pack_key)[0x870c377] sql/item_windowfunc.h:636(Item_sum_cume_dist::reset_field())[0x33ede22] sigaction.c:0(__restore_rt)[0x7f11d48443c0] ??:0(gsignal)[0x7f11d39e018b] ??:0(abort)[0x7f11d39bf859] /lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f11d39bf729] ??:0(__assert_fail)[0x7f11d39d0f36] sql/item.h:0(Item_timestamp_literal)[0x3c69740] sql/item_create.cc:0(Create_func_arg0::create_func(THD*, st_mysql_const_lex_string*, List*))[0x3c83b79] /usr/local/mysql/bin/mariadbd[0xaa2709] ??:0(Field_varstring::cmp_prefix(unsigned char const*, unsigned char const*, unsigned long) const)[0x3699258] ??:0(Field_date_common::store(long long, bool))[0x366e1ec] sql/item.cc:217(Item::val_string_from_real(String*))[0x395af04] ??:0(Sys_var_set::do_check(THD*, set_var*))[0x2be37ff] ??:0(Item::val_int_unsigned_typecast_from_str())[0x395d18e] handler.cc:0(is_versioning_bigint(Column_definition const*))[0x391797c] sql/sql_show.cc:9299(__cxx_global_var_init.760)[0xb24297] sql/sql_show.cc:9211(__cxx_global_var_init.705)[0xb1ed33] sql_select.cc:0(period_get_condition(THD*, TABLE_LIST*, st_select_lex*, vers_select_conds_t*, bool))[0x1cb7411] ??:0(LEX::sp_create_set_password_instr(THD*, LEX_USER*, USER_AUTH*, bool))[0x18e2f99] sql_prepare.cc:0(wsrep_after_statement(THD*))[0x1ba4e4c] sql/sql_lex.cc:11387(LEX::add_column_foreign_key(st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_ident*, DDL_options))[0x18ddbf0] ??:0(st_select_lex::build_pushable_cond_for_having_pushdown(THD*, Item*))[0x18caa0e] sql/sql_show.cc:3196(processlist_callback(THD*, processlist_callback_arg*))[0x21225cb] ??:0(mysqld_show_privileges(THD*))[0x20d852a] sql/multi_range_read.cc:1884(DsMrr_impl::choose_mrr_impl(unsigned int, unsigned long long, unsigned int*, unsigned int*, Cost_estimate*))[0x2d3d76b] sql/multi_range_read.cc:1852(DsMrr_impl::choose_mrr_impl(unsigned int, unsigned long long, unsigned int*, unsigned int*, Cost_estimate*))[0x2d3cccd] ??:0(remove_pushed_top_conjuncts_for_having(THD*, Item*))[0x18ce8d6] ??:0(Lex_trim_st::make_item_func_trim_std(THD*) const)[0x18a88ee] ??:0(LEX::make_item_func_substr(THD*, Item*, Item*))[0x18a5a5d] ??:0(mysql_upgrade_db(THD*, st_mysql_const_lex_string const*))[0x164cc11] sql/sql_lex.h:1985(Query_tables_list::set_stmt_unsafe(Query_tables_list::enum_binlog_stmt_unsafe))[0x15f3b55] sql/sql_class.cc:5886(start_new_trans)[0x15a9fad] ??:0(open_purge_table(THD*, char const*, unsigned long, char const*, unsigned long))[0x1591329] sql/sql_class.cc:6284(THD::decide_logging_format(TABLE_LIST*))[0x15b2502] ??:0(TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long, unsigned char const*, unsigned long))[0x262b03d] ??:0(TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long, unsigned char const*, unsigned long))[0x26294fd] :0(maria_repair)[0x5608773] nptl/pthread_create.c:478(start_thread)[0x7f11d4838609] ??:0(clone)[0x7f11d3abc293] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x62b0000a12a8): WITH jennifer_0 AS (select avg( cast(cast(nullif(73.88, 88.28) as SIGNED) as SIGNED)) over (partition by subq_0.c0 order by subq_0.c0) as c0, (select c_pnnh from t_ykc order by c_pnnh limit 1 offset 5) as c1, subq_0.c0 as c2, subq_0.c0 as c3, subq_0.c0 as c4, subq_0.c0 as c5, subq_0.c0 as c6, subq_0.c0 as c7, subq_0.c0 as c8, 37 as c9, subq_0.c0 as c10 from (select (select c_x5q8_jt7y from t_ykc order by c_x5q8_jt7y limit 1 offset 2) as c0, ref_0.c_l2i8lidqs as c1 from t_ykc as ref_0 where ref_0.c_ou3w65h not like 'tk%k7') as subq_0 order by c0, -c1, c2, c3, c4, c5, c6, c7, c8, c9, -c10 asc limit 93) select 1 Connection ID (thread ID): 6 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 unlimited bytes Max resident set unlimited unlimited bytes Max processes 79615 79615 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 79615 79615 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: |/usr/share/apport/apport %p %s %c %d %P %E 210813 03:55:03 mysqld_safe Number of processes running now: 0 210813 03:55:03 mysqld_safe mysqld restarted