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

SQL: partitioning misc fixes [closes #242]

* cleanup: *never* use assert(A && B)
* vers_setup_1() revisited
* vers_setup_2() renamed
* partition_element::type removed
* Copy ctor instead of memcpy()
* Handle return value from check_range_constants()
* Malloc error fix
* error, style, misc fixes
This commit is contained in:
Aleksey Midenkov
2017-09-07 15:49:11 +03:00
committed by GitHub
parent a734c2f0fb
commit 904b69cd9e
13 changed files with 124 additions and 106 deletions

View File

@ -3455,9 +3455,11 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
DBUG_RETURN(FALSE);
}
if (part_info->part_type == VERSIONING_PARTITION)
if (part_info->part_type == VERSIONING_PARTITION &&
part_info->vers_update_range_constants(thd))
{
part_info->vers_update_range_constants(thd);
retval= TRUE;
goto end2;
}
dbug_tmp_use_all_columns(table, old_sets,
@ -3559,6 +3561,7 @@ all_used:
mark_all_partitions_as_used(prune_param.part_info);
end:
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
end2:
thd->no_errors=0;
thd->mem_root= range_par->old_root;
free_root(&alloc,MYF(0)); // Return memory & allocator