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
1=== modified file 'docs/configuration/drizzled.rst'
2--- docs/configuration/drizzled.rst 2012-03-17 19:48:02 +0000
3+++ docs/configuration/drizzled.rst 2013-02-27 17:15:55 +0000
4@@ -540,13 +540,6 @@
5
6 The stack size for each thread. 0 means use OS default.
7
8-.. option:: --timed-mutexes
9-
10- :Default:
11- :Variable: ``timed_mutexes``
12-
13- Specify whether to time mutexes (only InnoDB mutexes are currently supported).
14-
15 .. option:: --tmp-table-size SIZE
16
17 :Default: 16M
18
19=== modified file 'drizzled/drizzled.cc'
20--- drizzled/drizzled.cc 2012-12-13 18:45:19 +0000
21+++ drizzled/drizzled.cc 2013-02-27 17:15:55 +0000
22@@ -1213,9 +1213,6 @@
23 _("Don't print a stack trace on failure."))
24 ("symbolic-links,s", po::value<bool>(&internal::my_use_symdir)->default_value(IF_PURIFY(false,true))->zero_tokens(),
25 _("Enable symbolic link support."))
26- ("timed-mutexes", po::value<bool>(&internal::timed_mutexes)->default_value(false)->zero_tokens(),
27- _("Specify whether to time mutexes (only InnoDB mutexes are currently "
28- "supported)"))
29 ("tmpdir,t", po::value<string>(),
30 _("Path for temporary files."))
31 ("transaction-isolation", po::value<string>(),
32@@ -1655,7 +1652,6 @@
33 OPT_OPTIMIZER_PRUNE_LEVEL,
34 OPT_AUTO_INCREMENT, OPT_AUTO_INCREMENT_OFFSET,
35 OPT_ENABLE_LARGE_PAGES,
36- OPT_TIMED_MUTEXES,
37 OPT_TABLE_LOCK_WAIT_TIMEOUT,
38 OPT_PLUGIN_ADD,
39 OPT_PLUGIN_REMOVE,
40@@ -1749,11 +1745,6 @@
41 option if compiled with valgrind support.
42 */
43 IF_PURIFY(0,1), 0, 0, 0, 0, 0},
44- {"timed_mutexes", OPT_TIMED_MUTEXES,
45- N_("Specify whether to time mutexes (only InnoDB mutexes are currently "
46- "supported)"),
47- (char**) &internal::timed_mutexes, NULL, 0, GET_BOOL, NO_ARG, 0,
48- 0, 0, 0, 0, 0},
49 {"transaction-isolation", OPT_TX_ISOLATION,
50 N_("Default transaction isolation level."),
51 0, 0, 0, GET_STR, REQUIRED_ARG, 0,
52
53=== modified file 'drizzled/internal/my_static.cc'
54--- drizzled/internal/my_static.cc 2011-07-07 12:37:15 +0000
55+++ drizzled/internal/my_static.cc 2013-02-27 17:15:55 +0000
56@@ -32,8 +32,6 @@
57 namespace internal
58 {
59
60-bool timed_mutexes= 0;
61-
62 /* from my_init */
63 char * home_dir=0;
64 const char *my_progname=0;
65
66=== modified file 'drizzled/internal/my_sys.h'
67--- drizzled/internal/my_sys.h 2013-02-10 01:32:31 +0000
68+++ drizzled/internal/my_sys.h 2013-02-27 17:15:55 +0000
69@@ -116,8 +116,6 @@
70 extern const char wild_many, wild_one, wild_prefix;
71 extern const char *charsets_dir;
72
73-extern bool timed_mutexes;
74-
75 enum cache_type
76 {
77 TYPE_NOT_SET= 0,
78
79=== modified file 'drizzled/sys_var.cc'
80--- drizzled/sys_var.cc 2012-02-08 21:33:04 +0000
81+++ drizzled/sys_var.cc 2013-02-27 17:15:55 +0000
82@@ -74,13 +74,7 @@
83
84 namespace drizzled {
85
86-namespace internal
87-{
88- extern bool timed_mutexes;
89-}
90-
91 extern plugin::StorageEngine *myisam_engine;
92-extern bool timed_mutexes;
93
94 extern struct option my_long_options[];
95 extern const charset_info_st *character_set_filesystem;
96@@ -194,7 +188,6 @@
97 check_tx_isolation);
98 static sys_var_session_uint64_t sys_tmp_table_size("tmp_table_size",
99 &drizzle_system_variables::tmp_table_size);
100-static sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", &internal::timed_mutexes);
101 static sys_var_const_str sys_version("version", version().c_str());
102
103 static sys_var_const_str sys_version_comment("version_comment", COMPILATION_COMMENT);
104@@ -1374,7 +1367,6 @@
105 add_sys_var_to_list(&sys_table_def_size, my_long_options);
106 add_sys_var_to_list(&sys_table_lock_wait_timeout, my_long_options);
107 add_sys_var_to_list(&sys_thread_stack_size, my_long_options);
108- add_sys_var_to_list(&sys_timed_mutexes, my_long_options);
109 add_sys_var_to_list(&sys_timestamp, my_long_options);
110 add_sys_var_to_list(&sys_tmp_table_size, my_long_options);
111 add_sys_var_to_list(&sys_tmpdir, my_long_options);
112
113=== modified file 'plugin/innobase/docs/index.rst'
114--- plugin/innobase/docs/index.rst 2012-03-16 23:58:53 +0000
115+++ plugin/innobase/docs/index.rst 2013-02-27 17:15:55 +0000
116@@ -517,6 +517,14 @@
117
118 Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep.
119
120+.. option:: --innodb.timed-mutexes
121+
122+ :Default: false
123+ :Variable: ``innodb_timed_mutexes``
124+
125+ Specify whether to time mutexes (only InnoDB mutexes are currently supported).
126+ This variable is only present if InnoDB is compiled with UNIV_DEBUG.
127+
128 .. option:: --innodb.use-internal-malloc
129
130 :Default: false
131
132=== modified file 'plugin/innobase/handler/ha_innodb.cc'
133--- plugin/innobase/handler/ha_innodb.cc 2013-02-21 22:31:46 +0000
134+++ plugin/innobase/handler/ha_innodb.cc 2013-02-27 17:15:55 +0000
135@@ -2715,6 +2715,11 @@
136 innobase_rollback_segments,
137 innodb_rollback_segments_update));
138
139+#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
140+ context.registerVariable(new sys_var_bool_ptr("timed-mutexes", &timed_mutexes));
141+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
142+
143+
144 return(FALSE);
145
146 error:
147@@ -9627,6 +9632,12 @@
148 context("rollback-segments",
149 po::value<rollback_segments_constraint>(&innobase_rollback_segments)->default_value(128),
150 "Number of UNDO logs to use");
151+#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
152+ context(("timed-mutexes",
153+ po::value<bool>(&timed_mutexes)->default_value(false)->zero_tokens(),
154+ _("Specify whether to time mutexes (only InnoDB mutexes are currently "
155+ "supported)"));
156+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
157
158 }
159
160
161=== modified file 'plugin/innobase/include/sync0sync.h'
162--- plugin/innobase/include/sync0sync.h 2012-05-23 05:03:45 +0000
163+++ plugin/innobase/include/sync0sync.h 2013-02-27 17:15:55 +0000
164@@ -43,7 +43,7 @@
165 #include "sync0arr.h"
166
167 #if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
168-extern my_bool timed_mutexes;
169+extern bool timed_mutexes;
170 #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
171
172 #ifdef HAVE_WINDOWS_ATOMICS
173
174=== modified file 'plugin/innobase/sync/sync0sync.cc'
175--- plugin/innobase/sync/sync0sync.cc 2012-05-23 05:03:45 +0000
176+++ plugin/innobase/sync/sync0sync.cc 2013-02-27 17:15:55 +0000
177@@ -167,6 +167,10 @@
178 signalled unconditionally at the release of the lock.
179 Q.E.D. */
180
181+#if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP)
182+bool timed_mutexes;
183+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
184+
185 /* Number of spin waits on mutexes: for performance monitoring */
186
187 /** The number of iterations in the mutex_spin_wait() spin loop.
188
189=== modified file 'tests/r/variables.result'
190--- tests/r/variables.result 2011-09-22 17:17:17 +0000
191+++ tests/r/variables.result 2013-02-27 17:15:55 +0000
192@@ -140,20 +140,6 @@
193 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
194 Warnings:
195 Note 1003 select 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity`
196-set global timed_mutexes=ON;
197-show variables like 'timed_mutexes';
198-Variable_name Value
199-timed_mutexes ON
200-select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
201-VARIABLE_NAME VARIABLE_VALUE
202-timed_mutexes ON
203-set global timed_mutexes=0;
204-show variables like 'timed_mutexes';
205-Variable_name Value
206-timed_mutexes OFF
207-select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
208-VARIABLE_NAME VARIABLE_VALUE
209-timed_mutexes OFF
210 set storage_engine=MYISAM, storage_engine="MEMORY";
211 show local variables like 'storage_engine';
212 Variable_name Value
213
214=== modified file 'tests/t/variables.test'
215--- tests/t/variables.test 2011-09-22 17:17:17 +0000
216+++ tests/t/variables.test 2013-02-27 17:15:55 +0000
217@@ -93,13 +93,6 @@
218 select @@IDENTITY,last_insert_id(), @@identity;
219 explain extended select @@IDENTITY,last_insert_id(), @@identity;
220
221-set global timed_mutexes=ON;
222-show variables like 'timed_mutexes';
223-select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
224-set global timed_mutexes=0;
225-show variables like 'timed_mutexes';
226-select * from data_dictionary.session_variables where variable_name like 'timed_mutexes';
227-
228 set storage_engine=MYISAM, storage_engine="MEMORY";
229 show local variables like 'storage_engine';
230 select * from data_dictionary.session_variables where variable_name like 'storage_engine';

Subscribers

People subscribed via source and target branches

to all changes: