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

Query with self join and sets of foreign keys crashes server: SIGSEGV and Assertion `key_col_info.comparator' failed, both in Item_func_in::get_func_row_mm_tree

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.32, 10.2(EOL), 10.3(EOL)
    • 10.3(EOL)
    • Optimizer
    • None
    • Ubuntu 20.4

    Description

      I got a TABLE with an ID two foreign keys then some more columns.
      For context it is a sport project with tupels representing each a result of a match between Host and Guest.

      SELECT * FROM match t1 WHERE (203, 204) IN ((t1.Host, t1.Guest), (t1.Guest, t1.Host))
      

      works as expected

      SELECT * FROM match t1, match t2 WHERE (203, t2.hostgoals) IN ((t1.hostgoals, t1.guestgoals), (t1.guestgoals, t1.hostgoals))
      

      does, too

      SELECT * FROM match t1, match t2 WHERE (203, t2.Host) IN ((t1.Host, t1.Guest), (t1.Guest, t1.Host))
      

      crashes the server

      SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
      

      Also after first occurence seems to have left server in corrupt state so it kept crashing without this query.

      Clarifications:
      "Host" and "Guest" are foreign keys to another table (same for both).
      "hostgoals" and "guestgoals" are just any numbers.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              AdamPDotty Benjamin Dauth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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