[Commits] b290627: Assertion failure with UPDATE of view using MERGE table
revision-id: b2906279f73cc9f37d436f0d3acdd05f6db5ceaa (mariadb-10.6.1-478-gb290627) parent(s): cd8b27bb537d03ed4042cdca3176ad7134b892a7 author: Igor Babaev committer: Igor Babaev timestamp: 2022-07-29 14:20:35 -0700 message: Assertion failure with UPDATE of view using MERGE table The problem was caused by an assertion that is not valid anymore. --- mysql-test/main/merge.result | 12 +++++++++--- mysql-test/main/merge.test | 16 ++++++++++++---- sql/sql_base.cc | 1 - 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result index 2dcc5a1..155b048 100644 --- a/mysql-test/main/merge.result +++ b/mysql-test/main/merge.result @@ -3902,9 +3902,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; @@ -3929,3 +3926,12 @@ drop table tm, t; # # End of 10.8 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 10.10 tests diff --git a/mysql-test/main/merge.test b/mysql-test/main/merge.test index 0485f3e..d8cf792 100644 --- a/mysql-test/main/merge.test +++ b/mysql-test/main/merge.test @@ -2860,10 +2860,6 @@ set global default_storage_engine=@save_default_storage_engine; --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 # create table t (a int, key(a desc)) engine=myisam; @@ -2886,3 +2882,15 @@ drop table tm, t; --echo # --echo # End of 10.8 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 10.10 tests diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 725a0ff..e815da3 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4743,7 +4743,6 @@ bool open_tables(THD *thd, const DDL_options_st &options, 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;
participants (1)
-
IgorBabaev