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)
if (flag & 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_tuple_id_range_guard g(m_share);
......
......@@ -530,8 +530,8 @@ void getTextUndoLogBlocked(QQQQ) {
void getTextTransporterError(QQQQ) {
struct myTransporterError{
int errorNum;
char errorString[256];
Uint32 errorNum;
char errorString[256];
};
int i = 0;
int lenth = 0;
......
......@@ -46,7 +46,7 @@ private:
} * m_map;
NdbMutex * m_mutex;
void expand(Uint32 newSize);
int expand(Uint32 newSize);
};
inline
......@@ -73,9 +73,8 @@ NdbObjectIdMap::map(void * object){
// lock();
if(m_firstFree == InvalidId){
expand(m_expandSize);
}
if(m_firstFree == InvalidId && expand(m_expandSize))
return InvalidId;
Uint32 ff = m_firstFree;
m_firstFree = m_map[ff].m_next;
......@@ -127,7 +126,7 @@ NdbObjectIdMap::getObject(Uint32 id){
return 0;
}
inline void
inline int
NdbObjectIdMap::expand(Uint32 incSize){
NdbMutex_Lock(m_mutex);
Uint32 newSize = m_size + incSize;
......@@ -146,9 +145,11 @@ NdbObjectIdMap::expand(Uint32 incSize){
}
else
{
ndbout_c("NdbObjectIdMap::expand unable to expand!!");
NdbMutex_Unlock(m_mutex);
return -1;
}
NdbMutex_Unlock(m_mutex);
return 0;
}
#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