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

multi-UPDATE with and without prepared satements accept different syntax

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0
    • Fix Version/s: 10.0
    • Component/s: None
    • Labels:
      None

      Description

      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      CREATE TABLE t2 (b INT, c INT, KEY(b)) ENGINE=InnoDB PARTITION BY HASH(c) PARTITIONS 2;
      CREATE ALGORITHM = MERGE VIEW v AS SELECT a, b FROM t1 STRAIGHT_JOIN t2 WHERE b = 'foo' WITH CHECK OPTION;
       
      INSERT INTO t1 VALUES (1),(2);
      INSERT IGNORE INTO t2 VALUES (2,2),('three',3),(4,4);
      UPDATE v SET a = NULL ORDER BY a, b;
      

      above will be error with prepared statements due to check at the end of multi_update_precheck()

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            sanja Oleksandr Byelkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: