~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_close.c

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:22 UTC
  • Revision ID: monty@inaugust.com-20080816210622-zpnn13unyinqzn72
Updated po files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* close a heap-database */
17
17
 
18
 
#include "heap_priv.h"
19
 
#include <cstdlib>
20
 
 
21
 
using namespace std;
 
18
#include "heapdef.h"
22
19
 
23
20
        /* Close a database open by hp_open() */
24
21
        /* Data is normally not deallocated */
33
30
}
34
31
 
35
32
 
36
 
int hp_close(HP_INFO *info)
 
33
int hp_close(register HP_INFO *info)
37
34
{
38
35
  int error=0;
39
36
  info->s->changed=0;
40
 
  heap_open_list.remove(info);
 
37
  if (info->open_list.data)
 
38
    heap_open_list=list_delete(heap_open_list,&info->open_list);
41
39
  if (!--info->s->open_count && info->s->delete_on_close)
42
40
    hp_free(info->s);                           /* Table was deleted */
43
 
  free((unsigned char*) info);
 
41
  my_free((uchar*) info,MYF(0));
44
42
  return(error);
45
43
}