Merge lp:~mordred/drizzle/rplugin-innobase into lp:~drizzle-trunk/drizzle/development

Proposed by Monty Taylor
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
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Drizzle Merge Team Pending
Review via email: mp+32257@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve
lp:~mordred/drizzle/rplugin-innobase updated
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.quickly'
--- .quickly 2010-07-31 17:48:00 +0000
+++ .quickly 2010-08-17 02:53:42 +0000
@@ -2,4 +2,4 @@
2version = 0.4.22version = 0.4.2
3template = pandora-build3template = pandora-build
4project-type = application4project-type = application
5pandora-version = 0.1415pandora-version = 0.145
66
=== modified file 'client/drizzle.cc'
--- client/drizzle.cc 2010-07-30 20:34:21 +0000
+++ client/drizzle.cc 2010-08-17 02:53:42 +0000
@@ -1329,7 +1329,7 @@
1329 opt_connect_timeout= 0;1329 opt_connect_timeout= 0;
1330 if (in_connect_timeout > 3600*12)1330 if (in_connect_timeout > 3600*12)
1331 {1331 {
1332 cout<<N_("Error: Invalid Value for connect_timeout"); 1332 cout << N_("Error: Invalid Value for connect_timeout");
1333 exit(-1);1333 exit(-1);
1334 }1334 }
1335 opt_connect_timeout= in_connect_timeout;1335 opt_connect_timeout= in_connect_timeout;
@@ -1338,13 +1338,12 @@
1338static void check_max_input_line(uint32_t in_max_input_line)1338static void check_max_input_line(uint32_t in_max_input_line)
1339{1339{
1340 opt_max_input_line= 0;1340 opt_max_input_line= 0;
1341 if (in_max_input_line<4096 || in_max_input_line>(int64_t)2*1024L*1024L*1024L)1341 if (in_max_input_line < 4096 || in_max_input_line > (int64_t)2*1024L*1024L*1024L)
1342 {1342 {
1343 cout<<N_("Error: Invalid Value for max_input_line");1343 cout << N_("Error: Invalid Value for max_input_line");
1344 exit(-1);1344 exit(-1);
1345 }1345 }
1346 opt_max_input_line= in_max_input_line/1024;1346 opt_max_input_line= in_max_input_line - (in_max_input_line % 1024);
1347 opt_max_input_line*=1024;
1348}1347}
13491348
1350int main(int argc,char *argv[])1349int main(int argc,char *argv[])
13511350
=== modified file 'client/drizzletest.cc'
--- client/drizzletest.cc 2010-08-03 21:49:46 +0000
+++ client/drizzletest.cc 2010-08-17 02:53:42 +0000
@@ -5360,7 +5360,7 @@
5360{5360{
5361 if (in_opt_max_connect_retries > 10000 || opt_max_connect_retries<1)5361 if (in_opt_max_connect_retries > 10000 || opt_max_connect_retries<1)
5362 {5362 {
5363 cout<<N_("Error: Invalid Value for opt_max_connect_retries"); 5363 cout << N_("Error: Invalid Value for opt_max_connect_retries");
5364 exit(-1);5364 exit(-1);
5365 }5365 }
5366 opt_max_connect_retries= in_opt_max_connect_retries;5366 opt_max_connect_retries= in_opt_max_connect_retries;
@@ -5370,7 +5370,7 @@
5370{5370{
5371 if (in_opt_tail_lines > 10000)5371 if (in_opt_tail_lines > 10000)
5372 {5372 {
5373 cout<<N_("Error: Invalid Value for opt_tail_lines"); 5373 cout << N_("Error: Invalid Value for opt_tail_lines");
5374 exit(-1);5374 exit(-1);
5375 }5375 }
5376 opt_tail_lines= in_opt_tail_lines;5376 opt_tail_lines= in_opt_tail_lines;
53775377
=== modified file 'drizzled/drizzled.cc'
--- drizzled/drizzled.cc 2010-08-13 00:50:34 +0000
+++ drizzled/drizzled.cc 2010-08-17 02:53:42 +0000
@@ -27,6 +27,7 @@
27#include <netinet/in.h>27#include <netinet/in.h>
28#include <signal.h>28#include <signal.h>
29#include <limits.h>29#include <limits.h>
30#include <stdexcept>
3031
31#include <boost/program_options.hpp>32#include <boost/program_options.hpp>
32#include <boost/thread/recursive_mutex.hpp>33#include <boost/thread/recursive_mutex.hpp>
@@ -787,6 +788,61 @@
787 return 0;788 return 0;
788}789}
789790
791static pair<string, string> parse_size_suffixes(string s)
792{
793 size_t equal_pos= s.find("=");
794 if (equal_pos != string::npos)
795 {
796 string arg_key(s.substr(0, equal_pos));
797 string arg_val(s.substr(equal_pos+1));
798
799 try
800 {
801 size_t size_suffix_pos= arg_val.find_last_of("kmgKMG");
802 if (size_suffix_pos == arg_val.size()-1)
803 {
804 char suffix= arg_val[size_suffix_pos];
805 string size_val(arg_val.substr(0, size_suffix_pos));
806
807 uint64_t base_size= boost::lexical_cast<uint64_t>(size_val);
808 uint64_t new_size= 0;
809
810 switch (suffix)
811 {
812 case 'K':
813 case 'k':
814 new_size= base_size * 1024;
815 break;
816 case 'M':
817 case 'm':
818 new_size= base_size * 1024 * 1024;
819 break;
820 case 'G':
821 case 'g':
822 new_size= base_size * 1024 * 1024 * 1024;
823 break;
824 }
825 return make_pair(arg_key,
826 boost::lexical_cast<string>(new_size));
827 }
828 }
829 catch (...)
830 {
831 /* Screw it, let the normal parser take over */
832 }
833 }
834
835 return make_pair(string(""), string(""));
836}
837
838static pair<string, string> parse_size_arg(string s)
839{
840 if (s.find("--") == 0)
841 {
842 return parse_size_suffixes(s.substr(2));
843 }
844 return make_pair(string(""), string(""));
845}
790846
791int init_server_components(module::Registry &plugins)847int init_server_components(module::Registry &plugins)
792{848{
@@ -823,7 +879,8 @@
823879
824 po::parsed_options parsed= po::command_line_parser(defaults_argc,880 po::parsed_options parsed= po::command_line_parser(defaults_argc,
825 defaults_argv).881 defaults_argv).
826 options(long_options).allow_unregistered().run();882 options(long_options).extra_parser(parse_size_arg).
883 allow_unregistered().run();
827884
828 vector<string> unknown_options=885 vector<string> unknown_options=
829 po::collect_unrecognized(parsed.options, po::include_positional);886 po::collect_unrecognized(parsed.options, po::include_positional);
830887
=== modified file 'drizzled/module/library.cc'
--- drizzled/module/library.cc 2010-05-15 18:23:34 +0000
+++ drizzled/module/library.cc 2010-08-17 02:53:42 +0000
@@ -88,7 +88,7 @@
88 if (builtin)88 if (builtin)
89 {89 {
90 dlpath.assign("<builtin>");90 dlpath.assign("<builtin>");
91 handle= dlopen(NULL, RTLD_NOW|RTLD_GLOBAL);91 handle= dlopen(NULL, RTLD_NOW|RTLD_LOCAL);
92 if (handle == NULL)92 if (handle == NULL)
93 {93 {
94 const char *errmsg= dlerror();94 const char *errmsg= dlerror();
9595
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2010-07-31 17:48:00 +0000
+++ m4/pandora_canonical.m4 2010-08-17 02:53:42 +0000
@@ -4,7 +4,7 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.141])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.145])
88
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 AC_ARG_ENABLE([fat-binaries],10 AC_ARG_ENABLE([fat-binaries],
1111
=== added file 'm4/pandora_have_libboost_date_time.m4'
--- m4/pandora_have_libboost_date_time.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_date_time.m4 2010-08-17 02:53:42 +0000
@@ -0,0 +1,46 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8 AC_REQUIRE([ACX_PTHREAD])
9
10 dnl --------------------------------------------------------------------
11 dnl Check for Boost.Date_Time
12 dnl --------------------------------------------------------------------
13
14 AC_LANG_PUSH(C++)
15 AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[
16 #include <boost/date_time.hpp>
17 ],[
18 boost::gregorian::date weekstart(2002,2,1);
19 ])
20 AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[
21 AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[
22 #include <boost/date_time.hpp>
23 ],[
24 boost::gregorian::date weekstart(2002,2,1);
25 ])
26 ])
27 AC_LANG_POP()
28
29 AM_CONDITIONAL(HAVE_BOOST_DATE_TIME,
30 [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"])
31 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}"
32 AC_SUBST(BOOST_LIBS)
33])
34
35AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[
36 PANDORA_HAVE_BOOST($1)
37 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
38])
39
40AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[
41 PANDORA_REQUIRE_BOOST($1)
42 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
43 AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"],
44 AC_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}]))
45])
46
047
=== added file 'm4/pandora_have_libboost_filesystem.m4'
--- m4/pandora_have_libboost_filesystem.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libboost_filesystem.m4 2010-08-17 02:53:42 +0000
@@ -0,0 +1,45 @@
1dnl Copyright (C) 2010 Monty Taylor
2dnl This file is free software; Monty Taylor
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for Boost.Filesystem
11 dnl --------------------------------------------------------------------
12
13 AC_LANG_PUSH(C++)
14 AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,,[
15 #include <boost/filesystem.hpp>
16 ],[
17 boost::filesystem::path my_path("some_dir/file.txt");
18 ])
19 AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[
20 AC_LIB_HAVE_LINKFLAGS(boost_filesystem,,[
21 #include <boost/filesystem.hpp>
22 ],[
23 boost::filesystem::path my_path("some_dir/file.txt");
24 ])
25 ])
26 AC_LANG_POP()
27
28 AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
29 [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
30 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
31 AC_SUBST(BOOST_LIBS)
32])
33
34AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[
35 PANDORA_HAVE_BOOST($1)
36 _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
37])
38
39AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[
40 PANDORA_REQUIRE_BOOST($1)
41 _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
42 AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"],
43 AC_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}]))
44])
45
046
=== modified file 'm4/pandora_have_libinnodb.m4'
--- m4/pandora_have_libinnodb.m4 2010-03-02 07:14:49 +0000
+++ m4/pandora_have_libinnodb.m4 2010-08-17 02:53:42 +0000
@@ -7,7 +7,7 @@
7 AC_REQUIRE([AC_LIB_PREFIX])7 AC_REQUIRE([AC_LIB_PREFIX])
88
9 dnl --------------------------------------------------------------------9 dnl --------------------------------------------------------------------
10 dnl Check for libinnodb10 dnl Check for libhaildb or libinnodb
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
1212
13 AC_ARG_ENABLE([libinnodb],13 AC_ARG_ENABLE([libinnodb],
@@ -16,41 +16,37 @@
16 [ac_enable_libinnodb="$enableval"],16 [ac_enable_libinnodb="$enableval"],
17 [ac_enable_libinnodb="yes"])17 [ac_enable_libinnodb="yes"])
1818
19
19 AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[20 AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(innodb,,[21 AC_LIB_HAVE_LINKFLAGS(haildb,,[
21 #include <embedded_innodb-1.0/innodb.h>22 #include <haildb.h>
22 ],[23 ],[
23 ib_u64_t24 ib_u64_t
24 ib_api_version(void);25 ib_api_version(void);
25 ])26 ])
27 AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
28 AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
29 INNODB_LIBS="${LTLIBHAILDB}"
30 ac_cv_have_innodb=yes
31 ],[
32 AC_LIB_HAVE_LINKFLAGS(innodb,,[
33 #include <embedded_innodb-1.0/innodb.h>
34 ],[
35 ib_u64_t
36 ib_api_version(void);
37 ])
38 AS_IF([test "x{ac_cv_libinnodb}" = "xyes"],[
39 AC_DEFINE([HAVE_INNODB_H],[1],[Do we have innodb.h])
40 INNODB_LIBS="${LTLIBINNODB}"
41 ac_cv_have_innodb=yes
42 ])
43 ])
26 ],[44 ],[
45 ac_cv_libhaildb="no"
27 ac_cv_libinnodb="no"46 ac_cv_libinnodb="no"
28 ])47 ])
2948 AC_SUBST([INNODB_LIBS])
3049 AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_have_innodb}" = "xyes"])
31 AC_CACHE_CHECK([if libinnodb is recent enough],
32 [ac_cv_recent_innodb_h],[
33 save_LIBS=${LIBS}
34 LIBS="${LIBS} ${LTLIBINNODB}"
35 AC_LINK_IFELSE(
36 [AC_LANG_PROGRAM([[
37 #include <embedded_innodb-1.0/innodb.h>
38 ]],[[
39 /* Make sure we have the two-arg version */
40 ib_table_drop(NULL, "nothing");
41 ]])],[
42 ac_cv_recent_innodb_h=yes
43 ],[
44 ac_cv_recent_innodb_h=no
45 ])
46 LIBS="${save_LIBS}"
47 ])
48 AS_IF([test "x${ac_cv_recent_innodb_h}" = "xno"],[
49 AC_MSG_WARN([${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB])
50 ac_cv_libinnodb=no
51 ])
52
53 AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
54])50])
5551
56AC_DEFUN([PANDORA_HAVE_LIBINNODB],[52AC_DEFUN([PANDORA_HAVE_LIBINNODB],[
@@ -60,5 +56,5 @@
60AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[56AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[
61 AC_REQUIRE([PANDORA_HAVE_LIBINNODB])57 AC_REQUIRE([PANDORA_HAVE_LIBINNODB])
62 AS_IF([test "x${ac_cv_libinnodb}" = "xno"],58 AS_IF([test "x${ac_cv_libinnodb}" = "xno"],
63 AC_MSG_ERROR([libinnodb is required for ${PACKAGE}]))59 AC_MSG_ERROR([libhaildb or libinnodb is required for ${PACKAGE}]))
64])60])
6561
=== renamed file 'm4/intltool.m4' => 'm4/pandora_intltool.m4'
=== modified file 'plugin/drizzle_protocol/drizzle_protocol.cc'
--- plugin/drizzle_protocol/drizzle_protocol.cc 2010-07-06 07:24:01 +0000
+++ plugin/drizzle_protocol/drizzle_protocol.cc 2010-08-17 02:53:42 +0000
@@ -56,7 +56,13 @@
56static uint32_t write_timeout;56static uint32_t write_timeout;
57static uint32_t retry_count;57static uint32_t retry_count;
58static uint32_t buffer_length;58static uint32_t buffer_length;
59static char* bind_address;59static char* bind_address= NULL;
60
61ListenDrizzleProtocol::~ListenDrizzleProtocol()
62{
63 /* This is strdup'd from the options */
64 free(bind_address);
65}
6066
61const char* ListenDrizzleProtocol::getHost(void) const67const char* ListenDrizzleProtocol::getHost(void) const
62{68{
6369
=== modified file 'plugin/drizzle_protocol/drizzle_protocol.h'
--- plugin/drizzle_protocol/drizzle_protocol.h 2010-03-18 17:17:49 +0000
+++ plugin/drizzle_protocol/drizzle_protocol.h 2010-08-17 02:53:42 +0000
@@ -38,6 +38,7 @@
38 drizzled::plugin::ListenTcp(name_arg),38 drizzled::plugin::ListenTcp(name_arg),
39 using_mysql41_protocol(using_mysql41_protocol_arg)39 using_mysql41_protocol(using_mysql41_protocol_arg)
40 { }40 { }
41 virtual ~ListenDrizzleProtocol();
41 virtual const char* getHost(void) const;42 virtual const char* getHost(void) const;
42 virtual in_port_t getPort(void) const;43 virtual in_port_t getPort(void) const;
43 virtual drizzled::plugin::Client *getClient(int fd);44 virtual drizzled::plugin::Client *getClient(int fd);
4445
=== modified file 'plugin/embedded_innodb/config_table_function.cc'
--- plugin/embedded_innodb/config_table_function.cc 2010-05-18 18:20:56 +0000
+++ plugin/embedded_innodb/config_table_function.cc 2010-08-17 02:53:42 +0000
@@ -19,7 +19,11 @@
19#include "config.h"19#include "config.h"
20#include "drizzled/plugin/table_function.h"20#include "drizzled/plugin/table_function.h"
2121
22#include "embedded_innodb-1.0/innodb.h"22#if defined(HAVE_HAILDB_H)
23# include <haildb.h>
24#else
25# include <embedded_innodb-1.0/innodb.h>
26#endif /* HAVE_HAILDB_H */
2327
24#include "config_table_function.h"28#include "config_table_function.h"
2529
2630
=== modified file 'plugin/embedded_innodb/embedded_innodb_engine.cc'
--- plugin/embedded_innodb/embedded_innodb_engine.cc 2010-08-13 20:27:18 +0000
+++ plugin/embedded_innodb/embedded_innodb_engine.cc 2010-08-17 02:53:42 +0000
@@ -93,7 +93,11 @@
93#include "config_table_function.h"93#include "config_table_function.h"
94#include "status_table_function.h"94#include "status_table_function.h"
9595
96#include "embedded_innodb-1.0/innodb.h"96#if defined(HAVE_HAILDB_H)
97# include <haildb.h>
98#else
99# include <embedded_innodb-1.0/innodb.h>
100#endif /* HAVE_HAILDB_H */
97101
98#include "embedded_innodb_engine.h"102#include "embedded_innodb_engine.h"
99103
@@ -102,7 +106,11 @@
102#include "drizzled/field/blob.h"106#include "drizzled/field/blob.h"
103#include "drizzled/field/enum.h"107#include "drizzled/field/enum.h"
104#include <drizzled/session.h>108#include <drizzled/session.h>
109#include <boost/program_options.hpp>
110#include <drizzled/module/option_map.h>
111#include <iostream>
105112
113namespace po= boost::program_options;
106#include <boost/algorithm/string.hpp>114#include <boost/algorithm/string.hpp>
107115
108using namespace std;116using namespace std;
@@ -2720,7 +2728,7 @@
2720static bool innobase_rollback_on_timeout;2728static bool innobase_rollback_on_timeout;
2721static bool innobase_create_status_file;2729static bool innobase_create_status_file;
2722static bool srv_use_sys_malloc;2730static bool srv_use_sys_malloc;
2723static char* innobase_file_format_name = NULL;2731static char* innobase_file_format_name = const_cast<char *>("Barracuda");
2724static char* innobase_unix_file_flush_method = NULL;2732static char* innobase_unix_file_flush_method = NULL;
2725static unsigned long srv_flush_log_at_trx_commit;2733static unsigned long srv_flush_log_at_trx_commit;
2726static unsigned long srv_max_buf_pool_modified_pct;2734static unsigned long srv_max_buf_pool_modified_pct;
@@ -2745,6 +2753,203 @@
27452753
2746static int embedded_innodb_init(drizzled::module::Context &context)2754static int embedded_innodb_init(drizzled::module::Context &context)
2747{2755{
2756
2757 const module::option_map &vm= context.getOptions();
2758 if (vm.count("additional-mem-pool-size"))
2759 {
2760 if (innobase_additional_mem_pool_size > LONG_MAX || innobase_additional_mem_pool_size < 512*1024L)
2761 {
2762 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of additional-mem-pool-size"));
2763 exit(-1);
2764 }
2765 innobase_additional_mem_pool_size/= 1024;
2766 innobase_additional_mem_pool_size*= 1024;
2767 }
2768
2769 if (vm.count("autoextend-increment"))
2770 {
2771 if (srv_auto_extend_increment > 1000L || srv_auto_extend_increment < 1L)
2772 {
2773 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of autoextend-increment"));
2774 exit(-1);
2775 }
2776 }
2777
2778 if (vm.count("buffer-pool-size"))
2779 {
2780 if (innobase_buffer_pool_size > INT64_MAX || innobase_buffer_pool_size < 5*1024*1024L)
2781 {
2782 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of buffer-pool-size"));
2783 exit(-1);
2784 }
2785 innobase_buffer_pool_size/= 1024*1024L;
2786 innobase_buffer_pool_size*= 1024*1024L;
2787 }
2788
2789 if (vm.count("io-capacity"))
2790 {
2791 if (srv_io_capacity > (unsigned long)~0L || srv_io_capacity < 100)
2792 {
2793 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of io-capacity"));
2794 exit(-1);
2795 }
2796 }
2797
2798 if (vm.count("fast-shutdown"))
2799 {
2800 if (innobase_fast_shutdown > 2)
2801 {
2802 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of fast-shutdown"));
2803 exit(-1);
2804 }
2805 }
2806
2807 if (vm.count("flush-log-at-trx-commit"))
2808 {
2809 if (srv_flush_log_at_trx_commit > 2)
2810 {
2811 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of flush-log-at-trx-commit"));
2812 exit(-1);
2813 }
2814 }
2815
2816 if (vm.count("force-recovery"))
2817 {
2818 if (innobase_force_recovery > 6)
2819 {
2820 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of force-recovery"));
2821 exit(-1);
2822 }
2823 }
2824
2825 if (vm.count("log-file-size"))
2826 {
2827 if (innodb_log_file_size > INT64_MAX || innodb_log_file_size < 1*1024*1024L)
2828 {
2829 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-file-size"));
2830 exit(-1);
2831 }
2832 innodb_log_file_size/= 1024*1024L;
2833 innodb_log_file_size*= 1024*1024L;
2834 }
2835
2836 if (vm.count("log-files-in-group"))
2837 {
2838 if (innodb_log_files_in_group > 100 || innodb_log_files_in_group < 2)
2839 {
2840 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-files-in-group"));
2841 exit(-1);
2842 }
2843 }
2844
2845 if (vm.count("lock-wait-timeout"))
2846 {
2847 if (innobase_lock_wait_timeout > 1024*1024*1024 || innobase_lock_wait_timeout < 1)
2848 {
2849 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lock-wait-timeout"));
2850 exit(-1);
2851 }
2852 }
2853
2854 if (vm.count("log-buffer-size"))
2855 {
2856 if (innobase_log_buffer_size > LONG_MAX || innobase_log_buffer_size < 256*1024L)
2857 {
2858 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of log-buffer-size"));
2859 exit(-1);
2860 }
2861 innobase_log_buffer_size/= 1024;
2862 innobase_log_buffer_size*= 1024;
2863 }
2864
2865 if (vm.count("lru-old-blocks-pct"))
2866 {
2867 if (innobase_lru_old_blocks_pct > 95 || innobase_lru_old_blocks_pct < 5)
2868 {
2869 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lru-old-blocks-pct"));
2870 exit(-1);
2871 }
2872 }
2873
2874 if (vm.count("lru-block-access-recency"))
2875 {
2876 if (innobase_lru_block_access_recency > ULONG_MAX)
2877 {
2878 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of lru-block-access-recency"));
2879 exit(-1);
2880 }
2881 }
2882
2883 if (vm.count("max-dirty-pages-pct"))
2884 {
2885 if (srv_max_buf_pool_modified_pct > 99)
2886 {
2887 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of max-dirty-pages-pct"));
2888 exit(-1);
2889 }
2890 }
2891
2892 if (vm.count("max-purge-lag"))
2893 {
2894 if (srv_max_purge_lag > (unsigned long)~0L)
2895 {
2896 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of max-purge-lag"));
2897 exit(-1);
2898 }
2899 }
2900
2901 if (vm.count("open-files"))
2902 {
2903 if (innobase_open_files > LONG_MAX || innobase_open_files < 10L)
2904 {
2905 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of open-files"));
2906 exit(-1);
2907 }
2908 }
2909
2910 if (vm.count("read-io-threads"))
2911 {
2912 if (innobase_read_io_threads > 64 || innobase_read_io_threads < 1)
2913 {
2914 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of read-io-threads"));
2915 exit(-1);
2916 }
2917 }
2918
2919 if (vm.count("sync-spin-loops"))
2920 {
2921 if (srv_n_spin_wait_rounds > (unsigned long)~0L)
2922 {
2923 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value of sync_spin_loops"));
2924 exit(-1);
2925 }
2926 }
2927
2928 if (vm.count("data-home-dir"))
2929 {
2930 innobase_data_home_dir= const_cast<char *>(vm["data-home-dir"].as<string>().c_str());
2931 }
2932
2933 if (vm.count("file-format"))
2934 {
2935 innobase_file_format_name= const_cast<char *>(vm["file-format"].as<string>().c_str());
2936 }
2937
2938 if (vm.count("log-group-home-dir"))
2939 {
2940 innobase_log_group_home_dir= const_cast<char *>(vm["log-group-home-dir"].as<string>().c_str());
2941 }
2942
2943 if (vm.count("flush-method"))
2944 {
2945 innobase_unix_file_flush_method= const_cast<char *>(vm["flush-method"].as<string>().c_str());
2946 }
2947
2948 if (vm.count("data-file-path"))
2949 {
2950 innodb_data_file_path= const_cast<char *>(vm["data-file-path"].as<string>().c_str());
2951 }
2952
2748 ib_err_t err;2953 ib_err_t err;
27492954
2750 err= ib_init();2955 err= ib_init();
@@ -2941,6 +3146,7 @@
2941 {3146 {
2942 fprintf(stderr,"Error %d shutting down Embedded InnoDB!\n", err);3147 fprintf(stderr,"Error %d shutting down Embedded InnoDB!\n", err);
2943 }3148 }
3149
2944}3150}
29453151
2946static char innodb_file_format_name_storage[100];3152static char innodb_file_format_name_storage[100];
@@ -3145,7 +3351,7 @@
3145static DRIZZLE_SYSVAR_ULONG(lock_wait_timeout, innobase_lock_wait_timeout,3351static DRIZZLE_SYSVAR_ULONG(lock_wait_timeout, innobase_lock_wait_timeout,
3146 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,3352 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
3147 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",3353 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
3148 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);3354 NULL, NULL, 5, 1, 1024 * 1024 * 1024, 0);
31493355
3150static DRIZZLE_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,3356static DRIZZLE_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size,
3151 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,3357 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
@@ -3217,6 +3423,112 @@
3217 "Use OS memory allocator instead of InnoDB's internal memory allocator",3423 "Use OS memory allocator instead of InnoDB's internal memory allocator",
3218 NULL, NULL, true);3424 NULL, NULL, true);
32193425
3426static void init_options(drizzled::module::option_context &context)
3427{
3428 context("adaptive-hash-index",
3429 po::value<bool>(&innobase_adaptive_hash_index)->default_value(true),
3430 N_("Enable InnoDB adaptive hash index (enabled by default)."));
3431 context("adaptive-flushing",
3432 po::value<bool>(&srv_adaptive_flushing)->default_value(true),
3433 N_("Attempt flushing dirty pages to avoid IO bursts at checkpoints."));
3434 context("additional-mem-pool-size",
3435 po::value<long>(&innobase_additional_mem_pool_size)->default_value(8*1024*1024L),
3436 N_("Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures."));
3437 context("autoextend-increment",
3438 po::value<unsigned int>(&srv_auto_extend_increment)->default_value(8L),
3439 N_("Data file autoextend increment in megabytes"));
3440 context("buffer-pool-size",
3441 po::value<int64_t>(&innobase_buffer_pool_size)->default_value(128*1024*1024L),
3442 N_("The size of the memory buffer InnoDB uses to cache data and indexes of its tables."));
3443 context("data-home-dir",
3444 po::value<string>(),
3445 N_("The common part for InnoDB table spaces."));
3446 context("checksums",
3447 po::value<bool>(&innobase_use_checksums)->default_value(true),
3448 N_("Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums."));
3449 context("doublewrite",
3450 po::value<bool>(&innobase_use_doublewrite)->default_value(true),
3451 N_("Enable InnoDB doublewrite buffer (enabled by default). Disable with --skip-innodb-doublewrite."));
3452 context("io-capacity",
3453 po::value<unsigned long>(&srv_io_capacity)->default_value(200),
3454 N_("Number of IOPs the server can do. Tunes the background IO rate"));
3455 context("fast-shutdown",
3456 po::value<unsigned long>(&innobase_fast_shutdown)->default_value(1),
3457 N_("Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like)."));
3458 context("file-per-table",
3459 po::value<bool>(&srv_file_per_table)->default_value(false),
3460 N_("Stores each InnoDB table to an .ibd file in the database dir."));
3461 context("file-format",
3462 po::value<string>(),
3463 N_("File format to use for new tables in .ibd files."));
3464 context("flush-log-at-trx-commit",
3465 po::value<unsigned long>(&srv_flush_log_at_trx_commit)->default_value(1),
3466 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)."));
3467 context("flush-method",
3468 po::value<string>(),
3469 N_("With which method to flush data."));
3470 context("force-recovery",
3471 po::value<long>(&innobase_force_recovery)->default_value(0),
3472 N_("Helps to save your data in case the disk image of the database becomes corrupt."));
3473 context("data-file-path",
3474 po::value<string>(),
3475 N_("Path to individual files and their sizes."));
3476 context("log-group-home-dir",
3477 po::value<string>(),
3478 N_("Path to individual files and their sizes."));
3479 context("log-group-home-dir",
3480 po::value<string>(),
3481 N_("Path to InnoDB log files."));
3482 context("log-file-size",
3483 po::value<int64_t>(&innodb_log_file_size)->default_value(20*1024*1024L),
3484 N_("Size of each log file in a log group."));
3485 context("innodb-log-files-in-group",
3486 po::value<int64_t>(&innodb_log_files_in_group)->default_value(2),
3487 N_("Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here."));
3488 context("lock-wait-timeout",
3489 po::value<unsigned long>(&innobase_lock_wait_timeout)->default_value(5),
3490 N_("Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout."));
3491 context("log-buffer-size",
3492 po::value<long>(&innobase_log_buffer_size)->default_value(8*1024*1024L),
3493 N_("The size of the buffer which InnoDB uses to write log to the log files on disk."));
3494 context("lru-old-blocks-pct",
3495 po::value<unsigned long>(&innobase_lru_old_blocks_pct)->default_value(37),
3496 N_("Sets the point in the LRU list from where all pages are classified as old (Advanced users)"));
3497 context("lru-block-access-recency",
3498 po::value<unsigned long>(&innobase_lru_block_access_recency)->default_value(0),
3499 N_("Milliseconds between accesses to a block at which it is made young. 0=disabled (Advanced users)"));
3500 context("max-dirty-pages-pct",
3501 po::value<unsigned long>(&srv_max_buf_pool_modified_pct)->default_value(75),
3502 N_("Percentage of dirty pages allowed in bufferpool."));
3503 context("max-purge-lag",
3504 po::value<unsigned long>(&srv_max_purge_lag)->default_value(0),
3505 N_("Desired maximum length of the purge queue (0 = no limit)"));
3506 context("rollback-on-timeout",
3507 po::value<bool>(&innobase_rollback_on_timeout)->default_value(false),
3508 N_("Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)"));
3509 context("open-files",
3510 po::value<long>(&innobase_open_files)->default_value(300),
3511 N_("How many files at the maximum InnoDB keeps open at the same time."));
3512 context("read-io-threads",
3513 po::value<unsigned long>(&innobase_read_io_threads)->default_value(4),
3514 N_("Number of background read I/O threads in InnoDB."));
3515 context("write-io-threads",
3516 po::value<unsigned long>(&innobase_write_io_threads)->default_value(4),
3517 N_("Number of background write I/O threads in InnoDB."));
3518 context("print-verbose-log",
3519 po::value<bool>(&innobase_print_verbose_log)->default_value(true),
3520 N_("Disable if you want to reduce the number of messages written to the log (default: enabled)."));
3521 context("status-file",
3522 po::value<bool>(&innobase_create_status_file)->default_value(false),
3523 N_("Enable SHOW INNODB STATUS output in the log"));
3524 context("sync-spin-loops",
3525 po::value<unsigned long>(&srv_n_spin_wait_rounds)->default_value(30L),
3526 N_("Count of spin-loop rounds in InnoDB mutexes (30 by default)"));
3527 context("use-sys-malloc",
3528 po::value<bool>(&srv_use_sys_malloc)->default_value(true),
3529 N_("Use OS memory allocator instead of InnoDB's internal memory allocator"));
3530}
3531
3220static drizzle_sys_var* innobase_system_variables[]= {3532static drizzle_sys_var* innobase_system_variables[]= {
3221 DRIZZLE_SYSVAR(adaptive_hash_index),3533 DRIZZLE_SYSVAR(adaptive_hash_index),
3222 DRIZZLE_SYSVAR(adaptive_flushing),3534 DRIZZLE_SYSVAR(adaptive_flushing),
@@ -3264,6 +3576,6 @@
3264 PLUGIN_LICENSE_GPL,3576 PLUGIN_LICENSE_GPL,
3265 embedded_innodb_init, /* Plugin Init */3577 embedded_innodb_init, /* Plugin Init */
3266 innobase_system_variables, /* system variables */3578 innobase_system_variables, /* system variables */
3267 NULL /* config options */3579 init_options /* config options */
3268}3580}
3269DRIZZLE_DECLARE_PLUGIN_END;3581DRIZZLE_DECLARE_PLUGIN_END;
32703582
=== modified file 'plugin/embedded_innodb/libinnodb_datadict_dump_func.cc'
--- plugin/embedded_innodb/libinnodb_datadict_dump_func.cc 2010-07-08 21:23:39 +0000
+++ plugin/embedded_innodb/libinnodb_datadict_dump_func.cc 2010-08-17 02:53:42 +0000
@@ -23,7 +23,11 @@
23#include <drizzled/function/str/strfunc.h>23#include <drizzled/function/str/strfunc.h>
24#include "libinnodb_datadict_dump_func.h"24#include "libinnodb_datadict_dump_func.h"
2525
26#include "embedded_innodb-1.0/innodb.h"26#if defined(HAVE_HAILDB_H)
27# include <haildb.h>
28#else
29# include <embedded_innodb-1.0/innodb.h>
30#endif /* HAVE_HAILDB_H */
2731
28#include <sstream>32#include <sstream>
29#include <string>33#include <string>
3034
=== modified file 'plugin/embedded_innodb/libinnodb_version_func.cc'
--- plugin/embedded_innodb/libinnodb_version_func.cc 2010-05-18 18:20:56 +0000
+++ plugin/embedded_innodb/libinnodb_version_func.cc 2010-08-17 02:53:42 +0000
@@ -23,7 +23,11 @@
23#include <drizzled/function/str/strfunc.h>23#include <drizzled/function/str/strfunc.h>
24#include "libinnodb_version_func.h"24#include "libinnodb_version_func.h"
2525
26#include "embedded_innodb-1.0/innodb.h"26#if defined(HAVE_HAILDB_H)
27# include <haildb.h>
28#else
29# include <embedded_innodb-1.0/innodb.h>
30#endif /* HAVE_HAILDB_H */
2731
28using namespace std;32using namespace std;
29using namespace drizzled;33using namespace drizzled;
3034
=== modified file 'plugin/embedded_innodb/plugin.ini'
--- plugin/embedded_innodb/plugin.ini 2010-04-21 02:31:09 +0000
+++ plugin/embedded_innodb/plugin.ini 2010-08-17 02:53:42 +0000
@@ -3,5 +3,5 @@
3description=Work in progress engine using libinnodb instead of including it in tree.3description=Work in progress engine using libinnodb instead of including it in tree.
4sources=embedded_innodb_engine.cc libinnodb_version_func.cc libinnodb_datadict_dump_func.cc config_table_function.cc status_table_function.cc4sources=embedded_innodb_engine.cc libinnodb_version_func.cc libinnodb_datadict_dump_func.cc config_table_function.cc status_table_function.cc
5headers=embedded_innodb_engine.h libinnodb_version_func.h libinnodb_datadict_dump_func.h config_table_function.h status_table_function.h5headers=embedded_innodb_engine.h libinnodb_version_func.h libinnodb_datadict_dump_func.h config_table_function.h status_table_function.h
6build_conditional="x${ac_cv_libinnodb}" = "xyes"6build_conditional="x${ac_cv_have_innodb}" = "xyes"
7ldflags=${LTLIBINNODB}7ldflags=${INNODB_LIBS}
88
=== modified file 'plugin/embedded_innodb/status_table_function.cc'
--- plugin/embedded_innodb/status_table_function.cc 2010-05-18 18:20:56 +0000
+++ plugin/embedded_innodb/status_table_function.cc 2010-08-17 02:53:42 +0000
@@ -19,7 +19,11 @@
19#include "config.h"19#include "config.h"
20#include "drizzled/plugin/table_function.h"20#include "drizzled/plugin/table_function.h"
2121
22#include "embedded_innodb-1.0/innodb.h"22#if defined(HAVE_HAILDB_H)
23# include <haildb.h>
24#else
25# include <embedded_innodb-1.0/innodb.h>
26#endif /* HAVE_HAILDB_H */
2327
24#include "status_table_function.h"28#include "status_table_function.h"
2529
2630
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result 2010-08-06 17:53:24 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/config_table_function.result 2010-08-17 02:53:42 +0000
@@ -46,7 +46,7 @@
46sync_spin_loops ULONG46sync_spin_loops ULONG
47use_sys_malloc BOOL47use_sys_malloc BOOL
48version TEXT48version TEXT
49SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION;49SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION where NAME NOT IN ("VERSION");
50NAME TYPE VALUE50NAME TYPE VALUE
51adaptive_hash_index BOOL true51adaptive_hash_index BOOL true
52adaptive_flushing BOOL true52adaptive_flushing BOOL true
@@ -83,7 +83,6 @@
83status_file BOOL false83status_file BOOL false
84sync_spin_loops ULONG 3084sync_spin_loops ULONG 30
85use_sys_malloc BOOL true85use_sys_malloc BOOL true
86version TEXT 1.0.6.6750
87SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir");86SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir");
88NAME VALUE87NAME VALUE
89data_file_path NULL88data_file_path NULL
9089
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt 2010-06-01 05:55:48 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb_lock_wait_timeout=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/basic_select_for_update_pk_index-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb_lock_wait_timeout=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt 2010-05-10 13:17:59 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_off-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-flushing=false1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-flushing=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt 2010-05-10 13:17:59 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_flushing_on-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-flushing=true1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-flushing=true
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt 2010-05-10 13:14:39 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_off-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-hash-index=false1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-hash-index=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt 2010-05-10 12:53:25 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_adaptive_hash_index_on-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-adaptive-hash-index=true1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.adaptive-hash-index=true
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_additional_mem_pool_size_32m-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-additional-mem-pool-size=32m1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.additional-mem-pool-size=33554432
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt 2010-05-10 13:56:23 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_autoextend_increment_42-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-autoextend-increment=421--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.autoextend-increment=42
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt 2010-05-10 14:02:46 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_buffer_pool_size_22m-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-buffer-pool-size=20m1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.buffer-pool-size=20971520
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt 2010-04-30 05:50:45 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_disable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --skip-innodb-checksums1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.checksums=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt 2010-04-30 05:50:45 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_checksums_enable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase1--plugin_add=embedded_innodb --plugin_remove=innobase
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt 2010-05-03 04:14:08 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_disable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --skip-innodb-doublewrite1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.doublewrite=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt 2010-05-03 04:14:08 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_doublewrite_enable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-doublewrite1--plugin_add=embedded_innodb --plugin_remove=innobase
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt 2010-05-03 13:41:05 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown0-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=01--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=0
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt 2010-05-03 13:41:05 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown1-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt 2010-05-03 13:41:05 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_fast_shutdown2-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-fast-shutdown=21--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.fast-shutdown=2
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt 2010-05-03 14:13:17 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_disable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table=01--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt 2010-05-03 14:08:25 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_file_per_table_enable-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=true
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit0-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=01--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=0
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit1-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_log_at_trx_commit2-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-log-at-trx-commit=21--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-log-at-trx-commit=2
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt 2010-05-06 09:50:02 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_fsync-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=fsync1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=fsync
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt 2010-05-06 09:50:02 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odirect-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=O_DIRECT1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=O_DIRECT
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt 2010-05-06 09:50:02 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_flush_method_odsync-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-flush-method=O_DSYNC1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.flush-method=O_DSYNC
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt 2010-05-11 05:11:20 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_force_recovery-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-force-recovery=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.force-recovery=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt 2010-05-03 12:27:00 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_io_capacity-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-io-capacity=5001--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.io-capacity=500
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt 2010-05-11 05:19:48 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_lock_wait_timeout_1-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-lock-wait-timeout=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.lock-wait-timeout=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt 2010-05-11 05:36:20 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_log_buffer_size_5m-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-log-buffer-size=5m1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.log-buffer-size=5242880
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_dirty_pages_pct_50-master.opt'
--- 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
+++ 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
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-max-dirty-pages-pct=501--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.max-dirty-pages-pct=50
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt 2010-05-07 12:15:41 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_max_purge_lag_42-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-max-purge-lag=421--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.max-purge-lag=42
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt 2010-05-10 05:13:41 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_open_files_800-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-open-files=8001--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.open-files=800
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt 2010-05-11 05:46:17 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_off-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-print-verbose-log=false1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.print-verbose-log=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt 2010-05-11 05:46:17 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_print_verbose_log_on-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-print-verbose-log=true1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.print-verbose-log=true
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt 2010-05-10 06:06:20 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_read_io_threads_64-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-read-io-threads=641--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.read-io-threads=64
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt 2010-05-11 07:09:35 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_off-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-rollback-on-timeout=false1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.rollback-on-timeout=false
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt 2010-05-11 07:09:35 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_rollback_on_timeout_on-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-rollback-on-timeout=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.rollback-on-timeout=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt 2010-05-11 07:29:33 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_sync_spin_loops_100-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-sync-spin-loops=1001--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.sync-spin-loops=100
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test 2010-03-15 05:34:43 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_table_function.test 2010-08-17 02:53:42 +0000
@@ -1,7 +1,7 @@
1SHOW CREATE TABLE DATA_DICTIONARY.INNODB_CONFIGURATION;1SHOW CREATE TABLE DATA_DICTIONARY.INNODB_CONFIGURATION;
2SELECT COUNT(*) FROM DATA_DICTIONARY.INNODB_CONFIGURATION;2SELECT COUNT(*) FROM DATA_DICTIONARY.INNODB_CONFIGURATION;
3SELECT NAME,TYPE FROM DATA_DICTIONARY.INNODB_CONFIGURATION;3SELECT NAME,TYPE FROM DATA_DICTIONARY.INNODB_CONFIGURATION;
4SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION;4SELECT * FROM DATA_DICTIONARY.INNODB_CONFIGURATION where NAME NOT IN ("VERSION");
5SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir");5SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME IN ("data_file_path", "data_home_dir");
6SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME = "file_per_table";6SELECT NAME,VALUE FROM DATA_DICTIONARY.INNODB_CONFIGURATION WHERE NAME = "file_per_table";
77
88
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt 2010-05-11 07:29:33 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_off-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-use-sys-malloc=01--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.use-sys-malloc=0
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt 2010-05-11 07:29:33 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_use_sys_malloc_on-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-use-sys-malloc=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.use-sys-malloc=1
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt 2010-05-10 06:09:51 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/config_write_io_threads_64-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-write-io-threads=641--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.write-io-threads=64
22
=== modified file 'plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt'
--- plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt 2010-06-07 08:46:37 +0000
+++ plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/row_format_file_per_table-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--plugin_add=embedded_innodb --plugin_remove=innobase --innodb-file-per-table=11--plugin_add=embedded_innodb --plugin_remove=innobase --innodb.file-per-table=1
22
=== modified file 'plugin/filtered_replicator/filtered_replicator.cc'
--- plugin/filtered_replicator/filtered_replicator.cc 2010-07-29 00:35:25 +0000
+++ plugin/filtered_replicator/filtered_replicator.cc 2010-08-17 02:53:42 +0000
@@ -126,6 +126,24 @@
126 pthread_mutex_init(&sysvar_tab_lock, NULL);126 pthread_mutex_init(&sysvar_tab_lock, NULL);
127}127}
128128
129FilteredReplicator::~FilteredReplicator()
130{
131 if (sch_re)
132 {
133 pcre_free(sch_re);
134 }
135 if (tab_re)
136 {
137 pcre_free(tab_re);
138 }
139
140 pthread_mutex_destroy(&sch_vector_lock);
141 pthread_mutex_destroy(&tab_vector_lock);
142 pthread_mutex_destroy(&sysvar_sch_lock);
143 pthread_mutex_destroy(&sysvar_tab_lock);
144
145}
146
129void FilteredReplicator::parseStatementTableMetadata(const message::Statement &in_statement,147void FilteredReplicator::parseStatementTableMetadata(const message::Statement &in_statement,
130 string &in_schema_name,148 string &in_schema_name,
131 string &in_table_name) const149 string &in_table_name) const
@@ -500,22 +518,22 @@
500 518
501 if (vm.count("filteredschemas"))519 if (vm.count("filteredschemas"))
502 {520 {
503 sysvar_filtered_replicator_sch_filters= strdup(vm["filteredschemas"].as<string>().c_str());521 sysvar_filtered_replicator_sch_filters= const_cast<char *>(vm["filteredschemas"].as<string>().c_str());
504 }522 }
505523
506 else524 else
507 {525 {
508 sysvar_filtered_replicator_sch_filters= (char *)"";526 sysvar_filtered_replicator_sch_filters= const_cast<char *>("");
509 }527 }
510528
511 if (vm.count("filteredtables"))529 if (vm.count("filteredtables"))
512 {530 {
513 sysvar_filtered_replicator_tab_filters= strdup(vm["filteredtables"].as<string>().c_str());531 sysvar_filtered_replicator_tab_filters= const_cast<char *>(vm["filteredtables"].as<string>().c_str());
514 }532 }
515533
516 else534 else
517 {535 {
518 sysvar_filtered_replicator_tab_filters= (char *)"";536 sysvar_filtered_replicator_tab_filters= const_cast<char *>("");
519 }537 }
520538
521 filtered_replicator= new(std::nothrow) 539 filtered_replicator= new(std::nothrow)
522540
=== modified file 'plugin/filtered_replicator/filtered_replicator.h'
--- plugin/filtered_replicator/filtered_replicator.h 2010-04-05 16:06:01 +0000
+++ plugin/filtered_replicator/filtered_replicator.h 2010-08-17 02:53:42 +0000
@@ -46,22 +46,7 @@
46 const char *in_tab_filters);46 const char *in_tab_filters);
4747
48 /** Destructor */48 /** Destructor */
49 ~FilteredReplicator() 49 ~FilteredReplicator();
50 {
51 if (sch_re)
52 {
53 pcre_free(sch_re);
54 }
55 if (tab_re)
56 {
57 pcre_free(tab_re);
58 }
59
60 pthread_mutex_destroy(&sch_vector_lock);
61 pthread_mutex_destroy(&tab_vector_lock);
62 pthread_mutex_destroy(&sysvar_sch_lock);
63 pthread_mutex_destroy(&sysvar_tab_lock);
64 }
6550
66 /**51 /**
67 * Replicate a Transaction message to an Applier.52 * Replicate a Transaction message to an Applier.
6853
=== modified file 'plugin/hello_events/hello_events.cc'
--- plugin/hello_events/hello_events.cc 2010-07-16 14:00:07 +0000
+++ plugin/hello_events/hello_events.cc 2010-08-17 02:53:42 +0000
@@ -135,6 +135,13 @@
135 fprintf(stderr, PLUGIN_NAME" EVENT observeAfterDropDatabase(%s) err = %d\n", data.db.c_str(), data.err);135 fprintf(stderr, PLUGIN_NAME" EVENT observeAfterDropDatabase(%s) err = %d\n", data.db.c_str(), data.err);
136}136}
137137
138HelloEvents::~HelloEvents()
139{
140 /* These are strdup'd in option processing */
141 free(sysvar_table_list);
142 free(sysvar_db_list);
143}
144
138//==================================145//==================================
139/* This is where I register which table events my pluggin is interested in.*/146/* This is where I register which table events my pluggin is interested in.*/
140void HelloEvents::registerTableEventsDo(TableShare &table_share, EventObserverList &observers)147void HelloEvents::registerTableEventsDo(TableShare &table_share, EventObserverList &observers)
141148
=== modified file 'plugin/hello_events/hello_events.h'
--- plugin/hello_events/hello_events.h 2010-05-17 16:42:43 +0000
+++ plugin/hello_events/hello_events.h 2010-08-17 02:53:42 +0000
@@ -34,6 +34,7 @@
34public:34public:
3535
36 HelloEvents(std::string name_arg): EventObserver(name_arg), is_enabled(false), db_list(""), table_list(""){}36 HelloEvents(std::string name_arg): EventObserver(name_arg), is_enabled(false), db_list(""), table_list(""){}
37 ~HelloEvents();
3738
38 void registerTableEventsDo(TableShare &table_share, EventObserverList &observers);39 void registerTableEventsDo(TableShare &table_share, EventObserverList &observers);
39 void registerSchemaEventsDo(const std::string &db, EventObserverList &observers);40 void registerSchemaEventsDo(const std::string &db, EventObserverList &observers);
4041
=== modified file 'plugin/innobase/handler/ha_innodb.cc'
--- plugin/innobase/handler/ha_innodb.cc 2010-08-08 01:18:02 +0000
+++ plugin/innobase/handler/ha_innodb.cc 2010-08-17 02:53:42 +0000
@@ -88,6 +88,12 @@
88#include <drizzled/transaction_services.h>88#include <drizzled/transaction_services.h>
8989
90#include <boost/algorithm/string.hpp>90#include <boost/algorithm/string.hpp>
91#include <boost/program_options.hpp>
92#include <drizzled/module/option_map.h>
93#include <iostream>
94
95namespace po= boost::program_options;
96using namespace std;
9197
92/** @file ha_innodb.cc */98/** @file ha_innodb.cc */
9399
@@ -180,8 +186,9 @@
180186
181static long innobase_mirrored_log_groups, innobase_log_files_in_group,187static long innobase_mirrored_log_groups, innobase_log_files_in_group,
182 innobase_log_buffer_size,188 innobase_log_buffer_size,
183 innobase_additional_mem_pool_size, innobase_file_io_threads,189 innobase_file_io_threads,
184 innobase_force_recovery, innobase_open_files;190 innobase_force_recovery, innobase_open_files;
191static long innobase_additional_mem_pool_size= 8*1024*1024L;
185static ulong innobase_commit_concurrency = 0;192static ulong innobase_commit_concurrency = 0;
186static ulong innobase_read_io_threads;193static ulong innobase_read_io_threads;
187static ulong innobase_write_io_threads;194static ulong innobase_write_io_threads;
@@ -189,7 +196,8 @@
189/**196/**
190 * @TODO: Turn this into size_t as soon as we have a Variable<size_t>197 * @TODO: Turn this into size_t as soon as we have a Variable<size_t>
191 */198 */
192static int64_t innobase_buffer_pool_size, innobase_log_file_size;199static int64_t innobase_buffer_pool_size= 128*1024*1024;
200static int64_t innobase_log_file_size;
193201
194/* The default values for the following char* start-up parameters202/* The default values for the following char* start-up parameters
195are determined in innobase_init below: */203are determined in innobase_init below: */
@@ -296,6 +304,10 @@
296 pthread_mutex_destroy(&commit_cond_m);304 pthread_mutex_destroy(&commit_cond_m);
297 pthread_cond_destroy(&commit_cond);305 pthread_cond_destroy(&commit_cond);
298 }306 }
307
308 /* These get strdup'd from vm variables */
309 free(innobase_data_home_dir);
310
299 }311 }
300312
301private:313private:
@@ -1815,6 +1827,12 @@
1815 prebuilt->read_just_key = 0;1827 prebuilt->read_just_key = 0;
1816}1828}
18171829
1830template<class T>
1831void align_value(T& value, size_t align_val= 1024)
1832{
1833 value= value - (value % align_val);
1834}
1835
1818/*********************************************************************//**1836/*********************************************************************//**
1819Opens an InnoDB database.1837Opens an InnoDB database.
1820@return 0 on success, error code on failure */1838@return 0 on success, error code on failure */
@@ -1830,6 +1848,279 @@
1830 char *default_path;1848 char *default_path;
1831 uint format_id;1849 uint format_id;
1832 InnobaseEngine *actuall_engine_ptr;1850 InnobaseEngine *actuall_engine_ptr;
1851 const module::option_map &vm= context.getOptions();
1852
1853 if (vm.count("io-capacity"))
1854 {
1855 if (srv_io_capacity < 100)
1856 {
1857 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for io-capacity\n"));
1858 exit(-1);
1859 }
1860 }
1861
1862 if (vm.count("data-home-dir"))
1863 {
1864 innobase_data_home_dir= strdup(vm["data-home-dir"].as<string>().c_str());
1865 }
1866
1867 else
1868 {
1869 innobase_data_home_dir= NULL;
1870 }
1871
1872 if (vm.count("fast-shutdown"))
1873 {
1874 if (innobase_fast_shutdown > 2)
1875 {
1876 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for fast-shutdown\n"));
1877 exit(-1);
1878 }
1879 }
1880
1881 if (vm.count("file-format-check"))
1882 {
1883 innobase_file_format_check= const_cast<char *>(vm["file-format-check"].as<string>().c_str());
1884 }
1885
1886 if (vm.count("flush-log-at-trx-commit"))
1887 {
1888 if (srv_flush_log_at_trx_commit > 2)
1889 {
1890 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for flush-log-at-trx-commit\n"));
1891 exit(-1);
1892 }
1893 }
1894
1895 if (vm.count("flush-method"))
1896 {
1897 innobase_unix_file_flush_method= const_cast<char *>(vm["flush-method"].as<string>().c_str());
1898 }
1899 else
1900 {
1901 innobase_unix_file_flush_method= NULL;
1902 }
1903
1904#ifdef UNIV_LOG_ARCHIVE
1905 if (vm.count("log-arch-dir"))
1906 {
1907 innobase_log_arch_dir= const_cast<char *>(vm["log-arch-dir"].as<string>().c_str());
1908 }
1909
1910 else
1911 {
1912 innobase_log_arch_dir= NULL;
1913 }
1914#endif /* UNIV_LOG_ARCHIVE */
1915
1916 if (vm.count("max-dirty-pages-pct"))
1917 {
1918 if (srv_max_buf_pool_modified_pct > 99)
1919 {
1920 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for max-dirty-pages-pct\n"));
1921 exit(-1);
1922 }
1923 }
1924
1925 if (vm.count("stats-sample-pages"))
1926 {
1927 if (srv_stats_sample_pages < 8)
1928 {
1929 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for stats-sample-pages\n"));
1930 exit(-1);
1931 }
1932 }
1933
1934 if (vm.count("additional-mem-pool-size"))
1935 {
1936 align_value(innobase_additional_mem_pool_size);
1937
1938 if (innobase_additional_mem_pool_size < 512*1024L)
1939 {
1940 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for additional-mem-pool-size\n"));
1941 exit(-1);
1942 }
1943
1944 }
1945
1946 if (vm.count("autoextend-increment"))
1947 {
1948 if (srv_auto_extend_increment < 1 || srv_auto_extend_increment > 1000)
1949 {
1950 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for autoextend-increment\n"));
1951 exit(-1);
1952 }
1953 }
1954
1955 if (vm.count("buffer-pool-size"))
1956 {
1957 align_value(innobase_buffer_pool_size, 1024*1024);
1958 if (innobase_buffer_pool_size < 5*1024*1024)
1959 {
1960 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for buffer-pool-size\n"));
1961 exit(-1);
1962 }
1963
1964 }
1965
1966 if (vm.count("commit-concurrency"))
1967 {
1968 if (srv_replication_delay > 1000)
1969 {
1970 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for commit-concurrency\n"));
1971 exit(-1);
1972 }
1973 }
1974
1975 if (vm.count("concurrency-tickets"))
1976 {
1977 if (srv_n_free_tickets_to_enter < 1)
1978 {
1979 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for concurrency-tickets\n"));
1980 exit(-1);
1981 }
1982 }
1983
1984 if (vm.count("file-io-threads"))
1985 {
1986 if (innobase_file_io_threads < 4 || innobase_file_io_threads > 64)
1987 {
1988 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for file-io-threads\n"));
1989 exit(-1);
1990 }
1991 }
1992
1993 if (vm.count("read-io-threads"))
1994 {
1995 if (innobase_read_io_threads < 1 || innobase_read_io_threads > 64)
1996 {
1997 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-io-threads\n"));
1998 exit(-1);
1999 }
2000 }
2001
2002 if (vm.count("write-io-threads"))
2003 {
2004 if (innobase_write_io_threads < 1 || innobase_write_io_threads > 64)
2005 {
2006 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for write-io-threads\n"));
2007 exit(-1);
2008 }
2009 }
2010
2011 if (vm.count("force-recovery"))
2012 {
2013 if (innobase_force_recovery > 6)
2014 {
2015 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for force-recovery\n"));
2016 exit(-1);
2017 }
2018 }
2019
2020 if (vm.count("log-buffer-size"))
2021 {
2022 align_value(innobase_log_buffer_size);
2023 if (innobase_log_buffer_size < 256*1024L)
2024 {
2025 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n"));
2026 exit(-1);
2027 }
2028 }
2029
2030 if (vm.count("log-file-size"))
2031 {
2032 align_value(innobase_log_file_size, 1024*1024);
2033 if (innobase_log_file_size < 1*1024*1024L)
2034 {
2035 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n"));
2036 exit(-1);
2037 }
2038 }
2039
2040 if (vm.count("log-files-in-group"))
2041 {
2042 if (innobase_log_files_in_group < 2 || innobase_log_files_in_group > 100)
2043 {
2044 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-files-in-group\n"));
2045 exit(-1);
2046 }
2047 }
2048
2049 if (vm.count("mirrored-log-groups"))
2050 {
2051 if (innobase_mirrored_log_groups < 1 || innobase_mirrored_log_groups > 10)
2052 {
2053 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for mirrored-log-groups\n"));
2054 exit(-1);
2055 }
2056 }
2057
2058 if (vm.count("open-files"))
2059 {
2060 if (innobase_open_files < 10)
2061 {
2062 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for open-files\n"));
2063 exit(-1);
2064 }
2065 }
2066
2067 if (vm.count("thread-concurrency"))
2068 {
2069 if (srv_thread_concurrency > 1000)
2070 {
2071 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for thread-concurrency\n"));
2072 exit(-1);
2073 }
2074 }
2075
2076 if (vm.count("data-file-path"))
2077 {
2078 innobase_data_file_path= const_cast<char *>(vm["data-file-path"].as<string>().c_str());
2079 }
2080 else
2081 {
2082 innobase_data_file_path= NULL;
2083 }
2084
2085 if (vm.count("version"))
2086 {
2087 innodb_version_str= const_cast<char *>(vm["version"].as<string>().c_str());
2088 }
2089
2090 if (vm.count("read-ahead-threshold"))
2091 {
2092 if (srv_read_ahead_threshold > 64)
2093 {
2094 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-ahead-threshold\n"));
2095 exit(-1);
2096 }
2097 }
2098
2099 if (vm.count("support-xa"))
2100 {
2101 (SessionVAR(NULL,support_xa))= vm["support-xa"].as<bool>();
2102 }
2103
2104 if (vm.count("table-locks"))
2105 {
2106 (SessionVAR(NULL,table_locks))= vm["table-locks"].as<bool>();
2107 }
2108
2109 if (vm.count("strict-mode"))
2110 {
2111 (SessionVAR(NULL,strict_mode))= vm["strict-mode"].as<bool>();
2112 }
2113
2114 if (vm.count("lock-wait-timeout"))
2115 {
2116 if (vm["lock-wait-timeout"].as<unsigned long>() < 1 || vm["lock-wait-timeout"].as<unsigned long>() > 1024*1024*1024)
2117 {
2118 errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for lock-wait-timeout\n"));
2119 exit(-1);
2120 }
2121
2122 (SessionVAR(NULL,lock_wait_timeout))= vm["lock-wait-timeout"].as<unsigned long>();
2123 }
18332124
1834 innodb_engine_ptr= actuall_engine_ptr= new InnobaseEngine(innobase_engine_name);2125 innodb_engine_ptr= actuall_engine_ptr= new InnobaseEngine(innobase_engine_name);
18352126
@@ -1930,7 +2221,12 @@
19302221
1931 /* The default dir for log files is the datadir of MySQL */2222 /* The default dir for log files is the datadir of MySQL */
19322223
1933 if (!innobase_log_group_home_dir) {2224 if (vm.count("log-group-home-dir"))
2225 {
2226 innobase_log_group_home_dir= const_cast<char *>(vm["log-group-home-dir"].as<string>().c_str());
2227 }
2228 else
2229 {
1934 innobase_log_group_home_dir = default_path;2230 innobase_log_group_home_dir = default_path;
1935 }2231 }
19362232
@@ -1954,11 +2250,12 @@
1954 goto mem_free_and_error;2250 goto mem_free_and_error;
1955 }2251 }
19562252
2253
1957 /* Validate the file format by animal name */2254 /* Validate the file format by animal name */
1958 if (innobase_file_format_name != NULL) {2255 if (vm.count("file-format"))
19592256 {
1960 format_id = innobase_file_format_name_lookup(2257 format_id = innobase_file_format_name_lookup(
1961 innobase_file_format_name);2258 vm["file-format"].as<string>().c_str());
19622259
1963 if (format_id > DICT_TF_FORMAT_MAX) {2260 if (format_id > DICT_TF_FORMAT_MAX) {
19642261
@@ -1967,8 +2264,7 @@
1967 goto mem_free_and_error;2264 goto mem_free_and_error;
1968 }2265 }
1969 } else {2266 } else {
1970 /* Set it to the default file format id. Though this2267 /* Set it to the default file format id.*/
1971 should never happen. */
1972 format_id = 0;2268 format_id = 0;
1973 }2269 }
19742270
@@ -2007,14 +2303,15 @@
2007 }2303 }
2008 }2304 }
20092305
2010 if (innobase_change_buffering) {2306 if (vm.count("change-buffering"))
2307 {
2011 ulint use;2308 ulint use;
20122309
2013 for (use = 0;2310 for (use = 0;
2014 use < UT_ARR_SIZE(innobase_change_buffering_values);2311 use < UT_ARR_SIZE(innobase_change_buffering_values);
2015 use++) {2312 use++) {
2016 if (!innobase_strcasecmp(2313 if (!innobase_strcasecmp(
2017 innobase_change_buffering,2314 vm["change-buffering"].as<string>().c_str(),
2018 innobase_change_buffering_values[use])) {2315 innobase_change_buffering_values[use])) {
2019 ibuf_use = (ibuf_use_t) use;2316 ibuf_use = (ibuf_use_t) use;
2020 goto innobase_change_buffering_inited_ok;2317 goto innobase_change_buffering_inited_ok;
@@ -2024,7 +2321,7 @@
2024 errmsg_printf(ERRMSG_LVL_ERROR,2321 errmsg_printf(ERRMSG_LVL_ERROR,
2025 "InnoDB: invalid value "2322 "InnoDB: invalid value "
2026 "innodb_file_format_check=%s",2323 "innodb_file_format_check=%s",
2027 innobase_change_buffering);2324 vm["change-buffering"].as<string>().c_str());
2028 goto mem_free_and_error;2325 goto mem_free_and_error;
2029 }2326 }
20302327
@@ -8352,8 +8649,7 @@
8352/* plugin options */8649/* plugin options */
8353static DRIZZLE_SYSVAR_BOOL(checksums, innobase_use_checksums,8650static DRIZZLE_SYSVAR_BOOL(checksums, innobase_use_checksums,
8354 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,8651 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
8355 "Enable InnoDB checksums validation (enabled by default). "8652 "Enable InnoDB checksums validation (enabled by default). ",
8356 "Disable with --skip-innodb-checksums.",
8357 NULL, NULL, TRUE);8653 NULL, NULL, TRUE);
83588654
8359static DRIZZLE_SYSVAR_STR(data_home_dir, innobase_data_home_dir,8655static DRIZZLE_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
@@ -8363,8 +8659,7 @@
83638659
8364static DRIZZLE_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,8660static DRIZZLE_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
8365 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,8661 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
8366 "Enable InnoDB doublewrite buffer (enabled by default). "8662 "Enable InnoDB doublewrite buffer (enabled by default). ",
8367 "Disable with --skip-innodb-doublewrite.",
8368 NULL, NULL, TRUE);8663 NULL, NULL, TRUE);
83698664
8370static DRIZZLE_SYSVAR_ULONG(io_capacity, srv_io_capacity,8665static DRIZZLE_SYSVAR_ULONG(io_capacity, srv_io_capacity,
@@ -8455,8 +8750,7 @@
84558750
8456static DRIZZLE_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,8751static DRIZZLE_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
8457 PLUGIN_VAR_OPCMDARG,8752 PLUGIN_VAR_OPCMDARG,
8458 "Enable InnoDB adaptive hash index (enabled by default). "8753 "Enable InnoDB adaptive hash index (enabled by default).",
8459 "Disable with --skip-innodb-adaptive-hash-index.",
8460 NULL, innodb_adaptive_hash_index_update, TRUE);8754 NULL, innodb_adaptive_hash_index_update, TRUE);
84618755
8462static DRIZZLE_SYSVAR_ULONG(replication_delay, srv_replication_delay,8756static DRIZZLE_SYSVAR_ULONG(replication_delay, srv_replication_delay,
@@ -8582,6 +8876,156 @@
8582 "trigger a readahead.",8876 "trigger a readahead.",
8583 NULL, NULL, 56, 0, 64, 0);8877 NULL, NULL, 56, 0, 64, 0);
85848878
8879static void init_options(drizzled::module::option_context &context)
8880{
8881 context("checksums",
8882 po::value<bool>(&innobase_use_checksums)->default_value(true)->zero_tokens(),
8883 "Enable InnoDB checksums validation.");
8884 context("data-home-dir",
8885 po::value<string>(),
8886 "The common part for InnoDB table spaces.");
8887 context("doublewrite",
8888 po::value<bool>(&innobase_use_doublewrite)->default_value(true)->zero_tokens(),
8889 "Enable InnoDB doublewrite buffer.");
8890 context("io-capacity",
8891 po::value<unsigned long>(&srv_io_capacity)->default_value(200),
8892 "Number of IOPs the server can do. Tunes the background IO rate");
8893 context("fast-shutdown",
8894 po::value<unsigned long>(&innobase_fast_shutdown)->default_value(1),
8895 "Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).");
8896 context("file-per-table",
8897 po::value<bool>(&srv_file_per_table)->default_value(false)->zero_tokens(),
8898 "Stores each InnoDB table to an .ibd file in the database dir.");
8899 context("file-format",
8900 po::value<string>()->default_value("Antelope"),
8901 "File format to use for new tables in .ibd files.");
8902 context("file-format-check",
8903 po::value<string>()->default_value("on"),
8904 "The highest file format in the tablespace.");
8905 context("flush-log-at-trx-commit",
8906 po::value<unsigned long>(&srv_flush_log_at_trx_commit)->default_value(1),
8907 "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).");
8908 context("flush-method",
8909 po::value<string>(),
8910 "With which method to flush data.");
8911#ifdef UNIV_LOG_ARCHIVE
8912 context("log-arch-dir",
8913 po::value<string>(),
8914 "Where full logs should be archived.");
8915 context("log-archive",
8916 po::value<bool>(&innobase_log_archive)->default_value(false)->zero_tokens(),
8917 "Set to 1 if you want to have logs archived.");
8918#endif /* UNIV_LOG_ARCHIVE */
8919 context("log-group-home-dir",
8920 po::value<string>(),
8921 "Path to InnoDB log files.");
8922 context("max-dirty-pages-pct",
8923 po::value<unsigned long>(&srv_max_buf_pool_modified_pct)->default_value(75),
8924 "Percentage of dirty pages allowed in bufferpool.");
8925 context("adaptive-flushing",
8926 po::value<bool>(&srv_adaptive_flushing)->default_value(true)->zero_tokens(),
8927 "Attempt flushing dirty pages to avoid IO bursts at checkpoints.");
8928 context("max-purge-lag",
8929 po::value<unsigned long>(&srv_max_purge_lag)->default_value(0),
8930 "Desired maximum length of the purge queue (0 = no limit)");
8931 context("status-file",
8932 po::value<bool>(&innobase_create_status_file)->default_value(false)->zero_tokens(),
8933 "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file");
8934 context("stats-on-metadata",
8935 po::value<bool>(&innobase_stats_on_metadata)->default_value(true)->zero_tokens(),
8936 "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)");
8937 context("stats-sample-pages",
8938 po::value<uint64_t>(&srv_stats_sample_pages)->default_value(8),
8939 "The number of index pages to sample when calculating statistics (default 8)");
8940 context("adaptive-hash-index",
8941 po::value<bool>(&btr_search_enabled)->default_value(true)->zero_tokens(),
8942 "Enable InnoDB adaptive hash index (enabled by default)");
8943 context("replication-delay",
8944 po::value<unsigned long>(&srv_replication_delay)->default_value(0),
8945 "Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)");
8946 context("additional-mem-pool-size",
8947 po::value<long>(&innobase_additional_mem_pool_size)->default_value(8*1024*1024L),
8948 "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.");
8949 context("autoextend-increment",
8950 po::value<uint32_t>(&srv_auto_extend_increment)->default_value(8L),
8951 "Data file autoextend increment in megabytes");
8952 context("buffer-pool-size",
8953 po::value<int64_t>(&innobase_buffer_pool_size)->default_value(128*1024*1024L),
8954 "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.");
8955 context("commit-concurrency",
8956 po::value<unsigned long>(&innobase_commit_concurrency)->default_value(0),
8957 "Helps in performance tuning in heavily concurrent environments.");
8958 context("concurrency-tickets",
8959 po::value<unsigned long>(&srv_n_free_tickets_to_enter)->default_value(500L),
8960 "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket");
8961 context("file-io-threads",
8962 po::value<long>(&innobase_file_io_threads)->default_value(4),
8963 "Number of file I/O threads in InnoDB.");
8964 context("read-io-threads",
8965 po::value<unsigned long>(&innobase_read_io_threads)->default_value(4),
8966 "Number of background read I/O threads in InnoDB.");
8967 context("write-io-threads",
8968 po::value<unsigned long>(&innobase_write_io_threads)->default_value(4),
8969 "Number of background write I/O threads in InnoDB.");
8970 context("force-recovery",
8971 po::value<long>(&innobase_force_recovery)->default_value(0),
8972 "Helps to save your data in case the disk image of the database becomes corrupt.");
8973 context("log-buffer-size",
8974 po::value<long>(&innobase_log_buffer_size)->default_value(8*1024*1024L),
8975 "The size of the buffer which InnoDB uses to write log to the log files on disk.");
8976 context("log-file-size",
8977 po::value<int64_t>(&innobase_log_file_size)->default_value(20*1024*1024L),
8978 "The size of the buffer which InnoDB uses to write log to the log files on disk.");
8979 context("log-files-in-group",
8980 po::value<long>(&innobase_log_files_in_group)->default_value(2),
8981 "Number of log files in the log group. InnoDB writes to the files in a circular fashion.");
8982 context("mirrored-log-groups",
8983 po::value<long>(&innobase_mirrored_log_groups)->default_value(1),
8984 "Number of identical copies of log groups we keep for the database. Currently this should be set to 1.");
8985 context("open-files",
8986 po::value<long>(&innobase_open_files)->default_value(300L),
8987 "How many files at the maximum InnoDB keeps open at the same time.");
8988 context("sync-spin-loops",
8989 po::value<unsigned long>(&srv_n_spin_wait_rounds)->default_value(30L),
8990 "Count of spin-loop rounds in InnoDB mutexes (30 by default)");
8991 context("spin-wait-delay",
8992 po::value<unsigned long>(&srv_spin_wait_delay)->default_value(6L),
8993 "Maximum delay between polling for a spin lock (6 by default)");
8994 context("thread-concurrency",
8995 po::value<unsigned long>(&srv_thread_concurrency)->default_value(0),
8996 "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.");
8997 context("thread-sleep-delay",
8998 po::value<unsigned long>(&srv_thread_sleep_delay)->default_value(10000L),
8999 "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep");
9000 context("data-file-path",
9001 po::value<string>(),
9002 "Path to individual files and their sizes.");
9003 context("version",
9004 po::value<string>()->default_value(INNODB_VERSION_STR),
9005 "InnoDB version");
9006 context("use-sys-malloc",
9007 po::value<bool>(&srv_use_sys_malloc)->default_value(true)->zero_tokens(),
9008 "Use OS memory allocator instead of InnoDB's internal memory allocator");
9009 context("change-buffering",
9010 po::value<string>(),
9011 "Buffer changes to reduce random access: OFF, ON, inserting, deleting, changing, or purging.");
9012 context("read-ahead-threshold",
9013 po::value<unsigned long>(&srv_read_ahead_threshold)->default_value(56),
9014 "Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.");
9015 context("support-xa",
9016 po::value<bool>()->default_value(true)->zero_tokens(),
9017 "Enable InnoDB support for the XA two-phase commit");
9018 context("table-locks",
9019 po::value<bool>()->default_value(true)->zero_tokens(),
9020 "Enable InnoDB locking in LOCK TABLES");
9021 context("strict-mode",
9022 po::value<bool>()->default_value(false)->zero_tokens(),
9023 "Use strict mode when evaluating create options.");
9024 context("lock-wait-timeout",
9025 po::value<unsigned long>()->default_value(50),
9026 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.");
9027}
9028
8585static drizzle_sys_var* innobase_system_variables[]= {9029static drizzle_sys_var* innobase_system_variables[]= {
8586 DRIZZLE_SYSVAR(additional_mem_pool_size),9030 DRIZZLE_SYSVAR(additional_mem_pool_size),
8587 DRIZZLE_SYSVAR(autoextend_increment),9031 DRIZZLE_SYSVAR(autoextend_increment),
@@ -8646,7 +9090,7 @@
8646 PLUGIN_LICENSE_GPL,9090 PLUGIN_LICENSE_GPL,
8647 innobase_init, /* Plugin Init */9091 innobase_init, /* Plugin Init */
8648 innobase_system_variables, /* system variables */9092 innobase_system_variables, /* system variables */
8649 NULL /* reserved */9093 init_options /* reserved */
8650}9094}
8651DRIZZLE_DECLARE_PLUGIN_END;9095DRIZZLE_DECLARE_PLUGIN_END;
86529096
86539097
=== added file 'plugin/innobase/tests/t/innodb_lock_waits-master.opt'
--- plugin/innobase/tests/t/innodb_lock_waits-master.opt 1970-01-01 00:00:00 +0000
+++ plugin/innobase/tests/t/innodb_lock_waits-master.opt 2010-08-17 02:53:42 +0000
@@ -0,0 +1,1 @@
1--innodb.lock-wait-timeout=5
02
=== modified file 'plugin/memcached_stats/memcached_stats.cc'
--- plugin/memcached_stats/memcached_stats.cc 2010-07-18 05:16:33 +0000
+++ plugin/memcached_stats/memcached_stats.cc 2010-08-17 02:53:42 +0000
@@ -72,11 +72,12 @@
7272
73 else73 else
74 {74 {
75 sysvar_memcached_servers= "";75 sysvar_memcached_servers= strdup("");
76 }76 }
7777
78 SysvarHolder &sysvar_holder= SysvarHolder::singleton();78 SysvarHolder &sysvar_holder= SysvarHolder::singleton();
79 sysvar_holder.setServersString(sysvar_memcached_servers);79 sysvar_holder.setServersString(sysvar_memcached_servers);
80 sysvar_holder.setMemoryPtr(sysvar_memcached_servers);
8081
81 /* we are good to go */82 /* we are good to go */
82 stats_table_tool= new(std::nothrow)StatsTableTool; 83 stats_table_tool= new(std::nothrow)StatsTableTool;
8384
=== modified file 'plugin/memcached_stats/sysvar_holder.h'
--- plugin/memcached_stats/sysvar_holder.h 2009-12-21 10:13:31 +0000
+++ plugin/memcached_stats/sysvar_holder.h 2010-08-17 02:53:42 +0000
@@ -66,16 +66,23 @@
66 return servers_string;66 return servers_string;
67 }67 }
6868
69 void setMemoryPtr(void *mem_ptr_in)
70 {
71 memory_ptr= mem_ptr_in;
72 }
73
69private:74private:
7075
71 pthread_mutex_t mutex;76 pthread_mutex_t mutex;
7277
73 std::string servers_string;78 std::string servers_string;
79 void *memory_ptr;
7480
75 SysvarHolder()81 SysvarHolder()
76 :82 :
77 mutex(),83 mutex(),
78 servers_string()84 servers_string()
85 memory_ptr(NULL)
79 {86 {
80 pthread_mutex_init(&mutex, NULL);87 pthread_mutex_init(&mutex, NULL);
81 }88 }
@@ -83,6 +90,7 @@
83 ~SysvarHolder()90 ~SysvarHolder()
84 {91 {
85 pthread_mutex_destroy(&mutex);92 pthread_mutex_destroy(&mutex);
93 free(memory_ptr);
86 }94 }
8795
88 SysvarHolder(const SysvarHolder&);96 SysvarHolder(const SysvarHolder&);
8997
=== modified file 'plugin/myisam/mi_key.cc'
--- plugin/myisam/mi_key.cc 2010-02-04 08:14:46 +0000
+++ plugin/myisam/mi_key.cc 2010-08-17 02:53:42 +0000
@@ -23,6 +23,9 @@
23#include <math.h>23#include <math.h>
24#include <cassert>24#include <cassert>
2525
26using namespace drizzled;
27using namespace std;
28
26#define CHECK_KEYS /* Enable safety checks */29#define CHECK_KEYS /* Enable safety checks */
2730
28#define FIX_LENGTH(cs, pos, length, char_length) \31#define FIX_LENGTH(cs, pos, length, char_length) \
2932
=== modified file 'plugin/mysql_protocol/mysql_protocol.cc'
--- plugin/mysql_protocol/mysql_protocol.cc 2010-07-06 12:47:40 +0000
+++ plugin/mysql_protocol/mysql_protocol.cc 2010-08-17 02:53:42 +0000
@@ -56,6 +56,12 @@
56static const uint32_t random_max= 0x3FFFFFFF;56static const uint32_t random_max= 0x3FFFFFFF;
57static const double random_max_double= (double)0x3FFFFFFF;57static const double random_max_double= (double)0x3FFFFFFF;
5858
59ListenMySQLProtocol::~ListenMySQLProtocol()
60{
61 /* This is strdup'd from the options */
62 free(bind_address);
63}
64
59const char* ListenMySQLProtocol::getHost(void) const65const char* ListenMySQLProtocol::getHost(void) const
60{66{
61 return bind_address;67 return bind_address;
6268
=== modified file 'plugin/mysql_protocol/mysql_protocol.h'
--- plugin/mysql_protocol/mysql_protocol.h 2010-03-18 18:08:25 +0000
+++ plugin/mysql_protocol/mysql_protocol.h 2010-08-17 02:53:42 +0000
@@ -35,6 +35,7 @@
35 drizzled::plugin::ListenTcp(name_arg),35 drizzled::plugin::ListenTcp(name_arg),
36 using_mysql41_protocol(using_mysql41_protocol_arg)36 using_mysql41_protocol(using_mysql41_protocol_arg)
37 { }37 { }
38 virtual ~ListenMySQLProtocol();
38 virtual const char* getHost(void) const;39 virtual const char* getHost(void) const;
39 virtual in_port_t getPort(void) const;40 virtual in_port_t getPort(void) const;
40 virtual drizzled::plugin::Client *getClient(int fd);41 virtual drizzled::plugin::Client *getClient(int fd);
4142
=== modified file 'plugin/syslog/module.cc'
--- plugin/syslog/module.cc 2010-08-04 08:10:51 +0000
+++ plugin/syslog/module.cc 2010-08-17 02:53:42 +0000
@@ -49,6 +49,7 @@
49bool sysvar_errmsg_enable;49bool sysvar_errmsg_enable;
50char* sysvar_errmsg_priority;50char* sysvar_errmsg_priority;
5151
52
52static int init(drizzled::module::Context &context)53static int init(drizzled::module::Context &context)
53{54{
54 const module::option_map &vm= context.getOptions();55 const module::option_map &vm= context.getOptions();
@@ -82,42 +83,39 @@
8283
83 if (vm.count("ident"))84 if (vm.count("ident"))
84 {85 {
85 sysvar_ident= strdup(vm["ident"].as<string>().c_str());86 sysvar_ident= const_cast<char *>(vm["ident"].as<string>().c_str());
86 }87 }
87
88 else88 else
89 {89 {
90 sysvar_ident= strdup("drizzled");90 sysvar_ident= const_cast<char *>("drizzled");
91 }91 }
9292
93 if (vm.count("facility"))93 if (vm.count("facility"))
94 {94 {
95 sysvar_facility= strdup(vm["facility"].as<string>().c_str());95 sysvar_facility= const_cast<char *>(vm["facility"].as<string>().c_str());
96 }96 }
97
98 else97 else
99 {98 {
100 sysvar_facility= strdup("local0");99 sysvar_facility= const_cast<char *>("local0");
101 }100 }
102101
103 if (vm.count("logging-priority"))102 if (vm.count("logging-priority"))
104 {103 {
105 sysvar_logging_priority= strdup(vm["logging-priority"].as<string>().c_str());104 sysvar_logging_priority= const_cast<char *>(vm["logging-priority"].as<string>().c_str());
106 }105 }
107
108 else106 else
109 {107 {
110 sysvar_logging_priority= strdup("info");108 sysvar_logging_priority= const_cast<char *>("info");
111 }109 }
112110
113 if (vm.count("errmsg-priority"))111 if (vm.count("errmsg-priority"))
114 {112 {
115 sysvar_errmsg_priority= strdup(vm["errmsg-priority"].as<string>().c_str());113 sysvar_errmsg_priority= const_cast<char *>(vm["errmsg-priority"].as<string>().c_str());
116 }114 }
117115
118 else116 else
119 {117 {
120 sysvar_errmsg_priority= strdup("warning");118 sysvar_errmsg_priority= const_cast<char *>("warning");
121 }119 }
122120
123 context.add(new Logging_syslog());121 context.add(new Logging_syslog());
124122
=== modified file 'plugin/transaction_log/module.cc'
--- plugin/transaction_log/module.cc 2010-08-06 07:51:36 +0000
+++ plugin/transaction_log/module.cc 2010-08-17 02:53:42 +0000
@@ -111,6 +111,19 @@
111extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func_factory;111extern plugin::Create_function<PrintTransactionMessageFunction> *print_transaction_message_func_factory;
112extern plugin::Create_function<HexdumpTransactionMessageFunction> *hexdump_transaction_message_func_factory;112extern plugin::Create_function<HexdumpTransactionMessageFunction> *hexdump_transaction_message_func_factory;
113113
114TransactionLog::~TransactionLog()
115{
116 /* Clear up any resources we've consumed */
117 if (log_file != -1)
118 {
119 (void) close(log_file);
120 }
121
122 /* These get strdup'd below */
123 free(sysvar_transaction_log_file);
124 free(sysvar_transaction_log_use_replicator);
125}
126
114static int init(drizzled::module::Context &context)127static int init(drizzled::module::Context &context)
115{128{
116 const module::option_map &vm= context.getOptions();129 const module::option_map &vm= context.getOptions();
117130
=== modified file 'plugin/transaction_log/transaction_log.cc'
--- plugin/transaction_log/transaction_log.cc 2010-03-31 19:04:12 +0000
+++ plugin/transaction_log/transaction_log.cc 2010-08-17 02:53:42 +0000
@@ -138,15 +138,6 @@
138 state= ONLINE;138 state= ONLINE;
139}139}
140140
141TransactionLog::~TransactionLog()
142{
143 /* Clear up any resources we've consumed */
144 if (log_file != -1)
145 {
146 (void) close(log_file);
147 }
148}
149
150uint8_t *TransactionLog::packTransactionIntoLogEntry(const message::Transaction &trx,141uint8_t *TransactionLog::packTransactionIntoLogEntry(const message::Transaction &trx,
151 uint8_t *buffer,142 uint8_t *buffer,
152 uint32_t *checksum_out)143 uint32_t *checksum_out)
153144
=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2010-07-27 00:41:57 +0000
+++ po/POTFILES.in 2010-08-17 02:53:42 +0000
@@ -66,6 +66,7 @@
66plugin/filtered_replicator/filtered_replicator.cc66plugin/filtered_replicator/filtered_replicator.cc
67plugin/hello_events/hello_events.cc67plugin/hello_events/hello_events.cc
68plugin/innobase/handler/data_dictionary.cc68plugin/innobase/handler/data_dictionary.cc
69plugin/innobase/handler/ha_innodb.cc
69plugin/innobase/ut/ut0auxconf_pause.c70plugin/innobase/ut/ut0auxconf_pause.c
70plugin/logging_gearman/logging_gearman.cc71plugin/logging_gearman/logging_gearman.cc
71plugin/logging_query/logging_query.cc72plugin/logging_query/logging_query.cc
7273
=== modified file 'support-files/drizzle.spec.in'
--- support-files/drizzle.spec.in 2010-06-24 03:15:21 +0000
+++ support-files/drizzle.spec.in 2010-08-17 02:53:42 +0000
@@ -510,10 +510,14 @@
510%{_libdir}/drizzle/libdefault_replicator_plugin.so510%{_libdir}/drizzle/libdefault_replicator_plugin.so
511%{_libdir}/drizzle/liberrmsg_stderr_plugin.la511%{_libdir}/drizzle/liberrmsg_stderr_plugin.la
512%{_libdir}/drizzle/liberrmsg_stderr_plugin.so512%{_libdir}/drizzle/liberrmsg_stderr_plugin.so
513%{_libdir}/drizzle/libfilesystem_engine_plugin.la
514%{_libdir}/drizzle/libfilesystem_engine_plugin.so
513%{_libdir}/drizzle/libfiltered_replicator_plugin.la515%{_libdir}/drizzle/libfiltered_replicator_plugin.la
514%{_libdir}/drizzle/libfiltered_replicator_plugin.so516%{_libdir}/drizzle/libfiltered_replicator_plugin.so
515%{_libdir}/drizzle/libhello_world_plugin.la517%{_libdir}/drizzle/libhello_world_plugin.la
516%{_libdir}/drizzle/libhello_world_plugin.so518%{_libdir}/drizzle/libhello_world_plugin.so
519%{_libdir}/drizzle/libinnobase_plugin.la
520%{_libdir}/drizzle/libinnobase_plugin.so
517%{_libdir}/drizzle/libinfo_schema_plugin.la521%{_libdir}/drizzle/libinfo_schema_plugin.la
518%{_libdir}/drizzle/libinfo_schema_plugin.so522%{_libdir}/drizzle/libinfo_schema_plugin.so
519%{_libdir}/drizzle/libinformation_engine_plugin.la523%{_libdir}/drizzle/libinformation_engine_plugin.la
520524
=== modified file 'tests/t/unsafe_binlog_innodb-master.opt'
--- tests/t/unsafe_binlog_innodb-master.opt 2010-03-15 16:12:10 +0000
+++ tests/t/unsafe_binlog_innodb-master.opt 2010-08-17 02:53:42 +0000
@@ -1,1 +1,1 @@
1--innodb_lock_wait_timeout=11--innodb.lock-wait-timeout=1
22
=== modified file 'tests/test-run.pl'
--- tests/test-run.pl 2010-08-10 18:09:11 +0000
+++ tests/test-run.pl 2010-08-17 02:53:42 +0000
@@ -2580,9 +2580,7 @@
2580 $idx > 0 ? $idx + 101 : 1);2580 $idx > 0 ? $idx + 101 : 1);
25812581
2582 mtr_add_arg($args,2582 mtr_add_arg($args,
2583 "%s--loose-innodb_data_file_path=ibdata1:20M:autoextend", $prefix);2583 "%s--innodb.data-file-path=ibdata1:20M:autoextend", $prefix);
2584
2585 mtr_add_arg($args, "%s--loose-innodb-lock-wait-timeout=5", $prefix);
25862584
2587 }2585 }
2588 else2586 else
25892587
=== modified file 'tests/valgrind.supp'
--- tests/valgrind.supp 2010-07-30 17:38:08 +0000
+++ tests/valgrind.supp 2010-08-17 02:53:42 +0000
@@ -29,6 +29,64 @@
29 ...29 ...
30}30}
3131
32{
33 dlpreload memory leak
34 Memcheck:Leak
35 ...
36 fun:do_preload
37 fun:dl_main
38 ...
39}
40
41{
42 dl_main issue
43 Memcheck:Cond
44 ...
45 fun:dl_main
46 ...
47}
48
49# Masking an issue in system tzset call
50{
51 tzset() on debian reports issues
52 Memcheck:Cond
53 ...
54 fun:tzset
55 fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_
56 ...
57}
58{
59 tzset() on debian reports issues
60 Memcheck:Addr8
61 ...
62 fun:tzset
63 fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_
64 ...
65}
66{
67 tzset() on debian reports issues
68 Memcheck:Addr4
69 ...
70 fun:tzset
71 fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_
72 ...
73}
74{
75 tzset() on debian reports issues
76 Memcheck:Addr8
77 ...
78 fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_
79 fun:main
80}
81{
82 tzset() on debian reports issues
83 Memcheck:Addr4
84 ...
85 fun:_ZN8drizzled21init_common_variablesEPKciPPcPS1_
86 fun:main
87}
88
89
3290
33# Masking static allocation issues in InnoDB91# Masking static allocation issues in InnoDB
34{92{
@@ -148,6 +206,24 @@
148}206}
149207
150208
209{
210 HailDB Inherited some issues from InnoDB
211 Memcheck:Cond
212 fun:rw_lock_x_lock_func
213 ...
214 fun:innobase_start_or_create
215 fun:_ZL20embedded_innodb_initRN8drizzled6module7ContextE
216 fun:_ZN8drizzled15plugin_finalizeERNS_6module8RegistryE
217 fun:_ZN8drizzled22init_server_componentsERNS_6module8RegistryE
218 fun:main
219}
220
221{
222 HailDB Inherited some issues from InnoDB
223 Memcheck:Cond
224 fun:rw_lock_x_lock_func
225 ...
226}
151227
152228
153# Masking Leaks in System Libraries229# Masking Leaks in System Libraries