Merge lp:~stewart/drizzle/move-timed-mutexes into lp:drizzle

Proposed by Stewart Smith
Status: Merged
Merged at revision: 2628
Proposed branch: lp:~stewart/drizzle/move-timed-mutexes
Merge into: lp:drizzle
Diff against target: 230 lines (+24/-50)
11 files modified
docs/configuration/drizzled.rst (+0/-7)
drizzled/drizzled.cc (+0/-9)
drizzled/internal/my_static.cc (+0/-2)
drizzled/internal/my_sys.h (+0/-2)
drizzled/sys_var.cc (+0/-8)
plugin/innobase/docs/index.rst (+8/-0)
plugin/innobase/handler/ha_innodb.cc (+11/-0)
plugin/innobase/include/sync0sync.h (+1/-1)
plugin/innobase/sync/sync0sync.cc (+4/-0)
tests/r/variables.result (+0/-14)
tests/t/variables.test (+0/-7)
To merge this branch: bzr merge lp:~stewart/drizzle/move-timed-mutexes
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Drizzle Trunk Pending
Review via email: mp+150855@code.launchpad.net

Description of the change

this option is really innodb only, so move it there. It's also only valid for UNIV_DEBUG, so only include it based on it.

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

discussed (and approved) with Brian over email

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/configuration/drizzled.rst'
--- docs/configuration/drizzled.rst 2012-03-17 19:48:02 +0000
+++ docs/configuration/drizzled.rst 2013-02-27 17:15:55 +0000
@@ -540,13 +540,6 @@
540540
541 The stack size for each thread. 0 means use OS default.541 The stack size for each thread. 0 means use OS default.
542542
543.. option:: --timed-mutexes
544
545 :Default:
546 :Variable: ``timed_mutexes``
547
548 Specify whether to time mutexes (only InnoDB mutexes are currently supported).
549
550.. option:: --tmp-table-size SIZE543.. option:: --tmp-table-size SIZE
551544
552 :Default: 16M545 :Default: 16M
553546
=== modified file 'drizzled/drizzled.cc'
--- drizzled/drizzled.cc 2012-12-13 18:45:19 +0000
+++ drizzled/drizzled.cc 2013-02-27 17:15:55 +0000
@@ -1213,9 +1213,6 @@
1213 _("Don't print a stack trace on failure."))1213 _("Don't print a stack trace on failure."))
1214 ("symbolic-links,s", po::value<bool>(&internal::my_use_symdir)->default_value(IF_PURIFY(false,true))->zero_tokens(),1214 ("symbolic-links,s", po::value<bool>(&internal::my_use_symdir)->default_value(IF_PURIFY(false,true))->zero_tokens(),
1215 _("Enable symbolic link support."))1215 _("Enable symbolic link support."))
1216 ("timed-mutexes", po::value<bool>(&internal::timed_mutexes)->default_value(false)->zero_tokens(),
1217 _("Specify whether to time mutexes (only InnoDB mutexes are currently "
1218 "supported)"))
1219 ("tmpdir,t", po::value<string>(),1216 ("tmpdir,t", po::value<string>(),
1220 _("Path for temporary files."))1217 _("Path for temporary files."))
1221 ("transaction-isolation", po::value<string>(),1218 ("transaction-isolation", po::value<string>(),
@@ -1655,7 +1652,6 @@
1655 OPT_OPTIMIZER_PRUNE_LEVEL,1652 OPT_OPTIMIZER_PRUNE_LEVEL,
1656 OPT_AUTO_INCREMENT, OPT_AUTO_INCREMENT_OFFSET,1653 OPT_AUTO_INCREMENT, OPT_AUTO_INCREMENT_OFFSET,
1657 OPT_ENABLE_LARGE_PAGES,1654 OPT_ENABLE_LARGE_PAGES,
1658 OPT_TIMED_MUTEXES,
1659 OPT_TABLE_LOCK_WAIT_TIMEOUT,1655 OPT_TABLE_LOCK_WAIT_TIMEOUT,
1660 OPT_PLUGIN_ADD,1656 OPT_PLUGIN_ADD,
1661 OPT_PLUGIN_REMOVE,1657 OPT_PLUGIN_REMOVE,
@@ -1749,11 +1745,6 @@
1749 option if compiled with valgrind support.1745 option if compiled with valgrind support.
1750 */1746 */
1751 IF_PURIFY(0,1), 0, 0, 0, 0, 0},1747 IF_PURIFY(0,1), 0, 0, 0, 0, 0},
1752 {"timed_mutexes", OPT_TIMED_MUTEXES,
1753 N_("Specify whether to time mutexes (only InnoDB mutexes are currently "
1754 "supported)"),
1755 (char**) &internal::timed_mutexes, NULL, 0, GET_BOOL, NO_ARG, 0,
1756 0, 0, 0, 0, 0},
1757 {"transaction-isolation", OPT_TX_ISOLATION,1748 {"transaction-isolation", OPT_TX_ISOLATION,
1758 N_("Default transaction isolation level."),1749 N_("Default transaction isolation level."),
1759 0, 0, 0, GET_STR, REQUIRED_ARG, 0,1750 0, 0, 0, GET_STR, REQUIRED_ARG, 0,
17601751
=== modified file 'drizzled/internal/my_static.cc'
--- drizzled/internal/my_static.cc 2011-07-07 12:37:15 +0000
+++ drizzled/internal/my_static.cc 2013-02-27 17:15:55 +0000
@@ -32,8 +32,6 @@
32namespace internal32namespace internal
33{33{
3434
35bool timed_mutexes= 0;
36
37 /* from my_init */35 /* from my_init */
38char * home_dir=0;36char * home_dir=0;
39const char *my_progname=0;37const char *my_progname=0;
4038
=== modified file 'drizzled/internal/my_sys.h'
--- drizzled/internal/my_sys.h 2013-02-10 01:32:31 +0000
+++ drizzled/internal/my_sys.h 2013-02-27 17:15:55 +0000
@@ -116,8 +116,6 @@
116extern const char wild_many, wild_one, wild_prefix;116extern const char wild_many, wild_one, wild_prefix;
117extern const char *charsets_dir;117extern const char *charsets_dir;
118118
119extern bool timed_mutexes;
120
121enum cache_type119enum cache_type
122{120{
123 TYPE_NOT_SET= 0,121 TYPE_NOT_SET= 0,
124122
=== modified file 'drizzled/sys_var.cc'
--- drizzled/sys_var.cc 2012-02-08 21:33:04 +0000
+++ drizzled/sys_var.cc 2013-02-27 17:15:55 +0000
@@ -74,13 +74,7 @@
7474
75namespace drizzled {75namespace drizzled {
7676
77namespace internal
78{
79 extern bool timed_mutexes;
80}
81
82extern plugin::StorageEngine *myisam_engine;77extern plugin::StorageEngine *myisam_engine;
83extern bool timed_mutexes;
8478
85extern struct option my_long_options[];79extern struct option my_long_options[];
86extern const charset_info_st *character_set_filesystem;80extern const charset_info_st *character_set_filesystem;
@@ -194,7 +188,6 @@
194 check_tx_isolation);188 check_tx_isolation);
195static sys_var_session_uint64_t sys_tmp_table_size("tmp_table_size",189static sys_var_session_uint64_t sys_tmp_table_size("tmp_table_size",
196 &drizzle_system_variables::tmp_table_size);190 &drizzle_system_variables::tmp_table_size);
197static sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", &internal::timed_mutexes);
198static sys_var_const_str sys_version("version", version().c_str());191static sys_var_const_str sys_version("version", version().c_str());
199192
200static sys_var_const_str sys_version_comment("version_comment", COMPILATION_COMMENT);193static sys_var_const_str sys_version_comment("version_comment", COMPILATION_COMMENT);
@@ -1374,7 +1367,6 @@
1374 add_sys_var_to_list(&sys_table_def_size, my_long_options);1367 add_sys_var_to_list(&sys_table_def_size, my_long_options);
1375 add_sys_var_to_list(&sys_table_lock_wait_timeout, my_long_options);1368 add_sys_var_to_list(&sys_table_lock_wait_timeout, my_long_options);
1376 add_sys_var_to_list(&sys_thread_stack_size, my_long_options);1369 add_sys_var_to_list(&sys_thread_stack_size, my_long_options);
1377 add_sys_var_to_list(&sys_timed_mutexes, my_long_options);
1378 add_sys_var_to_list(&sys_timestamp, my_long_options);1370 add_sys_var_to_list(&sys_timestamp, my_long_options);
1379 add_sys_var_to_list(&sys_tmp_table_size, my_long_options);1371 add_sys_var_to_list(&sys_tmp_table_size, my_long_options);
1380 add_sys_var_to_list(&sys_tmpdir, my_long_options);1372 add_sys_var_to_list(&sys_tmpdir, my_long_options);
13811373
=== modified file 'plugin/innobase/docs/index.rst'
--- plugin/innobase/docs/index.rst 2012-03-16 23:58:53 +0000
+++ plugin/innobase/docs/index.rst 2013-02-27 17:15:55 +0000
@@ -517,6 +517,14 @@
517517
518 Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep.518 Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep.
519519
520.. option:: --innodb.timed-mutexes
521
522 :Default: false
523 :Variable: ``innodb_timed_mutexes``
524
525 Specify whether to time mutexes (only InnoDB mutexes are currently supported).
526 This variable is only present if InnoDB is compiled with UNIV_DEBUG.
527
520.. option:: --innodb.use-internal-malloc 528.. option:: --innodb.use-internal-malloc
521529
522 :Default: false530 :Default: false
523531
=== modified file 'plugin/innobase/handler/ha_innodb.cc'
--- plugin/innobase/handler/ha_innodb.cc 2013-02-21 22:31:46 +0000
+++ plugin/innobase/handler/ha_innodb.cc 2013-02-27 17:15:55 +0000
@@ -2715,6 +2715,11 @@
2715 innobase_rollback_segments,2715 innobase_rollback_segments,
2716 innodb_rollback_segments_update));2716 innodb_rollback_segments_update));
27172717
2718#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
2719 context.registerVariable(new sys_var_bool_ptr("timed-mutexes", &timed_mutexes));
2720#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
2721
2722
2718 return(FALSE);2723 return(FALSE);
27192724
2720error:2725error:
@@ -9627,6 +9632,12 @@
9627 context("rollback-segments",9632 context("rollback-segments",
9628 po::value<rollback_segments_constraint>(&innobase_rollback_segments)->default_value(128),9633 po::value<rollback_segments_constraint>(&innobase_rollback_segments)->default_value(128),
9629 "Number of UNDO logs to use");9634 "Number of UNDO logs to use");
9635#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
9636 context(("timed-mutexes",
9637 po::value<bool>(&timed_mutexes)->default_value(false)->zero_tokens(),
9638 _("Specify whether to time mutexes (only InnoDB mutexes are currently "
9639 "supported)"));
9640#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
96309641
9631}9642}
96329643
96339644
=== modified file 'plugin/innobase/include/sync0sync.h'
--- plugin/innobase/include/sync0sync.h 2012-05-23 05:03:45 +0000
+++ plugin/innobase/include/sync0sync.h 2013-02-27 17:15:55 +0000
@@ -43,7 +43,7 @@
43#include "sync0arr.h"43#include "sync0arr.h"
4444
45#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)45#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
46extern my_bool timed_mutexes;46extern bool timed_mutexes;
47#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */47#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
4848
49#ifdef HAVE_WINDOWS_ATOMICS49#ifdef HAVE_WINDOWS_ATOMICS
5050
=== modified file 'plugin/innobase/sync/sync0sync.cc'
--- plugin/innobase/sync/sync0sync.cc 2012-05-23 05:03:45 +0000
+++ plugin/innobase/sync/sync0sync.cc 2013-02-27 17:15:55 +0000
@@ -167,6 +167,10 @@
167signalled unconditionally at the release of the lock.167signalled unconditionally at the release of the lock.
168Q.E.D. */168Q.E.D. */
169169
170#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
171bool timed_mutexes;
172#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
173
170/* Number of spin waits on mutexes: for performance monitoring */174/* Number of spin waits on mutexes: for performance monitoring */
171175
172/** The number of iterations in the mutex_spin_wait() spin loop.176/** The number of iterations in the mutex_spin_wait() spin loop.
173177
=== modified file 'tests/r/variables.result'
--- tests/r/variables.result 2011-09-22 17:17:17 +0000
+++ tests/r/variables.result 2013-02-27 17:15:55 +0000
@@ -140,20 +140,6 @@
1401 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used1401 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
141Warnings:141Warnings:
142Note 1003 select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity`142Note 1003 select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity`
143set global timed_mutexes=ON;
144show variables like 'timed_mutexes';
145Variable_name Value
146timed_mutexes ON
147select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
148VARIABLE_NAME VARIABLE_VALUE
149timed_mutexes ON
150set global timed_mutexes=0;
151show variables like 'timed_mutexes';
152Variable_name Value
153timed_mutexes OFF
154select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
155VARIABLE_NAME VARIABLE_VALUE
156timed_mutexes OFF
157set storage_engine=MYISAM, storage_engine="MEMORY";143set storage_engine=MYISAM, storage_engine="MEMORY";
158show local variables like 'storage_engine';144show local variables like 'storage_engine';
159Variable_name Value145Variable_name Value
160146
=== modified file 'tests/t/variables.test'
--- tests/t/variables.test 2011-09-22 17:17:17 +0000
+++ tests/t/variables.test 2013-02-27 17:15:55 +0000
@@ -93,13 +93,6 @@
93select @@IDENTITY,last_insert_id(), @@identity;93select @@IDENTITY,last_insert_id(), @@identity;
94explain extended select @@IDENTITY,last_insert_id(), @@identity;94explain extended select @@IDENTITY,last_insert_id(), @@identity;
9595
96set global timed_mutexes=ON;
97show variables like 'timed_mutexes';
98select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
99set global timed_mutexes=0;
100show variables like 'timed_mutexes';
101select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
102
103set storage_engine=MYISAM, storage_engine="MEMORY";96set storage_engine=MYISAM, storage_engine="MEMORY";
104show local variables like 'storage_engine';97show local variables like 'storage_engine';
105select * from data_dictionary.session_variables where variable_name like 'storage_engine';98select * from data_dictionary.session_variables where variable_name like 'storage_engine';

Subscribers

People subscribed via source and target branches

to all changes: