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 | 59d239e1f1c670875fdb3414c28d5a6e9820951d (patch) | |
tree | 1df6681d276a543343a672b0887578f6ebda5a32 /mysql-test/r/view.result | |
parent | 45d59063cb5c835c01d4744ad3b3b4c141a639a2 (diff) | |
parent | 2dd709468194c3b5399c4dc614037c0557e17e14 (diff) | |
download | mariadb-git-59d239e1f1c670875fdb3414c28d5a6e9820951d.tar.gz |
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 613939bfdf6..2dc448a29d8 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3718,6 +3718,117 @@ DROP TABLE t1; # -- End of test case for Bug#40825 +# +# Bug #45806 crash when replacing into a view with a join! +# +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; +a +1 +2 +1 +2 +REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v1; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +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; +a +1 +2 +1 +2 +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; +a +1 +2 +1 +2 +1 +2 +1 +2 +REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c; +SELECT * FROM v2; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c +ON DUPLICATE KEY UPDATE `v2`.`a`= 1; +SELECT * FROM v2; +a +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +1 +2 +3 +DROP VIEW v1; +DROP VIEW v2; +DROP TABLE t1; +# -- End of test case for Bug#45806 # ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- |