summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-03-04 11:24:39 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2010-03-04 11:24:39 +0100
commit5eaa7936f667f4c38ea54310f5511dc323a8f039 (patch)
treea7a243823bfcef9781202c526308babc11fe0a39 /sql/sql_partition.cc
parentaca943f0b122e56aa19fb2f73583de3078d9d458 (diff)
downloadmariadb-git-5eaa7936f667f4c38ea54310f5511dc323a8f039.tar.gz
Bug#51347: assertion with show create table + partition by columns
on decimal column The problem was that there was no check to disallow DECIMAL columns in the code (it was accepted as if it was INTEGER). Solution was to correctly disallow DECIMAL columns in COLUMNS partitioning. As documented. mysql-test/r/partition_column.result: Bug#51347: assertion with show create table + partition by columns on decimal column updated test result mysql-test/t/partition_column.test: Bug#51347: assertion with show create table + partition by columns on decimal column Added test to verify column types that is not supported sql/sql_partition.cc: Bug#51347: assertion with show create table + partition by columns on decimal column Moved DECIMAL types to be disallowed as column types in COLUMNS partitioning
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index d400e96ce7e..cfb57475b68 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -2128,8 +2128,6 @@ static int check_part_field(enum_field_types sql_type,
}
switch (sql_type)
{
- case MYSQL_TYPE_NEWDECIMAL:
- case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_LONG:
@@ -2151,6 +2149,8 @@ static int check_part_field(enum_field_types sql_type,
*result_type= STRING_RESULT;
*need_cs_check= TRUE;
return FALSE;
+ case MYSQL_TYPE_NEWDECIMAL:
+ case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_NULL:
case MYSQL_TYPE_FLOAT: