1
/* Copyright (C) 2010 Brian Aker
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
#include "plugin/archive/archive_engine.h"
22
using namespace drizzled;
24
static ArchiveEngine *archive_engine= NULL;
26
static bool archive_use_aio= false;
28
/* Used by the engie to determine the state of the archive AIO state */
29
bool archive_aio_state(void);
31
bool archive_aio_state(void)
33
return archive_use_aio;
36
static int init(drizzled::plugin::Registry ®istry)
39
archive_engine= new ArchiveEngine();
40
registry.add(archive_engine);
46
Release the archive Cursor.
56
extern pthread_mutex_t archive_mutex;
58
static int done(drizzled::plugin::Registry ®istry)
60
registry.remove(archive_engine);
61
delete archive_engine;
63
pthread_mutex_destroy(&archive_mutex);
69
static DRIZZLE_SYSVAR_BOOL(aio, archive_use_aio,
71
"Whether or not to use asynchronous IO.",
74
static drizzle_sys_var* archive_system_variables[]= {
79
DRIZZLE_DECLARE_PLUGIN
84
"Brian Aker, MySQL AB",
85
"Archive storage engine",
87
init, /* Plugin Init */
88
done, /* Plugin Deinit */
89
NULL, /* status variables */
90
archive_system_variables, /* system variables */
91
NULL /* config options */
93
DRIZZLE_DECLARE_PLUGIN_END;