Commit 91c36268 authored by tomas@poseidon.mysql.com's avatar tomas@poseidon.mysql.com

Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb

into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
parents e865b595 f92d3b3a
...@@ -3810,7 +3810,7 @@ int ha_ndbcluster::info(uint flag) ...@@ -3810,7 +3810,7 @@ int ha_ndbcluster::info(uint flag)
if (flag & HA_STATUS_AUTO) if (flag & HA_STATUS_AUTO)
{ {
DBUG_PRINT("info", ("HA_STATUS_AUTO")); DBUG_PRINT("info", ("HA_STATUS_AUTO"));
if (m_table) if (m_table && table->found_next_number_field)
{ {
Ndb *ndb= get_ndb(); Ndb *ndb= get_ndb();
Ndb_tuple_id_range_guard g(m_share); Ndb_tuple_id_range_guard g(m_share);
......
...@@ -530,7 +530,7 @@ void getTextUndoLogBlocked(QQQQ) { ...@@ -530,7 +530,7 @@ void getTextUndoLogBlocked(QQQQ) {
void getTextTransporterError(QQQQ) { void getTextTransporterError(QQQQ) {
struct myTransporterError{ struct myTransporterError{
int errorNum; Uint32 errorNum;
char errorString[256]; char errorString[256];
}; };
int i = 0; int i = 0;
......
...@@ -46,7 +46,7 @@ private: ...@@ -46,7 +46,7 @@ private:
} * m_map; } * m_map;
NdbMutex * m_mutex; NdbMutex * m_mutex;
void expand(Uint32 newSize); int expand(Uint32 newSize);
}; };
inline inline
...@@ -73,9 +73,8 @@ NdbObjectIdMap::map(void * object){ ...@@ -73,9 +73,8 @@ NdbObjectIdMap::map(void * object){
// lock(); // lock();
if(m_firstFree == InvalidId){ if(m_firstFree == InvalidId && expand(m_expandSize))
expand(m_expandSize); return InvalidId;
}
Uint32 ff = m_firstFree; Uint32 ff = m_firstFree;
m_firstFree = m_map[ff].m_next; m_firstFree = m_map[ff].m_next;
...@@ -127,7 +126,7 @@ NdbObjectIdMap::getObject(Uint32 id){ ...@@ -127,7 +126,7 @@ NdbObjectIdMap::getObject(Uint32 id){
return 0; return 0;
} }
inline void inline int
NdbObjectIdMap::expand(Uint32 incSize){ NdbObjectIdMap::expand(Uint32 incSize){
NdbMutex_Lock(m_mutex); NdbMutex_Lock(m_mutex);
Uint32 newSize = m_size + incSize; Uint32 newSize = m_size + incSize;
...@@ -146,9 +145,11 @@ NdbObjectIdMap::expand(Uint32 incSize){ ...@@ -146,9 +145,11 @@ NdbObjectIdMap::expand(Uint32 incSize){
} }
else else
{ {
ndbout_c("NdbObjectIdMap::expand unable to expand!!"); NdbMutex_Unlock(m_mutex);
return -1;
} }
NdbMutex_Unlock(m_mutex); NdbMutex_Unlock(m_mutex);
return 0;
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment