diff options
author | Igor Babaev <igor@askmonty.org> | 2011-07-11 14:00:44 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-07-11 14:00:44 -0700 |
commit | 6e5413853e9788b7e86808c8765983f8724122d8 (patch) | |
tree | d9f8cad45c8229b6979ebe284587e0f949416bd8 /mysql-test/t/derived_view.test | |
parent | 47aee19827743f0fd9e6af45713b4e1ed6365576 (diff) | |
parent | 565b7feea86f1a192f809be41abd03c275ddb126 (diff) | |
download | mariadb-git-6e5413853e9788b7e86808c8765983f8724122d8.tar.gz |
Merge with the latest 5.3 code.
Diffstat (limited to 'mysql-test/t/derived_view.test')
-rw-r--r-- | mysql-test/t/derived_view.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test index dcad590676c..40baec5137a 100644 --- a/mysql-test/t/derived_view.test +++ b/mysql-test/t/derived_view.test @@ -237,6 +237,30 @@ DROP VIEW v1; DROP TABLE t1,t2; --echo # +--echo # LP bug #794890: abort failure on multi-update with view +--echo # + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (20), (7); +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES (7), (9), (7); + +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT a FROM t1; + +CREATE VIEW v2 AS SELECT t2.a FROM t2, v1 WHERE t2.a=t2.a; +UPDATE v2 SET a = 2; +SELECT * FROM t2; + +UPDATE t1,v2 SET t1.a = 3; +SELECT * FROM t1; + +DELETE t1 FROM t1,v2; +SELECT * FROM t1; + +DROP VIEW v1,v2; +DROP TABLE t1,t2; + +--echo # --echo # LP bug #802023: MIN/MAX optimization --echo # for mergeable derived tables and views --echo # |