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

LP:1002126 - Assertion abort on SELECT @user_var

Details

    Description

      The following test case causes an assertion abort in MariaDB 5.2:

      CREATE TABLE t1(a INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (0);
      SELECT DISTINCT POW(COUNT(*), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a))
      AS b FROM t1 GROUP BY a;
      SELECT @a;
      DROP TABLE t1;
      CREATE TABLE t1(f1 INT, f2 INT);
      INSERT INTO t1 VALUES (1,2),(2,3),(3,1);
      CREATE TABLE t2(a INT);
      INSERT INTO t2 VALUES (1);
      SET @var=NULL;
      SELECT @var:=(SELECT f2 FROM t2 WHERE @var) FROM t1 GROUP BY f1 ORDER BY f2 DESC
      LIMIT 1;
      SELECT @var;
      DROP TABLE t1, t2;

      The is no problem here with MaraiDB 5.5 though.

      Attachments

        Activity

          igor Igor Babaev (Inactive) created issue -
          ratzpo Rasmus Johansson (Inactive) made changes -
          Field Original Value New Value
          Labels Launchpad
          ratzpo Rasmus Johansson (Inactive) made changes -
          Fix Version/s Maria 5.2 [ 11301 ]
          Labels Launchpad Launchpad MariaDB_5.2
          ratzpo Rasmus Johansson (Inactive) made changes -
          Key IMT-6561 MDEV-616
          Project ImportTest [ 10200 ] MariaDB Development [ 10000 ]
          Workflow jira [ 20210 ] defaullt [ 21460 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.29 [ 11701 ]
          Fix Version/s 5.3.10 [ 11500 ]
          Fix Version/s 5.2.13 [ 10800 ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Labels Launchpad MariaDB_5.2 Launchpad
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Description The following test case causes an assertion abort in MariaDB 5.2:

          CREATE TABLE t1(a INT) ENGINE=InnoDB;
          INSERT INTO t1 VALUES (0);
          SELECT DISTINCT POW(COUNT(*), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a))
          AS b FROM t1 GROUP BY a;
          SELECT @a;
          DROP TABLE t1;
          CREATE TABLE t1(f1 INT, f2 INT);
          INSERT INTO t1 VALUES (1,2),(2,3),(3,1);
          CREATE TABLE t2(a INT);
          INSERT INTO t2 VALUES (1);
          SET @var=NULL;
          SELECT @var:=(SELECT f2 FROM t2 WHERE @var) FROM t1 GROUP BY f1 ORDER BY f2 DESC
          LIMIT 1;
          SELECT @var;
          DROP TABLE t1, t2;

          The is no problem here with MaraiDB 5.5 though.
          The following test case causes an assertion abort in MariaDB 5.2:
          {code:sql}
          CREATE TABLE t1(a INT) ENGINE=InnoDB;
          INSERT INTO t1 VALUES (0);
          SELECT DISTINCT POW(COUNT(*), @a:=(SELECT 1 FROM t1 LEFT JOIN t1 AS t2 ON @a))
          AS b FROM t1 GROUP BY a;
          SELECT @a;
          DROP TABLE t1;
          CREATE TABLE t1(f1 INT, f2 INT);
          INSERT INTO t1 VALUES (1,2),(2,3),(3,1);
          CREATE TABLE t2(a INT);
          INSERT INTO t2 VALUES (1);
          SET @var=NULL;
          SELECT @var:=(SELECT f2 FROM t2 WHERE @var) FROM t1 GROUP BY f1 ORDER BY f2 DESC
          LIMIT 1;
          SELECT @var;
          DROP TABLE t1, t2;
          {code}
          The is no problem here with MaraiDB 5.5 though.
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          serg Sergei Golubchik made changes -
          Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.29 [ 11701 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          timour Timour Katchaounov (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 21460 ] MariaDB v2 [ 44838 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 44838 ] MariaDB v3 [ 64508 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 64508 ] MariaDB v4 [ 145027 ]

          People

            sanja Oleksandr Byelkin
            igor Igor Babaev (Inactive)
            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.