List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:October 26 2010 8:12am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (msabaratnam:3531) Bug#53354
View as plain text  
#At file:///export/home2/tmp/maitrayi/mysql-src/mysql-5.1-telco-7.0-bug53354/ based on revid:magnus.blaudd@stripped

 3531 Maitrayi Sabaratnam	2010-10-26
      Bug#53354 crash when creating partitioned table with multiple columns in the partition key

    modified:
      sql/ha_ndbcluster.cc
      storage/ndb/src/ndbapi/ndberror.c
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-05-04 13:16:50 +0000
+++ b/sql/ha_ndbcluster.cc	2010-10-26 08:12:36 +0000
@@ -7417,7 +7417,12 @@ int ha_ndbcluster::create(const char *na
   // Check partition info
   part_info= form->part_info;
   if ((my_errno= set_up_partition_info(part_info, form, (void*)&tab)))
+  {
+    const NdbError err= ndb->getNdbError(my_errno);
+    set_ndb_err(thd, err);
+    my_errno= ndb_to_mysql_error(&err);
     goto abort;
+  }
 
   // Check for HashMap
   if (tab.getFragmentType() == NDBTAB::HashMapPartition && 
@@ -12563,6 +12568,10 @@ uint ha_ndbcluster::set_up_partition_inf
 
     for (i= 0; i < part_info->part_field_list.elements; i++)
     {
+      if (!fields[i])
+      {
+        DBUG_RETURN(4330);
+      }
       NDBCOL *col= tab->getColumn(fields[i]->field_index);
       DBUG_PRINT("info",("setting dist key on %s", col->getName()));
       col->setPartitionKey(TRUE);

=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c	2010-05-03 04:49:08 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c	2010-10-26 08:12:36 +0000
@@ -476,6 +476,7 @@ ErrorBundle ErrorCodes[] = {
   { 786,  DMEC, NR, "Schema transaction aborted due to node-failure" },
   { 792,  DMEC, SE, "Default value for primary key column not supported" },
   { 794,  DMEC, AE, "Schema feature requires data node upgrade" },
+  { 4330, DMEC, AE, "Duplicate key is not allowed in hash partition" },
   
   /**
    * FunctionNotImplemented


Attachment: [text/bzr-bundle] bzr/msabaratnam@mysql.com-20101026081236-omtk3hu6w05h7pjj.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (msabaratnam:3531) Bug#53354Maitrayi Sabaratnam26 Oct
  • Re: bzr commit into mysql-5.1-telco-7.0 branch (msabaratnam:3531)Bug#53354Magnus BlĂ„udd26 Oct