Merge lp:~vjsamuel/drizzle/rplugin-transaction-log into lp:~drizzle-trunk/drizzle/development

Proposed by Vijay Samuel
Status: Merged
Approved by: Brian Aker
Approved revision: 1689
Merged at revision: 1690
Proposed branch: lp:~vjsamuel/drizzle/rplugin-transaction-log
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 337 lines (+103/-35)
35 files modified
plugin/replication_dictionary/tests/t/replication_streams-master.opt (+1/-1)
plugin/transaction_log/module.cc (+69/-1)
plugin/transaction_log/tests/t/alter-master.opt (+1/-1)
plugin/transaction_log/tests/t/auto_commit-master.opt (+1/-1)
plugin/transaction_log/tests/t/bad_replicator-master.opt (+1/-1)
plugin/transaction_log/tests/t/blob-master.opt (+1/-1)
plugin/transaction_log/tests/t/create_select-master.opt (+1/-1)
plugin/transaction_log/tests/t/create_table-master.opt (+1/-1)
plugin/transaction_log/tests/t/database-master.opt (+1/-1)
plugin/transaction_log/tests/t/ddl_transaction_id-master.opt (+1/-1)
plugin/transaction_log/tests/t/delete-master.opt (+1/-1)
plugin/transaction_log/tests/t/filtered_replicator-master.opt (+1/-1)
plugin/transaction_log/tests/t/information_schema-master.opt (+1/-1)
plugin/transaction_log/tests/t/insert-master.opt (+1/-1)
plugin/transaction_log/tests/t/insert_multi-master.opt (+1/-1)
plugin/transaction_log/tests/t/insert_on_duplicate_update-master.opt (+1/-1)
plugin/transaction_log/tests/t/insert_select-master.opt (+1/-1)
plugin/transaction_log/tests/t/multi_column_primary_key-master.opt (+1/-1)
plugin/transaction_log/tests/t/multi_table-master.opt (+1/-1)
plugin/transaction_log/tests/t/no_modification-master.opt (+1/-1)
plugin/transaction_log/tests/t/no_primary_key-master.opt (+1/-1)
plugin/transaction_log/tests/t/null_values-master.opt (+1/-1)
plugin/transaction_log/tests/t/rand-master.opt (+1/-1)
plugin/transaction_log/tests/t/rename-master.opt (+1/-1)
plugin/transaction_log/tests/t/replace-master.opt (+1/-1)
plugin/transaction_log/tests/t/rollback-master.opt (+1/-1)
plugin/transaction_log/tests/t/schema-master.opt (+1/-1)
plugin/transaction_log/tests/t/select_for_update-master.opt (+1/-1)
plugin/transaction_log/tests/t/slap-master.opt (+1/-1)
plugin/transaction_log/tests/t/temp_tables-master.opt (+1/-1)
plugin/transaction_log/tests/t/truncate-master.opt (+1/-1)
plugin/transaction_log/tests/t/truncate_log-master.opt (+1/-1)
plugin/transaction_log/tests/t/udf_print_transaction_message-master.opt (+1/-1)
plugin/transaction_log/tests/t/update-master.opt (+1/-1)
plugin/transaction_log/tests/t/variables-master.opt (+1/-1)
To merge this branch: bzr merge lp:~vjsamuel/drizzle/rplugin-transaction-log
Reviewer Review Type Date Requested Status
Vijay Samuel Pending
Drizzle Merge Team Pending
Jay Pipes Pending
Review via email: mp+31931@code.launchpad.net

This proposal supersedes a proposal from 2010-08-04.

To post a comment you must log in.
Revision history for this message
Vijay Samuel (vjsamuel) wrote : Posted in a previous version of this proposal

I ve made some mistake which is reflecting in CentOS FreeBSD and Solaris. I ll fix it and re submit the merge proposal.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/replication_dictionary/tests/t/replication_streams-master.opt'
2--- plugin/replication_dictionary/tests/t/replication_streams-master.opt 2010-04-05 16:06:01 +0000
3+++ plugin/replication_dictionary/tests/t/replication_streams-master.opt 2010-08-06 07:56:00 +0000
4@@ -1,1 +1,1 @@
5---transaction-log-enable --transaction-log-use-replicator=filtered
6+--transaction-log.enable --transaction-log.use-replicator=filtered
7
8=== modified file 'plugin/transaction_log/module.cc'
9--- plugin/transaction_log/module.cc 2010-06-23 20:51:16 +0000
10+++ plugin/transaction_log/module.cc 2010-08-06 07:56:00 +0000
11@@ -44,7 +44,10 @@
12 #include <drizzled/session.h>
13 #include <drizzled/set_var.h>
14 #include <drizzled/gettext.h>
15+#include <boost/program_options.hpp>
16+#include <drizzled/module/option_map.h>
17
18+namespace po= boost::program_options;
19 using namespace std;
20 using namespace drizzled;
21
22@@ -110,6 +113,46 @@
23
24 static int init(drizzled::module::Context &context)
25 {
26+ const module::option_map &vm= context.getOptions();
27+
28+ if (vm.count("sync-method"))
29+ {
30+ if (sysvar_transaction_log_sync_method > 2)
31+ {
32+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for sync-method\n"));
33+ exit(-1);
34+ }
35+ }
36+
37+ if (vm.count("num-write-buffers"))
38+ {
39+ if (sysvar_transaction_log_num_write_buffers < 4 || sysvar_transaction_log_num_write_buffers > 8192)
40+ {
41+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for num-write-buffers\n"));
42+ exit(-1);
43+ }
44+ }
45+
46+ if (vm.count("file"))
47+ {
48+ sysvar_transaction_log_file= strdup(vm["file"].as<string>().c_str());
49+ }
50+
51+ else
52+ {
53+ sysvar_transaction_log_file= strdup(DEFAULT_LOG_FILE_PATH);
54+ }
55+
56+ if (vm.count("use-replicator"))
57+ {
58+ sysvar_transaction_log_use_replicator= strdup(vm["use-replicator"].as<string>().c_str());
59+ }
60+
61+ else
62+ {
63+ sysvar_transaction_log_use_replicator= strdup(DEFAULT_USE_REPLICATOR);
64+ }
65+
66 /* Create and initialize the transaction log itself */
67 if (sysvar_transaction_log_enabled)
68 {
69@@ -281,6 +324,31 @@
70 8192,
71 0);
72
73+static void init_options(drizzled::module::option_context &context)
74+{
75+ context("truncate-debug",
76+ po::value<bool>(&sysvar_transaction_log_truncate_debug)->default_value(false)->zero_tokens(),
77+ N_("DEBUGGING - Truncate transaction log"));
78+ context("enable-checksum",
79+ po::value<bool>(&sysvar_transaction_log_checksum_enabled)->default_value(false)->zero_tokens(),
80+ N_("Enable CRC32 Checksumming of each written transaction log entry"));
81+ context("enable",
82+ po::value<bool>(&sysvar_transaction_log_enabled)->default_value(false)->zero_tokens(),
83+ N_("Enable transaction log"));
84+ context("file",
85+ po::value<string>(),
86+ N_("Path to the file to use for transaction log"));
87+ context("use-replicator",
88+ po::value<string>(),
89+ N_("Name of the replicator plugin to use (default='default_replicator')"));
90+ context("sync-method",
91+ po::value<uint32_t>(&sysvar_transaction_log_sync_method)->default_value(0),
92+ N_("0 == rely on operating system to sync log file (default), 1 == sync file at each transaction write, 2 == sync log file once per second"));
93+ context("num-write-buffers",
94+ po::value<uint32_t>(&sysvar_transaction_log_num_write_buffers)->default_value(8),
95+ N_("Number of slots for in-memory write buffers (default=8)."));
96+}
97+
98 static drizzle_sys_var* sys_variables[]= {
99 DRIZZLE_SYSVAR(enable),
100 DRIZZLE_SYSVAR(truncate_debug),
101@@ -292,4 +360,4 @@
102 NULL
103 };
104
105-DRIZZLE_PLUGIN(init, sys_variables, NULL);
106+DRIZZLE_PLUGIN(init, sys_variables, init_options);
107
108=== modified file 'plugin/transaction_log/tests/t/alter-master.opt'
109--- plugin/transaction_log/tests/t/alter-master.opt 2010-04-05 16:06:01 +0000
110+++ plugin/transaction_log/tests/t/alter-master.opt 2010-08-06 07:56:00 +0000
111@@ -1,1 +1,1 @@
112---transaction-log-enable --scheduler=multi_thread
113+--transaction-log.enable --scheduler=multi_thread
114
115=== modified file 'plugin/transaction_log/tests/t/auto_commit-master.opt'
116--- plugin/transaction_log/tests/t/auto_commit-master.opt 2010-04-05 16:06:01 +0000
117+++ plugin/transaction_log/tests/t/auto_commit-master.opt 2010-08-06 07:56:00 +0000
118@@ -1,1 +1,1 @@
119---transaction-log-enable --scheduler=multi_thread
120+--transaction-log.enable --scheduler=multi_thread
121
122=== modified file 'plugin/transaction_log/tests/t/bad_replicator-master.opt'
123--- plugin/transaction_log/tests/t/bad_replicator-master.opt 2010-04-05 16:06:01 +0000
124+++ plugin/transaction_log/tests/t/bad_replicator-master.opt 2010-08-06 07:56:00 +0000
125@@ -1,1 +1,1 @@
126---transaction-log-enable --transaction-log-use-replicator=bad --scheduler=multi_thread
127+--transaction-log.enable --transaction-log.use-replicator=bad --scheduler=multi_thread
128
129=== modified file 'plugin/transaction_log/tests/t/blob-master.opt'
130--- plugin/transaction_log/tests/t/blob-master.opt 2010-04-05 16:06:01 +0000
131+++ plugin/transaction_log/tests/t/blob-master.opt 2010-08-06 07:56:00 +0000
132@@ -1,1 +1,1 @@
133---transaction-log-enable --scheduler=multi_thread
134+--transaction-log.enable --scheduler=multi_thread
135
136=== modified file 'plugin/transaction_log/tests/t/create_select-master.opt'
137--- plugin/transaction_log/tests/t/create_select-master.opt 2010-04-05 16:06:01 +0000
138+++ plugin/transaction_log/tests/t/create_select-master.opt 2010-08-06 07:56:00 +0000
139@@ -1,1 +1,1 @@
140---transaction-log-enable --scheduler=multi_thread
141+--transaction-log.enable --scheduler=multi_thread
142
143=== modified file 'plugin/transaction_log/tests/t/create_table-master.opt'
144--- plugin/transaction_log/tests/t/create_table-master.opt 2010-04-05 16:06:01 +0000
145+++ plugin/transaction_log/tests/t/create_table-master.opt 2010-08-06 07:56:00 +0000
146@@ -1,1 +1,1 @@
147---transaction-log-enable --scheduler=multi_thread
148+--transaction-log.enable --scheduler=multi_thread
149
150=== modified file 'plugin/transaction_log/tests/t/database-master.opt'
151--- plugin/transaction_log/tests/t/database-master.opt 2010-04-05 16:06:01 +0000
152+++ plugin/transaction_log/tests/t/database-master.opt 2010-08-06 07:56:00 +0000
153@@ -1,1 +1,1 @@
154---transaction-log-enable --scheduler=multi_thread
155+--transaction-log.enable --scheduler=multi_thread
156
157=== modified file 'plugin/transaction_log/tests/t/ddl_transaction_id-master.opt'
158--- plugin/transaction_log/tests/t/ddl_transaction_id-master.opt 2010-04-05 16:06:01 +0000
159+++ plugin/transaction_log/tests/t/ddl_transaction_id-master.opt 2010-08-06 07:56:00 +0000
160@@ -1,1 +1,1 @@
161---transaction-log-enable --scheduler=multi_thread
162+--transaction-log.enable --scheduler=multi_thread
163
164=== modified file 'plugin/transaction_log/tests/t/delete-master.opt'
165--- plugin/transaction_log/tests/t/delete-master.opt 2010-04-05 16:06:01 +0000
166+++ plugin/transaction_log/tests/t/delete-master.opt 2010-08-06 07:56:00 +0000
167@@ -1,1 +1,1 @@
168---transaction-log-enable --scheduler=multi_thread
169+--transaction-log.enable --scheduler=multi_thread
170
171=== modified file 'plugin/transaction_log/tests/t/filtered_replicator-master.opt'
172--- plugin/transaction_log/tests/t/filtered_replicator-master.opt 2010-07-16 10:52:11 +0000
173+++ plugin/transaction_log/tests/t/filtered_replicator-master.opt 2010-08-06 07:56:00 +0000
174@@ -1,1 +1,1 @@
175---transaction-log-enable --transaction-log-use-replicator=filtered --scheduler=multi_thread --filtered-replicator.filteredschemas=notest
176+--transaction-log.enable --transaction-log.use-replicator=filtered --scheduler=multi_thread --filtered-replicator.filteredschemas=notest
177
178=== modified file 'plugin/transaction_log/tests/t/information_schema-master.opt'
179--- plugin/transaction_log/tests/t/information_schema-master.opt 2010-04-05 16:06:01 +0000
180+++ plugin/transaction_log/tests/t/information_schema-master.opt 2010-08-06 07:56:00 +0000
181@@ -1,1 +1,1 @@
182---transaction-log-enable --scheduler=multi_thread
183+--transaction-log.enable --scheduler=multi_thread
184
185=== modified file 'plugin/transaction_log/tests/t/insert-master.opt'
186--- plugin/transaction_log/tests/t/insert-master.opt 2010-04-05 16:06:01 +0000
187+++ plugin/transaction_log/tests/t/insert-master.opt 2010-08-06 07:56:00 +0000
188@@ -1,1 +1,1 @@
189---transaction-log-enable --scheduler=multi_thread
190+--transaction-log.enable --scheduler=multi_thread
191
192=== modified file 'plugin/transaction_log/tests/t/insert_multi-master.opt'
193--- plugin/transaction_log/tests/t/insert_multi-master.opt 2010-04-05 16:06:01 +0000
194+++ plugin/transaction_log/tests/t/insert_multi-master.opt 2010-08-06 07:56:00 +0000
195@@ -1,1 +1,1 @@
196---transaction-log-enable --scheduler=multi_thread
197+--transaction-log.enable --scheduler=multi_thread
198
199=== modified file 'plugin/transaction_log/tests/t/insert_on_duplicate_update-master.opt'
200--- plugin/transaction_log/tests/t/insert_on_duplicate_update-master.opt 2010-04-05 16:06:01 +0000
201+++ plugin/transaction_log/tests/t/insert_on_duplicate_update-master.opt 2010-08-06 07:56:00 +0000
202@@ -1,1 +1,1 @@
203---transaction-log-enable --scheduler=multi_thread
204+--transaction-log.enable --scheduler=multi_thread
205
206=== modified file 'plugin/transaction_log/tests/t/insert_select-master.opt'
207--- plugin/transaction_log/tests/t/insert_select-master.opt 2010-04-05 16:06:01 +0000
208+++ plugin/transaction_log/tests/t/insert_select-master.opt 2010-08-06 07:56:00 +0000
209@@ -1,1 +1,1 @@
210---transaction-log-enable --scheduler=multi_thread
211+--transaction-log.enable --scheduler=multi_thread
212
213=== modified file 'plugin/transaction_log/tests/t/multi_column_primary_key-master.opt'
214--- plugin/transaction_log/tests/t/multi_column_primary_key-master.opt 2010-04-05 16:06:01 +0000
215+++ plugin/transaction_log/tests/t/multi_column_primary_key-master.opt 2010-08-06 07:56:00 +0000
216@@ -1,1 +1,1 @@
217---transaction-log-enable --scheduler=multi_thread
218+--transaction-log.enable --scheduler=multi_thread
219
220=== modified file 'plugin/transaction_log/tests/t/multi_table-master.opt'
221--- plugin/transaction_log/tests/t/multi_table-master.opt 2010-07-21 03:20:34 +0000
222+++ plugin/transaction_log/tests/t/multi_table-master.opt 2010-08-06 07:56:00 +0000
223@@ -1,1 +1,1 @@
224---transaction-log-enable --scheduler=multi_thread
225+--transaction-log.enable --scheduler=multi_thread
226
227=== modified file 'plugin/transaction_log/tests/t/no_modification-master.opt'
228--- plugin/transaction_log/tests/t/no_modification-master.opt 2010-04-05 16:06:01 +0000
229+++ plugin/transaction_log/tests/t/no_modification-master.opt 2010-08-06 07:56:00 +0000
230@@ -1,1 +1,1 @@
231---transaction-log-enable --scheduler=multi_thread
232+--transaction-log.enable --scheduler=multi_thread
233
234=== modified file 'plugin/transaction_log/tests/t/no_primary_key-master.opt'
235--- plugin/transaction_log/tests/t/no_primary_key-master.opt 2010-04-05 16:06:01 +0000
236+++ plugin/transaction_log/tests/t/no_primary_key-master.opt 2010-08-06 07:56:00 +0000
237@@ -1,1 +1,1 @@
238---transaction-log-enable --scheduler=multi_thread
239+--transaction-log.enable --scheduler=multi_thread
240
241=== modified file 'plugin/transaction_log/tests/t/null_values-master.opt'
242--- plugin/transaction_log/tests/t/null_values-master.opt 2010-07-25 00:52:26 +0000
243+++ plugin/transaction_log/tests/t/null_values-master.opt 2010-08-06 07:56:00 +0000
244@@ -1,1 +1,1 @@
245---transaction-log-enable --scheduler=multi_thread
246+--transaction-log.enable --scheduler=multi_thread
247
248=== modified file 'plugin/transaction_log/tests/t/rand-master.opt'
249--- plugin/transaction_log/tests/t/rand-master.opt 2010-04-05 16:06:01 +0000
250+++ plugin/transaction_log/tests/t/rand-master.opt 2010-08-06 07:56:00 +0000
251@@ -1,1 +1,1 @@
252---transaction-log-enable --scheduler=multi_thread
253+--transaction-log.enable --scheduler=multi_thread
254
255=== modified file 'plugin/transaction_log/tests/t/rename-master.opt'
256--- plugin/transaction_log/tests/t/rename-master.opt 2010-04-05 16:06:01 +0000
257+++ plugin/transaction_log/tests/t/rename-master.opt 2010-08-06 07:56:00 +0000
258@@ -1,1 +1,1 @@
259---transaction-log-enable --scheduler=multi_thread
260+--transaction-log.enable --scheduler=multi_thread
261
262=== modified file 'plugin/transaction_log/tests/t/replace-master.opt'
263--- plugin/transaction_log/tests/t/replace-master.opt 2010-04-05 16:06:01 +0000
264+++ plugin/transaction_log/tests/t/replace-master.opt 2010-08-06 07:56:00 +0000
265@@ -1,1 +1,1 @@
266---transaction-log-enable --scheduler=multi_thread
267+--transaction-log.enable --scheduler=multi_thread
268
269=== modified file 'plugin/transaction_log/tests/t/rollback-master.opt'
270--- plugin/transaction_log/tests/t/rollback-master.opt 2010-04-05 16:06:01 +0000
271+++ plugin/transaction_log/tests/t/rollback-master.opt 2010-08-06 07:56:00 +0000
272@@ -1,1 +1,1 @@
273---transaction-log-enable --scheduler=multi_thread
274+--transaction-log.enable --scheduler=multi_thread
275
276=== modified file 'plugin/transaction_log/tests/t/schema-master.opt'
277--- plugin/transaction_log/tests/t/schema-master.opt 2010-04-05 16:06:01 +0000
278+++ plugin/transaction_log/tests/t/schema-master.opt 2010-08-06 07:56:00 +0000
279@@ -1,1 +1,1 @@
280---transaction-log-enable --scheduler=multi_thread
281+--transaction-log.enable --scheduler=multi_thread
282
283=== modified file 'plugin/transaction_log/tests/t/select_for_update-master.opt'
284--- plugin/transaction_log/tests/t/select_for_update-master.opt 2010-04-05 16:06:01 +0000
285+++ plugin/transaction_log/tests/t/select_for_update-master.opt 2010-08-06 07:56:00 +0000
286@@ -1,1 +1,1 @@
287---transaction-log-enable --scheduler=multi_thread
288+--transaction-log.enable --scheduler=multi_thread
289
290=== modified file 'plugin/transaction_log/tests/t/slap-master.opt'
291--- plugin/transaction_log/tests/t/slap-master.opt 2010-04-05 16:06:01 +0000
292+++ plugin/transaction_log/tests/t/slap-master.opt 2010-08-06 07:56:00 +0000
293@@ -1,1 +1,1 @@
294---transaction-log-enable --scheduler=multi_thread
295+--transaction-log.enable --scheduler=multi_thread
296
297=== modified file 'plugin/transaction_log/tests/t/temp_tables-master.opt'
298--- plugin/transaction_log/tests/t/temp_tables-master.opt 2010-04-05 16:06:01 +0000
299+++ plugin/transaction_log/tests/t/temp_tables-master.opt 2010-08-06 07:56:00 +0000
300@@ -1,1 +1,1 @@
301---transaction-log-enable --scheduler=multi_thread
302+--transaction-log.enable --scheduler=multi_thread
303
304=== modified file 'plugin/transaction_log/tests/t/truncate-master.opt'
305--- plugin/transaction_log/tests/t/truncate-master.opt 2010-04-05 16:06:01 +0000
306+++ plugin/transaction_log/tests/t/truncate-master.opt 2010-08-06 07:56:00 +0000
307@@ -1,1 +1,1 @@
308---transaction-log-enable --scheduler=multi_thread
309+--transaction-log.enable --scheduler=multi_thread
310
311=== modified file 'plugin/transaction_log/tests/t/truncate_log-master.opt'
312--- plugin/transaction_log/tests/t/truncate_log-master.opt 2010-04-05 16:06:01 +0000
313+++ plugin/transaction_log/tests/t/truncate_log-master.opt 2010-08-06 07:56:00 +0000
314@@ -1,1 +1,1 @@
315---transaction-log-enable --scheduler=multi_thread
316+--transaction-log.enable --scheduler=multi_thread
317
318=== modified file 'plugin/transaction_log/tests/t/udf_print_transaction_message-master.opt'
319--- plugin/transaction_log/tests/t/udf_print_transaction_message-master.opt 2010-04-05 16:06:01 +0000
320+++ plugin/transaction_log/tests/t/udf_print_transaction_message-master.opt 2010-08-06 07:56:00 +0000
321@@ -1,1 +1,1 @@
322---transaction-log-enable --scheduler=multi_thread
323+--transaction-log.enable --scheduler=multi_thread
324
325=== modified file 'plugin/transaction_log/tests/t/update-master.opt'
326--- plugin/transaction_log/tests/t/update-master.opt 2010-04-05 16:06:01 +0000
327+++ plugin/transaction_log/tests/t/update-master.opt 2010-08-06 07:56:00 +0000
328@@ -1,1 +1,1 @@
329---transaction-log-enable --scheduler=multi_thread
330+--transaction-log.enable --scheduler=multi_thread
331
332=== modified file 'plugin/transaction_log/tests/t/variables-master.opt'
333--- plugin/transaction_log/tests/t/variables-master.opt 2010-04-05 16:06:01 +0000
334+++ plugin/transaction_log/tests/t/variables-master.opt 2010-08-06 07:56:00 +0000
335@@ -1,1 +1,1 @@
336---transaction-log-enable --transaction-log-sync-method=1 --scheduler=multi_thread
337+--transaction-log.enable --transaction-log.sync-method=1 --scheduler=multi_thread