Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.4.6, 10.4.12
    • N/A
    • Optimizer
    • None
    • Docker

    Description

      The following schema and (arguably bad) query results in a hard crash when tested against the latest (10.4.12) Docker image.

      CREATE TABLE storage_storagemedium (id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id));
      CREATE TABLE storage_storageobject (id INT NOT NULL AUTO_INCREMENT, ip_id INT, PRIMARY KEY(id));
      CREATE TABLE storage_storagemethodtargetrelation (id INT NOT NULL AUTO_INCREMENT, storage_method_id INT, PRIMARY KEY(id));
      

      SELECT
          W0.`id`
      FROM
          `storage_storagemedium` W0
      WHERE (
          EXISTS(
              SELECT
                  V0.`id`
              FROM
                  `storage_storageobject` V0
              WHERE (
                  EXISTS(
                      SELECT
                          U0.`id`
                      FROM
                          `storage_storageobject` U0
                          INNER JOIN `storage_storagemethodtargetrelation` U4 ON (U0.`id` = U4.`storage_target_id`)
                      WHERE (
                              U0.`ip_id` = V0.`ip_id`
                              AND U4.`storage_method_id` = (
                                  SELECT
                                      U5.`storage_method_id`
                                  FROM
                                      `storage_storagemethodtargetrelation` U5
                                  WHERE
                                      U5.`storage_target_id` = V0.`id`
                                  LIMIT
                                      1
                              )
                      )
                  )
              )
          )
      )
      

      Feel free to rename this issue since I can't really pinpoint what part of the query exactly that is causing the crash yet.

      Attachments

        Issue Links

          Activity

            Thanks for the report. It appears to be the same crash as in MDEV-20557 (at least it produces the same stack trace for me), so I suggest to keep tracking it there. I will add your test case to the other report.

            elenst Elena Stepanova added a comment - Thanks for the report. It appears to be the same crash as in MDEV-20557 (at least it produces the same stack trace for me), so I suggest to keep tracking it there. I will add your test case to the other report.

            People

              Unassigned Unassigned
              oskar Oskar Persson
              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.