93
93
extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func_factory;
94
94
extern plugin::Create_function<HexdumpTransactionMessageFunction> *hexdump_transaction_message_func_factory;
96
static int init(drizzled::plugin::Registry ®istry)
96
static int init(drizzled::plugin::Context &context)
98
98
/* Create and initialize the transaction log itself */
99
99
if (sysvar_transaction_log_enabled)
127
127
strerror(errno));
130
registry.add(transaction_log_applier);
130
context.add(transaction_log_applier);
132
132
/* Setup DATA_DICTIONARY views */
134
134
transaction_log_tool= new (nothrow) TransactionLogTool;
135
registry.add(transaction_log_tool);
135
context.add(transaction_log_tool);
136
136
transaction_log_entries_tool= new (nothrow) TransactionLogEntriesTool;
137
registry.add(transaction_log_entries_tool);
137
context.add(transaction_log_entries_tool);
138
138
transaction_log_transactions_tool= new (nothrow) TransactionLogTransactionsTool;
139
registry.add(transaction_log_transactions_tool);
139
context.add(transaction_log_transactions_tool);
141
141
/* Setup the module's UDFs */
142
142
print_transaction_message_func_factory=
143
143
new plugin::Create_function<PrintTransactionMessageFunction>("print_transaction_message");
144
registry.add(print_transaction_message_func_factory);
144
context.add(print_transaction_message_func_factory);
146
146
hexdump_transaction_message_func_factory=
147
147
new plugin::Create_function<HexdumpTransactionMessageFunction>("hexdump_transaction_message");
148
registry.add(hexdump_transaction_message_func_factory);
148
context.add(hexdump_transaction_message_func_factory);
150
150
/* Create and initialize the transaction log index */
151
151
transaction_log_index= new (nothrow) TransactionLogIndex(*transaction_log);
179
static int deinit(drizzled::plugin::Registry ®istry)
181
/* Cleanup the transaction log itself */
184
registry.remove(transaction_log_applier);
185
delete transaction_log_applier;
186
delete transaction_log;
187
delete transaction_log_index;
189
/* Cleanup the DATA_DICTIONARY views */
190
registry.remove(transaction_log_tool);
191
delete transaction_log_tool;
192
registry.remove(transaction_log_entries_tool);
193
delete transaction_log_entries_tool;
194
registry.remove(transaction_log_transactions_tool);
195
delete transaction_log_transactions_tool;
197
/* Cleanup module UDFs */
198
registry.remove(print_transaction_message_func_factory);
199
delete print_transaction_message_func_factory;
200
registry.remove(hexdump_transaction_message_func_factory);
201
delete hexdump_transaction_message_func_factory;
207
180
static void set_truncate_debug(Session *,
208
181
drizzle_sys_var *,