diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2018-01-10 12:36:55 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2018-01-10 12:36:55 +0300 |
commit | c59c1a0736e36e9c66f798d199a124f362353377 (patch) | |
tree | 80ee18faad049687b0b4f0e2f147caf870d68390 /sql/sql_partition.cc | |
parent | 26971c9aea67a62f348cd105348a8dc4407bcf4a (diff) | |
parent | 0b597d3ab2494bc1db97cc4a30d697a5fdf48c21 (diff) | |
download | mariadb-git-c59c1a0736e36e9c66f798d199a124f362353377.tar.gz |
System Versioning 1.0 pre8
Merge branch '10.3' into trunk
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 24cd5fc5123..d1da9823aa4 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4743,16 +4743,11 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, { my_error(ER_PARTITION_WRONG_TYPE, MYF(0), "SYSTEM_TIME"); } - else if (tab_part_info->part_type == RANGE_PARTITION) - { - my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), - "RANGE", "LESS THAN"); - } else { - DBUG_ASSERT(tab_part_info->part_type == LIST_PARTITION); - my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0), - "LIST", "IN"); + DBUG_ASSERT(tab_part_info->part_type == RANGE_PARTITION || + tab_part_info->part_type == LIST_PARTITION); + (void) tab_part_info->error_if_requires_values(); } goto err; } @@ -8368,8 +8363,11 @@ int create_partition_name(char *out, size_t outlen, const char *in1, end= strxnmov(out, outlen-1, in1, "#P#", transl_part, NullS); else if (name_variant == TEMP_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#TMP#", NullS); - else if (name_variant == RENAMED_PART_NAME) + else + { + DBUG_ASSERT(name_variant == RENAMED_PART_NAME); end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#REN#", NullS); + } if (end - out == static_cast<ptrdiff_t>(outlen-1)) { my_error(ER_PATH_LENGTH, MYF(0), longest_str(in1, transl_part)); @@ -8409,9 +8407,12 @@ int create_subpartition_name(char *out, size_t outlen, else if (name_variant == TEMP_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name, "#SP#", transl_subpart_name, "#TMP#", NullS); - else if (name_variant == RENAMED_PART_NAME) + else + { + DBUG_ASSERT(name_variant == RENAMED_PART_NAME); end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name, "#SP#", transl_subpart_name, "#REN#", NullS); + } if (end - out == static_cast<ptrdiff_t>(outlen-1)) { my_error(ER_PATH_LENGTH, MYF(0), |