diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result index 1eecb3e34ca..7144fd1d349 100644 --- a/mysql-test/main/merge.result +++ b/mysql-test/main/merge.result @@ -3898,9 +3898,6 @@ DROP TABLE t1; DROP TABLE m1; set global default_storage_engine=@save_default_storage_engine; # -# End of 10.0 tests -# -# # MDEV-27407 Different ASC/DESC index attributes on MERGE and underlying table can cause wrong results # create table t (a int, key(a desc)) engine=myisam; @@ -3967,3 +3964,12 @@ DROP TABLE tm, t1, t2; # # End of 11.0 tests # +# +# MDEV-29174: UPDATE of view that uses MERGE table +# +CREATE TABLE t1 (a int) ENGINE=MERGE; +CREATE VIEW v1 AS SELECT a FROM t1; +UPDATE v1 SET a=0; +DROP VIEW v1; +DROP TABLE t1; +# End of 11.1 tests diff --git a/mysql-test/main/merge.test b/mysql-test/main/merge.test index 6b88d427fb4..f8f421994e9 100644 --- a/mysql-test/main/merge.test +++ b/mysql-test/main/merge.test @@ -2859,10 +2859,6 @@ set global default_storage_engine=@save_default_storage_engine; # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc ---echo # ---echo # End of 10.0 tests ---echo # - --echo # --echo # MDEV-27407 Different ASC/DESC index attributes on MERGE and underlying table can cause wrong results --echo # @@ -2925,3 +2921,14 @@ DROP TABLE tm, t1, t2; --echo # --echo # End of 11.0 tests --echo # +--echo # +--echo # MDEV-29174: UPDATE of view that uses MERGE table +--echo # + +CREATE TABLE t1 (a int) ENGINE=MERGE; +CREATE VIEW v1 AS SELECT a FROM t1; +UPDATE v1 SET a=0; +DROP VIEW v1; +DROP TABLE t1; + +--echo # End of 11.1 tests diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 4019de6d36d..e37fb3bbe95 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4765,7 +4765,6 @@ restart: if (tbl->file->ha_table_flags() & HA_CAN_MULTISTEP_MERGE) { /* MERGE tables need to access parent and child TABLE_LISTs. */ - DBUG_ASSERT(tbl->pos_in_table_list == tables); if (tbl->file->extra(HA_EXTRA_ATTACH_CHILDREN)) { error= TRUE;