~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/ndb/src/ndbapi/DictCache.cpp

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
}
155
155
 
156
156
NdbTableImpl *
157
 
GlobalDictCache::get(const char * name)
 
157
GlobalDictCache::get(const char * name, int *error)
158
158
{
159
159
  DBUG_ENTER("GlobalDictCache::get");
160
160
  DBUG_PRINT("enter", ("name: %s", name));
165
165
  versions = m_tableHash.getData(name, len);
166
166
  if(versions == 0){
167
167
    versions = new Vector<TableVersion>(2);
 
168
    if (versions == NULL)
 
169
    {
 
170
      *error = -1;
 
171
      DBUG_RETURN(0);
 
172
    }
168
173
    m_tableHash.insertKey(name, len, 0, versions);
169
174
  }
170
175
 
211
216
  tmp.m_impl = 0;
212
217
  tmp.m_status = RETREIVING;
213
218
  tmp.m_refCount = 1; // The one retreiving it
214
 
  versions->push_back(tmp);
 
219
  if (versions->push_back(tmp))
 
220
  {
 
221
    *error = -1;
 
222
     DBUG_RETURN(0);
 
223
  }
215
224
  DBUG_PRINT("info", ("No table found"));
216
225
  DBUG_RETURN(0);
217
226
}