~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/blackhole/ha_blackhole.cc

Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
  return (unsigned char*) share->table_name;
276
276
}
277
277
 
278
 
static int blackhole_init(void *p)
 
278
static StorageEngine *blackhole_engine= NULL;
 
279
 
 
280
static int blackhole_init(PluginRegistry &registry)
279
281
{
280
 
  StorageEngine **engine= static_cast<StorageEngine **>(p);
281
 
 
282
 
  BlackholeEngine *blackhole_engine= new BlackholeEngine(engine_name);
283
 
 
284
 
  *engine= blackhole_engine; 
285
 
 
 
282
 
 
283
  blackhole_engine= new BlackholeEngine(engine_name);
 
284
  registry.add(blackhole_engine);
 
285
  
286
286
  pthread_mutex_init(&blackhole_mutex, MY_MUTEX_INIT_FAST);
287
287
  (void) hash_init(&blackhole_open_tables, system_charset_info,32,0,0,
288
288
                   (hash_get_key) blackhole_get_key,
291
291
  return 0;
292
292
}
293
293
 
294
 
static int blackhole_fini(void *p)
 
294
static int blackhole_fini(PluginRegistry &registry)
295
295
{
296
 
  BlackholeEngine *blackhole_engine= static_cast<BlackholeEngine *>(p);
 
296
  registry.remove(blackhole_engine);
297
297
  delete blackhole_engine;
298
298
 
299
299
  hash_free(&blackhole_open_tables);
304
304
 
305
305
drizzle_declare_plugin(blackhole)
306
306
{
307
 
  DRIZZLE_STORAGE_ENGINE_PLUGIN,
308
307
  "BLACKHOLE",
309
308
  "1.0",
310
309
  "MySQL AB",