Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32314

Server crashes at Item_singlerow_subselect::store

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 11.1.2, 11.2.1
    • N/A
    • Optimizer
    • None
    • Ubuntu 20.04 x86-64, docker image mariadb:11.1.2

    Description

      PoC:

      SELECT * FROM ( SELECT 1 x ) ss GROUP BY x HAVING x = ( ( ( SELECT 1 UNION SELECT 1 ) ) IN ( SELECT NULL WHERE FALSE ) ) ;
      

      docker log:

      mariadbd(my_print_stacktrace+0x32)[0x55be12e9f7c2]
      mariadbd(handle_fatal_signal+0x488)[0x55be12978cf8]
      /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f0d692ba520]
      mariadbd(_ZN24Item_singlerow_subselect5storeEjP4Item+0x1a)[0x55be12a5a8aa]
      mariadbd(_ZN26select_singlerow_subselect9send_dataER4ListI4ItemE+0x3f)[0x55be126a293f]
      mariadbd(+0x89bf74)[0x55be1276ef74]
      mariadbd(+0x870557)[0x55be12743557]
      mariadbd(_Z10sub_selectP4JOINP13st_join_tableb+0x24b)[0x55be12753a1b]
      mariadbd(_ZN4JOIN10exec_innerEv+0xfd4)[0x55be12787bc4]
      mariadbd(_ZN4JOIN4execEv+0x3f)[0x55be12787fff]
      mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x12c)[0x55be12785f7c]
      mariadbd(_ZN18st_select_lex_unit10exec_innerEv+0x68c)[0x55be127da41c]
      mariadbd(_ZN22subselect_union_engine4execEv+0x22)[0x55be12a57262]
      mariadbd(_ZN14Item_subselect4execEv+0x4c)[0x55be12a5773c]
      mariadbd(_ZN24Item_singlerow_subselect7val_intEv+0x24)[0x55be12a59784]
      mariadbd(_ZN14Item_cache_int11cache_valueEv+0x29)[0x55be1298e149]
      mariadbd(_ZN17Item_in_optimizer7val_intEv+0x3f)[0x55be129bf2cf]
      mariadbd(_ZNK23Type_handler_int_result13Item_eq_valueEP3THDPK19Type_cmp_attributesP4ItemS6_+0x23)[0x55be128bba63]
      mariadbd(_ZN10Item_equal9add_constEP3THDP4Item+0x56)[0x55be129c6a66]
      mariadbd(_ZN10Item_equal16merge_with_checkEP3THDPS_b+0xc5)[0x55be129c6d85]
      mariadbd(_Z24propagate_new_equalitiesP3THDP4ItemP4ListI10Item_equalEP10COND_EQUALPb+0xe0)[0x55be1275b3e0]
      mariadbd(_Z36and_new_conditions_to_optimized_condP3THDP4ItemPP10COND_EQUALR4ListIS1_EPNS1_11cond_resultE+0x462)[0x55be1287f602]
      mariadbd(_ZN4JOIN14optimize_innerEv+0x152b)[0x55be127859eb]
      mariadbd(_ZN4JOIN8optimizeEv+0xda)[0x55be12785e2a]
      mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xd1)[0x55be12785f21]
      mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x154)[0x55be12786774]
      mariadbd(+0x826f55)[0x55be126f9f55]
      mariadbd(_Z21mysql_execute_commandP3THDb+0x419e)[0x55be12708f0e]
      mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x55be1270a237]
      mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x14bd)[0x55be1270ca1d]
      mariadbd(_Z10do_commandP3THDb+0x138)[0x55be1270e818]
      mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3bf)[0x55be128363af]
      mariadbd(handle_one_connection+0x5d)[0x55be128366fd]
      mariadbd(+0xcd1906)[0x55be12ba4906]
      /lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7f0d6930cb43]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7f0d6939dbb4]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f0d040130d8): SELECT * FROM ( SELECT 1 x ) ss GROUP BY x HAVING x = ( ( ( SELECT 1 UNION SELECT 1 ) ) IN ( SELECT NULL WHERE FALSE ) )
       
      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,hash_join_cardinality=on
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fuboat Jingzhou Fu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.