List:Commits« Previous MessageNext Message »
From:Martin Skold Date:April 26 2010 9:14am
Subject:bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3182) Bug#31853
View as plain text  
#At file:///home/marty/MySQL/mysql-5.1-telco-6.3/

 3182 Martin Skold	2010-04-26
      BUG#31853 Wrong error message on failed cluster create table after after mysqld
                  (re)start
      if the return value of the member function get_default_no_partition() is less than 0,
          it means error happens.
      modified:
        sql/partition_info.cc

=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2009-12-17 10:14:52 +0000
+++ b/sql/partition_info.cc	2010-04-26 09:14:53 +0000
@@ -192,8 +192,16 @@ bool partition_info::set_up_default_part
     goto end;
   }
 
-  if ((no_parts == 0) &&
-      ((no_parts= file->get_default_no_partitions(info)) == 0))
+  if (no_parts == 0)
+  { 
+    int no_parts_tmp;
+    if ((no_parts_tmp= file->get_default_no_partitions(info)) < 0)
+      goto end;
+
+    no_parts= no_parts_tmp;
+  }
+
+  if (no_parts == 0)
   {
     my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions");
     goto end;
@@ -262,8 +270,15 @@ bool partition_info::set_up_default_subp
   List_iterator<partition_element> part_it(partitions);
   DBUG_ENTER("partition_info::set_up_default_subpartitions");
 
-  if (no_subparts == 0)
-    no_subparts= file->get_default_no_partitions(info);
+  if (no_subparts == 0) 
+  {
+    int no_subparts_tmp;
+    if ((no_subparts_tmp= file->get_default_no_partitions(info)) < 0)
+      goto end;
+
+    no_subparts= no_subparts_tmp;
+  }
+
   if (unlikely((no_parts * no_subparts) > MAX_PARTITIONS))
   {
     my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0));

Thread
bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3182) Bug#31853Martin Skold26 Apr