From 0b1abc2f0f391d4e55029fa53f1e5da926f7be61 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 8 Mar 2017 12:11:49 +0100 Subject: MDEV-10704: Assertion `field->field->table == table_arg' failed in fill_record(THD*, TABLE*, List&, List&, bool, bool) the bug test suite --- mysql-test/r/view.result | 13 +++++++++++++ mysql-test/t/view.test | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'mysql-test') 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&, List&, +# 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 @@ -6070,6 +6070,23 @@ show create view v1; drop view v1; drop table t1; +--echo # +--echo # MDEV-10704: Assertion `field->field->table == table_arg' +--echo # failed in fill_record(THD*, TABLE*, List&, List&, +--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 # -- cgit v1.2.1