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

MySQL bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD

    Details

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

      Description

      Test case for MySQL "bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD" fails in 10.0:

      --echo # Bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD
      
      CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
      CREATE TABLE t2 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (5, 7);
      INSERT INTO t2 VALUES (6, 97);
      
      CREATE ALGORITHM = MERGE VIEW v1 AS
      SELECT a2.f1 AS f1, a2.f2 AS f2
      FROM t1 AS a1 JOIN t2 AS a2 ON a1.f2 > a2.f1
      WITH LOCAL CHECK OPTION;
      
      SELECT * FROM v1;
      UPDATE v1 SET f1 = 1;
      SELECT * FROM v1;
      
      DROP TABLE t1, t2;
      DROP VIEW v1;
      

      Relevant revision:

      revno: 3402.31.24
      committer: Dmitry Shulga <Dmitry.Shulga@oracle.com>
      branch nick: mysql-trunk-bug13256831
      timestamp: Fri 2011-12-09 16:47:01 +0600
      message:
        Fixed bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD.
      
        This bug only occurs if a user tries to update a base table using
        an updatable view and this view was created as a join for which
        the clause 'WITH CHECK OPTION' was specified.
      
        The reason for the bug was that when such an update was
        executed, row positions were not properly handled for tables
        that were not updated but had constraints that had to be
        checked due to the 'WITH CHECK OPTION' clause.
      
        The reason for the bug was that when such update is executed
        then for tables specified in the view definition and
        also listed in the 'WITH CHECK OPTION' clause the positioning to
        row being updated is not performed.
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  igor Igor Babaev
                  Reporter:
                  svoj Sergey Vojtovich
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: