diff options
author | Igor Babaev <igor@askmonty.org> | 2011-07-17 00:52:07 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-07-17 00:52:07 -0700 |
commit | cc0195d6a1e603c3ebef91af16a1e1c33dff4a2e (patch) | |
tree | 346adf4088219487e1667e680ffb0ac891042097 /mysql-test/r/derived_view.result | |
parent | c1b6eb149056f39969b2bbcbfe5d07eb3e1fcd44 (diff) | |
parent | d37465a9cc458ab215105de22875ce0a64c0efc2 (diff) | |
download | mariadb-git-cc0195d6a1e603c3ebef91af16a1e1c33dff4a2e.tar.gz |
Merge with the latest 5.3 code.
Diffstat (limited to 'mysql-test/r/derived_view.result')
-rw-r--r-- | mysql-test/r/derived_view.result | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result index 51444acdb3c..a28a6bcf53a 100644 --- a/mysql-test/r/derived_view.result +++ b/mysql-test/r/derived_view.result @@ -590,6 +590,31 @@ f1 f1 DROP VIEW v1; DROP TABLE t1,t2; # +# LP bug #794890: abort failure on multi-update with view +# +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; +a +2 +2 +2 +UPDATE t1,v2 SET t1.a = 3; +SELECT * FROM t1; +a +3 +3 +DELETE t1 FROM t1,v2; +SELECT * FROM t1; +a +DROP VIEW v1,v2; +DROP TABLE t1,t2; +# # LP bug #802023: MIN/MAX optimization # for mergeable derived tables and views # @@ -1078,3 +1103,16 @@ Warnings: Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t1` join `test`.`t2` left join `test`.`t3` on((0 <> 0)) where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5))))))) DROP VIEW v1; DROP TABLE t1,t2,t3; +# +# LP bug #794901: insert into a multi-table view +# +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE VIEW v1 AS SELECT t1.a FROM t1,t2; +CREATE VIEW v2 AS SELECT a FROM t2 GROUP BY a; +CREATE VIEW v3 AS SELECT v1.a FROM v1,v2; +INSERT INTO v3(a) VALUES (1); +ERROR HY000: The target table v3 of the INSERT is not insertable-into +DROP VIEW v1,v2,v3; +DROP TABLE t1,t2,t3; |