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

LP:784297 - Failure in multi-update that uses a derived table.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      When trying to execute the test test case of bug #52157 from mysql-test/t/multi_update.test on the LP tree
      maria-5.3-mwl106 you get:

      MariaDB [test]> CREATE FUNCTION f1 () RETURNS BLOB RETURN 1;
      Query OK, 0 rows affected (0.00 sec)

      MariaDB [test]> CREATE TABLE t1 (f1 DATE);
      Query OK, 0 rows affected (0.01 sec)

      MariaDB [test]> INSERT INTO t1 VALUES('2001-01-01');
      Query OK, 1 row affected (0.00 sec)

      MariaDB [test]> UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
      ERROR 1093 (HY000): You can't specify target table 'x' for update in FROM clause

      Yet, on the 5.3 tree the last statement works fine:

      MariaDB [test]> UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
      Query OK, 0 rows affected, 1 warning (0.01 sec)
      Rows matched: 0 Changed: 0 Warnings: 0

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            igor Igor Babaev added a comment -

            Re: Failure in multi-update that uses a derived table.
            The failure in innodb_multi_update.test with the test case for bug#54475 is probably of same nature (observed only in maria-5.3-mwl106)

            Show
            igor Igor Babaev added a comment - Re: Failure in multi-update that uses a derived table. The failure in innodb_multi_update.test with the test case for bug#54475 is probably of same nature (observed only in maria-5.3-mwl106)
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 784297

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 784297

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                igor Igor Babaev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: