~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_create.c

  • Committer: Stewart Smith
  • Date: 2008-07-25 03:48:54 UTC
  • mfrom: (207.1.1 drizzle)
  • mto: (210.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 211.
  • Revision ID: stewart@flamingspork.com-20080725034854-p34pdb0lhpoc159d
merge mainline and update md5 and crc32 plugins to new interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
  uint i, j, key_segs, max_length, length;
29
29
  HP_SHARE *share= 0;
30
30
  HA_KEYSEG *keyseg;
31
 
  DBUG_ENTER("heap_create");
32
31
 
33
32
  if (!create_info->internal_table)
34
33
  {
43
42
  if (!share)
44
43
  {
45
44
    HP_KEYDEF *keyinfo;
46
 
    DBUG_PRINT("info",("Initializing new table"));
47
45
    
48
46
    /*
49
47
      We have to store sometimes uchar* del_link in records,
200
198
    pthread_mutex_unlock(&THR_LOCK_heap);
201
199
 
202
200
  *res= share;
203
 
  DBUG_RETURN(0);
 
201
  return(0);
204
202
 
205
203
err:
206
204
  if (!create_info->internal_table)
207
205
    pthread_mutex_unlock(&THR_LOCK_heap);
208
 
  DBUG_RETURN(1);
 
206
  return(1);
209
207
} /* heap_create */
210
208
 
211
209
 
256
254
{
257
255
  int result;
258
256
  register HP_SHARE *share;
259
 
  DBUG_ENTER("heap_delete_table");
260
257
 
261
258
  pthread_mutex_lock(&THR_LOCK_heap);
262
259
  if ((share= hp_find_named_heap(name)))
269
266
    result= my_errno=ENOENT;
270
267
  }
271
268
  pthread_mutex_unlock(&THR_LOCK_heap);
272
 
  DBUG_RETURN(result);
 
269
  return(result);
273
270
}
274
271
 
275
272
 
276
273
void heap_drop_table(HP_INFO *info)
277
274
{
278
 
  DBUG_ENTER("heap_drop_table");
279
275
  pthread_mutex_lock(&THR_LOCK_heap);
280
276
  heap_try_free(info->s);
281
277
  pthread_mutex_unlock(&THR_LOCK_heap);
282
 
  DBUG_VOID_RETURN;
 
278
  return;
283
279
}
284
280
 
285
281