mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
BUG#18198: Too much expressiveness in partition functions allowed
First step sql/item.h: Add function to check for partition function whether allowed or not. In this first step allow only a field on its own. Further steps will add a lot more possibilities. sql/partition_info.cc: Add a check whether the partition function is allowed by walking the partition function expression. sql/share/errmsg.txt: Add a new error code for partition function not allowed
This commit is contained in:
@@ -655,8 +655,15 @@ bool partition_info::check_partition_info(handlerton **eng_type,
|
||||
uint i, tot_partitions;
|
||||
bool result= TRUE;
|
||||
char *same_name;
|
||||
bool part_expression_ok= TRUE;
|
||||
DBUG_ENTER("partition_info::check_partition_info");
|
||||
|
||||
if (part_expr->walk(Item::check_partition_func_processor,
|
||||
(byte*)&part_expression_ok))
|
||||
{
|
||||
my_error(ER_PARTITION_FUNC_NOT_ALLOWED, MYF(0));
|
||||
goto end;
|
||||
}
|
||||
if (unlikely(!is_sub_partitioned() &&
|
||||
!(use_default_subpartitions && use_default_no_subpartitions)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user