1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL: (0.6) Pruning for VERSIONING partitions [closes #97]

* based on RANGE pruning by COLUMNS (sys_trx_end) condition
* removed DEFAULT; AS OF NOW is always last; current VERSIONING as last non-empty (or first empty)
* Min/Max stats in TABLE_SHARE
* ALTER TABLE ADD PARTITION adds before AS OF NOW partition
This commit is contained in:
Aleksey Midenkov
2016-12-31 15:33:26 +00:00
parent e069de7d9d
commit 26a3ff0a22
17 changed files with 627 additions and 354 deletions

View File

@ -3454,6 +3454,11 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
free_root(&alloc,MYF(0)); // Return memory & allocator
DBUG_RETURN(FALSE);
}
if (part_info->part_type == VERSIONING_PARTITION)
{
part_info->vers_update_range_constants(thd);
}
dbug_tmp_use_all_columns(table, old_sets,
table->read_set, table->write_set);
@ -3980,7 +3985,7 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
simply set res= -1 as if the mapper had returned that.
TODO: What to do here is defined in WL#4065.
*/
if (ppar->arg_stack[0]->part == 0)
if (ppar->arg_stack[0]->part == 0 || ppar->part_info->part_type == VERSIONING_PARTITION)
{
uint32 i;
uint32 store_length_array[MAX_KEY];