Merge lp:~mordred/drizzle/rplugin-innobase into lp:~drizzle-trunk/drizzle/development
- rplugin-innobase
- Merge into development
Status: | Merged |
---|---|
Approved by: | Brian Aker |
Approved revision: | no longer in the revision history of the source branch. |
Merged at revision: | 1712 |
Proposed branch: | lp:~mordred/drizzle/rplugin-innobase |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: |
2246 lines (+1191/-158) 79 files modified
.quickly (+1/-1) client/drizzle.cc (+4/-5) client/drizzletest.cc (+2/-2) drizzled/drizzled.cc (+58/-1) drizzled/module/library.cc (+1/-1) m4/pandora_canonical.m4 (+1/-1) m4/pandora_have_libboost_date_time.m4 (+46/-0) m4/pandora_have_libboost_filesystem.m4 (+45/-0) m4/pandora_have_libinnodb.m4 (+25/-29) plugin/drizzle_protocol/drizzle_protocol.cc (+7/-1) plugin/drizzle_protocol/drizzle_protocol.h (+1/-0) plugin/embedded_innodb/config_table_function.cc (+5/-1) plugin/embedded_innodb/embedded_innodb_engine.cc (+316/-4) plugin/embedded_innodb/libinnodb_datadict_dump_func.cc (+5/-1) plugin/embedded_innodb/libinnodb_version_func.cc (+5/-1) plugin/embedded_innodb/plugin.ini (+2/-2) plugin/embedded_innodb/status_table_function.cc (+5/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result (+1/-2) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update_pk_index-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_additional_mem_pool_size_32m-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit0-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit1-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit2-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_dirty_pages_pct_50-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt (+1/-1) plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt (+1/-1) plugin/filtered_replicator/filtered_replicator.cc (+22/-4) plugin/filtered_replicator/filtered_replicator.h (+1/-16) plugin/hello_events/hello_events.cc (+7/-0) plugin/hello_events/hello_events.h (+1/-0) plugin/innobase/handler/ha_innodb.cc (+462/-18) plugin/innobase/tests/t/innodb_lock_waits-master.opt (+1/-0) plugin/memcached_stats/memcached_stats.cc (+2/-1) plugin/memcached_stats/sysvar_holder.h (+8/-0) plugin/myisam/mi_key.cc (+3/-0) plugin/mysql_protocol/mysql_protocol.cc (+6/-0) plugin/mysql_protocol/mysql_protocol.h (+1/-0) plugin/syslog/module.cc (+9/-11) plugin/transaction_log/module.cc (+13/-0) plugin/transaction_log/transaction_log.cc (+0/-9) po/POTFILES.in (+1/-0) support-files/drizzle.spec.in (+4/-0) tests/t/unsafe_binlog_innodb-master.opt (+1/-1) tests/test-run.pl (+1/-3) tests/valgrind.supp (+76/-0) |
To merge this branch: | bzr merge lp:~mordred/drizzle/rplugin-innobase |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Drizzle Merge Team | Pending | ||
Review via email: mp+32257@code.launchpad.net |
Commit message
Description of the change
Vijay's innodb and embedded_innodb branches, along with fixes for Stewart's reviews, a patch to make embedded_innodb build/test directly and to use libhaildb instead of libinnodb if it's there.
Stewart Smith (stewart) : | # |
- 1700. By Brian Aker <brian@gaz>
-
Merge from staging.
- 1701. By Brian Aker <brian@gaz>
-
Merge in Stewart's FK work
- 1702. By Brian Aker <brian@gaz>
-
No longer concurrent, no longer need these locks.
- 1703. By Brian Aker <brian@gaz>
-
Update heap (mostly C++).
- 1704. By Brian Aker
-
MErge Monty, remove CSV from auto-build
- 1705. By Brian Aker
-
Merge in removal of pthread dead wrappers.
- 1706. By Brian Aker
-
Remove sync() call.
- 1707. By Brian Aker
-
Merge for lp611379
- 1708. By Brian Aker
-
MErge Joe
- 1709. By Brian Aker
-
Merge MyISAM changes.
- 1710. By Brian Aker
-
Style fixes/etc in heap.
- 1711. By Brian Aker
-
Merge Stewart.
- 1712. By Monty Taylor
-
Merged in innodb changes. Fixed the buffer pool size default.
- 1713. By Monty Taylor
-
Merged in valgrind fixes.
- 1714. By Monty Taylor
-
Fixed some help text and defaults.
- 1715. By Monty Taylor
-
Fixed mac build error.
- 1716. By Monty Taylor
-
Fixed a valgrind error and some missed opt files.
- 1717. By Monty Taylor
-
Added a few valgrind suppressions for newer debian box.
- 1718. By Monty Taylor
-
Fixed the check to also work with libinnodb.
- 1719. By Monty Taylor
-
Added a suppression for haildb.
- 1720. By Monty Taylor
-
It turns out anytime we call this it's fail.
- 1721. By Monty Taylor
-
Turned embedded_innodb back off. Need to clean valgrind first.
Preview Diff
1 | === modified file '.quickly' |
2 | --- .quickly 2010-07-31 17:48:00 +0000 |
3 | +++ .quickly 2010-08-17 02:53:42 +0000 |
4 | @@ -2,4 +2,4 @@ |
5 | version = 0.4.2 |
6 | template = pandora-build |
7 | project-type = application |
8 | -pandora-version = 0.141 |
9 | +pandora-version = 0.145 |
10 | |
11 | === modified file 'client/drizzle.cc' |
12 | --- client/drizzle.cc 2010-07-30 20:34:21 +0000 |
13 | +++ client/drizzle.cc 2010-08-17 02:53:42 +0000 |
14 | @@ -1329,7 +1329,7 @@ |
15 | opt_connect_timeout= 0; |
16 | if (in_connect_timeout > 3600*12) |
17 | { |
18 | - cout<<N_("Error: Invalid Value for connect_timeout"); |
19 | + cout << N_("Error: Invalid Value for connect_timeout"); |
20 | exit(-1); |
21 | } |
22 | opt_connect_timeout= in_connect_timeout; |
23 | @@ -1338,13 +1338,12 @@ |
24 | static void check_max_input_line(uint32_t in_max_input_line) |
25 | { |
26 | opt_max_input_line= 0; |
27 | - if (in_max_input_line<4096 || in_max_input_line>(int64_t)2*1024L*1024L*1024L) |
28 | + if (in_max_input_line < 4096 || in_max_input_line > (int64_t)2*1024L*1024L*1024L) |
29 | { |
30 | - cout<<N_("Error: Invalid Value for max_input_line"); |
31 | + cout << N_("Error: Invalid Value for max_input_line"); |
32 | exit(-1); |
33 | } |
34 | - opt_max_input_line= in_max_input_line/1024; |
35 | - opt_max_input_line*=1024; |
36 | + opt_max_input_line= in_max_input_line - (in_max_input_line % 1024); |
37 | } |
38 | |
39 | int main(int argc,char *argv[]) |
40 | |
41 | === modified file 'client/drizzletest.cc' |
42 | --- client/drizzletest.cc 2010-08-03 21:49:46 +0000 |
43 | +++ client/drizzletest.cc 2010-08-17 02:53:42 +0000 |
44 | @@ -5360,7 +5360,7 @@ |
45 | { |
46 | if (in_opt_max_connect_retries > 10000 || opt_max_connect_retries<1) |
47 | { |
48 | - cout<<N_("Error: Invalid Value for opt_max_connect_retries"); |
49 | + cout << N_("Error: Invalid Value for opt_max_connect_retries"); |
50 | exit(-1); |
51 | } |
52 | opt_max_connect_retries= in_opt_max_connect_retries; |
53 | @@ -5370,7 +5370,7 @@ |
54 | { |
55 | if (in_opt_tail_lines > 10000) |
56 | { |
57 | - cout<<N_("Error: Invalid Value for opt_tail_lines"); |
58 | + cout << N_("Error: Invalid Value for opt_tail_lines"); |
59 | exit(-1); |
60 | } |
61 | opt_tail_lines= in_opt_tail_lines; |
62 | |
63 | === modified file 'drizzled/drizzled.cc' |
64 | --- drizzled/drizzled.cc 2010-08-13 00:50:34 +0000 |
65 | +++ drizzled/drizzled.cc 2010-08-17 02:53:42 +0000 |
66 | @@ -27,6 +27,7 @@ |
67 | #include <netinet/in.h> |
68 | #include <signal.h> |
69 | #include <limits.h> |
70 | +#include <stdexcept> |
71 | |
72 | #include <boost/program_options.hpp> |
73 | #include <boost/thread/recursive_mutex.hpp> |
74 | @@ -787,6 +788,61 @@ |
75 | return 0; |
76 | } |
77 | |
78 | +static pair<string, string> parse_size_suffixes(string s) |
79 | +{ |
80 | + size_t equal_pos= s.find("="); |
81 | + if (equal_pos != string::npos) |
82 | + { |
83 | + string arg_key(s.substr(0, equal_pos)); |
84 | + string arg_val(s.substr(equal_pos+1)); |
85 | + |
86 | + try |
87 | + { |
88 | + size_t size_suffix_pos= arg_val.find_last_of("kmgKMG"); |
89 | + if (size_suffix_pos == arg_val.size()-1) |
90 | + { |
91 | + char suffix= arg_val[size_suffix_pos]; |
92 | + string size_val(arg_val.substr(0, size_suffix_pos)); |
93 | + |
94 | + uint64_t base_size= boost::lexical_cast<uint64_t>(size_val); |
95 | + uint64_t new_size= 0; |
96 | + |
97 | + switch (suffix) |
98 | + { |
99 | + case 'K': |
100 | + case 'k': |
101 | + new_size= base_size * 1024; |
102 | + break; |
103 | + case 'M': |
104 | + case 'm': |
105 | + new_size= base_size * 1024 * 1024; |
106 | + break; |
107 | + case 'G': |
108 | + case 'g': |
109 | + new_size= base_size * 1024 * 1024 * 1024; |
110 | + break; |
111 | + } |
112 | + return make_pair(arg_key, |
113 | + boost::lexical_cast<string>(new_size)); |
114 | + } |
115 | + } |
116 | + catch (...) |
117 | + { |
118 | + /* Screw it, let the normal parser take over */ |
119 | + } |
120 | + } |
121 | + |
122 | + return make_pair(string(""), string("")); |
123 | +} |
124 | + |
125 | +static pair<string, string> parse_size_arg(string s) |
126 | +{ |
127 | + if (s.find("--") == 0) |
128 | + { |
129 | + return parse_size_suffixes(s.substr(2)); |
130 | + } |
131 | + return make_pair(string(""), string("")); |
132 | +} |
133 | |
134 | int init_server_components(module::Registry &plugins) |
135 | { |
136 | @@ -823,7 +879,8 @@ |
137 | |
138 | po::parsed_options parsed= po::command_line_parser(defaults_argc, |
139 | defaults_argv). |
140 | - options(long_options).allow_unregistered().run(); |
141 | + options(long_options).extra_parser(parse_size_arg). |
142 | + allow_unregistered().run(); |
143 | |
144 | vector<string> unknown_options= |
145 | po::collect_unrecognized(parsed.options, po::include_positional); |
146 | |
147 | === modified file 'drizzled/module/library.cc' |
148 | --- drizzled/module/library.cc 2010-05-15 18:23:34 +0000 |
149 | +++ drizzled/module/library.cc 2010-08-17 02:53:42 +0000 |
150 | @@ -88,7 +88,7 @@ |
151 | if (builtin) |
152 | { |
153 | dlpath.assign("<builtin>"); |
154 | - handle= dlopen(NULL, RTLD_NOW|RTLD_GLOBAL); |
155 | + handle= dlopen(NULL, RTLD_NOW|RTLD_LOCAL); |
156 | if (handle == NULL) |
157 | { |
158 | const char *errmsg= dlerror(); |
159 | |
160 | === modified file 'm4/pandora_canonical.m4' |
161 | --- m4/pandora_canonical.m4 2010-07-31 17:48:00 +0000 |
162 | +++ m4/pandora_canonical.m4 2010-08-17 02:53:42 +0000 |
163 | @@ -4,7 +4,7 @@ |
164 | dnl with or without modifications, as long as this notice is preserved. |
165 | |
166 | dnl Which version of the canonical setup we're using |
167 | -AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.141]) |
168 | +AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.145]) |
169 | |
170 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
171 | AC_ARG_ENABLE([fat-binaries], |
172 | |
173 | === added file 'm4/pandora_have_libboost_date_time.m4' |
174 | --- m4/pandora_have_libboost_date_time.m4 1970-01-01 00:00:00 +0000 |
175 | +++ m4/pandora_have_libboost_date_time.m4 2010-08-17 02:53:42 +0000 |
176 | @@ -0,0 +1,46 @@ |
177 | +dnl Copyright (C) 2010 Monty Taylor |
178 | +dnl This file is free software; Monty Taylor |
179 | +dnl gives unlimited permission to copy and/or distribute it, |
180 | +dnl with or without modifications, as long as this notice is preserved. |
181 | + |
182 | +AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[ |
183 | + AC_REQUIRE([AC_LIB_PREFIX]) |
184 | + AC_REQUIRE([ACX_PTHREAD]) |
185 | + |
186 | + dnl -------------------------------------------------------------------- |
187 | + dnl Check for Boost.Date_Time |
188 | + dnl -------------------------------------------------------------------- |
189 | + |
190 | + AC_LANG_PUSH(C++) |
191 | + AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[ |
192 | + #include <boost/date_time.hpp> |
193 | + ],[ |
194 | + boost::gregorian::date weekstart(2002,2,1); |
195 | + ]) |
196 | + AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[ |
197 | + AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[ |
198 | + #include <boost/date_time.hpp> |
199 | + ],[ |
200 | + boost::gregorian::date weekstart(2002,2,1); |
201 | + ]) |
202 | + ]) |
203 | + AC_LANG_POP() |
204 | + |
205 | + AM_CONDITIONAL(HAVE_BOOST_DATE_TIME, |
206 | + [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"]) |
207 | + BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}" |
208 | + AC_SUBST(BOOST_LIBS) |
209 | +]) |
210 | + |
211 | +AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[ |
212 | + PANDORA_HAVE_BOOST($1) |
213 | + _PANDORA_SEARCH_BOOST_DATE_TIME($1) |
214 | +]) |
215 | + |
216 | +AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[ |
217 | + PANDORA_REQUIRE_BOOST($1) |
218 | + _PANDORA_SEARCH_BOOST_DATE_TIME($1) |
219 | + AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"], |
220 | + AC_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}])) |
221 | +]) |
222 | + |
223 | |
224 | === added file 'm4/pandora_have_libboost_filesystem.m4' |
225 | --- m4/pandora_have_libboost_filesystem.m4 1970-01-01 00:00:00 +0000 |
226 | +++ m4/pandora_have_libboost_filesystem.m4 2010-08-17 02:53:42 +0000 |
227 | @@ -0,0 +1,45 @@ |
228 | +dnl Copyright (C) 2010 Monty Taylor |
229 | +dnl This file is free software; Monty Taylor |
230 | +dnl gives unlimited permission to copy and/or distribute it, |
231 | +dnl with or without modifications, as long as this notice is preserved. |
232 | + |
233 | +AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[ |
234 | + AC_REQUIRE([AC_LIB_PREFIX]) |
235 | + |
236 | + dnl -------------------------------------------------------------------- |
237 | + dnl Check for Boost.Filesystem |
238 | + dnl -------------------------------------------------------------------- |
239 | + |
240 | + AC_LANG_PUSH(C++) |
241 | + AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,,[ |
242 | + #include <boost/filesystem.hpp> |
243 | + ],[ |
244 | + boost::filesystem::path my_path("some_dir/file.txt"); |
245 | + ]) |
246 | + AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[ |
247 | + AC_LIB_HAVE_LINKFLAGS(boost_filesystem,,[ |
248 | + #include <boost/filesystem.hpp> |
249 | + ],[ |
250 | + boost::filesystem::path my_path("some_dir/file.txt"); |
251 | + ]) |
252 | + ]) |
253 | + AC_LANG_POP() |
254 | + |
255 | + AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM, |
256 | + [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"]) |
257 | + BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}" |
258 | + AC_SUBST(BOOST_LIBS) |
259 | +]) |
260 | + |
261 | +AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[ |
262 | + PANDORA_HAVE_BOOST($1) |
263 | + _PANDORA_SEARCH_BOOST_FILESYSTEM($1) |
264 | +]) |
265 | + |
266 | +AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[ |
267 | + PANDORA_REQUIRE_BOOST($1) |
268 | + _PANDORA_SEARCH_BOOST_FILESYSTEM($1) |
269 | + AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"], |
270 | + AC_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}])) |
271 | +]) |
272 | + |
273 | |
274 | === modified file 'm4/pandora_have_libinnodb.m4' |
275 | --- m4/pandora_have_libinnodb.m4 2010-03-02 07:14:49 +0000 |
276 | +++ m4/pandora_have_libinnodb.m4 2010-08-17 02:53:42 +0000 |
277 | @@ -7,7 +7,7 @@ |
278 | AC_REQUIRE([AC_LIB_PREFIX]) |
279 | |
280 | dnl -------------------------------------------------------------------- |
281 | - dnl Check for libinnodb |
282 | + dnl Check for libhaildb or libinnodb |
283 | dnl -------------------------------------------------------------------- |
284 | |
285 | AC_ARG_ENABLE([libinnodb], |
286 | @@ -16,41 +16,37 @@ |
287 | [ac_enable_libinnodb="$enableval"], |
288 | [ac_enable_libinnodb="yes"]) |
289 | |
290 | + |
291 | AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[ |
292 | - AC_LIB_HAVE_LINKFLAGS(innodb,,[ |
293 | - #include <embedded_innodb-1.0/innodb.h> |
294 | + AC_LIB_HAVE_LINKFLAGS(haildb,,[ |
295 | + #include <haildb.h> |
296 | ],[ |
297 | ib_u64_t |
298 | ib_api_version(void); |
299 | ]) |
300 | + AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[ |
301 | + AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h]) |
302 | + INNODB_LIBS="${LTLIBHAILDB}" |
303 | + ac_cv_have_innodb=yes |
304 | + ],[ |
305 | + AC_LIB_HAVE_LINKFLAGS(innodb,,[ |
306 | + #include <embedded_innodb-1.0/innodb.h> |
307 | + ],[ |
308 | + ib_u64_t |
309 | + ib_api_version(void); |
310 | + ]) |
311 | + AS_IF([test "x{ac_cv_libinnodb}" = "xyes"],[ |
312 | + AC_DEFINE([HAVE_INNODB_H],[1],[Do we have innodb.h]) |
313 | + INNODB_LIBS="${LTLIBINNODB}" |
314 | + ac_cv_have_innodb=yes |
315 | + ]) |
316 | + ]) |
317 | ],[ |
318 | + ac_cv_libhaildb="no" |
319 | ac_cv_libinnodb="no" |
320 | ]) |
321 | - |
322 | - |
323 | - AC_CACHE_CHECK([if libinnodb is recent enough], |
324 | - [ac_cv_recent_innodb_h],[ |
325 | - save_LIBS=${LIBS} |
326 | - LIBS="${LIBS} ${LTLIBINNODB}" |
327 | - AC_LINK_IFELSE( |
328 | - [AC_LANG_PROGRAM([[ |
329 | - #include <embedded_innodb-1.0/innodb.h> |
330 | - ]],[[ |
331 | - /* Make sure we have the two-arg version */ |
332 | - ib_table_drop(NULL, "nothing"); |
333 | - ]])],[ |
334 | - ac_cv_recent_innodb_h=yes |
335 | - ],[ |
336 | - ac_cv_recent_innodb_h=no |
337 | - ]) |
338 | - LIBS="${save_LIBS}" |
339 | - ]) |
340 | - AS_IF([test "x${ac_cv_recent_innodb_h}" = "xno"],[ |
341 | - AC_MSG_WARN([${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB]) |
342 | - ac_cv_libinnodb=no |
343 | - ]) |
344 | - |
345 | - AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"]) |
346 | + AC_SUBST([INNODB_LIBS]) |
347 | + AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_have_innodb}" = "xyes"]) |
348 | ]) |
349 | |
350 | AC_DEFUN([PANDORA_HAVE_LIBINNODB],[ |
351 | @@ -60,5 +56,5 @@ |
352 | AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[ |
353 | AC_REQUIRE([PANDORA_HAVE_LIBINNODB]) |
354 | AS_IF([test "x${ac_cv_libinnodb}" = "xno"], |
355 | - AC_MSG_ERROR([libinnodb is required for ${PACKAGE}])) |
356 | + AC_MSG_ERROR([libhaildb or libinnodb is required for ${PACKAGE}])) |
357 | ]) |
358 | |
359 | === renamed file 'm4/intltool.m4' => 'm4/pandora_intltool.m4' |
360 | === modified file 'plugin/drizzle_protocol/drizzle_protocol.cc' |
361 | --- plugin/drizzle_protocol/drizzle_protocol.cc 2010-07-06 07:24:01 +0000 |
362 | +++ plugin/drizzle_protocol/drizzle_protocol.cc 2010-08-17 02:53:42 +0000 |
363 | @@ -56,7 +56,13 @@ |
364 | static uint32_t write_timeout; |
365 | static uint32_t retry_count; |
366 | static uint32_t buffer_length; |
367 | -static char* bind_address; |
368 | +static char* bind_address= NULL; |
369 | + |
370 | +ListenDrizzleProtocol::~ListenDrizzleProtocol() |
371 | +{ |
372 | + /* This is strdup'd from the options */ |
373 | + free(bind_address); |
374 | +} |
375 | |
376 | const char* ListenDrizzleProtocol::getHost(void) const |
377 | { |
378 | |
379 | === modified file 'plugin/drizzle_protocol/drizzle_protocol.h' |
380 | --- plugin/drizzle_protocol/drizzle_protocol.h 2010-03-18 17:17:49 +0000 |
381 | +++ plugin/drizzle_protocol/drizzle_protocol.h 2010-08-17 02:53:42 +0000 |
382 | @@ -38,6 +38,7 @@ |
383 | drizzled::plugin::ListenTcp(name_arg), |
384 | using_mysql41_protocol(using_mysql41_protocol_arg) |
385 | { } |
386 | + virtual ~ListenDrizzleProtocol(); |
387 | virtual const char* getHost(void) const; |
388 | virtual in_port_t getPort(void) const; |
389 | virtual drizzled::plugin::Client *getClient(int fd); |
390 | |
391 | === modified file 'plugin/embedded_innodb/config_table_function.cc' |
392 | --- plugin/embedded_innodb/config_table_function.cc 2010-05-18 18:20:56 +0000 |
393 | +++ plugin/embedded_innodb/config_table_function.cc 2010-08-17 02:53:42 +0000 |
394 | @@ -19,7 +19,11 @@ |
395 | #include "config.h" |
396 | #include "drizzled/plugin/table_function.h" |
397 | |
398 | -#include "embedded_innodb-1.0/innodb.h" |
399 | +#if defined(HAVE_HAILDB_H) |
400 | +# include <haildb.h> |
401 | +#else |
402 | +# include <embedded_innodb-1.0/innodb.h> |
403 | +#endif /* HAVE_HAILDB_H */ |
404 | |
405 | #include "config_table_function.h" |
406 | |
407 | |
408 | === modified file 'plugin/embedded_innodb/embedded_innodb_engine.cc' |
409 | --- plugin/embedded_innodb/embedded_innodb_engine.cc 2010-08-13 20:27:18 +0000 |
410 | +++ plugin/embedded_innodb/embedded_innodb_engine.cc 2010-08-17 02:53:42 +0000 |
411 | @@ -93,7 +93,11 @@ |
412 | #include "config_table_function.h" |
413 | #include "status_table_function.h" |
414 | |
415 | -#include "embedded_innodb-1.0/innodb.h" |
416 | +#if defined(HAVE_HAILDB_H) |
417 | +# include <haildb.h> |
418 | +#else |
419 | +# include <embedded_innodb-1.0/innodb.h> |
420 | +#endif /* HAVE_HAILDB_H */ |
421 | |
422 | #include "embedded_innodb_engine.h" |
423 | |
424 | @@ -102,7 +106,11 @@ |
425 | #include "drizzled/field/blob.h" |
426 | #include "drizzled/field/enum.h" |
427 | #include <drizzled/session.h> |
428 | +#include <boost/program_options.hpp> |
429 | +#include <drizzled/module/option_map.h> |
430 | +#include <iostream> |
431 | |
432 | +namespace po= boost::program_options; |
433 | #include <boost/algorithm/string.hpp> |
434 | |
435 | using namespace std; |
436 | @@ -2720,7 +2728,7 @@ |
437 | static bool innobase_rollback_on_timeout; |
438 | static bool innobase_create_status_file; |
439 | static bool srv_use_sys_malloc; |
440 | -static char* innobase_file_format_name = NULL; |
441 | +static char* innobase_file_format_name = const_cast<char *>("Barracuda"); |
442 | static char* innobase_unix_file_flush_method = NULL; |
443 | static unsigned long srv_flush_log_at_trx_commit; |
444 | static unsigned long srv_max_buf_pool_modified_pct; |
445 | @@ -2745,6 +2753,203 @@ |
446 | |
447 | static int embedded_innodb_init(drizzled::module::Context &context) |
448 | { |
449 | + |
450 | + const module::option_map &vm= context.getOptions(); |
451 | + if (vm.count("additional-mem-pool-size")) |
452 | + { |
453 | + if (innobase_additional_mem_pool_size > LONG_MAX || innobase_additional_mem_pool_size < 512*1024L) |
454 | + { |
455 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of additional-mem-pool-size")); |
456 | + exit(-1); |
457 | + } |
458 | + innobase_additional_mem_pool_size/= 1024; |
459 | + innobase_additional_mem_pool_size*= 1024; |
460 | + } |
461 | + |
462 | + if (vm.count("autoextend-increment")) |
463 | + { |
464 | + if (srv_auto_extend_increment > 1000L || srv_auto_extend_increment < 1L) |
465 | + { |
466 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of autoextend-increment")); |
467 | + exit(-1); |
468 | + } |
469 | + } |
470 | + |
471 | + if (vm.count("buffer-pool-size")) |
472 | + { |
473 | + if (innobase_buffer_pool_size > INT64_MAX || innobase_buffer_pool_size < 5*1024*1024L) |
474 | + { |
475 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of buffer-pool-size")); |
476 | + exit(-1); |
477 | + } |
478 | + innobase_buffer_pool_size/= 1024*1024L; |
479 | + innobase_buffer_pool_size*= 1024*1024L; |
480 | + } |
481 | + |
482 | + if (vm.count("io-capacity")) |
483 | + { |
484 | + if (srv_io_capacity > (unsigned long)~0L || srv_io_capacity < 100) |
485 | + { |
486 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of io-capacity")); |
487 | + exit(-1); |
488 | + } |
489 | + } |
490 | + |
491 | + if (vm.count("fast-shutdown")) |
492 | + { |
493 | + if (innobase_fast_shutdown > 2) |
494 | + { |
495 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of fast-shutdown")); |
496 | + exit(-1); |
497 | + } |
498 | + } |
499 | + |
500 | + if (vm.count("flush-log-at-trx-commit")) |
501 | + { |
502 | + if (srv_flush_log_at_trx_commit > 2) |
503 | + { |
504 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of flush-log-at-trx-commit")); |
505 | + exit(-1); |
506 | + } |
507 | + } |
508 | + |
509 | + if (vm.count("force-recovery")) |
510 | + { |
511 | + if (innobase_force_recovery > 6) |
512 | + { |
513 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of force-recovery")); |
514 | + exit(-1); |
515 | + } |
516 | + } |
517 | + |
518 | + if (vm.count("log-file-size")) |
519 | + { |
520 | + if (innodb_log_file_size > INT64_MAX || innodb_log_file_size < 1*1024*1024L) |
521 | + { |
522 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-file-size")); |
523 | + exit(-1); |
524 | + } |
525 | + innodb_log_file_size/= 1024*1024L; |
526 | + innodb_log_file_size*= 1024*1024L; |
527 | + } |
528 | + |
529 | + if (vm.count("log-files-in-group")) |
530 | + { |
531 | + if (innodb_log_files_in_group > 100 || innodb_log_files_in_group < 2) |
532 | + { |
533 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-files-in-group")); |
534 | + exit(-1); |
535 | + } |
536 | + } |
537 | + |
538 | + if (vm.count("lock-wait-timeout")) |
539 | + { |
540 | + if (innobase_lock_wait_timeout > 1024*1024*1024 || innobase_lock_wait_timeout < 1) |
541 | + { |
542 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lock-wait-timeout")); |
543 | + exit(-1); |
544 | + } |
545 | + } |
546 | + |
547 | + if (vm.count("log-buffer-size")) |
548 | + { |
549 | + if (innobase_log_buffer_size > LONG_MAX || innobase_log_buffer_size < 256*1024L) |
550 | + { |
551 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-buffer-size")); |
552 | + exit(-1); |
553 | + } |
554 | + innobase_log_buffer_size/= 1024; |
555 | + innobase_log_buffer_size*= 1024; |
556 | + } |
557 | + |
558 | + if (vm.count("lru-old-blocks-pct")) |
559 | + { |
560 | + if (innobase_lru_old_blocks_pct > 95 || innobase_lru_old_blocks_pct < 5) |
561 | + { |
562 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lru-old-blocks-pct")); |
563 | + exit(-1); |
564 | + } |
565 | + } |
566 | + |
567 | + if (vm.count("lru-block-access-recency")) |
568 | + { |
569 | + if (innobase_lru_block_access_recency > ULONG_MAX) |
570 | + { |
571 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lru-block-access-recency")); |
572 | + exit(-1); |
573 | + } |
574 | + } |
575 | + |
576 | + if (vm.count("max-dirty-pages-pct")) |
577 | + { |
578 | + if (srv_max_buf_pool_modified_pct > 99) |
579 | + { |
580 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of max-dirty-pages-pct")); |
581 | + exit(-1); |
582 | + } |
583 | + } |
584 | + |
585 | + if (vm.count("max-purge-lag")) |
586 | + { |
587 | + if (srv_max_purge_lag > (unsigned long)~0L) |
588 | + { |
589 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of max-purge-lag")); |
590 | + exit(-1); |
591 | + } |
592 | + } |
593 | + |
594 | + if (vm.count("open-files")) |
595 | + { |
596 | + if (innobase_open_files > LONG_MAX || innobase_open_files < 10L) |
597 | + { |
598 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of open-files")); |
599 | + exit(-1); |
600 | + } |
601 | + } |
602 | + |
603 | + if (vm.count("read-io-threads")) |
604 | + { |
605 | + if (innobase_read_io_threads > 64 || innobase_read_io_threads < 1) |
606 | + { |
607 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of read-io-threads")); |
608 | + exit(-1); |
609 | + } |
610 | + } |
611 | + |
612 | + if (vm.count("sync-spin-loops")) |
613 | + { |
614 | + if (srv_n_spin_wait_rounds > (unsigned long)~0L) |
615 | + { |
616 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of sync_spin_loops")); |
617 | + exit(-1); |
618 | + } |
619 | + } |
620 | + |
621 | + if (vm.count("data-home-dir")) |
622 | + { |
623 | + innobase_data_home_dir= const_cast<char *>(vm["data-home-dir"].as<string>().c_str()); |
624 | + } |
625 | + |
626 | + if (vm.count("file-format")) |
627 | + { |
628 | + innobase_file_format_name= const_cast<char *>(vm["file-format"].as<string>().c_str()); |
629 | + } |
630 | + |
631 | + if (vm.count("log-group-home-dir")) |
632 | + { |
633 | + innobase_log_group_home_dir= const_cast<char *>(vm["log-group-home-dir"].as<string>().c_str()); |
634 | + } |
635 | + |
636 | + if (vm.count("flush-method")) |
637 | + { |
638 | + innobase_unix_file_flush_method= const_cast<char *>(vm["flush-method"].as<string>().c_str()); |
639 | + } |
640 | + |
641 | + if (vm.count("data-file-path")) |
642 | + { |
643 | + innodb_data_file_path= const_cast<char *>(vm["data-file-path"].as<string>().c_str()); |
644 | + } |
645 | + |
646 | ib_err_t err; |
647 | |
648 | err= ib_init(); |
649 | @@ -2941,6 +3146,7 @@ |
650 | { |
651 | fprintf(stderr,"Error %d shutting down Embedded InnoDB!\n", err); |
652 | } |
653 | + |
654 | } |
655 | |
656 | static char innodb_file_format_name_storage[100]; |
657 | @@ -3145,7 +3351,7 @@ |
658 | static DRIZZLE_SYSVAR_ULONG(lock_wait_timeout, innobase_lock_wait_timeout, |
659 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
660 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
661 | - NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); |
662 | + NULL, NULL, 5, 1, 1024 * 1024 * 1024, 0); |
663 | |
664 | static DRIZZLE_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size, |
665 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
666 | @@ -3217,6 +3423,112 @@ |
667 | "Use OS memory allocator instead of InnoDB's internal memory allocator", |
668 | NULL, NULL, true); |
669 | |
670 | +static void init_options(drizzled::module::option_context &context) |
671 | +{ |
672 | + context("adaptive-hash-index", |
673 | + po::value<bool>(&innobase_adaptive_hash_index)->default_value(true), |
674 | + N_("Enable InnoDB adaptive hash index (enabled by default).")); |
675 | + context("adaptive-flushing", |
676 | + po::value<bool>(&srv_adaptive_flushing)->default_value(true), |
677 | + N_("Attempt flushing dirty pages to avoid IO bursts at checkpoints.")); |
678 | + context("additional-mem-pool-size", |
679 | + po::value<long>(&innobase_additional_mem_pool_size)->default_value(8*1024*1024L), |
680 | + N_("Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.")); |
681 | + context("autoextend-increment", |
682 | + po::value<unsigned int>(&srv_auto_extend_increment)->default_value(8L), |
683 | + N_("Data file autoextend increment in megabytes")); |
684 | + context("buffer-pool-size", |
685 | + po::value<int64_t>(&innobase_buffer_pool_size)->default_value(128*1024*1024L), |
686 | + N_("The size of the memory buffer InnoDB uses to cache data and indexes of its tables.")); |
687 | + context("data-home-dir", |
688 | + po::value<string>(), |
689 | + N_("The common part for InnoDB table spaces.")); |
690 | + context("checksums", |
691 | + po::value<bool>(&innobase_use_checksums)->default_value(true), |
692 | + N_("Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.")); |
693 | + context("doublewrite", |
694 | + po::value<bool>(&innobase_use_doublewrite)->default_value(true), |
695 | + N_("Enable InnoDB doublewrite buffer (enabled by default). Disable with --skip-innodb-doublewrite.")); |
696 | + context("io-capacity", |
697 | + po::value<unsigned long>(&srv_io_capacity)->default_value(200), |
698 | + N_("Number of IOPs the server can do. Tunes the background IO rate")); |
699 | + context("fast-shutdown", |
700 | + po::value<unsigned long>(&innobase_fast_shutdown)->default_value(1), |
701 | + N_("Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).")); |
702 | + context("file-per-table", |
703 | + po::value<bool>(&srv_file_per_table)->default_value(false), |
704 | + N_("Stores each InnoDB table to an .ibd file in the database dir.")); |
705 | + context("file-format", |
706 | + po::value<string>(), |
707 | + N_("File format to use for new tables in .ibd files.")); |
708 | + context("flush-log-at-trx-commit", |
709 | + po::value<unsigned long>(&srv_flush_log_at_trx_commit)->default_value(1), |
710 | + N_("Set to 0 (write and flush once per second),1 (write and flush at each commit) or 2 (write at commit, flush once per second).")); |
711 | + context("flush-method", |
712 | + po::value<string>(), |
713 | + N_("With which method to flush data.")); |
714 | + context("force-recovery", |
715 | + po::value<long>(&innobase_force_recovery)->default_value(0), |
716 | + N_("Helps to save your data in case the disk image of the database becomes corrupt.")); |
717 | + context("data-file-path", |
718 | + po::value<string>(), |
719 | + N_("Path to individual files and their sizes.")); |
720 | + context("log-group-home-dir", |
721 | + po::value<string>(), |
722 | + N_("Path to individual files and their sizes.")); |
723 | + context("log-group-home-dir", |
724 | + po::value<string>(), |
725 | + N_("Path to InnoDB log files.")); |
726 | + context("log-file-size", |
727 | + po::value<int64_t>(&innodb_log_file_size)->default_value(20*1024*1024L), |
728 | + N_("Size of each log file in a log group.")); |
729 | + context("innodb-log-files-in-group", |
730 | + po::value<int64_t>(&innodb_log_files_in_group)->default_value(2), |
731 | + N_("Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.")); |
732 | + context("lock-wait-timeout", |
733 | + po::value<unsigned long>(&innobase_lock_wait_timeout)->default_value(5), |
734 | + N_("Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.")); |
735 | + context("log-buffer-size", |
736 | + po::value<long>(&innobase_log_buffer_size)->default_value(8*1024*1024L), |
737 | + N_("The size of the buffer which InnoDB uses to write log to the log files on disk.")); |
738 | + context("lru-old-blocks-pct", |
739 | + po::value<unsigned long>(&innobase_lru_old_blocks_pct)->default_value(37), |
740 | + N_("Sets the point in the LRU list from where all pages are classified as old (Advanced users)")); |
741 | + context("lru-block-access-recency", |
742 | + po::value<unsigned long>(&innobase_lru_block_access_recency)->default_value(0), |
743 | + N_("Milliseconds between accesses to a block at which it is made young. 0=disabled (Advanced users)")); |
744 | + context("max-dirty-pages-pct", |
745 | + po::value<unsigned long>(&srv_max_buf_pool_modified_pct)->default_value(75), |
746 | + N_("Percentage of dirty pages allowed in bufferpool.")); |
747 | + context("max-purge-lag", |
748 | + po::value<unsigned long>(&srv_max_purge_lag)->default_value(0), |
749 | + N_("Desired maximum length of the purge queue (0 = no limit)")); |
750 | + context("rollback-on-timeout", |
751 | + po::value<bool>(&innobase_rollback_on_timeout)->default_value(false), |
752 | + N_("Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)")); |
753 | + context("open-files", |
754 | + po::value<long>(&innobase_open_files)->default_value(300), |
755 | + N_("How many files at the maximum InnoDB keeps open at the same time.")); |
756 | + context("read-io-threads", |
757 | + po::value<unsigned long>(&innobase_read_io_threads)->default_value(4), |
758 | + N_("Number of background read I/O threads in InnoDB.")); |
759 | + context("write-io-threads", |
760 | + po::value<unsigned long>(&innobase_write_io_threads)->default_value(4), |
761 | + N_("Number of background write I/O threads in InnoDB.")); |
762 | + context("print-verbose-log", |
763 | + po::value<bool>(&innobase_print_verbose_log)->default_value(true), |
764 | + N_("Disable if you want to reduce the number of messages written to the log (default: enabled).")); |
765 | + context("status-file", |
766 | + po::value<bool>(&innobase_create_status_file)->default_value(false), |
767 | + N_("Enable SHOW INNODB STATUS output in the log")); |
768 | + context("sync-spin-loops", |
769 | + po::value<unsigned long>(&srv_n_spin_wait_rounds)->default_value(30L), |
770 | + N_("Count of spin-loop rounds in InnoDB mutexes (30 by default)")); |
771 | + context("use-sys-malloc", |
772 | + po::value<bool>(&srv_use_sys_malloc)->default_value(true), |
773 | + N_("Use OS memory allocator instead of InnoDB's internal memory allocator")); |
774 | +} |
775 | + |
776 | static drizzle_sys_var* innobase_system_variables[]= { |
777 | DRIZZLE_SYSVAR(adaptive_hash_index), |
778 | DRIZZLE_SYSVAR(adaptive_flushing), |
779 | @@ -3264,6 +3576,6 @@ |
780 | PLUGIN_LICENSE_GPL, |
781 | embedded_innodb_init, /* Plugin Init */ |
782 | innobase_system_variables, /* system variables */ |
783 | - NULL /* config options */ |
784 | + init_options /* config options */ |
785 | } |
786 | DRIZZLE_DECLARE_PLUGIN_END; |
787 | |
788 | === modified file 'plugin/embedded_innodb/libinnodb_datadict_dump_func.cc' |
789 | --- plugin/embedded_innodb/libinnodb_datadict_dump_func.cc 2010-07-08 21:23:39 +0000 |
790 | +++ plugin/embedded_innodb/libinnodb_datadict_dump_func.cc 2010-08-17 02:53:42 +0000 |
791 | @@ -23,7 +23,11 @@ |
792 | #include <drizzled/function/str/strfunc.h> |
793 | #include "libinnodb_datadict_dump_func.h" |
794 | |
795 | -#include "embedded_innodb-1.0/innodb.h" |
796 | +#if defined(HAVE_HAILDB_H) |
797 | +# include <haildb.h> |
798 | +#else |
799 | +# include <embedded_innodb-1.0/innodb.h> |
800 | +#endif /* HAVE_HAILDB_H */ |
801 | |
802 | #include <sstream> |
803 | #include <string> |
804 | |
805 | === modified file 'plugin/embedded_innodb/libinnodb_version_func.cc' |
806 | --- plugin/embedded_innodb/libinnodb_version_func.cc 2010-05-18 18:20:56 +0000 |
807 | +++ plugin/embedded_innodb/libinnodb_version_func.cc 2010-08-17 02:53:42 +0000 |
808 | @@ -23,7 +23,11 @@ |
809 | #include <drizzled/function/str/strfunc.h> |
810 | #include "libinnodb_version_func.h" |
811 | |
812 | -#include "embedded_innodb-1.0/innodb.h" |
813 | +#if defined(HAVE_HAILDB_H) |
814 | +# include <haildb.h> |
815 | +#else |
816 | +# include <embedded_innodb-1.0/innodb.h> |
817 | +#endif /* HAVE_HAILDB_H */ |
818 | |
819 | using namespace std; |
820 | using namespace drizzled; |
821 | |
822 | === modified file 'plugin/embedded_innodb/plugin.ini' |
823 | --- plugin/embedded_innodb/plugin.ini 2010-04-21 02:31:09 +0000 |
824 | +++ plugin/embedded_innodb/plugin.ini 2010-08-17 02:53:42 +0000 |
825 | @@ -3,5 +3,5 @@ |
826 | description=Work in progress engine using libinnodb instead of including it in tree. |
827 | sources=embedded_innodb_engine.cc libinnodb_version_func.cc libinnodb_datadict_dump_func.cc config_table_function.cc status_table_function.cc |
828 | headers=embedded_innodb_engine.h libinnodb_version_func.h libinnodb_datadict_dump_func.h config_table_function.h status_table_function.h |
829 | -build_conditional="x${ac_cv_libinnodb}" = "xyes" |
830 | -ldflags=${LTLIBINNODB} |
831 | +build_conditional="x${ac_cv_have_innodb}" = "xyes" |
832 | +ldflags=${INNODB_LIBS} |
833 | |
834 | === modified file 'plugin/embedded_innodb/status_table_function.cc' |
835 | --- plugin/embedded_innodb/status_table_function.cc 2010-05-18 18:20:56 +0000 |
836 | +++ plugin/embedded_innodb/status_table_function.cc 2010-08-17 02:53:42 +0000 |
837 | @@ -19,7 +19,11 @@ |
838 | #include "config.h" |
839 | #include "drizzled/plugin/table_function.h" |
840 | |
841 | -#include "embedded_innodb-1.0/innodb.h" |
842 | +#if defined(HAVE_HAILDB_H) |
843 | +# include <haildb.h> |
844 | +#else |
845 | +# include <embedded_innodb-1.0/innodb.h> |
846 | +#endif /* HAVE_HAILDB_H */ |
847 | |
848 | #include "status_table_function.h" |
849 | |
850 | |
851 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result' |
852 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result 2010-08-06 17:53:24 +0000 |
853 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result 2010-08-17 02:53:42 +0000 |
854 | @@ -46,7 +46,7 @@ |
855 | sync_spin_loops ULONG |
856 | use_sys_malloc BOOL |
857 | version TEXT |
858 | -SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION; |
859 | +SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION where NAME NOT IN ("VERSION"); |
860 | NAME TYPE VALUE |
861 | adaptive_hash_index BOOL true |
862 | adaptive_flushing BOOL true |
863 | @@ -83,7 +83,6 @@ |
864 | status_file BOOL false |
865 | sync_spin_loops ULONG 30 |
866 | use_sys_malloc BOOL true |
867 | -version TEXT 1.0.6.6750 |
868 | SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir"); |
869 | NAME VALUE |
870 | data_file_path NULL |
871 | |
872 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt' |
873 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt 2010-06-01 05:55:48 +0000 |
874 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt 2010-08-17 02:53:42 +0000 |
875 | @@ -1,1 +1,1 @@ |
876 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb_lock_wait_timeout=1 |
877 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1 |
878 | |
879 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update_pk_index-master.opt' |
880 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update_pk_index-master.opt 2010-06-01 06:00:24 +0000 |
881 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update_pk_index-master.opt 2010-08-17 02:53:42 +0000 |
882 | @@ -1,1 +1,1 @@ |
883 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb_lock_wait_timeout=1 |
884 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1 |
885 | |
886 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt' |
887 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt 2010-05-10 13:17:59 +0000 |
888 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt 2010-08-17 02:53:42 +0000 |
889 | @@ -1,1 +1,1 @@ |
890 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-flushing=false |
891 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-flushing=false |
892 | |
893 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt' |
894 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt 2010-05-10 13:17:59 +0000 |
895 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt 2010-08-17 02:53:42 +0000 |
896 | @@ -1,1 +1,1 @@ |
897 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-flushing=true |
898 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-flushing=true |
899 | |
900 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt' |
901 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt 2010-05-10 13:14:39 +0000 |
902 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt 2010-08-17 02:53:42 +0000 |
903 | @@ -1,1 +1,1 @@ |
904 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-hash-index=false |
905 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-hash-index=false |
906 | |
907 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt' |
908 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt 2010-05-10 12:53:25 +0000 |
909 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt 2010-08-17 02:53:42 +0000 |
910 | @@ -1,1 +1,1 @@ |
911 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-hash-index=true |
912 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-hash-index=true |
913 | |
914 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_additional_mem_pool_size_32m-master.opt' |
915 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_additional_mem_pool_size_32m-master.opt 2010-05-10 13:27:43 +0000 |
916 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_additional_mem_pool_size_32m-master.opt 2010-08-17 02:53:42 +0000 |
917 | @@ -1,1 +1,1 @@ |
918 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-additional-mem-pool-size=32m |
919 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.additional-mem-pool-size=33554432 |
920 | |
921 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt' |
922 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt 2010-05-10 13:56:23 +0000 |
923 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt 2010-08-17 02:53:42 +0000 |
924 | @@ -1,1 +1,1 @@ |
925 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-autoextend-increment=42 |
926 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.autoextend-increment=42 |
927 | |
928 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt' |
929 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt 2010-05-10 14:02:46 +0000 |
930 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt 2010-08-17 02:53:42 +0000 |
931 | @@ -1,1 +1,1 @@ |
932 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-buffer-pool-size=20m |
933 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.buffer-pool-size=20971520 |
934 | |
935 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt' |
936 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt 2010-04-30 05:50:45 +0000 |
937 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt 2010-08-17 02:53:42 +0000 |
938 | @@ -1,1 +1,1 @@ |
939 | ---plugin_add=embedded_innodb --plugin_remove=innobase --skip-innodb-checksums |
940 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.checksums=false |
941 | |
942 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt' |
943 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt 2010-04-30 05:50:45 +0000 |
944 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt 2010-08-17 02:53:42 +0000 |
945 | @@ -1,1 +1,1 @@ |
946 | ---plugin_add=embedded_innodb --plugin_remove=innobase |
947 | +--plugin_add=embedded_innodb --plugin_remove=innobase |
948 | |
949 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt' |
950 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt 2010-05-03 04:14:08 +0000 |
951 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt 2010-08-17 02:53:42 +0000 |
952 | @@ -1,1 +1,1 @@ |
953 | ---plugin_add=embedded_innodb --plugin_remove=innobase --skip-innodb-doublewrite |
954 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.doublewrite=false |
955 | |
956 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt' |
957 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt 2010-05-03 04:14:08 +0000 |
958 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt 2010-08-17 02:53:42 +0000 |
959 | @@ -1,1 +1,1 @@ |
960 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-doublewrite |
961 | +--plugin_add=embedded_innodb --plugin_remove=innobase |
962 | |
963 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt' |
964 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt 2010-05-03 13:41:05 +0000 |
965 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt 2010-08-17 02:53:42 +0000 |
966 | @@ -1,1 +1,1 @@ |
967 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=0 |
968 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=0 |
969 | |
970 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt' |
971 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt 2010-05-03 13:41:05 +0000 |
972 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt 2010-08-17 02:53:42 +0000 |
973 | @@ -1,1 +1,1 @@ |
974 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=1 |
975 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=1 |
976 | |
977 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt' |
978 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt 2010-05-03 13:41:05 +0000 |
979 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt 2010-08-17 02:53:42 +0000 |
980 | @@ -1,1 +1,1 @@ |
981 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=2 |
982 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=2 |
983 | |
984 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt' |
985 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt 2010-05-03 14:13:17 +0000 |
986 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt 2010-08-17 02:53:42 +0000 |
987 | @@ -1,1 +1,1 @@ |
988 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table=0 |
989 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=false |
990 | |
991 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt' |
992 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt 2010-05-03 14:08:25 +0000 |
993 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt 2010-08-17 02:53:42 +0000 |
994 | @@ -1,1 +1,1 @@ |
995 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table |
996 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=true |
997 | |
998 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit0-master.opt' |
999 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit0-master.opt 2010-05-05 04:24:23 +0000 |
1000 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit0-master.opt 2010-08-17 02:53:42 +0000 |
1001 | @@ -1,1 +1,1 @@ |
1002 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=0 |
1003 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=0 |
1004 | |
1005 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit1-master.opt' |
1006 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit1-master.opt 2010-05-05 04:24:23 +0000 |
1007 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit1-master.opt 2010-08-17 02:53:42 +0000 |
1008 | @@ -1,1 +1,1 @@ |
1009 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=1 |
1010 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=1 |
1011 | |
1012 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit2-master.opt' |
1013 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit2-master.opt 2010-05-05 04:24:23 +0000 |
1014 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit2-master.opt 2010-08-17 02:53:42 +0000 |
1015 | @@ -1,1 +1,1 @@ |
1016 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=2 |
1017 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=2 |
1018 | |
1019 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt' |
1020 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt 2010-05-06 09:50:02 +0000 |
1021 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt 2010-08-17 02:53:42 +0000 |
1022 | @@ -1,1 +1,1 @@ |
1023 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=fsync |
1024 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=fsync |
1025 | |
1026 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt' |
1027 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt 2010-05-06 09:50:02 +0000 |
1028 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt 2010-08-17 02:53:42 +0000 |
1029 | @@ -1,1 +1,1 @@ |
1030 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=O_DIRECT |
1031 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=O_DIRECT |
1032 | |
1033 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt' |
1034 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt 2010-05-06 09:50:02 +0000 |
1035 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt 2010-08-17 02:53:42 +0000 |
1036 | @@ -1,1 +1,1 @@ |
1037 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=O_DSYNC |
1038 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=O_DSYNC |
1039 | |
1040 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt' |
1041 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt 2010-05-11 05:11:20 +0000 |
1042 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt 2010-08-17 02:53:42 +0000 |
1043 | @@ -1,1 +1,1 @@ |
1044 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-force-recovery=1 |
1045 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.force-recovery=1 |
1046 | |
1047 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt' |
1048 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt 2010-05-03 12:27:00 +0000 |
1049 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt 2010-08-17 02:53:42 +0000 |
1050 | @@ -1,1 +1,1 @@ |
1051 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-io-capacity=500 |
1052 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.io-capacity=500 |
1053 | |
1054 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt' |
1055 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt 2010-05-11 05:19:48 +0000 |
1056 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt 2010-08-17 02:53:42 +0000 |
1057 | @@ -1,1 +1,1 @@ |
1058 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-lock-wait-timeout=1 |
1059 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1 |
1060 | |
1061 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt' |
1062 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt 2010-05-11 05:36:20 +0000 |
1063 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt 2010-08-17 02:53:42 +0000 |
1064 | @@ -1,1 +1,1 @@ |
1065 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-log-buffer-size=5m |
1066 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.log-buffer-size=5242880 |
1067 | |
1068 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_dirty_pages_pct_50-master.opt' |
1069 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_dirty_pages_pct_50-master.opt 2010-05-07 08:02:05 +0000 |
1070 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_dirty_pages_pct_50-master.opt 2010-08-17 02:53:42 +0000 |
1071 | @@ -1,1 +1,1 @@ |
1072 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-max-dirty-pages-pct=50 |
1073 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.max-dirty-pages-pct=50 |
1074 | |
1075 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt' |
1076 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt 2010-05-07 12:15:41 +0000 |
1077 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt 2010-08-17 02:53:42 +0000 |
1078 | @@ -1,1 +1,1 @@ |
1079 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-max-purge-lag=42 |
1080 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.max-purge-lag=42 |
1081 | |
1082 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt' |
1083 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt 2010-05-10 05:13:41 +0000 |
1084 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt 2010-08-17 02:53:42 +0000 |
1085 | @@ -1,1 +1,1 @@ |
1086 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-open-files=800 |
1087 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.open-files=800 |
1088 | |
1089 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt' |
1090 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt 2010-05-11 05:46:17 +0000 |
1091 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt 2010-08-17 02:53:42 +0000 |
1092 | @@ -1,1 +1,1 @@ |
1093 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-print-verbose-log=false |
1094 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.print-verbose-log=false |
1095 | |
1096 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt' |
1097 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt 2010-05-11 05:46:17 +0000 |
1098 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt 2010-08-17 02:53:42 +0000 |
1099 | @@ -1,1 +1,1 @@ |
1100 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-print-verbose-log=true |
1101 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.print-verbose-log=true |
1102 | |
1103 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt' |
1104 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt 2010-05-10 06:06:20 +0000 |
1105 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt 2010-08-17 02:53:42 +0000 |
1106 | @@ -1,1 +1,1 @@ |
1107 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-read-io-threads=64 |
1108 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.read-io-threads=64 |
1109 | |
1110 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt' |
1111 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt 2010-05-11 07:09:35 +0000 |
1112 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt 2010-08-17 02:53:42 +0000 |
1113 | @@ -1,1 +1,1 @@ |
1114 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-rollback-on-timeout=false |
1115 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.rollback-on-timeout=false |
1116 | |
1117 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt' |
1118 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt 2010-05-11 07:09:35 +0000 |
1119 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt 2010-08-17 02:53:42 +0000 |
1120 | @@ -1,1 +1,1 @@ |
1121 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-rollback-on-timeout=1 |
1122 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.rollback-on-timeout=1 |
1123 | |
1124 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt' |
1125 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt 2010-05-11 07:29:33 +0000 |
1126 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt 2010-08-17 02:53:42 +0000 |
1127 | @@ -1,1 +1,1 @@ |
1128 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-sync-spin-loops=100 |
1129 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.sync-spin-loops=100 |
1130 | |
1131 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test' |
1132 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test 2010-03-15 05:34:43 +0000 |
1133 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test 2010-08-17 02:53:42 +0000 |
1134 | @@ -1,7 +1,7 @@ |
1135 | SHOW CREATE TABLE DATA_DICTIONARY.INNODB_CONFIGURATION; |
1136 | SELECT COUNT(*) FROM DATA_DICTIONARY.INNODB_CONFIGURATION; |
1137 | SELECT NAME,TYPE FROM DATA_DICTIONARY.INNODB_CONFIGURATION; |
1138 | -SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION; |
1139 | +SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION where NAME NOT IN ("VERSION"); |
1140 | SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir"); |
1141 | SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME = "file_per_table"; |
1142 | |
1143 | |
1144 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt' |
1145 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt 2010-05-11 07:29:33 +0000 |
1146 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt 2010-08-17 02:53:42 +0000 |
1147 | @@ -1,1 +1,1 @@ |
1148 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-use-sys-malloc=0 |
1149 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.use-sys-malloc=0 |
1150 | |
1151 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt' |
1152 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt 2010-05-11 07:29:33 +0000 |
1153 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt 2010-08-17 02:53:42 +0000 |
1154 | @@ -1,1 +1,1 @@ |
1155 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-use-sys-malloc=1 |
1156 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.use-sys-malloc=1 |
1157 | |
1158 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt' |
1159 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt 2010-05-10 06:09:51 +0000 |
1160 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt 2010-08-17 02:53:42 +0000 |
1161 | @@ -1,1 +1,1 @@ |
1162 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-write-io-threads=64 |
1163 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.write-io-threads=64 |
1164 | |
1165 | === modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt' |
1166 | --- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt 2010-06-07 08:46:37 +0000 |
1167 | +++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt 2010-08-17 02:53:42 +0000 |
1168 | @@ -1,1 +1,1 @@ |
1169 | ---plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table=1 |
1170 | +--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=1 |
1171 | |
1172 | === modified file 'plugin/filtered_replicator/filtered_replicator.cc' |
1173 | --- plugin/filtered_replicator/filtered_replicator.cc 2010-07-29 00:35:25 +0000 |
1174 | +++ plugin/filtered_replicator/filtered_replicator.cc 2010-08-17 02:53:42 +0000 |
1175 | @@ -126,6 +126,24 @@ |
1176 | pthread_mutex_init(&sysvar_tab_lock, NULL); |
1177 | } |
1178 | |
1179 | +FilteredReplicator::~FilteredReplicator() |
1180 | +{ |
1181 | + if (sch_re) |
1182 | + { |
1183 | + pcre_free(sch_re); |
1184 | + } |
1185 | + if (tab_re) |
1186 | + { |
1187 | + pcre_free(tab_re); |
1188 | + } |
1189 | + |
1190 | + pthread_mutex_destroy(&sch_vector_lock); |
1191 | + pthread_mutex_destroy(&tab_vector_lock); |
1192 | + pthread_mutex_destroy(&sysvar_sch_lock); |
1193 | + pthread_mutex_destroy(&sysvar_tab_lock); |
1194 | + |
1195 | +} |
1196 | + |
1197 | void FilteredReplicator::parseStatementTableMetadata(const message::Statement &in_statement, |
1198 | string &in_schema_name, |
1199 | string &in_table_name) const |
1200 | @@ -500,22 +518,22 @@ |
1201 | |
1202 | if (vm.count("filteredschemas")) |
1203 | { |
1204 | - sysvar_filtered_replicator_sch_filters= strdup(vm["filteredschemas"].as<string>().c_str()); |
1205 | + sysvar_filtered_replicator_sch_filters= const_cast<char *>(vm["filteredschemas"].as<string>().c_str()); |
1206 | } |
1207 | |
1208 | else |
1209 | { |
1210 | - sysvar_filtered_replicator_sch_filters= (char *)""; |
1211 | + sysvar_filtered_replicator_sch_filters= const_cast<char *>(""); |
1212 | } |
1213 | |
1214 | if (vm.count("filteredtables")) |
1215 | { |
1216 | - sysvar_filtered_replicator_tab_filters= strdup(vm["filteredtables"].as<string>().c_str()); |
1217 | + sysvar_filtered_replicator_tab_filters= const_cast<char *>(vm["filteredtables"].as<string>().c_str()); |
1218 | } |
1219 | |
1220 | else |
1221 | { |
1222 | - sysvar_filtered_replicator_tab_filters= (char *)""; |
1223 | + sysvar_filtered_replicator_tab_filters= const_cast<char *>(""); |
1224 | } |
1225 | |
1226 | filtered_replicator= new(std::nothrow) |
1227 | |
1228 | === modified file 'plugin/filtered_replicator/filtered_replicator.h' |
1229 | --- plugin/filtered_replicator/filtered_replicator.h 2010-04-05 16:06:01 +0000 |
1230 | +++ plugin/filtered_replicator/filtered_replicator.h 2010-08-17 02:53:42 +0000 |
1231 | @@ -46,22 +46,7 @@ |
1232 | const char *in_tab_filters); |
1233 | |
1234 | /** Destructor */ |
1235 | - ~FilteredReplicator() |
1236 | - { |
1237 | - if (sch_re) |
1238 | - { |
1239 | - pcre_free(sch_re); |
1240 | - } |
1241 | - if (tab_re) |
1242 | - { |
1243 | - pcre_free(tab_re); |
1244 | - } |
1245 | - |
1246 | - pthread_mutex_destroy(&sch_vector_lock); |
1247 | - pthread_mutex_destroy(&tab_vector_lock); |
1248 | - pthread_mutex_destroy(&sysvar_sch_lock); |
1249 | - pthread_mutex_destroy(&sysvar_tab_lock); |
1250 | - } |
1251 | + ~FilteredReplicator(); |
1252 | |
1253 | /** |
1254 | * Replicate a Transaction message to an Applier. |
1255 | |
1256 | === modified file 'plugin/hello_events/hello_events.cc' |
1257 | --- plugin/hello_events/hello_events.cc 2010-07-16 14:00:07 +0000 |
1258 | +++ plugin/hello_events/hello_events.cc 2010-08-17 02:53:42 +0000 |
1259 | @@ -135,6 +135,13 @@ |
1260 | fprintf(stderr, PLUGIN_NAME" EVENT observeAfterDropDatabase(%s) err = %d\n", data.db.c_str(), data.err); |
1261 | } |
1262 | |
1263 | +HelloEvents::~HelloEvents() |
1264 | +{ |
1265 | + /* These are strdup'd in option processing */ |
1266 | + free(sysvar_table_list); |
1267 | + free(sysvar_db_list); |
1268 | +} |
1269 | + |
1270 | //================================== |
1271 | /* This is where I register which table events my pluggin is interested in.*/ |
1272 | void HelloEvents::registerTableEventsDo(TableShare &table_share, EventObserverList &observers) |
1273 | |
1274 | === modified file 'plugin/hello_events/hello_events.h' |
1275 | --- plugin/hello_events/hello_events.h 2010-05-17 16:42:43 +0000 |
1276 | +++ plugin/hello_events/hello_events.h 2010-08-17 02:53:42 +0000 |
1277 | @@ -34,6 +34,7 @@ |
1278 | public: |
1279 | |
1280 | HelloEvents(std::string name_arg): EventObserver(name_arg), is_enabled(false), db_list(""), table_list(""){} |
1281 | + ~HelloEvents(); |
1282 | |
1283 | void registerTableEventsDo(TableShare &table_share, EventObserverList &observers); |
1284 | void registerSchemaEventsDo(const std::string &db, EventObserverList &observers); |
1285 | |
1286 | === modified file 'plugin/innobase/handler/ha_innodb.cc' |
1287 | --- plugin/innobase/handler/ha_innodb.cc 2010-08-08 01:18:02 +0000 |
1288 | +++ plugin/innobase/handler/ha_innodb.cc 2010-08-17 02:53:42 +0000 |
1289 | @@ -88,6 +88,12 @@ |
1290 | #include <drizzled/transaction_services.h> |
1291 | |
1292 | #include <boost/algorithm/string.hpp> |
1293 | +#include <boost/program_options.hpp> |
1294 | +#include <drizzled/module/option_map.h> |
1295 | +#include <iostream> |
1296 | + |
1297 | +namespace po= boost::program_options; |
1298 | +using namespace std; |
1299 | |
1300 | /** @file ha_innodb.cc */ |
1301 | |
1302 | @@ -180,8 +186,9 @@ |
1303 | |
1304 | static long innobase_mirrored_log_groups, innobase_log_files_in_group, |
1305 | innobase_log_buffer_size, |
1306 | - innobase_additional_mem_pool_size, innobase_file_io_threads, |
1307 | + innobase_file_io_threads, |
1308 | innobase_force_recovery, innobase_open_files; |
1309 | +static long innobase_additional_mem_pool_size= 8*1024*1024L; |
1310 | static ulong innobase_commit_concurrency = 0; |
1311 | static ulong innobase_read_io_threads; |
1312 | static ulong innobase_write_io_threads; |
1313 | @@ -189,7 +196,8 @@ |
1314 | /** |
1315 | * @TODO: Turn this into size_t as soon as we have a Variable<size_t> |
1316 | */ |
1317 | -static int64_t innobase_buffer_pool_size, innobase_log_file_size; |
1318 | +static int64_t innobase_buffer_pool_size= 128*1024*1024; |
1319 | +static int64_t innobase_log_file_size; |
1320 | |
1321 | /* The default values for the following char* start-up parameters |
1322 | are determined in innobase_init below: */ |
1323 | @@ -296,6 +304,10 @@ |
1324 | pthread_mutex_destroy(&commit_cond_m); |
1325 | pthread_cond_destroy(&commit_cond); |
1326 | } |
1327 | + |
1328 | + /* These get strdup'd from vm variables */ |
1329 | + free(innobase_data_home_dir); |
1330 | + |
1331 | } |
1332 | |
1333 | private: |
1334 | @@ -1815,6 +1827,12 @@ |
1335 | prebuilt->read_just_key = 0; |
1336 | } |
1337 | |
1338 | +template<class T> |
1339 | +void align_value(T& value, size_t align_val= 1024) |
1340 | +{ |
1341 | + value= value - (value % align_val); |
1342 | +} |
1343 | + |
1344 | /*********************************************************************//** |
1345 | Opens an InnoDB database. |
1346 | @return 0 on success, error code on failure */ |
1347 | @@ -1830,6 +1848,279 @@ |
1348 | char *default_path; |
1349 | uint format_id; |
1350 | InnobaseEngine *actuall_engine_ptr; |
1351 | + const module::option_map &vm= context.getOptions(); |
1352 | + |
1353 | + if (vm.count("io-capacity")) |
1354 | + { |
1355 | + if (srv_io_capacity < 100) |
1356 | + { |
1357 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for io-capacity\n")); |
1358 | + exit(-1); |
1359 | + } |
1360 | + } |
1361 | + |
1362 | + if (vm.count("data-home-dir")) |
1363 | + { |
1364 | + innobase_data_home_dir= strdup(vm["data-home-dir"].as<string>().c_str()); |
1365 | + } |
1366 | + |
1367 | + else |
1368 | + { |
1369 | + innobase_data_home_dir= NULL; |
1370 | + } |
1371 | + |
1372 | + if (vm.count("fast-shutdown")) |
1373 | + { |
1374 | + if (innobase_fast_shutdown > 2) |
1375 | + { |
1376 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for fast-shutdown\n")); |
1377 | + exit(-1); |
1378 | + } |
1379 | + } |
1380 | + |
1381 | + if (vm.count("file-format-check")) |
1382 | + { |
1383 | + innobase_file_format_check= const_cast<char *>(vm["file-format-check"].as<string>().c_str()); |
1384 | + } |
1385 | + |
1386 | + if (vm.count("flush-log-at-trx-commit")) |
1387 | + { |
1388 | + if (srv_flush_log_at_trx_commit > 2) |
1389 | + { |
1390 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for flush-log-at-trx-commit\n")); |
1391 | + exit(-1); |
1392 | + } |
1393 | + } |
1394 | + |
1395 | + if (vm.count("flush-method")) |
1396 | + { |
1397 | + innobase_unix_file_flush_method= const_cast<char *>(vm["flush-method"].as<string>().c_str()); |
1398 | + } |
1399 | + else |
1400 | + { |
1401 | + innobase_unix_file_flush_method= NULL; |
1402 | + } |
1403 | + |
1404 | +#ifdef UNIV_LOG_ARCHIVE |
1405 | + if (vm.count("log-arch-dir")) |
1406 | + { |
1407 | + innobase_log_arch_dir= const_cast<char *>(vm["log-arch-dir"].as<string>().c_str()); |
1408 | + } |
1409 | + |
1410 | + else |
1411 | + { |
1412 | + innobase_log_arch_dir= NULL; |
1413 | + } |
1414 | +#endif /* UNIV_LOG_ARCHIVE */ |
1415 | + |
1416 | + if (vm.count("max-dirty-pages-pct")) |
1417 | + { |
1418 | + if (srv_max_buf_pool_modified_pct > 99) |
1419 | + { |
1420 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for max-dirty-pages-pct\n")); |
1421 | + exit(-1); |
1422 | + } |
1423 | + } |
1424 | + |
1425 | + if (vm.count("stats-sample-pages")) |
1426 | + { |
1427 | + if (srv_stats_sample_pages < 8) |
1428 | + { |
1429 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for stats-sample-pages\n")); |
1430 | + exit(-1); |
1431 | + } |
1432 | + } |
1433 | + |
1434 | + if (vm.count("additional-mem-pool-size")) |
1435 | + { |
1436 | + align_value(innobase_additional_mem_pool_size); |
1437 | + |
1438 | + if (innobase_additional_mem_pool_size < 512*1024L) |
1439 | + { |
1440 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for additional-mem-pool-size\n")); |
1441 | + exit(-1); |
1442 | + } |
1443 | + |
1444 | + } |
1445 | + |
1446 | + if (vm.count("autoextend-increment")) |
1447 | + { |
1448 | + if (srv_auto_extend_increment < 1 || srv_auto_extend_increment > 1000) |
1449 | + { |
1450 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for autoextend-increment\n")); |
1451 | + exit(-1); |
1452 | + } |
1453 | + } |
1454 | + |
1455 | + if (vm.count("buffer-pool-size")) |
1456 | + { |
1457 | + align_value(innobase_buffer_pool_size, 1024*1024); |
1458 | + if (innobase_buffer_pool_size < 5*1024*1024) |
1459 | + { |
1460 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for buffer-pool-size\n")); |
1461 | + exit(-1); |
1462 | + } |
1463 | + |
1464 | + } |
1465 | + |
1466 | + if (vm.count("commit-concurrency")) |
1467 | + { |
1468 | + if (srv_replication_delay > 1000) |
1469 | + { |
1470 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for commit-concurrency\n")); |
1471 | + exit(-1); |
1472 | + } |
1473 | + } |
1474 | + |
1475 | + if (vm.count("concurrency-tickets")) |
1476 | + { |
1477 | + if (srv_n_free_tickets_to_enter < 1) |
1478 | + { |
1479 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for concurrency-tickets\n")); |
1480 | + exit(-1); |
1481 | + } |
1482 | + } |
1483 | + |
1484 | + if (vm.count("file-io-threads")) |
1485 | + { |
1486 | + if (innobase_file_io_threads < 4 || innobase_file_io_threads > 64) |
1487 | + { |
1488 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for file-io-threads\n")); |
1489 | + exit(-1); |
1490 | + } |
1491 | + } |
1492 | + |
1493 | + if (vm.count("read-io-threads")) |
1494 | + { |
1495 | + if (innobase_read_io_threads < 1 || innobase_read_io_threads > 64) |
1496 | + { |
1497 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-io-threads\n")); |
1498 | + exit(-1); |
1499 | + } |
1500 | + } |
1501 | + |
1502 | + if (vm.count("write-io-threads")) |
1503 | + { |
1504 | + if (innobase_write_io_threads < 1 || innobase_write_io_threads > 64) |
1505 | + { |
1506 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for write-io-threads\n")); |
1507 | + exit(-1); |
1508 | + } |
1509 | + } |
1510 | + |
1511 | + if (vm.count("force-recovery")) |
1512 | + { |
1513 | + if (innobase_force_recovery > 6) |
1514 | + { |
1515 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for force-recovery\n")); |
1516 | + exit(-1); |
1517 | + } |
1518 | + } |
1519 | + |
1520 | + if (vm.count("log-buffer-size")) |
1521 | + { |
1522 | + align_value(innobase_log_buffer_size); |
1523 | + if (innobase_log_buffer_size < 256*1024L) |
1524 | + { |
1525 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n")); |
1526 | + exit(-1); |
1527 | + } |
1528 | + } |
1529 | + |
1530 | + if (vm.count("log-file-size")) |
1531 | + { |
1532 | + align_value(innobase_log_file_size, 1024*1024); |
1533 | + if (innobase_log_file_size < 1*1024*1024L) |
1534 | + { |
1535 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n")); |
1536 | + exit(-1); |
1537 | + } |
1538 | + } |
1539 | + |
1540 | + if (vm.count("log-files-in-group")) |
1541 | + { |
1542 | + if (innobase_log_files_in_group < 2 || innobase_log_files_in_group > 100) |
1543 | + { |
1544 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-files-in-group\n")); |
1545 | + exit(-1); |
1546 | + } |
1547 | + } |
1548 | + |
1549 | + if (vm.count("mirrored-log-groups")) |
1550 | + { |
1551 | + if (innobase_mirrored_log_groups < 1 || innobase_mirrored_log_groups > 10) |
1552 | + { |
1553 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for mirrored-log-groups\n")); |
1554 | + exit(-1); |
1555 | + } |
1556 | + } |
1557 | + |
1558 | + if (vm.count("open-files")) |
1559 | + { |
1560 | + if (innobase_open_files < 10) |
1561 | + { |
1562 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for open-files\n")); |
1563 | + exit(-1); |
1564 | + } |
1565 | + } |
1566 | + |
1567 | + if (vm.count("thread-concurrency")) |
1568 | + { |
1569 | + if (srv_thread_concurrency > 1000) |
1570 | + { |
1571 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for thread-concurrency\n")); |
1572 | + exit(-1); |
1573 | + } |
1574 | + } |
1575 | + |
1576 | + if (vm.count("data-file-path")) |
1577 | + { |
1578 | + innobase_data_file_path= const_cast<char *>(vm["data-file-path"].as<string>().c_str()); |
1579 | + } |
1580 | + else |
1581 | + { |
1582 | + innobase_data_file_path= NULL; |
1583 | + } |
1584 | + |
1585 | + if (vm.count("version")) |
1586 | + { |
1587 | + innodb_version_str= const_cast<char *>(vm["version"].as<string>().c_str()); |
1588 | + } |
1589 | + |
1590 | + if (vm.count("read-ahead-threshold")) |
1591 | + { |
1592 | + if (srv_read_ahead_threshold > 64) |
1593 | + { |
1594 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-ahead-threshold\n")); |
1595 | + exit(-1); |
1596 | + } |
1597 | + } |
1598 | + |
1599 | + if (vm.count("support-xa")) |
1600 | + { |
1601 | + (SessionVAR(NULL,support_xa))= vm["support-xa"].as<bool>(); |
1602 | + } |
1603 | + |
1604 | + if (vm.count("table-locks")) |
1605 | + { |
1606 | + (SessionVAR(NULL,table_locks))= vm["table-locks"].as<bool>(); |
1607 | + } |
1608 | + |
1609 | + if (vm.count("strict-mode")) |
1610 | + { |
1611 | + (SessionVAR(NULL,strict_mode))= vm["strict-mode"].as<bool>(); |
1612 | + } |
1613 | + |
1614 | + if (vm.count("lock-wait-timeout")) |
1615 | + { |
1616 | + if (vm["lock-wait-timeout"].as<unsigned long>() < 1 || vm["lock-wait-timeout"].as<unsigned long>() > 1024*1024*1024) |
1617 | + { |
1618 | + errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for lock-wait-timeout\n")); |
1619 | + exit(-1); |
1620 | + } |
1621 | + |
1622 | + (SessionVAR(NULL,lock_wait_timeout))= vm["lock-wait-timeout"].as<unsigned long>(); |
1623 | + } |
1624 | |
1625 | innodb_engine_ptr= actuall_engine_ptr= new InnobaseEngine(innobase_engine_name); |
1626 | |
1627 | @@ -1930,7 +2221,12 @@ |
1628 | |
1629 | /* The default dir for log files is the datadir of MySQL */ |
1630 | |
1631 | - if (!innobase_log_group_home_dir) { |
1632 | + if (vm.count("log-group-home-dir")) |
1633 | + { |
1634 | + innobase_log_group_home_dir= const_cast<char *>(vm["log-group-home-dir"].as<string>().c_str()); |
1635 | + } |
1636 | + else |
1637 | + { |
1638 | innobase_log_group_home_dir = default_path; |
1639 | } |
1640 | |
1641 | @@ -1954,11 +2250,12 @@ |
1642 | goto mem_free_and_error; |
1643 | } |
1644 | |
1645 | + |
1646 | /* Validate the file format by animal name */ |
1647 | - if (innobase_file_format_name != NULL) { |
1648 | - |
1649 | + if (vm.count("file-format")) |
1650 | + { |
1651 | format_id = innobase_file_format_name_lookup( |
1652 | - innobase_file_format_name); |
1653 | + vm["file-format"].as<string>().c_str()); |
1654 | |
1655 | if (format_id > DICT_TF_FORMAT_MAX) { |
1656 | |
1657 | @@ -1967,8 +2264,7 @@ |
1658 | goto mem_free_and_error; |
1659 | } |
1660 | } else { |
1661 | - /* Set it to the default file format id. Though this |
1662 | - should never happen. */ |
1663 | + /* Set it to the default file format id.*/ |
1664 | format_id = 0; |
1665 | } |
1666 | |
1667 | @@ -2007,14 +2303,15 @@ |
1668 | } |
1669 | } |
1670 | |
1671 | - if (innobase_change_buffering) { |
1672 | + if (vm.count("change-buffering")) |
1673 | + { |
1674 | ulint use; |
1675 | |
1676 | for (use = 0; |
1677 | use < UT_ARR_SIZE(innobase_change_buffering_values); |
1678 | use++) { |
1679 | if (!innobase_strcasecmp( |
1680 | - innobase_change_buffering, |
1681 | + vm["change-buffering"].as<string>().c_str(), |
1682 | innobase_change_buffering_values[use])) { |
1683 | ibuf_use = (ibuf_use_t) use; |
1684 | goto innobase_change_buffering_inited_ok; |
1685 | @@ -2024,7 +2321,7 @@ |
1686 | errmsg_printf(ERRMSG_LVL_ERROR, |
1687 | "InnoDB: invalid value " |
1688 | "innodb_file_format_check=%s", |
1689 | - innobase_change_buffering); |
1690 | + vm["change-buffering"].as<string>().c_str()); |
1691 | goto mem_free_and_error; |
1692 | } |
1693 | |
1694 | @@ -8352,8 +8649,7 @@ |
1695 | /* plugin options */ |
1696 | static DRIZZLE_SYSVAR_BOOL(checksums, innobase_use_checksums, |
1697 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
1698 | - "Enable InnoDB checksums validation (enabled by default). " |
1699 | - "Disable with --skip-innodb-checksums.", |
1700 | + "Enable InnoDB checksums validation (enabled by default). ", |
1701 | NULL, NULL, TRUE); |
1702 | |
1703 | static DRIZZLE_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
1704 | @@ -8363,8 +8659,7 @@ |
1705 | |
1706 | static DRIZZLE_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, |
1707 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
1708 | - "Enable InnoDB doublewrite buffer (enabled by default). " |
1709 | - "Disable with --skip-innodb-doublewrite.", |
1710 | + "Enable InnoDB doublewrite buffer (enabled by default). ", |
1711 | NULL, NULL, TRUE); |
1712 | |
1713 | static DRIZZLE_SYSVAR_ULONG(io_capacity, srv_io_capacity, |
1714 | @@ -8455,8 +8750,7 @@ |
1715 | |
1716 | static DRIZZLE_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled, |
1717 | PLUGIN_VAR_OPCMDARG, |
1718 | - "Enable InnoDB adaptive hash index (enabled by default). " |
1719 | - "Disable with --skip-innodb-adaptive-hash-index.", |
1720 | + "Enable InnoDB adaptive hash index (enabled by default).", |
1721 | NULL, innodb_adaptive_hash_index_update, TRUE); |
1722 | |
1723 | static DRIZZLE_SYSVAR_ULONG(replication_delay, srv_replication_delay, |
1724 | @@ -8582,6 +8876,156 @@ |
1725 | "trigger a readahead.", |
1726 | NULL, NULL, 56, 0, 64, 0); |
1727 | |
1728 | +static void init_options(drizzled::module::option_context &context) |
1729 | +{ |
1730 | + context("checksums", |
1731 | + po::value<bool>(&innobase_use_checksums)->default_value(true)->zero_tokens(), |
1732 | + "Enable InnoDB checksums validation."); |
1733 | + context("data-home-dir", |
1734 | + po::value<string>(), |
1735 | + "The common part for InnoDB table spaces."); |
1736 | + context("doublewrite", |
1737 | + po::value<bool>(&innobase_use_doublewrite)->default_value(true)->zero_tokens(), |
1738 | + "Enable InnoDB doublewrite buffer."); |
1739 | + context("io-capacity", |
1740 | + po::value<unsigned long>(&srv_io_capacity)->default_value(200), |
1741 | + "Number of IOPs the server can do. Tunes the background IO rate"); |
1742 | + context("fast-shutdown", |
1743 | + po::value<unsigned long>(&innobase_fast_shutdown)->default_value(1), |
1744 | + "Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like)."); |
1745 | + context("file-per-table", |
1746 | + po::value<bool>(&srv_file_per_table)->default_value(false)->zero_tokens(), |
1747 | + "Stores each InnoDB table to an .ibd file in the database dir."); |
1748 | + context("file-format", |
1749 | + po::value<string>()->default_value("Antelope"), |
1750 | + "File format to use for new tables in .ibd files."); |
1751 | + context("file-format-check", |
1752 | + po::value<string>()->default_value("on"), |
1753 | + "The highest file format in the tablespace."); |
1754 | + context("flush-log-at-trx-commit", |
1755 | + po::value<unsigned long>(&srv_flush_log_at_trx_commit)->default_value(1), |
1756 | + "Set to 0 (write and flush once per second), 1 (write and flush at each commit) or 2 (write at commit, flush once per second)."); |
1757 | + context("flush-method", |
1758 | + po::value<string>(), |
1759 | + "With which method to flush data."); |
1760 | +#ifdef UNIV_LOG_ARCHIVE |
1761 | + context("log-arch-dir", |
1762 | + po::value<string>(), |
1763 | + "Where full logs should be archived."); |
1764 | + context("log-archive", |
1765 | + po::value<bool>(&innobase_log_archive)->default_value(false)->zero_tokens(), |
1766 | + "Set to 1 if you want to have logs archived."); |
1767 | +#endif /* UNIV_LOG_ARCHIVE */ |
1768 | + context("log-group-home-dir", |
1769 | + po::value<string>(), |
1770 | + "Path to InnoDB log files."); |
1771 | + context("max-dirty-pages-pct", |
1772 | + po::value<unsigned long>(&srv_max_buf_pool_modified_pct)->default_value(75), |
1773 | + "Percentage of dirty pages allowed in bufferpool."); |
1774 | + context("adaptive-flushing", |
1775 | + po::value<bool>(&srv_adaptive_flushing)->default_value(true)->zero_tokens(), |
1776 | + "Attempt flushing dirty pages to avoid IO bursts at checkpoints."); |
1777 | + context("max-purge-lag", |
1778 | + po::value<unsigned long>(&srv_max_purge_lag)->default_value(0), |
1779 | + "Desired maximum length of the purge queue (0 = no limit)"); |
1780 | + context("status-file", |
1781 | + po::value<bool>(&innobase_create_status_file)->default_value(false)->zero_tokens(), |
1782 | + "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file"); |
1783 | + context("stats-on-metadata", |
1784 | + po::value<bool>(&innobase_stats_on_metadata)->default_value(true)->zero_tokens(), |
1785 | + "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)"); |
1786 | + context("stats-sample-pages", |
1787 | + po::value<uint64_t>(&srv_stats_sample_pages)->default_value(8), |
1788 | + "The number of index pages to sample when calculating statistics (default 8)"); |
1789 | + context("adaptive-hash-index", |
1790 | + po::value<bool>(&btr_search_enabled)->default_value(true)->zero_tokens(), |
1791 | + "Enable InnoDB adaptive hash index (enabled by default)"); |
1792 | + context("replication-delay", |
1793 | + po::value<unsigned long>(&srv_replication_delay)->default_value(0), |
1794 | + "Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)"); |
1795 | + context("additional-mem-pool-size", |
1796 | + po::value<long>(&innobase_additional_mem_pool_size)->default_value(8*1024*1024L), |
1797 | + "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures."); |
1798 | + context("autoextend-increment", |
1799 | + po::value<uint32_t>(&srv_auto_extend_increment)->default_value(8L), |
1800 | + "Data file autoextend increment in megabytes"); |
1801 | + context("buffer-pool-size", |
1802 | + po::value<int64_t>(&innobase_buffer_pool_size)->default_value(128*1024*1024L), |
1803 | + "The size of the memory buffer InnoDB uses to cache data and indexes of its tables."); |
1804 | + context("commit-concurrency", |
1805 | + po::value<unsigned long>(&innobase_commit_concurrency)->default_value(0), |
1806 | + "Helps in performance tuning in heavily concurrent environments."); |
1807 | + context("concurrency-tickets", |
1808 | + po::value<unsigned long>(&srv_n_free_tickets_to_enter)->default_value(500L), |
1809 | + "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket"); |
1810 | + context("file-io-threads", |
1811 | + po::value<long>(&innobase_file_io_threads)->default_value(4), |
1812 | + "Number of file I/O threads in InnoDB."); |
1813 | + context("read-io-threads", |
1814 | + po::value<unsigned long>(&innobase_read_io_threads)->default_value(4), |
1815 | + "Number of background read I/O threads in InnoDB."); |
1816 | + context("write-io-threads", |
1817 | + po::value<unsigned long>(&innobase_write_io_threads)->default_value(4), |
1818 | + "Number of background write I/O threads in InnoDB."); |
1819 | + context("force-recovery", |
1820 | + po::value<long>(&innobase_force_recovery)->default_value(0), |
1821 | + "Helps to save your data in case the disk image of the database becomes corrupt."); |
1822 | + context("log-buffer-size", |
1823 | + po::value<long>(&innobase_log_buffer_size)->default_value(8*1024*1024L), |
1824 | + "The size of the buffer which InnoDB uses to write log to the log files on disk."); |
1825 | + context("log-file-size", |
1826 | + po::value<int64_t>(&innobase_log_file_size)->default_value(20*1024*1024L), |
1827 | + "The size of the buffer which InnoDB uses to write log to the log files on disk."); |
1828 | + context("log-files-in-group", |
1829 | + po::value<long>(&innobase_log_files_in_group)->default_value(2), |
1830 | + "Number of log files in the log group. InnoDB writes to the files in a circular fashion."); |
1831 | + context("mirrored-log-groups", |
1832 | + po::value<long>(&innobase_mirrored_log_groups)->default_value(1), |
1833 | + "Number of identical copies of log groups we keep for the database. Currently this should be set to 1."); |
1834 | + context("open-files", |
1835 | + po::value<long>(&innobase_open_files)->default_value(300L), |
1836 | + "How many files at the maximum InnoDB keeps open at the same time."); |
1837 | + context("sync-spin-loops", |
1838 | + po::value<unsigned long>(&srv_n_spin_wait_rounds)->default_value(30L), |
1839 | + "Count of spin-loop rounds in InnoDB mutexes (30 by default)"); |
1840 | + context("spin-wait-delay", |
1841 | + po::value<unsigned long>(&srv_spin_wait_delay)->default_value(6L), |
1842 | + "Maximum delay between polling for a spin lock (6 by default)"); |
1843 | + context("thread-concurrency", |
1844 | + po::value<unsigned long>(&srv_thread_concurrency)->default_value(0), |
1845 | + "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling."); |
1846 | + context("thread-sleep-delay", |
1847 | + po::value<unsigned long>(&srv_thread_sleep_delay)->default_value(10000L), |
1848 | + "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep"); |
1849 | + context("data-file-path", |
1850 | + po::value<string>(), |
1851 | + "Path to individual files and their sizes."); |
1852 | + context("version", |
1853 | + po::value<string>()->default_value(INNODB_VERSION_STR), |
1854 | + "InnoDB version"); |
1855 | + context("use-sys-malloc", |
1856 | + po::value<bool>(&srv_use_sys_malloc)->default_value(true)->zero_tokens(), |
1857 | + "Use OS memory allocator instead of InnoDB's internal memory allocator"); |
1858 | + context("change-buffering", |
1859 | + po::value<string>(), |
1860 | + "Buffer changes to reduce random access: OFF, ON, inserting, deleting, changing, or purging."); |
1861 | + context("read-ahead-threshold", |
1862 | + po::value<unsigned long>(&srv_read_ahead_threshold)->default_value(56), |
1863 | + "Number of pages that must be accessed sequentially for InnoDB to trigger a readahead."); |
1864 | + context("support-xa", |
1865 | + po::value<bool>()->default_value(true)->zero_tokens(), |
1866 | + "Enable InnoDB support for the XA two-phase commit"); |
1867 | + context("table-locks", |
1868 | + po::value<bool>()->default_value(true)->zero_tokens(), |
1869 | + "Enable InnoDB locking in LOCK TABLES"); |
1870 | + context("strict-mode", |
1871 | + po::value<bool>()->default_value(false)->zero_tokens(), |
1872 | + "Use strict mode when evaluating create options."); |
1873 | + context("lock-wait-timeout", |
1874 | + po::value<unsigned long>()->default_value(50), |
1875 | + "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout."); |
1876 | +} |
1877 | + |
1878 | static drizzle_sys_var* innobase_system_variables[]= { |
1879 | DRIZZLE_SYSVAR(additional_mem_pool_size), |
1880 | DRIZZLE_SYSVAR(autoextend_increment), |
1881 | @@ -8646,7 +9090,7 @@ |
1882 | PLUGIN_LICENSE_GPL, |
1883 | innobase_init, /* Plugin Init */ |
1884 | innobase_system_variables, /* system variables */ |
1885 | - NULL /* reserved */ |
1886 | + init_options /* reserved */ |
1887 | } |
1888 | DRIZZLE_DECLARE_PLUGIN_END; |
1889 | |
1890 | |
1891 | === added file 'plugin/innobase/tests/t/innodb_lock_waits-master.opt' |
1892 | --- plugin/innobase/tests/t/innodb_lock_waits-master.opt 1970-01-01 00:00:00 +0000 |
1893 | +++ plugin/innobase/tests/t/innodb_lock_waits-master.opt 2010-08-17 02:53:42 +0000 |
1894 | @@ -0,0 +1,1 @@ |
1895 | +--innodb.lock-wait-timeout=5 |
1896 | |
1897 | === modified file 'plugin/memcached_stats/memcached_stats.cc' |
1898 | --- plugin/memcached_stats/memcached_stats.cc 2010-07-18 05:16:33 +0000 |
1899 | +++ plugin/memcached_stats/memcached_stats.cc 2010-08-17 02:53:42 +0000 |
1900 | @@ -72,11 +72,12 @@ |
1901 | |
1902 | else |
1903 | { |
1904 | - sysvar_memcached_servers= ""; |
1905 | + sysvar_memcached_servers= strdup(""); |
1906 | } |
1907 | |
1908 | SysvarHolder &sysvar_holder= SysvarHolder::singleton(); |
1909 | sysvar_holder.setServersString(sysvar_memcached_servers); |
1910 | + sysvar_holder.setMemoryPtr(sysvar_memcached_servers); |
1911 | |
1912 | /* we are good to go */ |
1913 | stats_table_tool= new(std::nothrow)StatsTableTool; |
1914 | |
1915 | === modified file 'plugin/memcached_stats/sysvar_holder.h' |
1916 | --- plugin/memcached_stats/sysvar_holder.h 2009-12-21 10:13:31 +0000 |
1917 | +++ plugin/memcached_stats/sysvar_holder.h 2010-08-17 02:53:42 +0000 |
1918 | @@ -66,16 +66,23 @@ |
1919 | return servers_string; |
1920 | } |
1921 | |
1922 | + void setMemoryPtr(void *mem_ptr_in) |
1923 | + { |
1924 | + memory_ptr= mem_ptr_in; |
1925 | + } |
1926 | + |
1927 | private: |
1928 | |
1929 | pthread_mutex_t mutex; |
1930 | |
1931 | std::string servers_string; |
1932 | + void *memory_ptr; |
1933 | |
1934 | SysvarHolder() |
1935 | : |
1936 | mutex(), |
1937 | servers_string() |
1938 | + memory_ptr(NULL) |
1939 | { |
1940 | pthread_mutex_init(&mutex, NULL); |
1941 | } |
1942 | @@ -83,6 +90,7 @@ |
1943 | ~SysvarHolder() |
1944 | { |
1945 | pthread_mutex_destroy(&mutex); |
1946 | + free(memory_ptr); |
1947 | } |
1948 | |
1949 | SysvarHolder(const SysvarHolder&); |
1950 | |
1951 | === modified file 'plugin/myisam/mi_key.cc' |
1952 | --- plugin/myisam/mi_key.cc 2010-02-04 08:14:46 +0000 |
1953 | +++ plugin/myisam/mi_key.cc 2010-08-17 02:53:42 +0000 |
1954 | @@ -23,6 +23,9 @@ |
1955 | #include <math.h> |
1956 | #include <cassert> |
1957 | |
1958 | +using namespace drizzled; |
1959 | +using namespace std; |
1960 | + |
1961 | #define CHECK_KEYS /* Enable safety checks */ |
1962 | |
1963 | #define FIX_LENGTH(cs, pos, length, char_length) \ |
1964 | |
1965 | === modified file 'plugin/mysql_protocol/mysql_protocol.cc' |
1966 | --- plugin/mysql_protocol/mysql_protocol.cc 2010-07-06 12:47:40 +0000 |
1967 | +++ plugin/mysql_protocol/mysql_protocol.cc 2010-08-17 02:53:42 +0000 |
1968 | @@ -56,6 +56,12 @@ |
1969 | static const uint32_t random_max= 0x3FFFFFFF; |
1970 | static const double random_max_double= (double)0x3FFFFFFF; |
1971 | |
1972 | +ListenMySQLProtocol::~ListenMySQLProtocol() |
1973 | +{ |
1974 | + /* This is strdup'd from the options */ |
1975 | + free(bind_address); |
1976 | +} |
1977 | + |
1978 | const char* ListenMySQLProtocol::getHost(void) const |
1979 | { |
1980 | return bind_address; |
1981 | |
1982 | === modified file 'plugin/mysql_protocol/mysql_protocol.h' |
1983 | --- plugin/mysql_protocol/mysql_protocol.h 2010-03-18 18:08:25 +0000 |
1984 | +++ plugin/mysql_protocol/mysql_protocol.h 2010-08-17 02:53:42 +0000 |
1985 | @@ -35,6 +35,7 @@ |
1986 | drizzled::plugin::ListenTcp(name_arg), |
1987 | using_mysql41_protocol(using_mysql41_protocol_arg) |
1988 | { } |
1989 | + virtual ~ListenMySQLProtocol(); |
1990 | virtual const char* getHost(void) const; |
1991 | virtual in_port_t getPort(void) const; |
1992 | virtual drizzled::plugin::Client *getClient(int fd); |
1993 | |
1994 | === modified file 'plugin/syslog/module.cc' |
1995 | --- plugin/syslog/module.cc 2010-08-04 08:10:51 +0000 |
1996 | +++ plugin/syslog/module.cc 2010-08-17 02:53:42 +0000 |
1997 | @@ -49,6 +49,7 @@ |
1998 | bool sysvar_errmsg_enable; |
1999 | char* sysvar_errmsg_priority; |
2000 | |
2001 | + |
2002 | static int init(drizzled::module::Context &context) |
2003 | { |
2004 | const module::option_map &vm= context.getOptions(); |
2005 | @@ -82,42 +83,39 @@ |
2006 | |
2007 | if (vm.count("ident")) |
2008 | { |
2009 | - sysvar_ident= strdup(vm["ident"].as<string>().c_str()); |
2010 | + sysvar_ident= const_cast<char *>(vm["ident"].as<string>().c_str()); |
2011 | } |
2012 | - |
2013 | else |
2014 | { |
2015 | - sysvar_ident= strdup("drizzled"); |
2016 | + sysvar_ident= const_cast<char *>("drizzled"); |
2017 | } |
2018 | |
2019 | if (vm.count("facility")) |
2020 | { |
2021 | - sysvar_facility= strdup(vm["facility"].as<string>().c_str()); |
2022 | + sysvar_facility= const_cast<char *>(vm["facility"].as<string>().c_str()); |
2023 | } |
2024 | - |
2025 | else |
2026 | { |
2027 | - sysvar_facility= strdup("local0"); |
2028 | + sysvar_facility= const_cast<char *>("local0"); |
2029 | } |
2030 | |
2031 | if (vm.count("logging-priority")) |
2032 | { |
2033 | - sysvar_logging_priority= strdup(vm["logging-priority"].as<string>().c_str()); |
2034 | + sysvar_logging_priority= const_cast<char *>(vm["logging-priority"].as<string>().c_str()); |
2035 | } |
2036 | - |
2037 | else |
2038 | { |
2039 | - sysvar_logging_priority= strdup("info"); |
2040 | + sysvar_logging_priority= const_cast<char *>("info"); |
2041 | } |
2042 | |
2043 | if (vm.count("errmsg-priority")) |
2044 | { |
2045 | - sysvar_errmsg_priority= strdup(vm["errmsg-priority"].as<string>().c_str()); |
2046 | + sysvar_errmsg_priority= const_cast<char *>(vm["errmsg-priority"].as<string>().c_str()); |
2047 | } |
2048 | |
2049 | else |
2050 | { |
2051 | - sysvar_errmsg_priority= strdup("warning"); |
2052 | + sysvar_errmsg_priority= const_cast<char *>("warning"); |
2053 | } |
2054 | |
2055 | context.add(new Logging_syslog()); |
2056 | |
2057 | === modified file 'plugin/transaction_log/module.cc' |
2058 | --- plugin/transaction_log/module.cc 2010-08-06 07:51:36 +0000 |
2059 | +++ plugin/transaction_log/module.cc 2010-08-17 02:53:42 +0000 |
2060 | @@ -111,6 +111,19 @@ |
2061 | extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func_factory; |
2062 | extern plugin::Create_function<HexdumpTransactionMessageFunction> *hexdump_transaction_message_func_factory; |
2063 | |
2064 | +TransactionLog::~TransactionLog() |
2065 | +{ |
2066 | + /* Clear up any resources we've consumed */ |
2067 | + if (log_file != -1) |
2068 | + { |
2069 | + (void) close(log_file); |
2070 | + } |
2071 | + |
2072 | + /* These get strdup'd below */ |
2073 | + free(sysvar_transaction_log_file); |
2074 | + free(sysvar_transaction_log_use_replicator); |
2075 | +} |
2076 | + |
2077 | static int init(drizzled::module::Context &context) |
2078 | { |
2079 | const module::option_map &vm= context.getOptions(); |
2080 | |
2081 | === modified file 'plugin/transaction_log/transaction_log.cc' |
2082 | --- plugin/transaction_log/transaction_log.cc 2010-03-31 19:04:12 +0000 |
2083 | +++ plugin/transaction_log/transaction_log.cc 2010-08-17 02:53:42 +0000 |
2084 | @@ -138,15 +138,6 @@ |
2085 | state= ONLINE; |
2086 | } |
2087 | |
2088 | -TransactionLog::~TransactionLog() |
2089 | -{ |
2090 | - /* Clear up any resources we've consumed */ |
2091 | - if (log_file != -1) |
2092 | - { |
2093 | - (void) close(log_file); |
2094 | - } |
2095 | -} |
2096 | - |
2097 | uint8_t *TransactionLog::packTransactionIntoLogEntry(const message::Transaction &trx, |
2098 | uint8_t *buffer, |
2099 | uint32_t *checksum_out) |
2100 | |
2101 | === modified file 'po/POTFILES.in' |
2102 | --- po/POTFILES.in 2010-07-27 00:41:57 +0000 |
2103 | +++ po/POTFILES.in 2010-08-17 02:53:42 +0000 |
2104 | @@ -66,6 +66,7 @@ |
2105 | plugin/filtered_replicator/filtered_replicator.cc |
2106 | plugin/hello_events/hello_events.cc |
2107 | plugin/innobase/handler/data_dictionary.cc |
2108 | +plugin/innobase/handler/ha_innodb.cc |
2109 | plugin/innobase/ut/ut0auxconf_pause.c |
2110 | plugin/logging_gearman/logging_gearman.cc |
2111 | plugin/logging_query/logging_query.cc |
2112 | |
2113 | === modified file 'support-files/drizzle.spec.in' |
2114 | --- support-files/drizzle.spec.in 2010-06-24 03:15:21 +0000 |
2115 | +++ support-files/drizzle.spec.in 2010-08-17 02:53:42 +0000 |
2116 | @@ -510,10 +510,14 @@ |
2117 | %{_libdir}/drizzle/libdefault_replicator_plugin.so |
2118 | %{_libdir}/drizzle/liberrmsg_stderr_plugin.la |
2119 | %{_libdir}/drizzle/liberrmsg_stderr_plugin.so |
2120 | +%{_libdir}/drizzle/libfilesystem_engine_plugin.la |
2121 | +%{_libdir}/drizzle/libfilesystem_engine_plugin.so |
2122 | %{_libdir}/drizzle/libfiltered_replicator_plugin.la |
2123 | %{_libdir}/drizzle/libfiltered_replicator_plugin.so |
2124 | %{_libdir}/drizzle/libhello_world_plugin.la |
2125 | %{_libdir}/drizzle/libhello_world_plugin.so |
2126 | +%{_libdir}/drizzle/libinnobase_plugin.la |
2127 | +%{_libdir}/drizzle/libinnobase_plugin.so |
2128 | %{_libdir}/drizzle/libinfo_schema_plugin.la |
2129 | %{_libdir}/drizzle/libinfo_schema_plugin.so |
2130 | %{_libdir}/drizzle/libinformation_engine_plugin.la |
2131 | |
2132 | === modified file 'tests/t/unsafe_binlog_innodb-master.opt' |
2133 | --- tests/t/unsafe_binlog_innodb-master.opt 2010-03-15 16:12:10 +0000 |
2134 | +++ tests/t/unsafe_binlog_innodb-master.opt 2010-08-17 02:53:42 +0000 |
2135 | @@ -1,1 +1,1 @@ |
2136 | ---innodb_lock_wait_timeout=1 |
2137 | +--innodb.lock-wait-timeout=1 |
2138 | |
2139 | === modified file 'tests/test-run.pl' |
2140 | --- tests/test-run.pl 2010-08-10 18:09:11 +0000 |
2141 | +++ tests/test-run.pl 2010-08-17 02:53:42 +0000 |
2142 | @@ -2580,9 +2580,7 @@ |
2143 | $idx > 0 ? $idx + 101 : 1); |
2144 | |
2145 | mtr_add_arg($args, |
2146 | - "%s--loose-innodb_data_file_path=ibdata1:20M:autoextend", $prefix); |
2147 | - |
2148 | - mtr_add_arg($args, "%s--loose-innodb-lock-wait-timeout=5", $prefix); |
2149 | + "%s--innodb.data-file-path=ibdata1:20M:autoextend", $prefix); |
2150 | |
2151 | } |
2152 | else |
2153 | |
2154 | === modified file 'tests/valgrind.supp' |
2155 | --- tests/valgrind.supp 2010-07-30 17:38:08 +0000 |
2156 | +++ tests/valgrind.supp 2010-08-17 02:53:42 +0000 |
2157 | @@ -29,6 +29,64 @@ |
2158 | ... |
2159 | } |
2160 | |
2161 | +{ |
2162 | + dlpreload memory leak |
2163 | + Memcheck:Leak |
2164 | + ... |
2165 | + fun:do_preload |
2166 | + fun:dl_main |
2167 | + ... |
2168 | +} |
2169 | + |
2170 | +{ |
2171 | + dl_main issue |
2172 | + Memcheck:Cond |
2173 | + ... |
2174 | + fun:dl_main |
2175 | + ... |
2176 | +} |
2177 | + |
2178 | +# Masking an issue in system tzset call |
2179 | +{ |
2180 | + tzset() on debian reports issues |
2181 | + Memcheck:Cond |
2182 | + ... |
2183 | + fun:tzset |
2184 | + fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_ |
2185 | + ... |
2186 | +} |
2187 | +{ |
2188 | + tzset() on debian reports issues |
2189 | + Memcheck:Addr8 |
2190 | + ... |
2191 | + fun:tzset |
2192 | + fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_ |
2193 | + ... |
2194 | +} |
2195 | +{ |
2196 | + tzset() on debian reports issues |
2197 | + Memcheck:Addr4 |
2198 | + ... |
2199 | + fun:tzset |
2200 | + fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_ |
2201 | + ... |
2202 | +} |
2203 | +{ |
2204 | + tzset() on debian reports issues |
2205 | + Memcheck:Addr8 |
2206 | + ... |
2207 | + fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_ |
2208 | + fun:main |
2209 | +} |
2210 | +{ |
2211 | + tzset() on debian reports issues |
2212 | + Memcheck:Addr4 |
2213 | + ... |
2214 | + fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_ |
2215 | + fun:main |
2216 | +} |
2217 | + |
2218 | + |
2219 | |
2220 | # Masking static allocation issues in InnoDB |
2221 | { |
2222 | @@ -148,6 +206,24 @@ |
2223 | } |
2224 | |
2225 | |
2226 | +{ |
2227 | + HailDB Inherited some issues from InnoDB |
2228 | + Memcheck:Cond |
2229 | + fun:rw_lock_x_lock_func |
2230 | + ... |
2231 | + fun:innobase_start_or_create |
2232 | + fun:_ZL20embedded_innodb_initRN8drizzled6module7ContextE |
2233 | + fun:_ZN8drizzled15plugin_finalizeERNS_6module8RegistryE |
2234 | + fun:_ZN8drizzled22init_server_componentsERNS_6module8RegistryE |
2235 | + fun:main |
2236 | +} |
2237 | + |
2238 | +{ |
2239 | + HailDB Inherited some issues from InnoDB |
2240 | + Memcheck:Cond |
2241 | + fun:rw_lock_x_lock_func |
2242 | + ... |
2243 | +} |
2244 | |
2245 | |
2246 | # Masking Leaks in System Libraries |