MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:April 11 2007 4:10pm
Subject:bk commit into 5.1 tree (tomas:1.2574) BUG#26176
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-11 18:10:45+02:00, tomas@stripped +6 -0
  Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
  - try to catch as many malloc failures as possible and give error messages
  (more for 5.1)

  storage/ndb/include/ndbapi/NdbDictionary.hpp@stripped, 2007-04-11 18:10:43+02:00, tomas@stripped +10 -10
    Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
    - try to catch as many malloc failures as possible and give error messages
    (more for 5.1)

  storage/ndb/include/util/Vector.hpp@stripped, 2007-04-11 18:10:43+02:00, tomas@stripped +1 -0
    Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
    - try to catch as many malloc failures as possible and give error messages
    (more for 5.1)

  storage/ndb/src/ndbapi/NdbDictionary.cpp@stripped, 2007-04-11 18:10:43+02:00, tomas@stripped +20 -20
    Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
    - try to catch as many malloc failures as possible and give error messages
    (more for 5.1)

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2007-04-11 18:10:43+02:00, tomas@stripped +89 -49
    Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
    - try to catch as many malloc failures as possible and give error messages
    (more for 5.1)

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp@stripped, 2007-04-11 18:10:43+02:00, tomas@stripped +16 -15
    Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11
    - try to catch as many malloc failures as possible and give error messages
    (more for 5.1)

  storage/ndb/src/ndbapi/ObjectMap.cpp@stripped, 2007-04-11 17:22:12+02:00, tomas@stripped +0 -0
    Rename: ndb/src/ndbapi/ObjectMap.cpp -> storage/ndb/src/ndbapi/ObjectMap.cpp

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-single-user

--- 1.90/storage/ndb/include/ndbapi/NdbDictionary.hpp	2007-04-11 15:51:06 +02:00
+++ 1.91/storage/ndb/include/ndbapi/NdbDictionary.hpp	2007-04-11 18:10:43 +02:00
@@ -819,9 +819,9 @@
      */
     void setMaxLoadFactor(int);
 
-    void setTablespaceName(const char * name);
+    int setTablespaceName(const char * name);
     const char * getTablespaceName() const;
-    void setTablespace(const class Tablespace &);
+    int setTablespace(const class Tablespace &);
     bool getTablespace(Uint32 *id= 0, Uint32 *version= 0) const;
 
     /**
@@ -862,12 +862,12 @@
      * Node group identity
      * Fragment State
      */
-    void setFragmentData(const void* data, Uint32 len);
+    int setFragmentData(const void* data, Uint32 len);
 
     /**
      * Set/Get tablespace names per fragment
      */
-    void setTablespaceNames(const void* data, Uint32 len);
+    int setTablespaceNames(const void* data, Uint32 len);
     const void *getTablespaceNames();
     Uint32 getTablespaceNamesLen() const;
 
@@ -875,7 +875,7 @@
      * Set tablespace information per fragment
      * Contains a tablespace id and a tablespace version
      */
-    void setTablespaceData(const void* data, Uint32 len);
+    int setTablespaceData(const void* data, Uint32 len);
 
     /**
      * Set array of information mapping range values and list values
@@ -884,7 +884,7 @@
      * one pair per fragment. For list partitions it could be any number
      * of pairs, at least as many as there are fragments.
      */
-    void setRangeListData(const void* data, Uint32 len);
+    int setRangeListData(const void* data, Uint32 len);
 
     /**
      * Set table object type
@@ -1281,7 +1281,7 @@
     /**
      * Set unique identifier for the event
      */
-    void setName(const char *name);
+    int setName(const char *name);
     /**
      * Get unique identifier for the event
      */
@@ -1308,7 +1308,7 @@
      * @note preferred way is using setTable(const NdbDictionary::Table&)
      *       or constructor with table object parameter
      */
-    void setTable(const char *tableName);
+    int setTable(const char *tableName);
     /**
      * Get table name for events
      *
@@ -1534,8 +1534,8 @@
     Uint64 getSize() const;
     Uint64 getFree() const;
     
-    void setTablespace(const char * name);
-    void setTablespace(const class Tablespace &);
+    int setTablespace(const char * name);
+    int setTablespace(const class Tablespace &);
     const char * getTablespace() const;
     void getTablespaceId(ObjectId * dst) const;
 

--- 1.10/storage/ndb/include/util/Vector.hpp	2007-04-11 15:51:06 +02:00
+++ 1.11/storage/ndb/include/util/Vector.hpp	2007-04-11 18:10:43 +02:00
@@ -116,6 +116,7 @@
   }
   m_items[m_size] = t;
   m_size++;
+  return 0;
 }
 
 template<class T>

--- 1.69/storage/ndb/src/ndbapi/NdbDictionary.cpp	2007-04-11 15:51:06 +02:00
+++ 1.70/storage/ndb/src/ndbapi/NdbDictionary.cpp	2007-04-11 18:10:43 +02:00
@@ -519,10 +519,10 @@
   m_impl.m_single_user_mode = (Uint8)mode;
 }
 
-void
+int
 NdbDictionary::Table::setTablespaceNames(const void *data, Uint32 len)
 {
-  m_impl.setTablespaceNames(data, len);
+  return m_impl.setTablespaceNames(data, len);
 }
 
 const void*
@@ -576,10 +576,10 @@
   return m_impl.getFragmentDataLen();
 }
 
-void
+int
 NdbDictionary::Table::setFragmentData(const void* data, Uint32 len)
 {
-  m_impl.setFragmentData(data, len);
+  return m_impl.setFragmentData(data, len);
 }
 
 const void* 
@@ -592,10 +592,10 @@
   return m_impl.getTablespaceDataLen();
 }
 
-void
+int
 NdbDictionary::Table::setTablespaceData(const void* data, Uint32 len)
 {
-  m_impl.setTablespaceData(data, len);
+  return m_impl.setTablespaceData(data, len);
 }
 
 const void* 
@@ -608,10 +608,10 @@
   return m_impl.getRangeListDataLen();
 }
 
-void
+int
 NdbDictionary::Table::setRangeListData(const void* data, Uint32 len)
 {
-  m_impl.setRangeListData(data, len);
+  return m_impl.setRangeListData(data, len);
 }
 
 NdbDictionary::Object::Status
@@ -693,18 +693,18 @@
   return m_impl.m_tablespace_name.c_str();
 }
 
-void 
+int
 NdbDictionary::Table::setTablespaceName(const char * name){
   m_impl.m_tablespace_id = ~0;
   m_impl.m_tablespace_version = ~0;
-  m_impl.m_tablespace_name.assign(name);
+  return !m_impl.m_tablespace_name.assign(name);
 }
 
-void 
+int
 NdbDictionary::Table::setTablespace(const NdbDictionary::Tablespace & ts){
   m_impl.m_tablespace_id = NdbTablespaceImpl::getImpl(ts).m_id;
   m_impl.m_tablespace_version = ts.getObjectVersion();
-  m_impl.m_tablespace_name.assign(ts.getName());
+  return !m_impl.m_tablespace_name.assign(ts.getName());
 }
 
 void
@@ -936,10 +936,10 @@
   }
 }
 
-void 
+int
 NdbDictionary::Event::setName(const char * name)
 {
-  m_impl.setName(name);
+  return m_impl.setName(name);
 }
 
 const char *
@@ -960,10 +960,10 @@
   return m_impl.getTable();
 }
 
-void 
+int
 NdbDictionary::Event::setTable(const char * table)
 {
-  m_impl.setTable(table);
+  return m_impl.setTable(table);
 }
 
 const char*
@@ -1295,18 +1295,18 @@
   return m_impl.m_free;
 }
 
-void 
+int
 NdbDictionary::Datafile::setTablespace(const char * tablespace){
   m_impl.m_filegroup_id = ~0;
   m_impl.m_filegroup_version = ~0;
-  m_impl.m_filegroup_name.assign(tablespace);
+  return !m_impl.m_filegroup_name.assign(tablespace);
 }
 
-void 
+int
 NdbDictionary::Datafile::setTablespace(const NdbDictionary::Tablespace & ts){
   m_impl.m_filegroup_id = NdbTablespaceImpl::getImpl(ts).m_id;
   m_impl.m_filegroup_version = ts.getObjectVersion();
-  m_impl.m_filegroup_name.assign(ts.getName());
+  return !m_impl.m_filegroup_name.assign(ts.getName());
 }
 
 const char *

--- 1.166/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2007-04-11 15:51:06 +02:00
+++ 1.167/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2007-04-11 18:10:43 +02:00
@@ -881,9 +881,9 @@
     return m_new_ts_name.length();
 }
 
-void NdbTableImpl::setTablespaceNames(const void *data, Uint32 len)
+int NdbTableImpl::setTablespaceNames(const void *data, Uint32 len)
 {
-  m_new_ts_name.assign(data, len);
+  return !m_new_ts_name.assign(data, len);
 }
 
 void NdbTableImpl::setFragmentCount(Uint32 count)
@@ -896,9 +896,9 @@
   return m_fragmentCount;
 }
 
-void NdbTableImpl::setFrm(const void* data, Uint32 len)
+int NdbTableImpl::setFrm(const void* data, Uint32 len)
 {
-  m_newFrm.assign(data, len);
+  return m_newFrm.assign(data, len);
 }
 
 const void * 
@@ -919,9 +919,9 @@
     return m_newFrm.length();
 }
 
-void NdbTableImpl::setFragmentData(const void* data, Uint32 len)
+int NdbTableImpl::setFragmentData(const void* data, Uint32 len)
 {
-  m_new_fd.assign(data, len);
+  return m_new_fd.assign(data, len);
 }
 
 const void * 
@@ -942,9 +942,9 @@
     return m_new_fd.length();
 }
 
-void NdbTableImpl::setTablespaceData(const void* data, Uint32 len)
+int NdbTableImpl::setTablespaceData(const void* data, Uint32 len)
 {
-  m_new_ts.assign(data, len);
+  return !m_new_ts.assign(data, len);
 }
 
 const void * 
@@ -965,9 +965,9 @@
     return m_new_ts.length();
 }
 
-void NdbTableImpl::setRangeListData(const void* data, Uint32 len)
+int NdbTableImpl::setRangeListData(const void* data, Uint32 len)
 {
-  m_new_range.assign(data, len);
+  return m_new_range.assign(data, len);
 }
 
 const void * 
@@ -988,16 +988,15 @@
     return m_new_range.length();
 }
 
-void
+int
 NdbTableImpl::updateMysqlName()
 {
   Vector<BaseString> v;
   if (m_internalName.split(v,"/") == 3)
   {
-    m_mysqlName.assfmt("%s/%s",v[0].c_str(),v[2].c_str());
-    return;
+    return !m_mysqlName.assfmt("%s/%s",v[0].c_str(),v[2].c_str());
   }
-  m_mysqlName.assign("");
+  return !m_mysqlName.assign("");
 }
 
 int
@@ -1274,9 +1273,9 @@
   DBUG_VOID_RETURN;
 }
 
-void NdbEventImpl::setName(const char * name)
+int NdbEventImpl::setName(const char * name)
 {
-  m_name.assign(name);
+  !m_name.assign(name);
 }
 
 const char *NdbEventImpl::getName() const
@@ -1284,11 +1283,11 @@
   return m_name.c_str();
 }
 
-void 
+int
 NdbEventImpl::setTable(const NdbDictionary::Table& table)
 {
   setTable(&NdbTableImpl::getImpl(table));
-  m_tableName.assign(m_tableImpl->getName());
+  return !m_tableName.assign(m_tableImpl->getName());
 }
 
 void 
@@ -1313,10 +1312,10 @@
     return NULL;
 }
 
-void 
+int
 NdbEventImpl::setTable(const char * table)
 {
-  m_tableName.assign(table);
+  return !m_tableName.assign(table);
 }
 
 const char *
@@ -1467,10 +1466,11 @@
   NdbTableImpl *old;
 
   int ret = getBlobTables(*impl);
+  int error = 0;
   assert(ret == 0);
 
   m_globalHash->lock();
-  if ((old= m_globalHash->get(impl->m_internalName.c_str())))
+  if ((old= m_globalHash->get(impl->m_internalName.c_str(), &error)))
   {
     m_globalHash->alter_table_rep(old->m_internalName.c_str(),
                                   impl->m_id,
@@ -2334,8 +2334,13 @@
 
   // if the new name has not been set, use the copied name
   if (t.m_newExternalName.empty())
-    t.m_newExternalName.assign(t.m_externalName);
-
+  {
+    if (!t.m_newExternalName.assign(t.m_externalName))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
+  }
   // create table
   if (m_receiver.createTable(m_ndb, t) != 0)
     DBUG_RETURN(-1);
@@ -2510,7 +2515,7 @@
     {
       AlterTableReq::setNameFlag(impl.m_changeMask, true);
     }
-    if (impl.m_externalName.assign(impl.m_newExternalName))
+    if (!impl.m_externalName.assign(impl.m_newExternalName))
     {
       m_error.code= 4000;
       DBUG_RETURN(-1);
@@ -2524,7 +2529,11 @@
     {
       AlterTableReq::setFrmFlag(impl.m_changeMask, true);
     }
-    impl.m_frm.assign(impl.m_newFrm.get_data(), impl.m_newFrm.length());
+    if (impl.m_frm.assign(impl.m_newFrm.get_data(), impl.m_newFrm.length()))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
     impl.m_newFrm.clear();
   }
   // Change FragmentData (fragment identity, state, tablespace id)
@@ -2534,7 +2543,11 @@
     {
       AlterTableReq::setFragDataFlag(impl.m_changeMask, true);
     }
-    impl.m_fd.assign(impl.m_new_fd.get_data(), impl.m_new_fd.length());
+    if (impl.m_fd.assign(impl.m_new_fd.get_data(), impl.m_new_fd.length()))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
     impl.m_new_fd.clear();
   }
   // Change Tablespace Name Data
@@ -2544,8 +2557,12 @@
     {
       AlterTableReq::setTsNameFlag(impl.m_changeMask, true);
     }
-    impl.m_ts_name.assign(impl.m_new_ts_name.get_data(),
-                          impl.m_new_ts_name.length());
+    if (impl.m_ts_name.assign(impl.m_new_ts_name.get_data(),
+                              impl.m_new_ts_name.length()))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
     impl.m_new_ts_name.clear();
   }
   // Change Range/List Data
@@ -2555,8 +2572,12 @@
     {
       AlterTableReq::setRangeListFlag(impl.m_changeMask, true);
     }
-    impl.m_range.assign(impl.m_new_range.get_data(),
-                          impl.m_new_range.length());
+    if (impl.m_range.assign(impl.m_new_range.get_data(),
+                            impl.m_new_range.length()))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
     impl.m_new_range.clear();
   }
   // Change Tablespace Data
@@ -2566,8 +2587,12 @@
     {
       AlterTableReq::setTsFlag(impl.m_changeMask, true);
     }
-    impl.m_ts.assign(impl.m_new_ts.get_data(),
-                     impl.m_new_ts.length());
+    if (impl.m_ts.assign(impl.m_new_ts.get_data(),
+                         impl.m_new_ts.length()))
+    {
+      m_error.code= 4000;
+      DBUG_RETURN(-1);
+    }
     impl.m_new_ts.clear();
   }
 
@@ -4473,7 +4498,7 @@
 NdbTablespaceImpl::~NdbTablespaceImpl(){
 }
 
-void
+int
 NdbTablespaceImpl::assign(const NdbTablespaceImpl& org)
 {
   m_id = org.m_id;
@@ -4481,14 +4506,17 @@
   m_status = org.m_status;
   m_type = org.m_type;
 
-  m_name.assign(org.m_name);
+  if (!m_name.assign(org.m_name))
+    return -1;
   m_grow_spec = org.m_grow_spec;
   m_extent_size = org.m_extent_size;
   m_undo_free_words = org.m_undo_free_words;
   m_logfile_group_id = org.m_logfile_group_id;
   m_logfile_group_version = org.m_logfile_group_version;
-  m_logfile_group_name.assign(org.m_logfile_group_name);
+  if (!m_logfile_group_name.assign(org.m_logfile_group_name))
+    return -1;
   m_undo_free_words = org.m_undo_free_words;
+  return 0;
 }
 
 NdbLogfileGroupImpl::NdbLogfileGroupImpl() : 
@@ -4506,7 +4534,7 @@
 NdbLogfileGroupImpl::~NdbLogfileGroupImpl(){
 }
 
-void
+int
 NdbLogfileGroupImpl::assign(const NdbLogfileGroupImpl& org)
 {
   m_id = org.m_id;
@@ -4514,14 +4542,17 @@
   m_status = org.m_status;
   m_type = org.m_type;
 
-  m_name.assign(org.m_name);
+  if (!m_name.assign(org.m_name))
+    return -1;
   m_grow_spec = org.m_grow_spec;
   m_extent_size = org.m_extent_size;
   m_undo_free_words = org.m_undo_free_words;
   m_logfile_group_id = org.m_logfile_group_id;
   m_logfile_group_version = org.m_logfile_group_version;
-  m_logfile_group_name.assign(org.m_logfile_group_name);
+  if (!m_logfile_group_name.assign(org.m_logfile_group_name))
+    return -1;
   m_undo_free_words = org.m_undo_free_words;
+  return 0;
 }
 
 NdbFileImpl::NdbFileImpl(NdbDictionary::Object::Type t)
@@ -4548,7 +4579,7 @@
 NdbDatafileImpl::~NdbDatafileImpl(){
 }
 
-void
+int
 NdbDatafileImpl::assign(const NdbDatafileImpl& org)
 {
   m_id = org.m_id;
@@ -4560,8 +4591,10 @@
   m_free = org.m_free;
   m_filegroup_id = org.m_filegroup_id;
   m_filegroup_version = org.m_filegroup_version;
-  m_path.assign(org.m_path);
-  m_filegroup_name.assign(org.m_filegroup_name);
+  if (!m_path.assign(org.m_path) ||
+      !m_filegroup_name.assign(org.m_filegroup_name))
+    return -1;
+  return 0;
 }
 
 NdbUndofileImpl::NdbUndofileImpl() : 
@@ -4579,7 +4612,7 @@
 NdbUndofileImpl::~NdbUndofileImpl(){
 }
 
-void
+int
 NdbUndofileImpl::assign(const NdbUndofileImpl& org)
 {
   m_id = org.m_id;
@@ -4591,8 +4624,10 @@
   m_free = org.m_free;
   m_filegroup_id = org.m_filegroup_id;
   m_filegroup_version = org.m_filegroup_version;
-  m_path.assign(org.m_path);
-  m_filegroup_name.assign(org.m_filegroup_name);
+  if (!m_path.assign(org.m_path) ||
+      !m_filegroup_name.assign(org.m_filegroup_name))
+    return 4000;
+  return 0;
 }
 
 int 
@@ -5024,7 +5059,8 @@
     get_filegroup(NdbLogfileGroupImpl::getImpl(tmp),
 		  NdbDictionary::Object::LogfileGroup,
 		  dst.m_logfile_group_id);
-    dst.m_logfile_group_name.assign(tmp.getName());
+    if (!dst.m_logfile_group_name.assign(tmp.getName()))
+      DBUG_RETURN(m_error.code = 4000);
   }
   
   if(dst.m_type == type)
@@ -5058,7 +5094,8 @@
   dst.m_type = (NdbDictionary::Object::Type)fg.FilegroupType;
   dst.m_status = NdbDictionary::Object::Retrieved;
   
-  dst.m_name.assign(fg.FilegroupName);
+  if (!dst.m_name.assign(fg.FilegroupName))
+    return 4000;
   dst.m_extent_size = fg.TS_ExtentSize;
   dst.m_undo_buffer_size = fg.LF_UndoBufferSize;
   dst.m_logfile_group_id = fg.TS_LogfileGroupId;
@@ -5177,7 +5214,8 @@
     get_filegroup(NdbLogfileGroupImpl::getImpl(tmp),
 		  NdbDictionary::Object::LogfileGroup,
 		  dst.m_filegroup_id);
-    dst.m_filegroup_name.assign(tmp.getName());
+    if (!dst.m_filegroup_name.assign(tmp.getName()))
+      DBUG_RETURN(m_error.code = 4000);
   }
   else if(dst.m_type == NdbDictionary::Object::Datafile)
   {
@@ -5185,7 +5223,8 @@
     get_filegroup(NdbTablespaceImpl::getImpl(tmp),
 		  NdbDictionary::Object::Tablespace,
 		  dst.m_filegroup_id);
-    dst.m_filegroup_name.assign(tmp.getName());
+    if (!dst.m_filegroup_name.assign(tmp.getName()))
+      DBUG_RETURN(m_error.code = 4000);
     dst.m_free *= tmp.getExtentSize();
   }
   else
@@ -5221,7 +5260,8 @@
   dst.m_version = f.FileVersion;
 
   dst.m_size= ((Uint64)f.FileSizeHi << 32) | (f.FileSizeLo);
-  dst.m_path.assign(f.FileName);
+  if (!dst.m_path.assign(f.FileName))
+    return 4000;
 
   dst.m_filegroup_id= f.FilegroupId;
   dst.m_filegroup_version= f.FilegroupVersion;

--- 1.73/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2007-04-11 15:51:06 +02:00
+++ 1.74/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2007-04-11 18:10:43 +02:00
@@ -135,24 +135,24 @@
   const char * getName() const;
   void setFragmentCount(Uint32 count);
   Uint32 getFragmentCount() const;
-  void setFrm(const void* data, Uint32 len);
+  int setFrm(const void* data, Uint32 len);
   const void * getFrmData() const;
   Uint32 getFrmLength() const;
-  void setFragmentData(const void* data, Uint32 len);
+  int setFragmentData(const void* data, Uint32 len);
   const void * getFragmentData() const;
   Uint32 getFragmentDataLen() const;
-  void setTablespaceNames(const void* data, Uint32 len);
+  int setTablespaceNames(const void* data, Uint32 len);
   Uint32 getTablespaceNamesLen() const;
   const void * getTablespaceNames() const;
-  void setTablespaceData(const void* data, Uint32 len);
+  int setTablespaceData(const void* data, Uint32 len);
   const void * getTablespaceData() const;
   Uint32 getTablespaceDataLen() const;
-  void setRangeListData(const void* data, Uint32 len);
+  int setRangeListData(const void* data, Uint32 len);
   const void * getRangeListData() const;
   Uint32 getRangeListDataLen() const;
 
   const char * getMysqlName() const;
-  void updateMysqlName();
+  int updateMysqlName();
 
   int aggregate(NdbError& error);
   int validate(NdbError& error);
@@ -296,11 +296,11 @@
   ~NdbEventImpl();
 
   void init();
-  void setName(const char * name);
+  int setName(const char * name);
   const char * getName() const;
-  void setTable(const NdbDictionary::Table& table);
+  int setTable(const NdbDictionary::Table& table);
   const NdbDictionary::Table * getTable() const;
-  void setTable(const char * table);
+  int setTable(const char * table);
   const char * getTableName() const;
   void addTableEvent(const NdbDictionary::Event::TableEvent t);
   bool getTableEvent(const NdbDictionary::Event::TableEvent t) const;
@@ -364,7 +364,7 @@
   NdbTablespaceImpl(NdbDictionary::Tablespace &);
   ~NdbTablespaceImpl();
 
-  void assign(const NdbTablespaceImpl&);
+  int assign(const NdbTablespaceImpl&);
 
   static NdbTablespaceImpl & getImpl(NdbDictionary::Tablespace & t);
   static const NdbTablespaceImpl & getImpl(const NdbDictionary::Tablespace &);
@@ -378,7 +378,7 @@
   NdbLogfileGroupImpl(NdbDictionary::LogfileGroup &);
   ~NdbLogfileGroupImpl();
 
-  void assign(const NdbLogfileGroupImpl&);
+  int assign(const NdbLogfileGroupImpl&);
 
   static NdbLogfileGroupImpl & getImpl(NdbDictionary::LogfileGroup & t);
   static const NdbLogfileGroupImpl& getImpl(const 
@@ -403,7 +403,7 @@
   NdbDatafileImpl(NdbDictionary::Datafile &);
   ~NdbDatafileImpl();
 
-  void assign(const NdbDatafileImpl&);
+  int assign(const NdbDatafileImpl&);
 
   static NdbDatafileImpl & getImpl(NdbDictionary::Datafile & t);
   static const NdbDatafileImpl & getImpl(const NdbDictionary::Datafile & t);
@@ -416,7 +416,7 @@
   NdbUndofileImpl(NdbDictionary::Undofile &);
   ~NdbUndofileImpl();
 
-  void assign(const NdbUndofileImpl&);
+  int assign(const NdbUndofileImpl&);
 
   static NdbUndofileImpl & getImpl(NdbDictionary::Undofile & t);
   static const NdbUndofileImpl & getImpl(const NdbDictionary::Undofile & t);
@@ -994,8 +994,9 @@
     if(NdbDictInterface::create_index_obj_from_table(&idx, &tab, &m_prim) == 0)
     {
       idx->m_table = &tab;
-      idx->m_externalName.assign(m_index_name);
-      idx->m_internalName.assign(m_name);
+      if (!idx->m_externalName.assign(m_index_name) ||
+          !idx->m_internalName.assign(m_name))
+        DBUG_RETURN(4000);
       tab.m_index = idx;
       DBUG_RETURN(0);
     }
Thread
bk commit into 5.1 tree (tomas:1.2574) BUG#26176tomas11 Apr