diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-08-03 14:37:55 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-08-03 14:37:55 +0200 |
commit | 701f0b8e366f957e8256e4741ca48424c84b7234 (patch) | |
tree | 0da96b6ad4ce9c98ad5d992d69b2e5112970b890 /sql/sql_partition.cc | |
parent | 9d42eb5e28303adb4d9467ac3e9c3be35d46e643 (diff) | |
download | mariadb-git-701f0b8e366f957e8256e4741ca48424c84b7234.tar.gz |
Fix gcc 7.3 compiler warnings.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 65c76127de9..05ef69e5795 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -8313,6 +8313,12 @@ int create_partition_name(char *out, size_t outlen, const char *in1, end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#TMP#", NullS); else if (name_variant == RENAMED_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#REN#", NullS); + else + { + DBUG_ASSERT(0); + out[0]= 0; + end= out + (outlen-1); + } if (end - out == static_cast<ptrdiff_t>(outlen-1)) { my_error(ER_PATH_LENGTH, MYF(0), longest_str(in1, transl_part)); @@ -8355,6 +8361,12 @@ int create_subpartition_name(char *out, size_t outlen, else if (name_variant == RENAMED_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name, "#SP#", transl_subpart_name, "#REN#", NullS); + else + { + DBUG_ASSERT(0); + out[0]= 0; + end= out + (outlen-1); + } if (end - out == static_cast<ptrdiff_t>(outlen-1)) { my_error(ER_PATH_LENGTH, MYF(0), |