mariadb/mysql-test/suite/versioning
Aleksey Midenkov 6dd41e008e MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view
When view is merged by DT_MERGE_FOR_INSERT it is then skipped from
processing and doesn't update WHERE clause with
vers_setup_conds(). Note that view itself cannot work in
vers_setup_conds() because it doesn't have row_start, row_end
fields. Thus it is required to descend down to material TABLE_LIST
through calls of mysql_derived_prepare() and run vers_setup_conds()
from there. Luckily, all views (views of views, views of views of
views, etc.) are linked in one list through next_global pointer, so we
can skip all views of views and get straight to non-view TABLE_LIST by
checking its merge_underlying_list property for zero value (it is
assigned by DT_MERGE_FOR_INSERT for merged derived tables).

We have to do that only for UPDATE and DELETE. Other DML commands
don't use WHERE clause.

MDEV-21146 Assertion `m_lock_type == 2' in handler::ha_drop_table upon LOAD DATA

LOAD DATA does not use WHERE and the above call of vers_setup_conds()
is not needed. unit->prepare() led to wrongly locked temporary table.
2019-12-02 11:48:37 +03:00
..
r MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view 2019-12-02 11:48:37 +03:00
t MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view 2019-12-02 11:48:37 +03:00
common.inc versioning test suite fixes 2019-10-10 00:20:34 +03:00
common.opt Tests: versioning suite fix when no test_versioning plugin 2019-07-09 10:01:54 +03:00
common_finish.inc versioning test suite fixes 2019-10-10 00:20:34 +03:00
disabled.def MDEV-14820 System versioning is applied incorrectly to CTEs 2018-05-12 10:16:45 +02:00
engines.combinations MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONING 2019-05-17 13:53:22 +02:00
engines.inc versioning/common.inc must "have_innodb" 2017-12-05 17:42:27 +03:00
innodb.combinations MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - generates error if table uses SYSTEM VERSIONING 2018-11-01 16:42:06 +02:00
innodb.inc MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - generates error if table uses SYSTEM VERSIONING 2018-11-01 16:42:06 +02:00
key_type.combinations versioning test suite fixes 2019-10-10 00:20:34 +03:00
key_type.inc versioning test suite fixes 2019-10-10 00:20:34 +03:00
wait_system_clock.inc fix tests on windows 2018-01-13 02:01:35 +01:00