diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-07-03 13:39:22 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-07-03 13:39:22 +0500 |
commit | c2ed9d36eba97d8699fefb9dc3d6a24c6d893f78 (patch) | |
tree | 1df6681d276a543343a672b0887578f6ebda5a32 /mysql-test/t/view.test | |
parent | 5072f4da364a0e42d4a9a9267422c1c5013f77f9 (diff) | |
parent | 1a539f170da3debce5656113c5fed7669f5ced3c (diff) | |
download | mariadb-git-c2ed9d36eba97d8699fefb9dc3d6a24c6d893f78.tar.gz |
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index a788b5ab41e..7bec02e6fb6 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3703,6 +3703,38 @@ DROP TABLE t1; --echo # -- End of test case for Bug#40825 --echo +--echo # +--echo # Bug #45806 crash when replacing into a view with a join! +--echo # +CREATE TABLE t1(a INT UNIQUE); +CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a; +INSERT INTO t1 VALUES (1), (2); + +REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v1; +REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v1; +DELETE FROM t1 WHERE a=3; +INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v1`.`a`= 1; +SELECT * FROM v1; + +CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a; + +REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c; +SELECT * FROM v2; +REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v2; +INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v2`.`a`= 1; +SELECT * FROM v2; + +DROP VIEW v1; +DROP VIEW v2; +DROP TABLE t1; + +--echo # -- End of test case for Bug#45806 + --echo # ----------------------------------------------------------------- --echo # -- End of 5.0 tests. --echo # ----------------------------------------------------------------- |