From f8c9cef1cd2389677c4dced15d569f6845e1a3f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Apr 2007 18:10:45 +0200 Subject: 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: Rename: ndb/src/ndbapi/ObjectMap.cpp -> storage/ndb/src/ndbapi/ObjectMap.cpp --- storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp | 31 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp') diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp index 72576bbd273..c904b9d65c3 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -135,24 +135,24 @@ public: 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 @@ public: ~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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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); } -- cgit v1.2.1