Merge lp:~vjsamuel/drizzle/rplugin-mysql-protocol into lp:~drizzle-trunk/drizzle/development
- rplugin-mysql-protocol
- Merge into development
Proposed by
Vijay Samuel
Status: | Merged |
---|---|
Merged at revision: | 1645 |
Proposed branch: | lp:~vjsamuel/drizzle/rplugin-mysql-protocol |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: |
794 lines (+293/-92) 31 files modified
drizzled/module/loader.cc (+27/-27) 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 (+3/-3) 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/mysql_protocol/mysql_protocol.cc (+98/-4) 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 (+5/-4) |
To merge this branch: | bzr merge lp:~vjsamuel/drizzle/rplugin-mysql-protocol |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Monty Taylor | Approve | ||
Brian Aker | Pending | ||
Vijay Samuel | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'drizzled/module/loader.cc' | |||
2 | --- drizzled/module/loader.cc 2010-06-23 20:11:47 +0000 | |||
3 | +++ drizzled/module/loader.cc 2010-07-06 15:38:27 +0000 | |||
4 | @@ -1686,33 +1686,33 @@ | |||
5 | 1686 | long_options.add(module_options); | 1686 | long_options.add(module_options); |
6 | 1687 | 1687 | ||
7 | 1688 | } | 1688 | } |
35 | 1689 | else | 1689 | |
36 | 1690 | { | 1690 | for (opt= test_module->getManifest().system_vars; opt && *opt; opt++) |
37 | 1691 | 1691 | { | |
38 | 1692 | for (opt= test_module->getManifest().system_vars; opt && *opt; opt++) | 1692 | count++; |
39 | 1693 | { | 1693 | } |
40 | 1694 | count++; | 1694 | |
41 | 1695 | } | 1695 | if (count > EXTRA_OPTIONS || (*argc > 1)) |
42 | 1696 | 1696 | { | |
43 | 1697 | if (count > EXTRA_OPTIONS || (*argc > 1)) | 1697 | if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count))) |
44 | 1698 | { | 1698 | { |
45 | 1699 | if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count))) | 1699 | errmsg_printf(ERRMSG_LVL_ERROR, |
46 | 1700 | { | 1700 | _("Out of memory for plugin '%s'."), |
47 | 1701 | errmsg_printf(ERRMSG_LVL_ERROR, | 1701 | test_module->getName().c_str()); |
48 | 1702 | _("Out of memory for plugin '%s'."), | 1702 | return(-1); |
49 | 1703 | test_module->getName().c_str()); | 1703 | } |
50 | 1704 | return(-1); | 1704 | memset(opts, 0, sizeof(option) * count); |
51 | 1705 | } | 1705 | |
52 | 1706 | memset(opts, 0, sizeof(option) * count); | 1706 | if (construct_options(module_root, test_module, opts)) |
53 | 1707 | 1707 | { | |
54 | 1708 | if (construct_options(module_root, test_module, opts)) | 1708 | errmsg_printf(ERRMSG_LVL_ERROR, |
55 | 1709 | { | 1709 | _("Bad options for plugin '%s'."), |
56 | 1710 | errmsg_printf(ERRMSG_LVL_ERROR, | 1710 | test_module->getName().c_str()); |
57 | 1711 | _("Bad options for plugin '%s'."), | 1711 | return(-1); |
58 | 1712 | test_module->getName().c_str()); | 1712 | } |
59 | 1713 | return(-1); | 1713 | |
60 | 1714 | } | 1714 | if (test_module->getManifest().init_options == NULL) |
61 | 1715 | 1715 | { | |
62 | 1716 | error= handle_options(argc, &argv, opts, get_one_plugin_option); | 1716 | error= handle_options(argc, &argv, opts, get_one_plugin_option); |
63 | 1717 | (*argc)++; /* add back one for the program name */ | 1717 | (*argc)++; /* add back one for the program name */ |
64 | 1718 | 1718 | ||
65 | 1719 | 1719 | ||
66 | === modified file 'drizzled/module/option_context.cc' | |||
67 | --- drizzled/module/option_context.cc 2010-06-16 22:09:59 +0000 | |||
68 | +++ drizzled/module/option_context.cc 2010-07-06 15:38:27 +0000 | |||
69 | @@ -36,7 +36,7 @@ | |||
70 | 36 | option_context& option_context::operator()(const char* name, | 36 | option_context& option_context::operator()(const char* name, |
71 | 37 | const char* description) | 37 | const char* description) |
72 | 38 | { | 38 | { |
74 | 39 | const std::string new_name(prepend_name(name)); | 39 | const std::string new_name(prepend_name(module_name, name)); |
75 | 40 | po_options(new_name.c_str(), description); | 40 | po_options(new_name.c_str(), description); |
76 | 41 | return *this; | 41 | return *this; |
77 | 42 | } | 42 | } |
78 | @@ -45,7 +45,7 @@ | |||
79 | 45 | option_context& option_context::operator()(const char* name, | 45 | option_context& option_context::operator()(const char* name, |
80 | 46 | const po::value_semantic* s) | 46 | const po::value_semantic* s) |
81 | 47 | { | 47 | { |
83 | 48 | const std::string new_name(prepend_name(name)); | 48 | const std::string new_name(prepend_name(module_name, name)); |
84 | 49 | po_options(new_name.c_str(), s); | 49 | po_options(new_name.c_str(), s); |
85 | 50 | return *this; | 50 | return *this; |
86 | 51 | } | 51 | } |
87 | @@ -55,11 +55,40 @@ | |||
88 | 55 | const po::value_semantic* s, | 55 | const po::value_semantic* s, |
89 | 56 | const char* description) | 56 | const char* description) |
90 | 57 | { | 57 | { |
92 | 58 | const std::string new_name(prepend_name(name)); | 58 | const std::string new_name(prepend_name(module_name, name)); |
93 | 59 | po_options(new_name.c_str(), s, description); | 59 | po_options(new_name.c_str(), s, description); |
94 | 60 | return *this; | 60 | return *this; |
95 | 61 | } | 61 | } |
96 | 62 | 62 | ||
97 | 63 | namespace | ||
98 | 64 | { | ||
99 | 65 | |||
100 | 66 | class SwapUnderscores | ||
101 | 67 | { | ||
102 | 68 | public: | ||
103 | 69 | char operator()(char a) const | ||
104 | 70 | { | ||
105 | 71 | if (a == '_') | ||
106 | 72 | return '-'; | ||
107 | 73 | return a; | ||
108 | 74 | } | ||
109 | 75 | }; | ||
110 | 76 | |||
111 | 77 | } /* namespace */ | ||
112 | 78 | |||
113 | 79 | /* | ||
114 | 80 | * Private methods. | ||
115 | 81 | */ | ||
116 | 82 | std::string option_context::prepend_name(std::string module_name, | ||
117 | 83 | const char *name_in) | ||
118 | 84 | { | ||
119 | 85 | module_name.push_back('.'); | ||
120 | 86 | std::transform(module_name.begin(), module_name.end(), | ||
121 | 87 | module_name.begin(), SwapUnderscores()); | ||
122 | 88 | module_name.append(name_in); | ||
123 | 89 | return module_name; | ||
124 | 90 | } | ||
125 | 91 | |||
126 | 63 | 92 | ||
127 | 64 | } /* namespace module */ | 93 | } /* namespace module */ |
128 | 65 | } /* namespace drizzled */ | 94 | } /* namespace drizzled */ |
129 | 66 | 95 | ||
130 | === modified file 'drizzled/module/option_context.h' | |||
131 | --- drizzled/module/option_context.h 2010-06-16 22:09:59 +0000 | |||
132 | +++ drizzled/module/option_context.h 2010-07-06 15:38:27 +0000 | |||
133 | @@ -47,8 +47,6 @@ | |||
134 | 47 | const std::string &module_name; | 47 | const std::string &module_name; |
135 | 48 | po::options_description_easy_init po_options; | 48 | po::options_description_easy_init po_options; |
136 | 49 | 49 | ||
137 | 50 | std::string prepend_name(const char *name) const; | ||
138 | 51 | |||
139 | 52 | public: | 50 | public: |
140 | 53 | 51 | ||
141 | 54 | option_context(const std::string &module_name_in, | 52 | option_context(const std::string &module_name_in, |
142 | @@ -64,6 +62,9 @@ | |||
143 | 64 | const po::value_semantic* s, | 62 | const po::value_semantic* s, |
144 | 65 | const char* description); | 63 | const char* description); |
145 | 66 | 64 | ||
146 | 65 | static std::string prepend_name(std::string module_name_in, | ||
147 | 66 | const char *name); | ||
148 | 67 | |||
149 | 67 | private: | 68 | private: |
150 | 68 | 69 | ||
151 | 69 | /** | 70 | /** |
152 | @@ -82,17 +83,6 @@ | |||
153 | 82 | option_context& operator=(const option_context &); | 83 | option_context& operator=(const option_context &); |
154 | 83 | }; | 84 | }; |
155 | 84 | 85 | ||
156 | 85 | /* | ||
157 | 86 | * Private methods. | ||
158 | 87 | */ | ||
159 | 88 | inline std::string option_context::prepend_name(const char *name_in) const | ||
160 | 89 | { | ||
161 | 90 | std::string new_name(module_name); | ||
162 | 91 | new_name.push_back('.'); | ||
163 | 92 | new_name.append(name_in); | ||
164 | 93 | return new_name; | ||
165 | 94 | } | ||
166 | 95 | |||
167 | 96 | } /* namespace module */ | 86 | } /* namespace module */ |
168 | 97 | } /* namespace drizzled */ | 87 | } /* namespace drizzled */ |
169 | 98 | 88 | ||
170 | 99 | 89 | ||
171 | === modified file 'drizzled/module/option_map.h' | |||
172 | --- drizzled/module/option_map.h 2010-06-20 19:05:15 +0000 | |||
173 | +++ drizzled/module/option_map.h 2010-07-06 15:38:27 +0000 | |||
174 | @@ -26,6 +26,7 @@ | |||
175 | 26 | #define DRIZZLED_MODULE_OPTION_MAP_H | 26 | #define DRIZZLED_MODULE_OPTION_MAP_H |
176 | 27 | 27 | ||
177 | 28 | #include "drizzled/visibility.h" | 28 | #include "drizzled/visibility.h" |
178 | 29 | #include "drizzled/module/option_context.h" | ||
179 | 29 | 30 | ||
180 | 30 | #include <boost/program_options.hpp> | 31 | #include <boost/program_options.hpp> |
181 | 31 | 32 | ||
182 | @@ -53,18 +54,12 @@ | |||
183 | 53 | 54 | ||
184 | 54 | const boost::program_options::variable_value& operator[](const std::string &name_in) const | 55 | const boost::program_options::variable_value& operator[](const std::string &name_in) const |
185 | 55 | { | 56 | { |
190 | 56 | std::string new_name(module_name); | 57 | return vm[option_context::prepend_name(module_name, name_in.c_str())]; |
187 | 57 | new_name.push_back('.'); | ||
188 | 58 | new_name.append(name_in); | ||
189 | 59 | return vm[new_name]; | ||
191 | 60 | } | 58 | } |
192 | 61 | 59 | ||
193 | 62 | size_t count(const std::string &name_in) const | 60 | size_t count(const std::string &name_in) const |
194 | 63 | { | 61 | { |
199 | 64 | std::string new_name(module_name); | 62 | return vm.count(option_context::prepend_name(module_name, name_in.c_str())); |
196 | 65 | new_name.push_back('.'); | ||
197 | 66 | new_name.append(name_in); | ||
198 | 67 | return vm.count(new_name); | ||
200 | 68 | } | 63 | } |
201 | 69 | 64 | ||
202 | 70 | private: | 65 | private: |
203 | 71 | 66 | ||
204 | === modified file 'drizzled/option.cc' | |||
205 | --- drizzled/option.cc 2010-04-23 21:37:29 +0000 | |||
206 | +++ drizzled/option.cc 2010-07-06 15:38:27 +0000 | |||
207 | @@ -562,7 +562,7 @@ | |||
208 | 562 | { | 562 | { |
209 | 563 | char *ptr, *end; | 563 | char *ptr, *end; |
210 | 564 | 564 | ||
212 | 565 | ptr= strrchr(cur_arg + 1, '.'); /* Skip the first character */ | 565 | ptr= NULL; //Options with '.' are now supported. |
213 | 566 | end= strrchr(cur_arg, '='); | 566 | end= strrchr(cur_arg, '='); |
214 | 567 | 567 | ||
215 | 568 | /* | 568 | /* |
216 | 569 | 569 | ||
217 | === modified file 'drizzled/plugin.h' | |||
218 | --- drizzled/plugin.h 2010-06-21 04:53:35 +0000 | |||
219 | +++ drizzled/plugin.h 2010-07-06 15:38:27 +0000 | |||
220 | @@ -68,7 +68,7 @@ | |||
221 | 68 | 68 | ||
222 | 69 | 69 | ||
223 | 70 | #define DRIZZLE_DECLARE_PLUGIN_END | 70 | #define DRIZZLE_DECLARE_PLUGIN_END |
225 | 71 | #define DRIZZLE_PLUGIN(init,system) \ | 71 | #define DRIZZLE_PLUGIN(init,system,options) \ |
226 | 72 | DRIZZLE_DECLARE_PLUGIN \ | 72 | DRIZZLE_DECLARE_PLUGIN \ |
227 | 73 | { \ | 73 | { \ |
228 | 74 | DRIZZLE_VERSION_ID, \ | 74 | DRIZZLE_VERSION_ID, \ |
229 | @@ -77,7 +77,7 @@ | |||
230 | 77 | STRINGIFY_ARG(PANDORA_MODULE_AUTHOR), \ | 77 | STRINGIFY_ARG(PANDORA_MODULE_AUTHOR), \ |
231 | 78 | STRINGIFY_ARG(PANDORA_MODULE_TITLE), \ | 78 | STRINGIFY_ARG(PANDORA_MODULE_TITLE), \ |
232 | 79 | PANDORA_MODULE_LICENSE, \ | 79 | PANDORA_MODULE_LICENSE, \ |
234 | 80 | init, system, NULL \ | 80 | init, system, options \ |
235 | 81 | } | 81 | } |
236 | 82 | 82 | ||
237 | 83 | 83 | ||
238 | @@ -189,7 +189,7 @@ | |||
239 | 189 | mysql_var_check_func check; \ | 189 | mysql_var_check_func check; \ |
240 | 190 | mysql_var_update_func update | 190 | mysql_var_update_func update |
241 | 191 | 191 | ||
243 | 192 | #define DRIZZLE_SYSVAR_NAME(name) mysql_sysvar_ ## name | 192 | #define DRIZZLE_SYSVAR_NAME(name) drizzle_sysvar_ ## name |
244 | 193 | #define DRIZZLE_SYSVAR(name) \ | 193 | #define DRIZZLE_SYSVAR(name) \ |
245 | 194 | ((drizzle_sys_var *)(&(DRIZZLE_SYSVAR_NAME(name)))) | 194 | ((drizzle_sys_var *)(&(DRIZZLE_SYSVAR_NAME(name)))) |
246 | 195 | 195 | ||
247 | 196 | 196 | ||
248 | === modified file 'plugin/auth_file/auth_file.cc' | |||
249 | --- plugin/auth_file/auth_file.cc 2010-05-18 18:20:56 +0000 | |||
250 | +++ plugin/auth_file/auth_file.cc 2010-07-06 15:38:27 +0000 | |||
251 | @@ -237,4 +237,4 @@ | |||
252 | 237 | 237 | ||
253 | 238 | } /* namespace auth_file */ | 238 | } /* namespace auth_file */ |
254 | 239 | 239 | ||
256 | 240 | DRIZZLE_PLUGIN(auth_file::init, auth_file::sys_variables); | 240 | DRIZZLE_PLUGIN(auth_file::init, auth_file::sys_variables, NULL); |
257 | 241 | 241 | ||
258 | === modified file 'plugin/auth_ldap/auth_ldap.cc' | |||
259 | --- plugin/auth_ldap/auth_ldap.cc 2010-05-18 18:20:56 +0000 | |||
260 | +++ plugin/auth_ldap/auth_ldap.cc 2010-07-06 15:38:27 +0000 | |||
261 | @@ -490,4 +490,4 @@ | |||
262 | 490 | 490 | ||
263 | 491 | } /* namespace auth_ldap */ | 491 | } /* namespace auth_ldap */ |
264 | 492 | 492 | ||
266 | 493 | DRIZZLE_PLUGIN(auth_ldap::init, auth_ldap::sys_variables); | 493 | DRIZZLE_PLUGIN(auth_ldap::init, auth_ldap::sys_variables, NULL); |
267 | 494 | 494 | ||
268 | === modified file 'plugin/auth_ldap/test_ldap.sh' | |||
269 | --- plugin/auth_ldap/test_ldap.sh 2010-04-27 20:36:41 +0000 | |||
270 | +++ plugin/auth_ldap/test_ldap.sh 2010-07-06 15:38:27 +0000 | |||
271 | @@ -19,7 +19,7 @@ | |||
272 | 19 | --auth-ldap-base-dn="dc=drizzle,dc=org" \ | 19 | --auth-ldap-base-dn="dc=drizzle,dc=org" \ |
273 | 20 | --auth-ldap-cache-timeout=1 \ | 20 | --auth-ldap-cache-timeout=1 \ |
274 | 21 | --mysql-protocol-port=12345 \ | 21 | --mysql-protocol-port=12345 \ |
276 | 22 | --drizzle-protocol-port=12346 \ | 22 | --drizzle-protocol.port=12346 \ |
277 | 23 | --pid-file=pid & | 23 | --pid-file=pid & |
278 | 24 | 24 | ||
279 | 25 | sleep 3 | 25 | sleep 3 |
280 | 26 | 26 | ||
281 | === modified file 'plugin/auth_test/auth_test.cc' | |||
282 | --- plugin/auth_test/auth_test.cc 2010-05-18 18:20:56 +0000 | |||
283 | +++ plugin/auth_test/auth_test.cc 2010-07-06 15:38:27 +0000 | |||
284 | @@ -106,4 +106,4 @@ | |||
285 | 106 | 106 | ||
286 | 107 | } /* namespace auth_test */ | 107 | } /* namespace auth_test */ |
287 | 108 | 108 | ||
289 | 109 | DRIZZLE_PLUGIN(auth_test::init, NULL); | 109 | DRIZZLE_PLUGIN(auth_test::init, NULL, NULL); |
290 | 110 | 110 | ||
291 | === modified file 'plugin/blitzdb/ha_blitz.cc' | |||
292 | --- plugin/blitzdb/ha_blitz.cc 2010-06-29 21:22:35 +0000 | |||
293 | +++ plugin/blitzdb/ha_blitz.cc 2010-07-06 15:38:27 +0000 | |||
294 | @@ -1457,4 +1457,4 @@ | |||
295 | 1457 | return pos + skip_len + sizeof(uint16_t); | 1457 | return pos + skip_len + sizeof(uint16_t); |
296 | 1458 | } | 1458 | } |
297 | 1459 | 1459 | ||
299 | 1460 | DRIZZLE_PLUGIN(blitz_init, NULL); | 1460 | DRIZZLE_PLUGIN(blitz_init, NULL, NULL); |
300 | 1461 | 1461 | ||
301 | === modified file 'plugin/crc32/crc32udf.cc' | |||
302 | --- plugin/crc32/crc32udf.cc 2010-05-18 18:20:56 +0000 | |||
303 | +++ plugin/crc32/crc32udf.cc 2010-07-06 15:38:27 +0000 | |||
304 | @@ -78,4 +78,4 @@ | |||
305 | 78 | return 0; | 78 | return 0; |
306 | 79 | } | 79 | } |
307 | 80 | 80 | ||
309 | 81 | DRIZZLE_PLUGIN(initialize, NULL); | 81 | DRIZZLE_PLUGIN(initialize, NULL, NULL); |
310 | 82 | 82 | ||
311 | === modified file 'plugin/default_replicator/default_replicator.cc' | |||
312 | --- plugin/default_replicator/default_replicator.cc 2010-05-18 18:20:56 +0000 | |||
313 | +++ plugin/default_replicator/default_replicator.cc 2010-07-06 15:38:27 +0000 | |||
314 | @@ -66,4 +66,4 @@ | |||
315 | 66 | return 0; | 66 | return 0; |
316 | 67 | } | 67 | } |
317 | 68 | 68 | ||
319 | 69 | DRIZZLE_PLUGIN(init, NULL); | 69 | DRIZZLE_PLUGIN(init, NULL, NULL); |
320 | 70 | 70 | ||
321 | === modified file 'plugin/drizzle_protocol/drizzle_protocol.cc' | |||
322 | --- plugin/drizzle_protocol/drizzle_protocol.cc 2010-05-18 18:20:56 +0000 | |||
323 | +++ plugin/drizzle_protocol/drizzle_protocol.cc 2010-07-06 15:38:27 +0000 | |||
324 | @@ -26,7 +26,9 @@ | |||
325 | 26 | #include "drizzled/internal/my_sys.h" | 26 | #include "drizzled/internal/my_sys.h" |
326 | 27 | #include "drizzled/internal/m_string.h" | 27 | #include "drizzled/internal/m_string.h" |
327 | 28 | #include <algorithm> | 28 | #include <algorithm> |
329 | 29 | 29 | #include <iostream> | |
330 | 30 | #include <boost/program_options.hpp> | ||
331 | 31 | #include <drizzled/module/option_map.h> | ||
332 | 30 | #include "pack.h" | 32 | #include "pack.h" |
333 | 31 | #include "errmsg.h" | 33 | #include "errmsg.h" |
334 | 32 | #include "drizzle_protocol.h" | 34 | #include "drizzle_protocol.h" |
335 | @@ -38,7 +40,7 @@ | |||
336 | 38 | { | 40 | { |
337 | 39 | extern uint32_t global_thread_id; | 41 | extern uint32_t global_thread_id; |
338 | 40 | } | 42 | } |
340 | 41 | 43 | namespace po= boost::program_options; | |
341 | 42 | using namespace drizzled; | 44 | using namespace drizzled; |
342 | 43 | using namespace std; | 45 | using namespace std; |
343 | 44 | 46 | ||
344 | @@ -812,12 +814,74 @@ | |||
345 | 812 | drizzleclient_net_write(&net, buff, 5); | 814 | drizzleclient_net_write(&net, buff, 5); |
346 | 813 | } | 815 | } |
347 | 814 | 816 | ||
348 | 815 | static ListenDrizzleProtocol *listen_obj= NULL; | ||
349 | 816 | |||
350 | 817 | static int init(module::Context &context) | 817 | static int init(module::Context &context) |
351 | 818 | { | 818 | { |
354 | 819 | listen_obj= new ListenDrizzleProtocol("drizzle_protocol", false); | 819 | const module::option_map &vm= context.getOptions(); |
355 | 820 | context.add(listen_obj); | 820 | if (vm.count("port")) |
356 | 821 | { | ||
357 | 822 | if (port > 65535) | ||
358 | 823 | { | ||
359 | 824 | cout << "Invalid value of port"; | ||
360 | 825 | exit(-1); | ||
361 | 826 | } | ||
362 | 827 | } | ||
363 | 828 | |||
364 | 829 | if (vm.count("connect-timeout")) | ||
365 | 830 | { | ||
366 | 831 | if (connect_timeout < 1 || connect_timeout > 300) | ||
367 | 832 | { | ||
368 | 833 | cout << "Invalid value for connect_timeout"; | ||
369 | 834 | exit(-1); | ||
370 | 835 | } | ||
371 | 836 | } | ||
372 | 837 | |||
373 | 838 | if (vm.count("read-timeout")) | ||
374 | 839 | { | ||
375 | 840 | if (read_timeout < 1 || read_timeout > 300) | ||
376 | 841 | { | ||
377 | 842 | cout << "Invalid value for read_timeout"; | ||
378 | 843 | exit(-1); | ||
379 | 844 | } | ||
380 | 845 | } | ||
381 | 846 | |||
382 | 847 | if (vm.count("write-timeout")) | ||
383 | 848 | { | ||
384 | 849 | if (write_timeout < 1 || write_timeout > 300) | ||
385 | 850 | { | ||
386 | 851 | cout << "Invalid value for write_timeout"; | ||
387 | 852 | exit(-1); | ||
388 | 853 | } | ||
389 | 854 | } | ||
390 | 855 | |||
391 | 856 | if (vm.count("retry-count")) | ||
392 | 857 | { | ||
393 | 858 | if (retry_count < 1 || retry_count > 100) | ||
394 | 859 | { | ||
395 | 860 | cout << "Invalid value for retry_count"; | ||
396 | 861 | exit(-1); | ||
397 | 862 | } | ||
398 | 863 | } | ||
399 | 864 | |||
400 | 865 | if (vm.count("buffer-length")) | ||
401 | 866 | { | ||
402 | 867 | if (buffer_length < 1024 || buffer_length > 1024*1024) | ||
403 | 868 | { | ||
404 | 869 | cout << "Invalid value for buffer_length"; | ||
405 | 870 | exit(-1); | ||
406 | 871 | } | ||
407 | 872 | } | ||
408 | 873 | |||
409 | 874 | if (vm.count("bind-address")) | ||
410 | 875 | { | ||
411 | 876 | bind_address= strdup(vm["bind-address"].as<string>().c_str()); | ||
412 | 877 | } | ||
413 | 878 | |||
414 | 879 | else | ||
415 | 880 | { | ||
416 | 881 | bind_address= NULL; | ||
417 | 882 | } | ||
418 | 883 | |||
419 | 884 | context.add(new ListenDrizzleProtocol("drizzle_protocol", false)); | ||
420 | 821 | return 0; | 885 | return 0; |
421 | 822 | } | 886 | } |
422 | 823 | 887 | ||
423 | @@ -842,6 +906,34 @@ | |||
424 | 842 | static DRIZZLE_SYSVAR_STR(bind_address, bind_address, PLUGIN_VAR_READONLY, | 906 | static DRIZZLE_SYSVAR_STR(bind_address, bind_address, PLUGIN_VAR_READONLY, |
425 | 843 | N_("Address to bind to."), NULL, NULL, NULL); | 907 | N_("Address to bind to."), NULL, NULL, NULL); |
426 | 844 | 908 | ||
427 | 909 | static void init_options(drizzled::module::option_context &context) | ||
428 | 910 | { | ||
429 | 911 | context("port", | ||
430 | 912 | po::value<uint32_t>(&port)->default_value(0), | ||
431 | 913 | N_("Port number to use for connection or 0 for " | ||
432 | 914 | "default to, in order of " | ||
433 | 915 | "preference, drizzle.cnf, $DRIZZLE_TCP_PORT, " | ||
434 | 916 | "built-in default (4427).")); | ||
435 | 917 | context("connect-timeout", | ||
436 | 918 | po::value<uint32_t>(&connect_timeout)->default_value(10), | ||
437 | 919 | N_("Connect Timeout.")); | ||
438 | 920 | context("read-timeout", | ||
439 | 921 | po::value<uint32_t>(&read_timeout)->default_value(30), | ||
440 | 922 | N_("Read Timeout.")); | ||
441 | 923 | context("write-timeout", | ||
442 | 924 | po::value<uint32_t>(&write_timeout)->default_value(60), | ||
443 | 925 | N_("Write Timeout.")); | ||
444 | 926 | context("retry-count", | ||
445 | 927 | po::value<uint32_t>(&retry_count)->default_value(10), | ||
446 | 928 | N_("Retry Count.")); | ||
447 | 929 | context("buffer-length", | ||
448 | 930 | po::value<uint32_t>(&buffer_length)->default_value(16384), | ||
449 | 931 | N_("Buffer length.")); | ||
450 | 932 | context("bind-address", | ||
451 | 933 | po::value<string>(), | ||
452 | 934 | N_("Address to bind to.")); | ||
453 | 935 | } | ||
454 | 936 | |||
455 | 845 | static drizzle_sys_var* sys_variables[]= { | 937 | static drizzle_sys_var* sys_variables[]= { |
456 | 846 | DRIZZLE_SYSVAR(port), | 938 | DRIZZLE_SYSVAR(port), |
457 | 847 | DRIZZLE_SYSVAR(connect_timeout), | 939 | DRIZZLE_SYSVAR(connect_timeout), |
458 | @@ -855,4 +947,4 @@ | |||
459 | 855 | 947 | ||
460 | 856 | } /* namespace drizzle_protocol */ | 948 | } /* namespace drizzle_protocol */ |
461 | 857 | 949 | ||
463 | 858 | DRIZZLE_PLUGIN(drizzle_protocol::init, drizzle_protocol::sys_variables); | 950 | DRIZZLE_PLUGIN(drizzle_protocol::init, drizzle_protocol::sys_variables, drizzle_protocol::init_options); |
464 | 859 | 951 | ||
465 | === modified file 'plugin/errmsg_notify/errmsg_notify.cc' | |||
466 | --- plugin/errmsg_notify/errmsg_notify.cc 2010-05-18 18:20:56 +0000 | |||
467 | +++ plugin/errmsg_notify/errmsg_notify.cc 2010-07-06 15:38:27 +0000 | |||
468 | @@ -103,4 +103,4 @@ | |||
469 | 103 | return 0; | 103 | return 0; |
470 | 104 | } | 104 | } |
471 | 105 | 105 | ||
473 | 106 | DRIZZLE_PLUGIN(plugin_init, NULL); | 106 | DRIZZLE_PLUGIN(plugin_init, NULL, NULL); |
474 | 107 | 107 | ||
475 | === modified file 'plugin/filtered_replicator/filtered_replicator.cc' | |||
476 | --- plugin/filtered_replicator/filtered_replicator.cc 2010-05-18 18:20:56 +0000 | |||
477 | +++ plugin/filtered_replicator/filtered_replicator.cc 2010-07-06 15:38:27 +0000 | |||
478 | @@ -611,4 +611,4 @@ | |||
479 | 611 | NULL | 611 | NULL |
480 | 612 | }; | 612 | }; |
481 | 613 | 613 | ||
483 | 614 | DRIZZLE_PLUGIN(init, filtered_replicator_system_variables); | 614 | DRIZZLE_PLUGIN(init, filtered_replicator_system_variables, NULL); |
484 | 615 | 615 | ||
485 | === modified file 'plugin/logging_stats/tests/t/command-master.opt' | |||
486 | --- plugin/logging_stats/tests/t/command-master.opt 2010-04-09 01:58:28 +0000 | |||
487 | +++ plugin/logging_stats/tests/t/command-master.opt 2010-07-06 15:38:27 +0000 | |||
488 | @@ -1,1 +1,1 @@ | |||
490 | 1 | --plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=503 | 1 | --plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=503 |
491 | 2 | 2 | ||
492 | === modified file 'plugin/logging_stats/tests/t/max_session-master.opt' | |||
493 | --- plugin/logging_stats/tests/t/max_session-master.opt 2010-04-09 01:58:28 +0000 | |||
494 | +++ plugin/logging_stats/tests/t/max_session-master.opt 2010-07-06 15:38:27 +0000 | |||
495 | @@ -1,1 +1,1 @@ | |||
497 | 1 | --plugin-add=logging_stats --logging_stats_enable --logging_stats_scoreboard_size=10 --logging_stats_bucket_count=5 --logging_stats_max_user_count=502 | 1 | --plugin-add=logging_stats --logging-stats-enable --logging-stats-scoreboard-size=10 --logging-stats-bucket-count=5 --logging-stats-max-user-count=502 |
498 | 2 | 2 | ||
499 | === modified file 'plugin/logging_stats/tests/t/max_user-master.opt' | |||
500 | --- plugin/logging_stats/tests/t/max_user-master.opt 2010-04-09 01:58:28 +0000 | |||
501 | +++ plugin/logging_stats/tests/t/max_user-master.opt 2010-07-06 15:38:27 +0000 | |||
502 | @@ -1,1 +1,1 @@ | |||
504 | 1 | --plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=505 | 1 | --plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=505 |
505 | 2 | 2 | ||
506 | === modified file 'plugin/logging_stats/tests/t/slap-master.opt' | |||
507 | --- plugin/logging_stats/tests/t/slap-master.opt 2010-04-09 01:58:28 +0000 | |||
508 | +++ plugin/logging_stats/tests/t/slap-master.opt 2010-07-06 15:38:27 +0000 | |||
509 | @@ -1,1 +1,1 @@ | |||
511 | 1 | --plugin-add=logging_stats --logging_stats_enable --logging_stats_max_user_count=501 | 1 | --plugin-add=logging_stats --logging-stats-enable --logging-stats-max-user-count=501 |
512 | 2 | 2 | ||
513 | === modified file 'plugin/mysql_protocol/mysql_protocol.cc' | |||
514 | --- plugin/mysql_protocol/mysql_protocol.cc 2010-05-18 18:20:56 +0000 | |||
515 | +++ plugin/mysql_protocol/mysql_protocol.cc 2010-07-06 15:38:27 +0000 | |||
516 | @@ -25,12 +25,14 @@ | |||
517 | 25 | #include <drizzled/session.h> | 25 | #include <drizzled/session.h> |
518 | 26 | #include "drizzled/internal/m_string.h" | 26 | #include "drizzled/internal/m_string.h" |
519 | 27 | #include <algorithm> | 27 | #include <algorithm> |
521 | 28 | 28 | #include <boost/program_options.hpp> | |
522 | 29 | #include <drizzled/module/option_map.h> | ||
523 | 29 | #include "errmsg.h" | 30 | #include "errmsg.h" |
524 | 30 | #include "mysql_protocol.h" | 31 | #include "mysql_protocol.h" |
525 | 31 | #include "mysql_password.h" | 32 | #include "mysql_password.h" |
526 | 32 | #include "options.h" | 33 | #include "options.h" |
527 | 33 | 34 | ||
528 | 35 | namespace po= boost::program_options; | ||
529 | 34 | using namespace std; | 36 | using namespace std; |
530 | 35 | using namespace drizzled; | 37 | using namespace drizzled; |
531 | 36 | 38 | ||
532 | @@ -882,12 +884,78 @@ | |||
533 | 882 | plugin::Create_function<MySQLPassword> *mysql_password= NULL; | 884 | plugin::Create_function<MySQLPassword> *mysql_password= NULL; |
534 | 883 | 885 | ||
535 | 884 | static int init(drizzled::module::Context &context) | 886 | static int init(drizzled::module::Context &context) |
537 | 885 | { | 887 | { |
538 | 888 | |||
539 | 886 | /* Initialize random seeds for the MySQL algorithm with minimal changes. */ | 889 | /* Initialize random seeds for the MySQL algorithm with minimal changes. */ |
540 | 887 | time_t seed_time= time(NULL); | 890 | time_t seed_time= time(NULL); |
541 | 888 | random_seed1= seed_time % random_max; | 891 | random_seed1= seed_time % random_max; |
542 | 889 | random_seed2= (seed_time / 2) % random_max; | 892 | random_seed2= (seed_time / 2) % random_max; |
543 | 890 | 893 | ||
544 | 894 | const module::option_map &vm= context.getOptions(); | ||
545 | 895 | if (vm.count("port")) | ||
546 | 896 | { | ||
547 | 897 | if (port > 65535) | ||
548 | 898 | { | ||
549 | 899 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of port\n")); | ||
550 | 900 | exit(-1); | ||
551 | 901 | } | ||
552 | 902 | } | ||
553 | 903 | |||
554 | 904 | if (vm.count("connect-timeout")) | ||
555 | 905 | { | ||
556 | 906 | if (connect_timeout < 1 || connect_timeout > 300) | ||
557 | 907 | { | ||
558 | 908 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for connect_timeout\n")); | ||
559 | 909 | exit(-1); | ||
560 | 910 | } | ||
561 | 911 | } | ||
562 | 912 | |||
563 | 913 | if (vm.count("read-timeout")) | ||
564 | 914 | { | ||
565 | 915 | if (read_timeout < 1 || read_timeout > 300) | ||
566 | 916 | { | ||
567 | 917 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read_timeout\n")); | ||
568 | 918 | exit(-1); | ||
569 | 919 | } | ||
570 | 920 | } | ||
571 | 921 | |||
572 | 922 | if (vm.count("write-timeout")) | ||
573 | 923 | { | ||
574 | 924 | if (write_timeout < 1 || write_timeout > 300) | ||
575 | 925 | { | ||
576 | 926 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for write_timeout\n")); | ||
577 | 927 | exit(-1); | ||
578 | 928 | } | ||
579 | 929 | } | ||
580 | 930 | |||
581 | 931 | if (vm.count("retry-count")) | ||
582 | 932 | { | ||
583 | 933 | if (retry_count < 1 || retry_count > 100) | ||
584 | 934 | { | ||
585 | 935 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for retry_count")); | ||
586 | 936 | exit(-1); | ||
587 | 937 | } | ||
588 | 938 | } | ||
589 | 939 | |||
590 | 940 | if (vm.count("buffer-length")) | ||
591 | 941 | { | ||
592 | 942 | if (buffer_length < 1024 || buffer_length > 1024*1024) | ||
593 | 943 | { | ||
594 | 944 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for buffer_length\n")); | ||
595 | 945 | exit(-1); | ||
596 | 946 | } | ||
597 | 947 | } | ||
598 | 948 | |||
599 | 949 | if (vm.count("bind-address")) | ||
600 | 950 | { | ||
601 | 951 | bind_address= strdup(vm["bind-address"].as<string>().c_str()); | ||
602 | 952 | } | ||
603 | 953 | |||
604 | 954 | else | ||
605 | 955 | { | ||
606 | 956 | bind_address= NULL; | ||
607 | 957 | } | ||
608 | 958 | |||
609 | 891 | mysql_password= new plugin::Create_function<MySQLPassword>(MySQLPasswordName); | 959 | mysql_password= new plugin::Create_function<MySQLPassword>(MySQLPasswordName); |
610 | 892 | context.add(mysql_password); | 960 | context.add(mysql_password); |
611 | 893 | 961 | ||
612 | @@ -916,6 +984,32 @@ | |||
613 | 916 | static DRIZZLE_SYSVAR_STR(bind_address, bind_address, PLUGIN_VAR_READONLY, | 984 | static DRIZZLE_SYSVAR_STR(bind_address, bind_address, PLUGIN_VAR_READONLY, |
614 | 917 | N_("Address to bind to."), NULL, NULL, NULL); | 985 | N_("Address to bind to."), NULL, NULL, NULL); |
615 | 918 | 986 | ||
616 | 987 | static void init_options(drizzled::module::option_context &context) | ||
617 | 988 | { | ||
618 | 989 | context("port", | ||
619 | 990 | po::value<uint32_t>(&port)->default_value(3306), | ||
620 | 991 | N_("Port number to use for connection or 0 for default to with MySQL " | ||
621 | 992 | "protocol.")); | ||
622 | 993 | context("connect-timeout", | ||
623 | 994 | po::value<uint32_t>(&connect_timeout)->default_value(10), | ||
624 | 995 | N_("Connect Timeout.")); | ||
625 | 996 | context("read-timeout", | ||
626 | 997 | po::value<uint32_t>(&read_timeout)->default_value(30), | ||
627 | 998 | N_("Read Timeout.")); | ||
628 | 999 | context("write-timeout", | ||
629 | 1000 | po::value<uint32_t>(&write_timeout)->default_value(60), | ||
630 | 1001 | N_("Write Timeout.")); | ||
631 | 1002 | context("retry-count", | ||
632 | 1003 | po::value<uint32_t>(&retry_count)->default_value(10), | ||
633 | 1004 | N_("Retry Count.")); | ||
634 | 1005 | context("buffer-length", | ||
635 | 1006 | po::value<uint32_t>(&buffer_length)->default_value(16384), | ||
636 | 1007 | N_("Buffer length.")); | ||
637 | 1008 | context("bind-address", | ||
638 | 1009 | po::value<string>(), | ||
639 | 1010 | N_("Address to bind to.")); | ||
640 | 1011 | } | ||
641 | 1012 | |||
642 | 919 | static drizzle_sys_var* sys_variables[]= { | 1013 | static drizzle_sys_var* sys_variables[]= { |
643 | 920 | DRIZZLE_SYSVAR(port), | 1014 | DRIZZLE_SYSVAR(port), |
644 | 921 | DRIZZLE_SYSVAR(connect_timeout), | 1015 | DRIZZLE_SYSVAR(connect_timeout), |
645 | @@ -930,13 +1024,13 @@ | |||
646 | 930 | DRIZZLE_DECLARE_PLUGIN | 1024 | DRIZZLE_DECLARE_PLUGIN |
647 | 931 | { | 1025 | { |
648 | 932 | DRIZZLE_VERSION_ID, | 1026 | DRIZZLE_VERSION_ID, |
650 | 933 | "mysql_protocol", | 1027 | "mysql-protocol", |
651 | 934 | "0.1", | 1028 | "0.1", |
652 | 935 | "Eric Day", | 1029 | "Eric Day", |
653 | 936 | "MySQL Protocol Module", | 1030 | "MySQL Protocol Module", |
654 | 937 | PLUGIN_LICENSE_GPL, | 1031 | PLUGIN_LICENSE_GPL, |
655 | 938 | init, /* Plugin Init */ | 1032 | init, /* Plugin Init */ |
656 | 939 | sys_variables, /* system variables */ | 1033 | sys_variables, /* system variables */ |
658 | 940 | NULL /* config options */ | 1034 | init_options /* config options */ |
659 | 941 | } | 1035 | } |
660 | 942 | DRIZZLE_DECLARE_PLUGIN_END; | 1036 | DRIZZLE_DECLARE_PLUGIN_END; |
661 | 943 | 1037 | ||
662 | === modified file 'plugin/rabbitmq/rabbitmq_log.cc' | |||
663 | --- plugin/rabbitmq/rabbitmq_log.cc 2010-05-21 16:24:37 +0000 | |||
664 | +++ plugin/rabbitmq/rabbitmq_log.cc 2010-07-06 15:38:27 +0000 | |||
665 | @@ -263,5 +263,5 @@ | |||
666 | 263 | NULL | 263 | NULL |
667 | 264 | }; | 264 | }; |
668 | 265 | 265 | ||
670 | 266 | DRIZZLE_PLUGIN(init, system_variables); | 266 | DRIZZLE_PLUGIN(init, system_variables, NULL); |
671 | 267 | 267 | ||
672 | 268 | 268 | ||
673 | === modified file 'plugin/rand_function/rand_function.cc' | |||
674 | --- plugin/rand_function/rand_function.cc 2010-06-04 09:05:44 +0000 | |||
675 | +++ plugin/rand_function/rand_function.cc 2010-07-06 15:38:27 +0000 | |||
676 | @@ -126,4 +126,4 @@ | |||
677 | 126 | return 0; | 126 | return 0; |
678 | 127 | } | 127 | } |
679 | 128 | 128 | ||
681 | 129 | DRIZZLE_PLUGIN(initialize, NULL); | 129 | DRIZZLE_PLUGIN(initialize, NULL, NULL); |
682 | 130 | 130 | ||
683 | === modified file 'plugin/replication_dictionary/module.cc' | |||
684 | --- plugin/replication_dictionary/module.cc 2010-05-18 18:20:56 +0000 | |||
685 | +++ plugin/replication_dictionary/module.cc 2010-07-06 15:38:27 +0000 | |||
686 | @@ -53,4 +53,4 @@ | |||
687 | 53 | } | 53 | } |
688 | 54 | } | 54 | } |
689 | 55 | 55 | ||
691 | 56 | DRIZZLE_PLUGIN(init, NULL); | 56 | DRIZZLE_PLUGIN(init, NULL, NULL); |
692 | 57 | 57 | ||
693 | === modified file 'plugin/rot13/rot13.cc' | |||
694 | --- plugin/rot13/rot13.cc 2010-05-18 18:20:56 +0000 | |||
695 | +++ plugin/rot13/rot13.cc 2010-07-06 15:38:27 +0000 | |||
696 | @@ -93,4 +93,4 @@ | |||
697 | 93 | 93 | ||
698 | 94 | } /* namespace rot13 */ | 94 | } /* namespace rot13 */ |
699 | 95 | 95 | ||
701 | 96 | DRIZZLE_PLUGIN(rot13::init, NULL); | 96 | DRIZZLE_PLUGIN(rot13::init, NULL, NULL); |
702 | 97 | 97 | ||
703 | === modified file 'plugin/simple_user_policy/module.cc' | |||
704 | --- plugin/simple_user_policy/module.cc 2010-05-18 18:20:56 +0000 | |||
705 | +++ plugin/simple_user_policy/module.cc 2010-07-06 15:38:27 +0000 | |||
706 | @@ -36,4 +36,4 @@ | |||
707 | 36 | 36 | ||
708 | 37 | } /* namespace simple_user_policy */ | 37 | } /* namespace simple_user_policy */ |
709 | 38 | 38 | ||
711 | 39 | DRIZZLE_PLUGIN(simple_user_policy::init, NULL); | 39 | DRIZZLE_PLUGIN(simple_user_policy::init, NULL, NULL); |
712 | 40 | 40 | ||
713 | === modified file 'plugin/sleep/sleep.cc' | |||
714 | --- plugin/sleep/sleep.cc 2010-05-18 18:20:56 +0000 | |||
715 | +++ plugin/sleep/sleep.cc 2010-07-06 15:38:27 +0000 | |||
716 | @@ -136,4 +136,4 @@ | |||
717 | 136 | return 0; | 136 | return 0; |
718 | 137 | } | 137 | } |
719 | 138 | 138 | ||
721 | 139 | DRIZZLE_PLUGIN(sleep_plugin_init, NULL); | 139 | DRIZZLE_PLUGIN(sleep_plugin_init, NULL, NULL); |
722 | 140 | 140 | ||
723 | === modified file 'plugin/syslog/module.cc' | |||
724 | --- plugin/syslog/module.cc 2010-06-24 03:15:21 +0000 | |||
725 | +++ plugin/syslog/module.cc 2010-07-06 15:38:27 +0000 | |||
726 | @@ -157,4 +157,4 @@ | |||
727 | 157 | 157 | ||
728 | 158 | } // namespace syslog_module | 158 | } // namespace syslog_module |
729 | 159 | 159 | ||
731 | 160 | DRIZZLE_PLUGIN(syslog_module::init, syslog_module::system_variables); | 160 | DRIZZLE_PLUGIN(syslog_module::init, syslog_module::system_variables, NULL); |
732 | 161 | 161 | ||
733 | === modified file 'plugin/transaction_log/module.cc' | |||
734 | --- plugin/transaction_log/module.cc 2010-05-18 18:20:56 +0000 | |||
735 | +++ plugin/transaction_log/module.cc 2010-07-06 15:38:27 +0000 | |||
736 | @@ -292,4 +292,4 @@ | |||
737 | 292 | NULL | 292 | NULL |
738 | 293 | }; | 293 | }; |
739 | 294 | 294 | ||
741 | 295 | DRIZZLE_PLUGIN(init, sys_variables); | 295 | DRIZZLE_PLUGIN(init, sys_variables, NULL); |
742 | 296 | 296 | ||
743 | === modified file 'plugin/version/versionudf.cc' | |||
744 | --- plugin/version/versionudf.cc 2010-05-18 18:20:56 +0000 | |||
745 | +++ plugin/version/versionudf.cc 2010-07-06 15:38:27 +0000 | |||
746 | @@ -60,4 +60,4 @@ | |||
747 | 60 | return 0; | 60 | return 0; |
748 | 61 | } | 61 | } |
749 | 62 | 62 | ||
751 | 63 | DRIZZLE_PLUGIN(initialize, NULL); | 63 | DRIZZLE_PLUGIN(initialize, NULL, NULL); |
752 | 64 | 64 | ||
753 | === modified file 'tests/test-run.pl' | |||
754 | --- tests/test-run.pl 2010-06-19 19:28:47 +0000 | |||
755 | +++ tests/test-run.pl 2010-07-06 15:38:27 +0000 | |||
756 | @@ -1497,7 +1497,7 @@ | |||
757 | 1497 | $ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'}; | 1497 | $ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'}; |
758 | 1498 | $ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'}; | 1498 | $ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'}; |
759 | 1499 | $ENV{'MC_PORT'}= $opt_memc_myport; | 1499 | $ENV{'MC_PORT'}= $opt_memc_myport; |
761 | 1500 | $ENV{'DRIZZLE_TCP_PORT'}= $mysqld_variables{'drizzle-protocol-port'}; | 1500 | $ENV{'DRIZZLE_TCP_PORT'}= $mysqld_variables{'drizzle-protocol.port'}; |
762 | 1501 | 1501 | ||
763 | 1502 | $ENV{'MTR_BUILD_THREAD'}= $opt_mtr_build_thread; | 1502 | $ENV{'MTR_BUILD_THREAD'}= $opt_mtr_build_thread; |
764 | 1503 | 1503 | ||
765 | @@ -2558,7 +2558,7 @@ | |||
766 | 2558 | # Increase default connect_timeout to avoid intermittent | 2558 | # Increase default connect_timeout to avoid intermittent |
767 | 2559 | # disconnects when test servers are put under load | 2559 | # disconnects when test servers are put under load |
768 | 2560 | # see BUG#28359 | 2560 | # see BUG#28359 |
770 | 2561 | mtr_add_arg($args, "%s--mysql-protocol-connect-timeout=60", $prefix); | 2561 | mtr_add_arg($args, "%s--mysql-protocol.connect-timeout=60", $prefix); |
771 | 2562 | 2562 | ||
772 | 2563 | 2563 | ||
773 | 2564 | # When mysqld is run by a root user(euid is 0), it will fail | 2564 | # When mysqld is run by a root user(euid is 0), it will fail |
774 | @@ -2571,10 +2571,10 @@ | |||
775 | 2571 | mtr_add_arg($args, "%s--pid-file=%s", $prefix, | 2571 | mtr_add_arg($args, "%s--pid-file=%s", $prefix, |
776 | 2572 | $mysqld->{'path_pid'}); | 2572 | $mysqld->{'path_pid'}); |
777 | 2573 | 2573 | ||
779 | 2574 | mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix, | 2574 | mtr_add_arg($args, "%s--mysql-protocol.port=%d", $prefix, |
780 | 2575 | $mysqld->{'port'}); | 2575 | $mysqld->{'port'}); |
781 | 2576 | 2576 | ||
783 | 2577 | mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix, | 2577 | mtr_add_arg($args, "%s--drizzle-protocol.port=%d", $prefix, |
784 | 2578 | $mysqld->{'secondary_port'}); | 2578 | $mysqld->{'secondary_port'}); |
785 | 2579 | 2579 | ||
786 | 2580 | mtr_add_arg($args, "%s--datadir=%s", $prefix, | 2580 | mtr_add_arg($args, "%s--datadir=%s", $prefix, |
787 | @@ -2739,6 +2739,7 @@ | |||
788 | 2739 | 2739 | ||
789 | 2740 | if ( defined $exe ) | 2740 | if ( defined $exe ) |
790 | 2741 | { | 2741 | { |
791 | 2742 | mtr_verbose("running Drizzle with: $exe @$args"); | ||
792 | 2742 | $pid= mtr_spawn($exe, $args, "", | 2743 | $pid= mtr_spawn($exe, $args, "", |
793 | 2743 | $mysqld->{'path_myerr'}, | 2744 | $mysqld->{'path_myerr'}, |
794 | 2744 | $mysqld->{'path_myerr'}, | 2745 | $mysqld->{'path_myerr'}, |
Looks good.