summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/view.result13
-rw-r--r--mysql-test/t/view.test17
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 0cd2655777c..5d8f71ef708 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -6333,5 +6333,18 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
drop view v1;
drop table t1;
#
+# MDEV-10704: Assertion `field->field->table == table_arg'
+# failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
+# bool, bool)
+#
+CREATE TABLE t1 (i INT);
+CREATE TABLE t2 (j INT);
+CREATE TABLE t3 (k INT);
+CREATE ALGORITHM = MERGE VIEW v AS SELECT j AS f1, k AS f2 FROM ( SELECT j FROM t1, t2 ) sq, t3;
+REPLACE INTO v (f1,f2) VALUES (1,1);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v'
+drop view v;
+drop table t1,t2,t3;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 3475d325321..e5dd22c64c3 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -6071,5 +6071,22 @@ drop view v1;
drop table t1;
--echo #
+--echo # MDEV-10704: Assertion `field->field->table == table_arg'
+--echo # failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
+--echo # bool, bool)
+--echo #
+
+CREATE TABLE t1 (i INT);
+CREATE TABLE t2 (j INT);
+CREATE TABLE t3 (k INT);
+
+CREATE ALGORITHM = MERGE VIEW v AS SELECT j AS f1, k AS f2 FROM ( SELECT j FROM t1, t2 ) sq, t3;
+--error ER_VIEW_MULTIUPDATE
+REPLACE INTO v (f1,f2) VALUES (1,1);
+
+drop view v;
+drop table t1,t2,t3;
+
+--echo #
--echo # End of 10.2 tests
--echo #