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

Proposed by Vijay Samuel
Status: Merged
Merged at revision: 1645
Proposed branch: lp:~vjsamuel/drizzle/rplugin-drizzle-protocol
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 558 lines (+165/-58)
29 files modified
drizzled/module/option_context.cc (+32/-3)
drizzled/module/option_context.h (+3/-13)
drizzled/module/option_map.h (+3/-8)
drizzled/option.cc (+1/-1)
drizzled/plugin.h (+2/-2)
plugin/auth_file/auth_file.cc (+1/-1)
plugin/auth_ldap/auth_ldap.cc (+1/-1)
plugin/auth_ldap/test_ldap.sh (+1/-1)
plugin/auth_test/auth_test.cc (+1/-1)
plugin/blitzdb/ha_blitz.cc (+1/-1)
plugin/crc32/crc32udf.cc (+1/-1)
plugin/default_replicator/default_replicator.cc (+1/-1)
plugin/drizzle_protocol/drizzle_protocol.cc (+99/-7)
plugin/errmsg_notify/errmsg_notify.cc (+1/-1)
plugin/filtered_replicator/filtered_replicator.cc (+1/-1)
plugin/logging_stats/tests/t/command-master.opt (+1/-1)
plugin/logging_stats/tests/t/max_session-master.opt (+1/-1)
plugin/logging_stats/tests/t/max_user-master.opt (+1/-1)
plugin/logging_stats/tests/t/slap-master.opt (+1/-1)
plugin/rabbitmq/rabbitmq_log.cc (+1/-1)
plugin/rand_function/rand_function.cc (+1/-1)
plugin/replication_dictionary/module.cc (+1/-1)
plugin/rot13/rot13.cc (+1/-1)
plugin/simple_user_policy/module.cc (+1/-1)
plugin/sleep/sleep.cc (+1/-1)
plugin/syslog/module.cc (+1/-1)
plugin/transaction_log/module.cc (+1/-1)
plugin/version/versionudf.cc (+1/-1)
tests/test-run.pl (+3/-2)
To merge this branch: bzr merge lp:~vjsamuel/drizzle/rplugin-drizzle-protocol
Reviewer Review Type Date Requested Status
Monty Taylor Approve
Drizzle Developers Pending
Brian Aker Pending
Review via email: mp+29259@code.launchpad.net

This proposal supersedes a proposal from 2010-06-26.

To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal

Good work so far. Now that you're hacking in the server, there are a few more new things you're going to need to deal with. (Most of this has to do with error message handling)

First of all: in init(module::Context &context), you're doing validation checks directly at module init time. I'd really prefer to see option value validation happen at option parse time, so that we don't have to get halfway in to server startup before we discover a bad value in a config file. Can you register validation methods for these values when you add them to the context?

Secondly, for reporting error messages, you need to use errmsg_printf rather than cout. This allows them to be processed by the servers error message reporting system, which may or may not be configured to actually print to a console (other options would be syslog or the like)

Just while I'm giving you feedback, if you _were_ to use a cout approach (not a choice here) you should be using cerr instead, and also should be adding a std::endl on to the end.

Finally, you need to wrap these new messages strings you just added in _() so that they'll get translated.

So this:

cout << "Invalid value for buffer_length";

Should become:

errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for buffer_length\n"));

review: Needs Fixing
Revision history for this message
Monty Taylor (mordred) wrote :

Looks good to me. The code in the core in the module loading section actually comes from me.

review: Approve
Revision history for this message
Vijay Samuel (vjsamuel) wrote :

Thank you for that important fix Monty!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/module/option_context.cc'
2--- drizzled/module/option_context.cc 2010-06-16 22:09:59 +0000
3+++ drizzled/module/option_context.cc 2010-07-06 08:14:36 +0000
4@@ -36,7 +36,7 @@
5 option_context& option_context::operator()(const char* name,
6 const char* description)
7 {
8- const std::string new_name(prepend_name(name));
9+ const std::string new_name(prepend_name(module_name, name));
10 po_options(new_name.c_str(), description);
11 return *this;
12 }
13@@ -45,7 +45,7 @@
14 option_context& option_context::operator()(const char* name,
15 const po::value_semantic* s)
16 {
17- const std::string new_name(prepend_name(name));
18+ const std::string new_name(prepend_name(module_name, name));
19 po_options(new_name.c_str(), s);
20 return *this;
21 }
22@@ -55,11 +55,40 @@
23 const po::value_semantic* s,
24 const char* description)
25 {
26- const std::string new_name(prepend_name(name));
27+ const std::string new_name(prepend_name(module_name, name));
28 po_options(new_name.c_str(), s, description);
29 return *this;
30 }
31
32+namespace
33+{
34+
35+class SwapUnderscores
36+{
37+public:
38+ char operator()(char a) const
39+ {
40+ if (a == '_')
41+ return '-';
42+ return a;
43+ }
44+};
45+
46+} /* namespace */
47+
48+/*
49+ * Private methods.
50+ */
51+std::string option_context::prepend_name(std::string module_name,
52+ const char *name_in)
53+{
54+ module_name.push_back('.');
55+ std::transform(module_name.begin(), module_name.end(),
56+ module_name.begin(), SwapUnderscores());
57+ module_name.append(name_in);
58+ return module_name;
59+}
60+
61
62 } /* namespace module */
63 } /* namespace drizzled */
64
65=== modified file 'drizzled/module/option_context.h'
66--- drizzled/module/option_context.h 2010-06-16 22:09:59 +0000
67+++ drizzled/module/option_context.h 2010-07-06 08:14:36 +0000
68@@ -47,8 +47,6 @@
69 const std::string &module_name;
70 po::options_description_easy_init po_options;
71
72- std::string prepend_name(const char *name) const;
73-
74 public:
75
76 option_context(const std::string &module_name_in,
77@@ -64,6 +62,9 @@
78 const po::value_semantic* s,
79 const char* description);
80
81+ static std::string prepend_name(std::string module_name_in,
82+ const char *name);
83+
84 private:
85
86 /**
87@@ -82,17 +83,6 @@
88 option_context& operator=(const option_context &);
89 };
90
91-/*
92- * Private methods.
93- */
94-inline std::string option_context::prepend_name(const char *name_in) const
95-{
96- std::string new_name(module_name);
97- new_name.push_back('.');
98- new_name.append(name_in);
99- return new_name;
100-}
101-
102 } /* namespace module */
103 } /* namespace drizzled */
104
105
106=== modified file 'drizzled/module/option_map.h'
107--- drizzled/module/option_map.h 2010-06-20 19:05:15 +0000
108+++ drizzled/module/option_map.h 2010-07-06 08:14:36 +0000
109@@ -26,6 +26,7 @@
110 #define DRIZZLED_MODULE_OPTION_MAP_H
111
112 #include "drizzled/visibility.h"
113+#include "drizzled/module/option_context.h"
114
115 #include <boost/program_options.hpp>
116
117@@ -53,18 +54,12 @@
118
119 const boost::program_options::variable_value& operator[](const std::string &name_in) const
120 {
121- std::string new_name(module_name);
122- new_name.push_back('.');
123- new_name.append(name_in);
124- return vm[new_name];
125+ return vm[option_context::prepend_name(module_name, name_in.c_str())];
126 }
127
128 size_t count(const std::string &name_in) const
129 {
130- std::string new_name(module_name);
131- new_name.push_back('.');
132- new_name.append(name_in);
133- return vm.count(new_name);
134+ return vm.count(option_context::prepend_name(module_name, name_in.c_str()));
135 }
136
137 private:
138
139=== modified file 'drizzled/option.cc'
140--- drizzled/option.cc 2010-04-23 21:37:29 +0000
141+++ drizzled/option.cc 2010-07-06 08:14:36 +0000
142@@ -562,7 +562,7 @@
143 {
144 char *ptr, *end;
145
146- ptr= strrchr(cur_arg + 1, '.'); /* Skip the first character */
147+ ptr= NULL; //Options with '.' are now supported.
148 end= strrchr(cur_arg, '=');
149
150 /*
151
152=== modified file 'drizzled/plugin.h'
153--- drizzled/plugin.h 2010-06-21 04:53:35 +0000
154+++ drizzled/plugin.h 2010-07-06 08:14:36 +0000
155@@ -68,7 +68,7 @@
156
157
158 #define DRIZZLE_DECLARE_PLUGIN_END
159-#define DRIZZLE_PLUGIN(init,system) \
160+#define DRIZZLE_PLUGIN(init,system,options) \
161 DRIZZLE_DECLARE_PLUGIN \
162 { \
163 DRIZZLE_VERSION_ID, \
164@@ -77,7 +77,7 @@
165 STRINGIFY_ARG(PANDORA_MODULE_AUTHOR), \
166 STRINGIFY_ARG(PANDORA_MODULE_TITLE), \
167 PANDORA_MODULE_LICENSE, \
168- init, system, NULL \
169+ init, system, options \
170 }
171
172
173
174=== modified file 'plugin/auth_file/auth_file.cc'
175--- plugin/auth_file/auth_file.cc 2010-05-18 18:20:56 +0000
176+++ plugin/auth_file/auth_file.cc 2010-07-06 08:14:36 +0000
177@@ -237,4 +237,4 @@
178
179 } /* namespace auth_file */
180
181-DRIZZLE_PLUGIN(auth_file::init, auth_file::sys_variables);
182+DRIZZLE_PLUGIN(auth_file::init, auth_file::sys_variables, NULL);
183
184=== modified file 'plugin/auth_ldap/auth_ldap.cc'
185--- plugin/auth_ldap/auth_ldap.cc 2010-05-18 18:20:56 +0000
186+++ plugin/auth_ldap/auth_ldap.cc 2010-07-06 08:14:36 +0000
187@@ -490,4 +490,4 @@
188
189 } /* namespace auth_ldap */
190
191-DRIZZLE_PLUGIN(auth_ldap::init, auth_ldap::sys_variables);
192+DRIZZLE_PLUGIN(auth_ldap::init, auth_ldap::sys_variables, NULL);
193
194=== modified file 'plugin/auth_ldap/test_ldap.sh'
195--- plugin/auth_ldap/test_ldap.sh 2010-04-27 20:36:41 +0000
196+++ plugin/auth_ldap/test_ldap.sh 2010-07-06 08:14:36 +0000
197@@ -19,7 +19,7 @@
198 --auth-ldap-base-dn="dc=drizzle,dc=org" \
199 --auth-ldap-cache-timeout=1 \
200 --mysql-protocol-port=12345 \
201- --drizzle-protocol-port=12346 \
202+ --drizzle-protocol.port=12346 \
203 --pid-file=pid &
204
205 sleep 3
206
207=== modified file 'plugin/auth_test/auth_test.cc'
208--- plugin/auth_test/auth_test.cc 2010-05-18 18:20:56 +0000
209+++ plugin/auth_test/auth_test.cc 2010-07-06 08:14:36 +0000
210@@ -106,4 +106,4 @@
211
212 } /* namespace auth_test */
213
214-DRIZZLE_PLUGIN(auth_test::init, NULL);
215+DRIZZLE_PLUGIN(auth_test::init, NULL, NULL);
216
217=== modified file 'plugin/blitzdb/ha_blitz.cc'
218--- plugin/blitzdb/ha_blitz.cc 2010-06-29 21:22:35 +0000
219+++ plugin/blitzdb/ha_blitz.cc 2010-07-06 08:14:36 +0000
220@@ -1457,4 +1457,4 @@
221 return pos + skip_len + sizeof(uint16_t);
222 }
223
224-DRIZZLE_PLUGIN(blitz_init, NULL);
225+DRIZZLE_PLUGIN(blitz_init, NULL, NULL);
226
227=== modified file 'plugin/crc32/crc32udf.cc'
228--- plugin/crc32/crc32udf.cc 2010-05-18 18:20:56 +0000
229+++ plugin/crc32/crc32udf.cc 2010-07-06 08:14:36 +0000
230@@ -78,4 +78,4 @@
231 return 0;
232 }
233
234-DRIZZLE_PLUGIN(initialize, NULL);
235+DRIZZLE_PLUGIN(initialize, NULL, NULL);
236
237=== modified file 'plugin/default_replicator/default_replicator.cc'
238--- plugin/default_replicator/default_replicator.cc 2010-05-18 18:20:56 +0000
239+++ plugin/default_replicator/default_replicator.cc 2010-07-06 08:14:36 +0000
240@@ -66,4 +66,4 @@
241 return 0;
242 }
243
244-DRIZZLE_PLUGIN(init, NULL);
245+DRIZZLE_PLUGIN(init, NULL, NULL);
246
247=== modified file 'plugin/drizzle_protocol/drizzle_protocol.cc'
248--- plugin/drizzle_protocol/drizzle_protocol.cc 2010-05-18 18:20:56 +0000
249+++ plugin/drizzle_protocol/drizzle_protocol.cc 2010-07-06 08:14:36 +0000
250@@ -26,7 +26,9 @@
251 #include "drizzled/internal/my_sys.h"
252 #include "drizzled/internal/m_string.h"
253 #include <algorithm>
254-
255+#include <iostream>
256+#include <boost/program_options.hpp>
257+#include <drizzled/module/option_map.h>
258 #include "pack.h"
259 #include "errmsg.h"
260 #include "drizzle_protocol.h"
261@@ -38,7 +40,7 @@
262 {
263 extern uint32_t global_thread_id;
264 }
265-
266+namespace po= boost::program_options;
267 using namespace drizzled;
268 using namespace std;
269
270@@ -812,12 +814,74 @@
271 drizzleclient_net_write(&net, buff, 5);
272 }
273
274-static ListenDrizzleProtocol *listen_obj= NULL;
275-
276 static int init(module::Context &context)
277 {
278- listen_obj= new ListenDrizzleProtocol("drizzle_protocol", false);
279- context.add(listen_obj);
280+ const module::option_map &vm= context.getOptions();
281+ if (vm.count("port"))
282+ {
283+ if (port > 65535)
284+ {
285+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of port\n"));
286+ exit(-1);
287+ }
288+ }
289+
290+ if (vm.count("connect-timeout"))
291+ {
292+ if (connect_timeout < 1 || connect_timeout > 300)
293+ {
294+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for connect_timeout\n"));
295+ exit(-1);
296+ }
297+ }
298+
299+ if (vm.count("read-timeout"))
300+ {
301+ if (read_timeout < 1 || read_timeout > 300)
302+ {
303+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read_timeout\n"));
304+ exit(-1);
305+ }
306+ }
307+
308+ if (vm.count("write-timeout"))
309+ {
310+ if (write_timeout < 1 || write_timeout > 300)
311+ {
312+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for write_timeout\n"));
313+ exit(-1);
314+ }
315+ }
316+
317+ if (vm.count("retry-count"))
318+ {
319+ if (retry_count < 1 || retry_count > 100)
320+ {
321+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for retry_count\n"));
322+ exit(-1);
323+ }
324+ }
325+
326+ if (vm.count("buffer-length"))
327+ {
328+ if (buffer_length < 1024 || buffer_length > 1024*1024)
329+ {
330+ errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for buffer_length\n"));
331+ exit(-1);
332+ }
333+ }
334+
335+ if (vm.count("bind-address"))
336+ {
337+ bind_address= strdup(vm["bind-address"].as<string>().c_str());
338+ }
339+
340+ else
341+ {
342+ bind_address= NULL;
343+ }
344+
345+ context.add(new ListenDrizzleProtocol("drizzle_protocol", false));
346 return 0;
347 }
348
349@@ -842,6 +906,34 @@
350 static DRIZZLE_SYSVAR_STR(bind_address, bind_address, PLUGIN_VAR_READONLY,
351 N_("Address to bind to."), NULL, NULL, NULL);
352
353+static void init_options(drizzled::module::option_context &context)
354+{
355+ context("port",
356+ po::value<uint32_t>(&port)->default_value(0),
357+ N_("Port number to use for connection or 0 for "
358+ "default to, in order of "
359+ "preference, drizzle.cnf, $DRIZZLE_TCP_PORT, "
360+ "built-in default (4427)."));
361+ context("connect-timeout",
362+ po::value<uint32_t>(&connect_timeout)->default_value(10),
363+ N_("Connect Timeout."));
364+ context("read-timeout",
365+ po::value<uint32_t>(&read_timeout)->default_value(30),
366+ N_("Read Timeout."));
367+ context("write-timeout",
368+ po::value<uint32_t>(&write_timeout)->default_value(60),
369+ N_("Write Timeout."));
370+ context("retry-count",
371+ po::value<uint32_t>(&retry_count)->default_value(10),
372+ N_("Retry Count."));
373+ context("buffer-length",
374+ po::value<uint32_t>(&buffer_length)->default_value(16384),
375+ N_("Buffer length."));
376+ context("bind-address",
377+ po::value<string>(),
378+ N_("Address to bind to."));
379+}
380+
381 static drizzle_sys_var* sys_variables[]= {
382 DRIZZLE_SYSVAR(port),
383 DRIZZLE_SYSVAR(connect_timeout),
384@@ -855,4 +947,4 @@
385
386 } /* namespace drizzle_protocol */
387
388-DRIZZLE_PLUGIN(drizzle_protocol::init, drizzle_protocol::sys_variables);
389+DRIZZLE_PLUGIN(drizzle_protocol::init, drizzle_protocol::sys_variables, drizzle_protocol::init_options);
390
391=== modified file 'plugin/errmsg_notify/errmsg_notify.cc'
392--- plugin/errmsg_notify/errmsg_notify.cc 2010-05-18 18:20:56 +0000
393+++ plugin/errmsg_notify/errmsg_notify.cc 2010-07-06 08:14:36 +0000
394@@ -103,4 +103,4 @@
395 return 0;
396 }
397
398-DRIZZLE_PLUGIN(plugin_init, NULL);
399+DRIZZLE_PLUGIN(plugin_init, NULL, NULL);
400
401=== modified file 'plugin/filtered_replicator/filtered_replicator.cc'
402--- plugin/filtered_replicator/filtered_replicator.cc 2010-05-18 18:20:56 +0000
403+++ plugin/filtered_replicator/filtered_replicator.cc 2010-07-06 08:14:36 +0000
404@@ -611,4 +611,4 @@
405 NULL
406 };
407
408-DRIZZLE_PLUGIN(init, filtered_replicator_system_variables);
409+DRIZZLE_PLUGIN(init, filtered_replicator_system_variables, NULL);
410
411=== modified file 'plugin/logging_stats/tests/t/command-master.opt'
412--- plugin/logging_stats/tests/t/command-master.opt 2010-04-09 01:58:28 +0000
413+++ plugin/logging_stats/tests/t/command-master.opt 2010-07-06 08:14:36 +0000
414@@ -1,1 +1,1 @@
415---plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=503
416+--plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=503
417
418=== modified file 'plugin/logging_stats/tests/t/max_session-master.opt'
419--- plugin/logging_stats/tests/t/max_session-master.opt 2010-04-09 01:58:28 +0000
420+++ plugin/logging_stats/tests/t/max_session-master.opt 2010-07-06 08:14:36 +0000
421@@ -1,1 +1,1 @@
422---plugin-add=logging_stats --logging_stats_enable --logging_stats_scoreboard_size=10 --logging_stats_bucket_count=5 --logging_stats_max_user_count=502
423+--plugin-add=logging_stats --logging-stats-enable --logging-stats-scoreboard-size=10 --logging-stats-bucket-count=5 --logging-stats-max-user-count=502
424
425=== modified file 'plugin/logging_stats/tests/t/max_user-master.opt'
426--- plugin/logging_stats/tests/t/max_user-master.opt 2010-04-09 01:58:28 +0000
427+++ plugin/logging_stats/tests/t/max_user-master.opt 2010-07-06 08:14:36 +0000
428@@ -1,1 +1,1 @@
429---plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=505
430+--plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=505
431
432=== modified file 'plugin/logging_stats/tests/t/slap-master.opt'
433--- plugin/logging_stats/tests/t/slap-master.opt 2010-04-09 01:58:28 +0000
434+++ plugin/logging_stats/tests/t/slap-master.opt 2010-07-06 08:14:36 +0000
435@@ -1,1 +1,1 @@
436---plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=501
437+--plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=501
438
439=== modified file 'plugin/rabbitmq/rabbitmq_log.cc'
440--- plugin/rabbitmq/rabbitmq_log.cc 2010-05-21 16:24:37 +0000
441+++ plugin/rabbitmq/rabbitmq_log.cc 2010-07-06 08:14:36 +0000
442@@ -263,5 +263,5 @@
443 NULL
444 };
445
446-DRIZZLE_PLUGIN(init, system_variables);
447+DRIZZLE_PLUGIN(init, system_variables, NULL);
448
449
450=== modified file 'plugin/rand_function/rand_function.cc'
451--- plugin/rand_function/rand_function.cc 2010-06-04 09:05:44 +0000
452+++ plugin/rand_function/rand_function.cc 2010-07-06 08:14:36 +0000
453@@ -126,4 +126,4 @@
454 return 0;
455 }
456
457-DRIZZLE_PLUGIN(initialize, NULL);
458+DRIZZLE_PLUGIN(initialize, NULL, NULL);
459
460=== modified file 'plugin/replication_dictionary/module.cc'
461--- plugin/replication_dictionary/module.cc 2010-05-18 18:20:56 +0000
462+++ plugin/replication_dictionary/module.cc 2010-07-06 08:14:36 +0000
463@@ -53,4 +53,4 @@
464 }
465 }
466
467-DRIZZLE_PLUGIN(init, NULL);
468+DRIZZLE_PLUGIN(init, NULL, NULL);
469
470=== modified file 'plugin/rot13/rot13.cc'
471--- plugin/rot13/rot13.cc 2010-05-18 18:20:56 +0000
472+++ plugin/rot13/rot13.cc 2010-07-06 08:14:36 +0000
473@@ -93,4 +93,4 @@
474
475 } /* namespace rot13 */
476
477-DRIZZLE_PLUGIN(rot13::init, NULL);
478+DRIZZLE_PLUGIN(rot13::init, NULL, NULL);
479
480=== modified file 'plugin/simple_user_policy/module.cc'
481--- plugin/simple_user_policy/module.cc 2010-05-18 18:20:56 +0000
482+++ plugin/simple_user_policy/module.cc 2010-07-06 08:14:36 +0000
483@@ -36,4 +36,4 @@
484
485 } /* namespace simple_user_policy */
486
487-DRIZZLE_PLUGIN(simple_user_policy::init, NULL);
488+DRIZZLE_PLUGIN(simple_user_policy::init, NULL, NULL);
489
490=== modified file 'plugin/sleep/sleep.cc'
491--- plugin/sleep/sleep.cc 2010-05-18 18:20:56 +0000
492+++ plugin/sleep/sleep.cc 2010-07-06 08:14:36 +0000
493@@ -136,4 +136,4 @@
494 return 0;
495 }
496
497-DRIZZLE_PLUGIN(sleep_plugin_init, NULL);
498+DRIZZLE_PLUGIN(sleep_plugin_init, NULL, NULL);
499
500=== modified file 'plugin/syslog/module.cc'
501--- plugin/syslog/module.cc 2010-06-24 03:15:21 +0000
502+++ plugin/syslog/module.cc 2010-07-06 08:14:36 +0000
503@@ -157,4 +157,4 @@
504
505 } // namespace syslog_module
506
507-DRIZZLE_PLUGIN(syslog_module::init, syslog_module::system_variables);
508+DRIZZLE_PLUGIN(syslog_module::init, syslog_module::system_variables, NULL);
509
510=== modified file 'plugin/transaction_log/module.cc'
511--- plugin/transaction_log/module.cc 2010-05-18 18:20:56 +0000
512+++ plugin/transaction_log/module.cc 2010-07-06 08:14:36 +0000
513@@ -292,4 +292,4 @@
514 NULL
515 };
516
517-DRIZZLE_PLUGIN(init, sys_variables);
518+DRIZZLE_PLUGIN(init, sys_variables, NULL);
519
520=== modified file 'plugin/version/versionudf.cc'
521--- plugin/version/versionudf.cc 2010-05-18 18:20:56 +0000
522+++ plugin/version/versionudf.cc 2010-07-06 08:14:36 +0000
523@@ -60,4 +60,4 @@
524 return 0;
525 }
526
527-DRIZZLE_PLUGIN(initialize, NULL);
528+DRIZZLE_PLUGIN(initialize, NULL, NULL);
529
530=== modified file 'tests/test-run.pl'
531--- tests/test-run.pl 2010-06-19 19:28:47 +0000
532+++ tests/test-run.pl 2010-07-06 08:14:36 +0000
533@@ -1497,7 +1497,7 @@
534 $ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'};
535 $ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'};
536 $ENV{'MC_PORT'}= $opt_memc_myport;
537- $ENV{'DRIZZLE_TCP_PORT'}= $mysqld_variables{'drizzle-protocol-port'};
538+ $ENV{'DRIZZLE_TCP_PORT'}= $mysqld_variables{'drizzle-protocol.port'};
539
540 $ENV{'MTR_BUILD_THREAD'}= $opt_mtr_build_thread;
541
542@@ -2574,7 +2574,7 @@
543 mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix,
544 $mysqld->{'port'});
545
546- mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix,
547+ mtr_add_arg($args, "%s--drizzle-protocol.port=%d", $prefix,
548 $mysqld->{'secondary_port'});
549
550 mtr_add_arg($args, "%s--datadir=%s", $prefix,
551@@ -2739,6 +2739,7 @@
552
553 if ( defined $exe )
554 {
555+ mtr_verbose("running Drizzle with: $exe @$args");
556 $pid= mtr_spawn($exe, $args, "",
557 $mysqld->{'path_myerr'},
558 $mysqld->{'path_myerr'},