1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-18727 improve DML operation of System Versioning

MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables

UPDATE, DELETE: replace linear search of current/historical records
with vers_setup_conds().

Additional DML cases in view.test
This commit is contained in:
Aleksey Midenkov
2019-11-22 14:29:03 +03:00
parent a14544260c
commit 0076dce2c8
19 changed files with 271 additions and 87 deletions

View File

@ -976,9 +976,21 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
if (sl->tvc->prepare(thd, sl, tmp_result, this))
goto err;
}
else if (prepare_join(thd, first_sl, tmp_result, additional_options,
else
{
if (prepare_join(thd, first_sl, tmp_result, additional_options,
is_union_select))
goto err;
goto err;
if (derived_arg && derived_arg->table &&
derived_arg->derived_type == VIEW_ALGORITHM_MERGE &&
derived_arg->table->versioned())
{
/* Got versioning conditions (see vers_setup_conds()), need to update
derived_arg. */
derived_arg->where= first_sl->where;
}
}
types= first_sl->item_list;
goto cont;
}