summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-10-05 12:26:55 +0300
committerunknown <sanja@montyprogram.com>2012-10-05 12:26:55 +0300
commitb0d11675fb46f5db458896a9a17f03bd53d98e88 (patch)
tree99ed64fa06871de511f40cd456a20960ef2b54a4 /mysql-test/r/view.result
parentc56fd181bff92dd377b4664583d4fe04ead16ac7 (diff)
downloadmariadb-git-b0d11675fb46f5db458896a9a17f03bd53d98e88.tar.gz
Fix of MDEV-589.
The problem was in incorrect detection of merged views in tem_direct_view_ref::used_tables() .
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index c8546f92bf9..332d3dadef0 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4567,6 +4567,27 @@ id id bbb iddqd val1
30631 NULL NULL NULL NULL
drop view v2;
drop table t1,t2;
+#
+# MDEV-589 (LP BUG#1007647) :
+# Assertion `vcol_table == 0 || vcol_table == table' failed in
+# fill_record(THD*, List<Item>&, List<Item>&, bool)
+#
+CREATE TABLE t1 (f1 INT, f2 INT);
+CREATE TABLE t2 (f1 INT, f2 INT);
+CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.f1, a2.f2 FROM t1 AS a1, t1 AS a2;
+CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1;
+CREATE ALGORITHM=MERGE VIEW v3 AS SELECT a1.f1, a2.f2 FROM t1 AS a1, t2 AS a2;
+CREATE ALGORITHM=MERGE VIEW v4 AS SELECT * FROM v3;
+INSERT INTO v3 (f1, f2) VALUES (1, 2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v3'
+INSERT INTO v1 (f1, f2) VALUES (1, 2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
+INSERT INTO v4 (f1, f2) VALUES (1, 2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v4'
+INSERT INTO v2 (f1, f2) VALUES (1, 2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v2'
+drop view v4,v3,v2,v1;
+drop table t1,t2;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------