Hi, Alexander! On Nov 15, Alexander Barkov wrote:
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 512bf29..740e508 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -2221,6 +2239,8 @@ int partition_info::fix_parser_data(THD *thd) part_elem= it++; List_iterator<part_elem_value> list_val_it(part_elem->list_val_list); num_elements= part_elem->list_val_list.elements; + if (!num_elements && error_if_requires_values()) + DBUG_RETURN(true);
I thought the parser was supposed to ensure that VALUES was used where needed, so there should be no need to do additional checks here. Why does the parser allow invalid syntax?
DBUG_ASSERT(part_type == RANGE_PARTITION ? num_elements == 1U : TRUE); for (j= 0; j < num_elements; j++)
Regards, Sergei Chief Architect MariaDB and security@mariadb.org