mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
6dd41e008e
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. |
||
---|---|---|
.. | ||
r | ||
t | ||
common.inc | ||
common.opt | ||
common_finish.inc | ||
disabled.def | ||
engines.combinations | ||
engines.inc | ||
innodb.combinations | ||
innodb.inc | ||
key_type.combinations | ||
key_type.inc | ||
wait_system_clock.inc |