~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/default_replicator/default_replicator.cc

  • Committer: Jay Pipes
  • Date: 2010-04-08 16:27:25 UTC
  • mfrom: (1405.6.10 replication-pairs)
  • mto: This revision was merged to the branch mainline in revision 1457.
  • Revision ID: jpipes@serialcoder-20100408162725-sugbgn38oxjqclq2
Merge trunk and replication-pairs with conflict resolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
using namespace std;
46
46
using namespace drizzled;
47
47
 
48
 
static bool sysvar_default_replicator_enable= false;
49
 
 
50
 
bool DefaultReplicator::isEnabled() const
51
 
{
52
 
  return sysvar_default_replicator_enable;
53
 
}
54
 
 
55
 
void DefaultReplicator::enable()
56
 
{
57
 
  sysvar_default_replicator_enable= true;
58
 
}
59
 
 
60
 
void DefaultReplicator::disable()
61
 
{
62
 
  sysvar_default_replicator_enable= false;
63
 
}
64
 
 
65
48
plugin::ReplicationReturnCode
66
49
DefaultReplicator::replicate(plugin::TransactionApplier *in_applier,
67
50
                             Session &in_session,
83
66
  return 0;
84
67
}
85
68
 
86
 
static DRIZZLE_SYSVAR_BOOL(
87
 
  enable,
88
 
  sysvar_default_replicator_enable,
89
 
  PLUGIN_VAR_NOCMDARG,
90
 
  N_("Enable default replicator"),
91
 
  NULL, /* check func */
92
 
  NULL, /* update func */
93
 
  false /* default */);
94
 
 
95
 
static drizzle_sys_var* default_replicator_system_variables[]= {
96
 
  DRIZZLE_SYSVAR(enable),
97
 
  NULL
98
 
};
99
 
 
100
 
DRIZZLE_DECLARE_PLUGIN
101
 
{
102
 
  DRIZZLE_VERSION_ID,
103
 
  "default_replicator",
104
 
  "0.1",
105
 
  "Jay Pipes",
106
 
  N_("Default Replicator"),
107
 
  PLUGIN_LICENSE_GPL,
108
 
  init, /* Plugin Init */
109
 
  default_replicator_system_variables, /* system variables */
110
 
  NULL    /* config options */
111
 
}
112
 
DRIZZLE_DECLARE_PLUGIN_END;
 
69
DRIZZLE_PLUGIN(init,  NULL);