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

Crash when comparing a ROW(...) expression involving a window function to a correlated row subquery

    XMLWordPrintable

Details

    Description

      Summary

      Crash when comparing a ROW(...) expression involving a window function to a correlated row subquery .

      Affected version

      • MariaDB 12.3.1 (reproduced on asan-debug build)

      Steps to reproduce

      1. Create table and data:

        DROP TABLE IF EXISTS t1;
        CREATE TABLE t1 (vkey INT, c5 INT);
        INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
        

      1. Run:

        SELECT ROW(AVG(vkey) OVER (PARTITION BY vkey), 59) =
               (SELECT ta.vkey, 59
                FROM t1 ta
                JOIN t1 tb ON (ta.vkey = outer_t.c5)
                LIMIT 1)
        FROM t1 AS outer_t;
        

      Actual result

      ERROR 2026 (HY000): TLS/SSL error: unexpected eof while reading

      Expected result

      • No server crash.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              mu mu
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.