summaryrefslogtreecommitdiff
path: root/mysys/my_winfile.c
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-12-02 11:48:37 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-12-02 11:48:37 +0300
commit6dd41e008eb2e384913d970e79aa01cd886891ec (patch)
tree5767ac99dab47612131b29985efd48b903c55dd3 /mysys/my_winfile.c
parent97aa07abf544870faa0956784f33f158b092b2e5 (diff)
downloadmariadb-git-6dd41e008eb2e384913d970e79aa01cd886891ec.tar.gz
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.
Diffstat (limited to 'mysys/my_winfile.c')
0 files changed, 0 insertions, 0 deletions