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

Server crash at st_select_lex_unit

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 12.1.1
    • N/A
    • Optimizer - CTE, Server
    • Ubuntu 20.04 x86-64, docker image mariadb:12.1.1
    • Not for Release Notes

    Description

      PoC:

      SELECT ( WITH RECURSIVE x ( x ) AS ( SELECT 1 INTERSECT SELECT x FROM ( SELECT DISTINCT x FROM x ) x HAVING ( 9 = -1 ) ) SELECT * FROM x ) x;
      

      docker log:

      #0 0x61506d5d2809 (_ZN18st_select_lex_unit14exec_recursiveEv+0x209)
      #1 0x61506d3cb6ef (_ZN10TABLE_LIST14fill_recursiveEP3THD+0x15f)
      #2 0x61506d3ca7be (_ZL18mysql_derived_fillP3THDP3LEXP10TABLE_LIST+0x23e)
      #3 0x61506d3cb418 (_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0x158)
      #4 0x61506d5042d6 (_ZN13st_join_table12preread_initEv+0xe6)
      #5 0x61506d4aca70 (_Z10sub_selectP4JOINP13st_join_tableb+0x250)
      #6 0x61506d4e3a29 (_ZN4JOIN10exec_innerEv+0x1489)
      #7 0x61506d4e24b6 (_ZN4JOIN4execEv+0x66)
      #8 0x61506d4adcd4 (_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x5e4)
      #9 0x61506d4ad635 (_Z13handle_selectP3THDP3LEXP13select_resulty+0x265)
      #10 0x61506d44dfc8 (_ZL21execute_sqlcom_selectP3THDP10TABLE_LIST+0x698)
      #11 0x61506d444095 (_Z21mysql_execute_commandP3THDb+0x3f65)
      #12 0x61506d439485 (_Z11mysql_parseP3THDPcjP12Parser_state+0x345)
      #13 0x61506d4359d1 (_Z16dispatch_command19enum_server_commandP3THDPcjb+0x16b1)
      #14 0x61506d439cd1 (_Z10do_commandP3THDb+0x4b1)
      #15 0x61506d66fb74 (_Z24do_handle_one_connectionP7CONNECTb+0x2a4)
      #16 0x61506d66f7a3 (handle_one_connection+0xd3)
      #17 0x61506dd380b4 (pfs_spawn_thread+0x104)
      #18 0x79784416a609 (start_thread+0xd9)
      #19 0x797843e8c353 (clone+0x43)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Yuxiao Guo Yuxiao Guo
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.