~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/plugin.cc

  • Committer: Brian Aker
  • Date: 2010-04-05 23:46:43 UTC
  • Revision ID: brian@gaz-20100405234643-0he3xnj902rc70r8
Fixing tests to work with PBXT.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2010 Brian Aker
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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 */
 
15
 
 
16
 
 
17
#include "config.h"
 
18
 
 
19
#include "plugin/archive/archive_engine.h"
 
20
 
 
21
using namespace std;
 
22
using namespace drizzled;
 
23
 
 
24
static ArchiveEngine *archive_engine= NULL;
 
25
 
 
26
static bool archive_use_aio= false;
 
27
 
 
28
/* Used by the engie to determine the state of the archive AIO state */
 
29
bool archive_aio_state(void);
 
30
 
 
31
bool archive_aio_state(void)
 
32
{
 
33
  return archive_use_aio;
 
34
}
 
35
 
 
36
static int init(drizzled::plugin::Context &context)
 
37
{
 
38
 
 
39
  archive_engine= new ArchiveEngine();
 
40
  context.add(archive_engine);
 
41
 
 
42
  return false;
 
43
}
 
44
 
 
45
 
 
46
static DRIZZLE_SYSVAR_BOOL(aio, archive_use_aio,
 
47
  PLUGIN_VAR_NOCMDOPT,
 
48
  "Whether or not to use asynchronous IO.",
 
49
  NULL, NULL, true);
 
50
 
 
51
static drizzle_sys_var* archive_system_variables[]= {
 
52
  DRIZZLE_SYSVAR(aio),
 
53
  NULL
 
54
};
 
55
 
 
56
DRIZZLE_DECLARE_PLUGIN
 
57
{
 
58
  DRIZZLE_VERSION_ID,
 
59
  "ARCHIVE",
 
60
  "3.5",
 
61
  "Brian Aker, MySQL AB",
 
62
  "Archive storage engine",
 
63
  PLUGIN_LICENSE_GPL,
 
64
  init, /* Plugin Init */
 
65
  archive_system_variables,   /* system variables                */
 
66
  NULL                        /* config options                  */
 
67
}
 
68
DRIZZLE_DECLARE_PLUGIN_END;