Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1959 05/10/31 17:55:51 timour@stripped +2 -0
Test for BUG#14027. The bug itself has been fixed by WL#2787.
mysql-test/t/view.test
1.118 05/10/31 17:55:41 timour@stripped +25 -0
Test for BUG#14027.
mysql-test/r/view.result
1.127 05/10/31 17:55:41 timour@stripped +26 -0
Test for BUG#14027.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: timour
# Host: lamia.home
# Root: /home/timka/mysql/src/5.0-bug-14027
--- 1.126/mysql-test/r/view.result 2005-10-28 15:50:29 +03:00
+++ 1.127/mysql-test/r/view.result 2005-10-31 17:55:41 +02:00
@@ -2323,3 +2323,29 @@
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
DROP VIEW v1,v2;
DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (id int, a1 int);
+CREATE TABLE t2 (id int, a2 int);
+INSERT INTO t1 VALUES (1,15),(2,12);
+INSERT INTO t2 VALUES (1,8),(2,7);
+CREATE VIEW v1 AS SELECT t1.id,a1,a2 FROM t1 INNER JOIN t2 WHERE t1.id=t2.id;
+CREATE VIEW v2 AS SELECT t1.id,a1,a2 FROM t1 INNER JOIN t2 USING (id);
+CREATE VIEW v3 AS SELECT t1.id,a1,a2 FROM t1 JOIN t2 ON t1.id=t2.id;
+CREATE VIEW v4 AS SELECT t1.id,a1,a2 FROM t1 NATURAL JOIN t2;
+UPDATE v1 SET a1=31 WHERE id=1;
+select * from v1 where id=1;
+id a1 a2
+1 31 8
+UPDATE v2 SET a1=32 WHERE id=1;
+select * from v2 where id=1;
+id a1 a2
+1 32 8
+UPDATE v3 SET a1=33 WHERE id=1;
+select * from v3 where id=1;
+id a1 a2
+1 33 8
+UPDATE v4 SET a1=34 WHERE id=1;
+select * from v4 where id=1;
+id a1 a2
+1 34 8
+drop view v1,v2,v3,v4;
+drop table t1,t2;
--- 1.117/mysql-test/t/view.test 2005-10-28 13:11:24 +03:00
+++ 1.118/mysql-test/t/view.test 2005-10-31 17:55:41 +02:00
@@ -2190,3 +2190,28 @@
DROP TABLE t1,t2,t3;
+#
+# Bug #14027 updatable views cannot be updated in certain cases
+#
+
+CREATE TABLE t1 (id int, a1 int);
+CREATE TABLE t2 (id int, a2 int);
+INSERT INTO t1 VALUES (1,15),(2,12);
+INSERT INTO t2 VALUES (1,8),(2,7);
+
+CREATE VIEW v1 AS SELECT t1.id,a1,a2 FROM t1 INNER JOIN t2 WHERE t1.id=t2.id;
+CREATE VIEW v2 AS SELECT t1.id,a1,a2 FROM t1 INNER JOIN t2 USING (id);
+CREATE VIEW v3 AS SELECT t1.id,a1,a2 FROM t1 JOIN t2 ON t1.id=t2.id;
+CREATE VIEW v4 AS SELECT t1.id,a1,a2 FROM t1 NATURAL JOIN t2;
+
+UPDATE v1 SET a1=31 WHERE id=1;
+select * from v1 where id=1;
+UPDATE v2 SET a1=32 WHERE id=1;
+select * from v2 where id=1;
+UPDATE v3 SET a1=33 WHERE id=1;
+select * from v3 where id=1;
+UPDATE v4 SET a1=34 WHERE id=1;
+select * from v4 where id=1;
+
+drop view v1,v2,v3,v4;
+drop table t1,t2;
| Thread |
|---|
| • bk commit into 5.0 tree (timour:1.1959) BUG#14027 | timour | 31 Oct |