~drizzle-developers/ubuntu/natty/drizzle/natty

« back to all changes in this revision

Viewing changes to storage/heap/ha_heap.cc

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
  }
50
50
};
51
51
 
52
 
int heap_init(void *p)
 
52
static HeapEngine *engine= NULL;
 
53
int heap_init(PluginRegistry &registry)
53
54
{
54
 
  StorageEngine **engine= static_cast<StorageEngine **>(p);
55
 
  *engine= new HeapEngine(engine_name);
 
55
  engine= new HeapEngine(engine_name);
 
56
  registry.add(engine);
 
57
  pthread_mutex_init(&THR_LOCK_heap, MY_MUTEX_INIT_FAST);
56
58
  return 0;
57
59
}
58
60
 
59
 
int heap_deinit(void *p)
 
61
int heap_deinit(PluginRegistry &registry)
60
62
{
61
 
  HeapEngine *engine= static_cast<HeapEngine *>(p);
 
63
  registry.remove(engine);
62
64
  delete engine;
63
65
 
64
 
  pthread_mutex_init(&THR_LOCK_heap,MY_MUTEX_INIT_FAST);
 
66
  pthread_mutex_destroy(&THR_LOCK_heap);
65
67
 
66
68
  return hp_panic(HA_PANIC_CLOSE);
67
69
}
849
851
 
850
852
drizzle_declare_plugin(heap)
851
853
{
852
 
  DRIZZLE_STORAGE_ENGINE_PLUGIN,
853
854
  "MEMORY",
854
855
  "1.0",
855
856
  "MySQL AB",