~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/archive/ha_archive.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:
136
136
  }
137
137
};
138
138
 
 
139
static ArchiveEngine *archive_engine= NULL;
139
140
 
140
141
/*
141
142
  Initialize the archive handler.
149
150
    true        Error
150
151
*/
151
152
 
152
 
int archive_db_init(void *p)
 
153
int archive_db_init(Plugin_registry &registry)
153
154
{
154
 
  StorageEngine **engine= static_cast<StorageEngine **>(p);
155
 
 
156
 
  ArchiveEngine *archive_engine= new ArchiveEngine(engine_name);
157
 
 
158
 
  *engine= archive_engine;
 
155
 
 
156
  pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST);
 
157
  archive_engine= new ArchiveEngine(engine_name);
 
158
  registry.registerPlugin(archive_engine);
159
159
 
160
160
  /* When the engine starts up set the first version */
161
161
  global_version= 1;
174
174
    false       OK
175
175
*/
176
176
 
177
 
int archive_db_done(void *p)
 
177
int archive_db_done(void *)
178
178
{
179
 
  ArchiveEngine *archive_engine= static_cast<ArchiveEngine *>(p);
180
179
  delete archive_engine;
181
180
 
182
181
  pthread_mutex_destroy(&archive_mutex);