summaryrefslogtreecommitdiff
path: root/mysql-test/r/multi_update.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2014-04-17 12:53:53 -0700
committerIgor Babaev <igor@askmonty.org>2014-04-17 12:53:53 -0700
commit12eb6d88f70100e6da7a5931f99b661bba01737b (patch)
treea4356fbfaf7b4249d08ef88b85d317a22f1a6fd0 /mysql-test/r/multi_update.result
parentbd44c086b33a7b324ac41f8eb0826c31da1c4103 (diff)
downloadmariadb-git-12eb6d88f70100e6da7a5931f99b661bba01737b.tar.gz
Fixed the problem of mdev-5970:
back-ported the patch for bug #13256831 from mysql-5.6 code line. Here's the comment this patch was provided with: 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.
Diffstat (limited to 'mysql-test/r/multi_update.result')
-rw-r--r--mysql-test/r/multi_update.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index ff0aa828636..7fa9620f0e6 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -795,3 +795,25 @@ col_int_key pk_1 pk_2 col_int
1 7 11 4
DROP TABLE t1,t2;
end of 5.5 tests
+
+# Bug mdev-5970
+# 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;
+f1 f2
+6 97
+UPDATE v1 SET f1 = 1;
+SELECT * FROM v1;
+f1 f2
+1 97
+DROP TABLE t1, t2;
+DROP VIEW v1;
+end of 10.0 tests