~ubuntu-branches/ubuntu/gutsy/mysql-dfsg-5.0/gutsy

« back to all changes in this revision

Viewing changes to ndb/src/ndbapi/ObjectMap.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-04-03 09:43:01 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070403094301-fnjhfr59hu72pvtg
Tags: 5.0.38-0ubuntu1
* Package the Enterprise version again (.37 was a community version), since
  Debian and we have always done so. This brings in a few more bug fixes and
  makes functional derivations less likely.
* debian/README.Maintainer: Add pointer to upstream download URL, since it
  is very hard to find the Enterprise versions.
* Disable 33_scripts__mysql_create_system_tables__no_test.dpatch, since that
  script was removed upstream.
* debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch: Adapted to
  changed formatting in new upstream version.
* Remove debian/patches/86_PATH_MAX.dpatch, fixed upstream.
* Add debian/patches/90_org_tables_definition.dpatch: Fix local variable
  declaration in libmysqld/sql_parse.cc to fix compilation with
  EMBEDDED_LIBRARY.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
  } * m_map;
47
47
 
48
48
  NdbMutex * m_mutex;
49
 
  void expand(Uint32 newSize);
 
49
  int expand(Uint32 newSize);
50
50
};
51
51
 
52
52
inline
73
73
  
74
74
  //  lock();
75
75
  
76
 
  if(m_firstFree == InvalidId){
77
 
    expand(m_expandSize);
78
 
  }
 
76
  if(m_firstFree == InvalidId && expand(m_expandSize))
 
77
    return InvalidId;
79
78
  
80
79
  Uint32 ff = m_firstFree;
81
80
  m_firstFree = m_map[ff].m_next;
130
129
  return 0;
131
130
}
132
131
 
133
 
inline void
 
132
inline int
134
133
NdbObjectIdMap::expand(Uint32 incSize){
135
134
  NdbMutex_Lock(m_mutex);
136
135
  Uint32 newSize = m_size + incSize;
149
148
  }
150
149
  else
151
150
  {
152
 
    ndbout_c("NdbObjectIdMap::expand unable to expand!!");
 
151
    NdbMutex_Unlock(m_mutex);
 
152
    return -1;
153
153
  }
154
154
  NdbMutex_Unlock(m_mutex);
 
155
  return 0;
155
156
}
156
157
 
157
158
#endif