summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorunknown <hery.ramilison@sun.com>2009-08-10 20:53:26 +0200
committerMySQL Build Team <build@mysql.com>2009-08-10 20:53:26 +0200
commitad624f1d0d0270de77958da59dabc6dd4ae9c303 (patch)
tree110303e38693e789a213c139403dd9ec4c2dd7a8 /mysql-test/r/view.result
parent158b8ba4a93f00a2221aaffc765fa01e9201d9ea (diff)
parent065792924a8c8533825d01cebfff0a6de5e3cb2d (diff)
downloadmariadb-git-ad624f1d0d0270de77958da59dabc6dd4ae9c303.tar.gz
Merge
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result111
1 files changed, 111 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 715fb225550..aa2294ef926 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -3659,6 +3659,117 @@ DROP TABLE t1;
# -- End of test case for Bug#34337.
+#
+# 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
# -----------------------------------------------------------------
# -- Bug#35193 VIEW query is rewritten without "FROM DUAL",
# -- causing syntax error