~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/module.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:
85
85
 * for managing write buffers
86
86
 */
87
87
static uint32_t sysvar_transaction_log_num_write_buffers= 8;
 
88
/**
 
89
 * Transaction Log plugin system variable - The name of the replicator plugin
 
90
 * to pair the transaction log's applier with.  Defaults to "default"
 
91
 */
 
92
static char *sysvar_transaction_log_use_replicator= NULL;
 
93
static const char DEFAULT_USE_REPLICATOR[]= "default";
88
94
 
89
95
/** DATA_DICTIONARY views */
90
96
static TransactionLogTool *transaction_log_tool;
129
135
    }
130
136
    /* Create the applier plugin and register it */
131
137
    transaction_log_applier= new (nothrow) TransactionLogApplier("transaction_log_applier",
132
 
                                                                 *transaction_log, 
 
138
                                                                 transaction_log, 
133
139
                                                                 sysvar_transaction_log_num_write_buffers);
134
140
    if (transaction_log_applier == NULL)
135
141
    {
138
144
      return 1;
139
145
    }
140
146
    context.add(transaction_log_applier);
 
147
    ReplicationServices &replication_services= ReplicationServices::singleton();
 
148
    string replicator_name(sysvar_transaction_log_use_replicator);
 
149
    replication_services.attachApplier(transaction_log_applier, replicator_name);
141
150
 
142
151
    /* Setup DATA_DICTIONARY views */
143
152
 
230
239
                          NULL, /* update func*/
231
240
                          DEFAULT_LOG_FILE_PATH /* default */);
232
241
 
 
242
static DRIZZLE_SYSVAR_STR(use_replicator,
 
243
                          sysvar_transaction_log_use_replicator,
 
244
                          PLUGIN_VAR_READONLY,
 
245
                          N_("Name of the replicator plugin to use (default='default_replicator')"),
 
246
                          NULL, /* check func */
 
247
                          NULL, /* update func*/
 
248
                          DEFAULT_USE_REPLICATOR /* default */);
 
249
 
233
250
static DRIZZLE_SYSVAR_BOOL(enable_checksum,
234
251
                           sysvar_transaction_log_checksum_enabled,
235
252
                           PLUGIN_VAR_NOCMDARG,
269
286
  DRIZZLE_SYSVAR(enable_checksum),
270
287
  DRIZZLE_SYSVAR(sync_method),
271
288
  DRIZZLE_SYSVAR(num_write_buffers),
 
289
  DRIZZLE_SYSVAR(use_replicator),
272
290
  NULL
273
291
};
274
292