~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Monty Taylor
  • Date: 2009-04-10 21:13:45 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410211345-8ti3nt2i2otjrjly
New-style plugin registration now works.
New-style plugin re-registration on the way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
683
683
}
684
684
 
685
685
 
686
 
int storage_engine_finalizer(st_plugin_int *plugin)
 
686
int storage_engine_finalizer(st_plugin_int *)
687
687
{
688
 
  StorageEngine *engine= static_cast<StorageEngine *>(plugin->data);
689
 
 
690
 
  remove_storage_engine(engine);
691
 
 
692
 
  if (engine && plugin->plugin->deinit)
693
 
    (void)plugin->plugin->deinit(engine);
694
 
 
 
688
 
 
689
  //remove_storage_engine(engine);
 
690
 
 
691
/*  if (engine && plugin->plugin->deinit)
 
692
    (void)plugin->plugin->deinit(NULL);
 
693
*/
695
694
  return(0);
696
695
}
697
696
 
698
697
 
699
 
int storage_engine_initializer(st_plugin_int *plugin)
700
 
{
701
 
  StorageEngine *engine= NULL;
702
 
 
703
 
  if (plugin->plugin->init)
704
 
  {
705
 
    if (plugin->plugin->init(&engine))
706
 
    {
707
 
      errmsg_printf(ERRMSG_LVL_ERROR,
708
 
                    _("Plugin '%s' init function returned error."),
709
 
                    plugin->name.str);
710
 
      return 1;
711
 
    }
712
 
  }
713
 
 
714
 
  Plugin_registry &registry= Plugin_registry::get_plugin_registry();
715
 
  if (engine != NULL)
716
 
    registry.registerPlugin(engine);
717
 
 
718
 
  plugin->data= engine;
719
 
  plugin->isInited= true;
720
 
 
721
 
  return 0;
722
 
}
723
 
 
724
698
const string ha_resolve_storage_engine_name(const StorageEngine *engine)
725
699
{
726
700
  return engine == NULL ? string("UNKNOWN") : engine->getName();