summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-04-05 13:25:39 +0500
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-04-05 13:25:39 +0500
commita127d582591c0a8e238e9c6f3fd813c48cc11477 (patch)
tree904899f40d9e985376f1abb1d664268dd2fe28e6 /sql/partition_info.cc
parent8653417e4ede7949f62f22e6554e3380bd622f53 (diff)
downloadmariadb-git-a127d582591c0a8e238e9c6f3fd813c48cc11477.tar.gz
aftermerging fix
sql/partition_info.cc: here we have to check for zero return from file->get_default_no_partitions
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 6444d54ea5d..3e0257f5b1d 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -187,8 +187,14 @@ bool partition_info::set_up_default_partitions(handler *file,
my_error(ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), error_string);
goto end;
}
- if (no_parts == 0)
- no_parts= file->get_default_no_partitions(info);
+
+ if ((no_parts == 0) &&
+ ((no_parts= file->get_default_no_partitions(info)) == 0))
+ {
+ my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions");
+ goto end;
+ }
+
if (unlikely(no_parts > MAX_PARTITIONS))
{
my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0));