diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-11-20 09:33:19 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-11-20 09:33:19 +0400 |
commit | 9b53e541f03d74e2777e0d1e7618b6246b81c721 (patch) | |
tree | 669b60056a43fb77f6823c795ed5f8d221623411 /sql/sql_partition.cc | |
parent | c44ece7342f14498630e4ab403ae125971137457 (diff) | |
download | mariadb-git-9b53e541f03d74e2777e0d1e7618b6246b81c721.tar.gz |
MDEV-13788 Server crash when issuing bad SQL partition syntax
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index ab31a8c1791..01dcc7cc2ac 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4770,16 +4770,11 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0), "LIST", "IN"); } - 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; } |