diff options
author | Igor Babaev <igor@askmonty.org> | 2011-07-16 23:57:43 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-07-16 23:57:43 -0700 |
commit | d37465a9cc458ab215105de22875ce0a64c0efc2 (patch) | |
tree | 2fc2c3e0ee8a246b65001039b7651a2f38091608 /mysql-test/t/derived_view.test | |
parent | 6e5413853e9788b7e86808c8765983f8724122d8 (diff) | |
download | mariadb-git-d37465a9cc458ab215105de22875ce0a64c0efc2.tar.gz |
Fixed LP bug #794901.
Also:
1. simplified the code of the function mysql_derived_merge_for_insert.
2. moved merge of views/dt for multi-update/delete to the prepare stage.
3. the list of the references to the candidates for semi-join now is
allocated in the statement memory.
Diffstat (limited to 'mysql-test/t/derived_view.test')
-rw-r--r-- | mysql-test/t/derived_view.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test index 40baec5137a..802f3205ee3 100644 --- a/mysql-test/t/derived_view.test +++ b/mysql-test/t/derived_view.test @@ -582,3 +582,21 @@ SELECT * FROM t2 RIGHT JOIN v1 AS t ON t.a != 0 DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # LP bug #794901: insert into a multi-table view +--echo # + +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; + +-- error ER_NON_INSERTABLE_TABLE +INSERT INTO v3(a) VALUES (1); + +DROP VIEW v1,v2,v3; +DROP TABLE t1,t2,t3; |