Merge lp:~vjsamuel/drizzle/rplugin-innobase into lp:~drizzle-trunk/drizzle/development
- rplugin-innobase
- Merge into development
Proposed by
Vijay Samuel
Status: | Merged |
---|---|
Merged at revision: | 1712 |
Proposed branch: | lp:~vjsamuel/drizzle/rplugin-innobase |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: |
574 lines (+500/-7) 4 files modified
plugin/innobase/handler/ha_innodb.cc (+497/-3) po/POTFILES.in (+1/-0) tests/t/unsafe_binlog_innodb-master.opt (+1/-1) tests/test-run.pl (+1/-3) |
To merge this branch: | bzr merge lp:~vjsamuel/drizzle/rplugin-innobase |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Needs Fixing | ||
Drizzle Merge Team | Pending | ||
Review via email: mp+32183@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'plugin/innobase/handler/ha_innodb.cc' | |||
2 | --- plugin/innobase/handler/ha_innodb.cc 2010-08-08 01:18:02 +0000 | |||
3 | +++ plugin/innobase/handler/ha_innodb.cc 2010-08-10 11:52:47 +0000 | |||
4 | @@ -88,6 +88,12 @@ | |||
5 | 88 | #include <drizzled/transaction_services.h> | 88 | #include <drizzled/transaction_services.h> |
6 | 89 | 89 | ||
7 | 90 | #include <boost/algorithm/string.hpp> | 90 | #include <boost/algorithm/string.hpp> |
8 | 91 | #include <boost/program_options.hpp> | ||
9 | 92 | #include <drizzled/module/option_map.h> | ||
10 | 93 | #include <iostream> | ||
11 | 94 | |||
12 | 95 | namespace po= boost::program_options; | ||
13 | 96 | using namespace std; | ||
14 | 91 | 97 | ||
15 | 92 | /** @file ha_innodb.cc */ | 98 | /** @file ha_innodb.cc */ |
16 | 93 | 99 | ||
17 | @@ -213,10 +219,8 @@ | |||
18 | 213 | values */ | 219 | values */ |
19 | 214 | 220 | ||
20 | 215 | static ulong innobase_fast_shutdown = 1; | 221 | static ulong innobase_fast_shutdown = 1; |
21 | 216 | #ifdef UNIV_LOG_ARCHIVE | ||
22 | 217 | static my_bool innobase_log_archive = FALSE; | 222 | static my_bool innobase_log_archive = FALSE; |
23 | 218 | static char* innobase_log_arch_dir = NULL; | 223 | static char* innobase_log_arch_dir = NULL; |
24 | 219 | #endif /* UNIV_LOG_ARCHIVE */ | ||
25 | 220 | static my_bool innobase_use_doublewrite = TRUE; | 224 | static my_bool innobase_use_doublewrite = TRUE; |
26 | 221 | static my_bool innobase_use_checksums = TRUE; | 225 | static my_bool innobase_use_checksums = TRUE; |
27 | 222 | static my_bool innobase_rollback_on_timeout = FALSE; | 226 | static my_bool innobase_rollback_on_timeout = FALSE; |
28 | @@ -1830,6 +1834,348 @@ | |||
29 | 1830 | char *default_path; | 1834 | char *default_path; |
30 | 1831 | uint format_id; | 1835 | uint format_id; |
31 | 1832 | InnobaseEngine *actuall_engine_ptr; | 1836 | InnobaseEngine *actuall_engine_ptr; |
32 | 1837 | const module::option_map &vm= context.getOptions(); | ||
33 | 1838 | |||
34 | 1839 | if (vm.count("io-capacity")) | ||
35 | 1840 | { | ||
36 | 1841 | if (srv_io_capacity < 100 || srv_io_capacity > (unsigned long)~0L) | ||
37 | 1842 | { | ||
38 | 1843 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for io-capacity\n")); | ||
39 | 1844 | exit(-1); | ||
40 | 1845 | } | ||
41 | 1846 | } | ||
42 | 1847 | |||
43 | 1848 | if (vm.count("data-home-dir")) | ||
44 | 1849 | { | ||
45 | 1850 | innobase_data_home_dir= strdup(vm["data-home-dir"].as<string>().c_str()); | ||
46 | 1851 | } | ||
47 | 1852 | |||
48 | 1853 | else | ||
49 | 1854 | { | ||
50 | 1855 | innobase_data_home_dir= NULL; | ||
51 | 1856 | } | ||
52 | 1857 | |||
53 | 1858 | if (vm.count("fast-shutdown")) | ||
54 | 1859 | { | ||
55 | 1860 | if (innobase_fast_shutdown > 2) | ||
56 | 1861 | { | ||
57 | 1862 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for fast-shutdown\n")); | ||
58 | 1863 | exit(-1); | ||
59 | 1864 | } | ||
60 | 1865 | } | ||
61 | 1866 | |||
62 | 1867 | if (vm.count("file-format")) | ||
63 | 1868 | { | ||
64 | 1869 | innobase_file_format_name= strdup(vm["file-format"].as<string>().c_str()); | ||
65 | 1870 | } | ||
66 | 1871 | |||
67 | 1872 | else | ||
68 | 1873 | { | ||
69 | 1874 | innobase_file_format_name= strdup("Antelope"); | ||
70 | 1875 | } | ||
71 | 1876 | |||
72 | 1877 | if (vm.count("file-format-check")) | ||
73 | 1878 | { | ||
74 | 1879 | innobase_file_format_check= strdup(vm["file-format-check"].as<string>().c_str()); | ||
75 | 1880 | } | ||
76 | 1881 | |||
77 | 1882 | else | ||
78 | 1883 | { | ||
79 | 1884 | innobase_file_format_check= strdup("on"); | ||
80 | 1885 | } | ||
81 | 1886 | |||
82 | 1887 | if (vm.count("flush-log-at-trx-commit")) | ||
83 | 1888 | { | ||
84 | 1889 | if (srv_flush_log_at_trx_commit > 2) | ||
85 | 1890 | { | ||
86 | 1891 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for flush-log-at-trx-commit\n")); | ||
87 | 1892 | exit(-1); | ||
88 | 1893 | } | ||
89 | 1894 | } | ||
90 | 1895 | |||
91 | 1896 | if (vm.count("flush-method")) | ||
92 | 1897 | { | ||
93 | 1898 | innobase_unix_file_flush_method= strdup(vm["flush-method"].as<string>().c_str()); | ||
94 | 1899 | } | ||
95 | 1900 | |||
96 | 1901 | else | ||
97 | 1902 | { | ||
98 | 1903 | innobase_unix_file_flush_method= NULL; | ||
99 | 1904 | } | ||
100 | 1905 | |||
101 | 1906 | if (vm.count("log-arch-dir")) | ||
102 | 1907 | { | ||
103 | 1908 | innobase_log_arch_dir= strdup(vm["log-arch-dir"].as<string>().c_str()); | ||
104 | 1909 | } | ||
105 | 1910 | |||
106 | 1911 | else | ||
107 | 1912 | { | ||
108 | 1913 | innobase_log_arch_dir= NULL; | ||
109 | 1914 | } | ||
110 | 1915 | |||
111 | 1916 | if (vm.count("max-dirty-pages-pct")) | ||
112 | 1917 | { | ||
113 | 1918 | if (srv_max_buf_pool_modified_pct > 99) | ||
114 | 1919 | { | ||
115 | 1920 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for max-dirty-pages-pct\n")); | ||
116 | 1921 | exit(-1); | ||
117 | 1922 | } | ||
118 | 1923 | } | ||
119 | 1924 | |||
120 | 1925 | if (vm.count("max-purge-lag")) | ||
121 | 1926 | { | ||
122 | 1927 | if (srv_max_purge_lag > (unsigned long)~0L) | ||
123 | 1928 | { | ||
124 | 1929 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for max-purge-lag\n")); | ||
125 | 1930 | exit(-1); | ||
126 | 1931 | } | ||
127 | 1932 | } | ||
128 | 1933 | |||
129 | 1934 | if (vm.count("log-group-home-dir")) | ||
130 | 1935 | { | ||
131 | 1936 | innobase_log_group_home_dir= strdup(vm["log-group-home-dir"].as<string>().c_str()); | ||
132 | 1937 | } | ||
133 | 1938 | |||
134 | 1939 | else | ||
135 | 1940 | { | ||
136 | 1941 | innobase_log_group_home_dir= NULL; | ||
137 | 1942 | } | ||
138 | 1943 | |||
139 | 1944 | if (vm.count("stats-sample-pages")) | ||
140 | 1945 | { | ||
141 | 1946 | if (srv_stats_sample_pages < 8 || srv_stats_sample_pages > (unsigned long long)~0ULL) | ||
142 | 1947 | { | ||
143 | 1948 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for stats-sample-pages\n")); | ||
144 | 1949 | exit(-1); | ||
145 | 1950 | } | ||
146 | 1951 | } | ||
147 | 1952 | |||
148 | 1953 | if (vm.count("replication-delay")) | ||
149 | 1954 | { | ||
150 | 1955 | if (srv_replication_delay > (unsigned long)~0UL) | ||
151 | 1956 | { | ||
152 | 1957 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for replication-delay\n")); | ||
153 | 1958 | exit(-1); | ||
154 | 1959 | } | ||
155 | 1960 | } | ||
156 | 1961 | |||
157 | 1962 | if (vm.count("additional-mem-pool-size")) | ||
158 | 1963 | { | ||
159 | 1964 | if (innobase_additional_mem_pool_size < 512*1024L || innobase_additional_mem_pool_size > LONG_MAX) | ||
160 | 1965 | { | ||
161 | 1966 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for additional-mem-pool-size\n")); | ||
162 | 1967 | exit(-1); | ||
163 | 1968 | } | ||
164 | 1969 | |||
165 | 1970 | innobase_additional_mem_pool_size/= 1024; | ||
166 | 1971 | innobase_additional_mem_pool_size*= 1024; | ||
167 | 1972 | } | ||
168 | 1973 | |||
169 | 1974 | if (vm.count("commit-concurrency")) | ||
170 | 1975 | { | ||
171 | 1976 | if (srv_replication_delay > 1000) | ||
172 | 1977 | { | ||
173 | 1978 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for commit-concurrency\n")); | ||
174 | 1979 | exit(-1); | ||
175 | 1980 | } | ||
176 | 1981 | } | ||
177 | 1982 | |||
178 | 1983 | if (vm.count("concurrency-tickets")) | ||
179 | 1984 | { | ||
180 | 1985 | if (srv_n_free_tickets_to_enter < 1L || srv_n_free_tickets_to_enter > (unsigned long)~0L) | ||
181 | 1986 | { | ||
182 | 1987 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for concurrency-tickets\n")); | ||
183 | 1988 | exit(-1); | ||
184 | 1989 | } | ||
185 | 1990 | } | ||
186 | 1991 | |||
187 | 1992 | if (vm.count("file-io-threads")) | ||
188 | 1993 | { | ||
189 | 1994 | if (innobase_file_io_threads < 4 || innobase_file_io_threads > 64) | ||
190 | 1995 | { | ||
191 | 1996 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for file-io-threads\n")); | ||
192 | 1997 | exit(-1); | ||
193 | 1998 | } | ||
194 | 1999 | } | ||
195 | 2000 | |||
196 | 2001 | if (vm.count("read-io-threads")) | ||
197 | 2002 | { | ||
198 | 2003 | if (innobase_read_io_threads < 1 || innobase_read_io_threads > 64) | ||
199 | 2004 | { | ||
200 | 2005 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-io-threads\n")); | ||
201 | 2006 | exit(-1); | ||
202 | 2007 | } | ||
203 | 2008 | } | ||
204 | 2009 | |||
205 | 2010 | if (vm.count("write-io-threads")) | ||
206 | 2011 | { | ||
207 | 2012 | if (innobase_write_io_threads < 1 || innobase_write_io_threads > 64) | ||
208 | 2013 | { | ||
209 | 2014 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for write-io-threads\n")); | ||
210 | 2015 | exit(-1); | ||
211 | 2016 | } | ||
212 | 2017 | } | ||
213 | 2018 | |||
214 | 2019 | if (vm.count("force-recovery")) | ||
215 | 2020 | { | ||
216 | 2021 | if (innobase_force_recovery > 6) | ||
217 | 2022 | { | ||
218 | 2023 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for force-recovery\n")); | ||
219 | 2024 | exit(-1); | ||
220 | 2025 | } | ||
221 | 2026 | } | ||
222 | 2027 | |||
223 | 2028 | if (vm.count("log-buffer-size")) | ||
224 | 2029 | { | ||
225 | 2030 | if (innobase_log_buffer_size < 256*1024L || innobase_log_buffer_size > LONG_MAX) | ||
226 | 2031 | { | ||
227 | 2032 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n")); | ||
228 | 2033 | exit(-1); | ||
229 | 2034 | } | ||
230 | 2035 | |||
231 | 2036 | innobase_log_buffer_size/= 1024; | ||
232 | 2037 | innobase_log_buffer_size*= 1024; | ||
233 | 2038 | } | ||
234 | 2039 | |||
235 | 2040 | if (vm.count("log-file-size")) | ||
236 | 2041 | { | ||
237 | 2042 | if (innobase_log_file_size < 1*1024*1024L || innobase_log_file_size > INT64_MAX) | ||
238 | 2043 | { | ||
239 | 2044 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-file-size\n")); | ||
240 | 2045 | exit(-1); | ||
241 | 2046 | } | ||
242 | 2047 | |||
243 | 2048 | innobase_log_file_size/= 1024*1024L; | ||
244 | 2049 | innobase_log_file_size*= 1024*1024L; | ||
245 | 2050 | } | ||
246 | 2051 | |||
247 | 2052 | if (vm.count("log-files-in-group")) | ||
248 | 2053 | { | ||
249 | 2054 | if (innobase_log_files_in_group < 2 || innobase_log_files_in_group > 100) | ||
250 | 2055 | { | ||
251 | 2056 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for log-files-in-group\n")); | ||
252 | 2057 | exit(-1); | ||
253 | 2058 | } | ||
254 | 2059 | } | ||
255 | 2060 | |||
256 | 2061 | if (vm.count("mirrored-log-groups")) | ||
257 | 2062 | { | ||
258 | 2063 | if (innobase_mirrored_log_groups < 1 || innobase_mirrored_log_groups > 10) | ||
259 | 2064 | { | ||
260 | 2065 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for mirrored-log-groups\n")); | ||
261 | 2066 | exit(-1); | ||
262 | 2067 | } | ||
263 | 2068 | } | ||
264 | 2069 | |||
265 | 2070 | if (vm.count("open-files")) | ||
266 | 2071 | { | ||
267 | 2072 | if (innobase_open_files < 10L || innobase_open_files > LONG_MAX) | ||
268 | 2073 | { | ||
269 | 2074 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for open-files\n")); | ||
270 | 2075 | exit(-1); | ||
271 | 2076 | } | ||
272 | 2077 | } | ||
273 | 2078 | |||
274 | 2079 | if (vm.count("sync-spin-loops")) | ||
275 | 2080 | { | ||
276 | 2081 | if (srv_n_spin_wait_rounds > (unsigned long)~0L) | ||
277 | 2082 | { | ||
278 | 2083 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for sync-spin-loops\n")); | ||
279 | 2084 | exit(-1); | ||
280 | 2085 | } | ||
281 | 2086 | } | ||
282 | 2087 | |||
283 | 2088 | if (vm.count("spin-wait-delay")) | ||
284 | 2089 | { | ||
285 | 2090 | if (srv_spin_wait_delay > (unsigned long)~0L) | ||
286 | 2091 | { | ||
287 | 2092 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for spin-wait-delay\n")); | ||
288 | 2093 | exit(-1); | ||
289 | 2094 | } | ||
290 | 2095 | } | ||
291 | 2096 | |||
292 | 2097 | if (vm.count("thread-concurrency")) | ||
293 | 2098 | { | ||
294 | 2099 | if (srv_thread_concurrency > 1000) | ||
295 | 2100 | { | ||
296 | 2101 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for thread-concurrency\n")); | ||
297 | 2102 | exit(-1); | ||
298 | 2103 | } | ||
299 | 2104 | } | ||
300 | 2105 | |||
301 | 2106 | if (vm.count("thread-sleep-delay")) | ||
302 | 2107 | { | ||
303 | 2108 | if (srv_thread_sleep_delay > (unsigned long)~0L) | ||
304 | 2109 | { | ||
305 | 2110 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for thread-sleep-delay\n")); | ||
306 | 2111 | exit(-1); | ||
307 | 2112 | } | ||
308 | 2113 | } | ||
309 | 2114 | |||
310 | 2115 | if (vm.count("data-file-path")) | ||
311 | 2116 | { | ||
312 | 2117 | innobase_data_file_path= strdup(vm["data-file-path"].as<string>().c_str()); | ||
313 | 2118 | } | ||
314 | 2119 | |||
315 | 2120 | else | ||
316 | 2121 | { | ||
317 | 2122 | innobase_data_file_path= NULL; | ||
318 | 2123 | } | ||
319 | 2124 | |||
320 | 2125 | if (vm.count("version")) | ||
321 | 2126 | { | ||
322 | 2127 | innodb_version_str= strdup(vm["version"].as<string>().c_str()); | ||
323 | 2128 | } | ||
324 | 2129 | |||
325 | 2130 | else | ||
326 | 2131 | { | ||
327 | 2132 | innodb_version_str= strdup(INNODB_VERSION_STR); | ||
328 | 2133 | } | ||
329 | 2134 | |||
330 | 2135 | if (vm.count("change-buffering")) | ||
331 | 2136 | { | ||
332 | 2137 | innobase_change_buffering= strdup(vm["change-buffering"].as<string>().c_str()); | ||
333 | 2138 | } | ||
334 | 2139 | |||
335 | 2140 | else | ||
336 | 2141 | { | ||
337 | 2142 | innobase_change_buffering= NULL; | ||
338 | 2143 | } | ||
339 | 2144 | |||
340 | 2145 | if (vm.count("read-ahead-threshold")) | ||
341 | 2146 | { | ||
342 | 2147 | if (srv_read_ahead_threshold > 64) | ||
343 | 2148 | { | ||
344 | 2149 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for read-ahead-threshold\n")); | ||
345 | 2150 | exit(-1); | ||
346 | 2151 | } | ||
347 | 2152 | } | ||
348 | 2153 | |||
349 | 2154 | if (vm.count("support-xa")) | ||
350 | 2155 | { | ||
351 | 2156 | (SessionVAR(NULL,support_xa))= vm["support-xa"].as<bool>(); | ||
352 | 2157 | } | ||
353 | 2158 | |||
354 | 2159 | if (vm.count("table-locks")) | ||
355 | 2160 | { | ||
356 | 2161 | (SessionVAR(NULL,table_locks))= vm["table-locks"].as<bool>(); | ||
357 | 2162 | } | ||
358 | 2163 | |||
359 | 2164 | if (vm.count("strict-mode")) | ||
360 | 2165 | { | ||
361 | 2166 | (SessionVAR(NULL,strict_mode))= vm["strict-mode"].as<bool>(); | ||
362 | 2167 | } | ||
363 | 2168 | |||
364 | 2169 | if (vm.count("lock-wait-timeout")) | ||
365 | 2170 | { | ||
366 | 2171 | if (vm["lock-wait-timeout"].as<unsigned long>() < 1 || vm["lock-wait-timeout"].as<unsigned long>() > 1024*1024*1024) | ||
367 | 2172 | { | ||
368 | 2173 | errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid value for lock-wait-timeout\n")); | ||
369 | 2174 | exit(-1); | ||
370 | 2175 | } | ||
371 | 2176 | |||
372 | 2177 | (SessionVAR(NULL,lock_wait_timeout))= vm["lock-wait-timeout"].as<unsigned long>(); | ||
373 | 2178 | } | ||
374 | 1833 | 2179 | ||
375 | 1834 | innodb_engine_ptr= actuall_engine_ptr= new InnobaseEngine(innobase_engine_name); | 2180 | innodb_engine_ptr= actuall_engine_ptr= new InnobaseEngine(innobase_engine_name); |
376 | 1835 | 2181 | ||
377 | @@ -8582,6 +8928,154 @@ | |||
378 | 8582 | "trigger a readahead.", | 8928 | "trigger a readahead.", |
379 | 8583 | NULL, NULL, 56, 0, 64, 0); | 8929 | NULL, NULL, 56, 0, 64, 0); |
380 | 8584 | 8930 | ||
381 | 8931 | static void init_options(drizzled::module::option_context &context) | ||
382 | 8932 | { | ||
383 | 8933 | context("checksums", | ||
384 | 8934 | po::value<bool>(&innobase_use_checksums)->default_value(true)->zero_tokens(), | ||
385 | 8935 | "Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums."); | ||
386 | 8936 | context("data-home-dir", | ||
387 | 8937 | po::value<string>(), | ||
388 | 8938 | "The common part for InnoDB table spaces."); | ||
389 | 8939 | context("doublewrite", | ||
390 | 8940 | po::value<bool>(&innobase_use_doublewrite)->default_value(true)->zero_tokens(), | ||
391 | 8941 | "Enable InnoDB doublewrite buffer (enabled by default). Disable with --skip-innodb-doublewrite."); | ||
392 | 8942 | context("io-capacity", | ||
393 | 8943 | po::value<unsigned long>(&srv_io_capacity)->default_value(200), | ||
394 | 8944 | "Number of IOPs the server can do. Tunes the background IO rate"); | ||
395 | 8945 | context("fast-shutdown", | ||
396 | 8946 | po::value<unsigned long>(&innobase_fast_shutdown)->default_value(1), | ||
397 | 8947 | "Speeds up the shutdown process of the InnoDB storage engine. Possible values are(faster) or 2 (fastest - crash-like)."); | ||
398 | 8948 | context("file-per-table", | ||
399 | 8949 | po::value<bool>(&srv_file_per_table)->default_value(false)->zero_tokens(), | ||
400 | 8950 | "Stores each InnoDB table to an .ibd file in the database dir."); | ||
401 | 8951 | context("file-format", | ||
402 | 8952 | po::value<string>(), | ||
403 | 8953 | "File format to use for new tables in .ibd files."); | ||
404 | 8954 | context("file-format-check", | ||
405 | 8955 | po::value<string>(), | ||
406 | 8956 | "The highest file format in the tablespace."); | ||
407 | 8957 | context("flush-log-at-trx-commit", | ||
408 | 8958 | po::value<unsigned long>(&srv_flush_log_at_trx_commit)->default_value(1), | ||
409 | 8959 | "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)."); | ||
410 | 8960 | context("flush-method", | ||
411 | 8961 | po::value<string>(), | ||
412 | 8962 | "With which method to flush data."); | ||
413 | 8963 | context("log-arch-dir", | ||
414 | 8964 | po::value<string>(), | ||
415 | 8965 | "Where full logs should be archived."); | ||
416 | 8966 | context("log-archive", | ||
417 | 8967 | po::value<bool>(&innobase_log_archive)->default_value(false)->zero_tokens(), | ||
418 | 8968 | "Set to 1 if you want to have logs archived."); | ||
419 | 8969 | context("log-group-home-dir", | ||
420 | 8970 | po::value<string>(), | ||
421 | 8971 | "Path to InnoDB log files."); | ||
422 | 8972 | context("max-dirty-pages-pct", | ||
423 | 8973 | po::value<unsigned long>(&srv_max_buf_pool_modified_pct)->default_value(75), | ||
424 | 8974 | "Percentage of dirty pages allowed in bufferpool."); | ||
425 | 8975 | context("adaptive-flushing", | ||
426 | 8976 | po::value<bool>(&srv_adaptive_flushing)->default_value(true)->zero_tokens(), | ||
427 | 8977 | "Attempt flushing dirty pages to avoid IO bursts at checkpoints."); | ||
428 | 8978 | context("max-purge-lag", | ||
429 | 8979 | po::value<unsigned long>(&srv_max_purge_lag)->default_value(0), | ||
430 | 8980 | "Desired maximum length of the purge queue (0 = no limit)"); | ||
431 | 8981 | context("status-file", | ||
432 | 8982 | po::value<bool>(&innobase_create_status_file)->default_value(false)->zero_tokens(), | ||
433 | 8983 | "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file"); | ||
434 | 8984 | context("stats-on-metadata", | ||
435 | 8985 | po::value<bool>(&innobase_stats_on_metadata)->default_value(true)->zero_tokens(), | ||
436 | 8986 | "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)"); | ||
437 | 8987 | context("stats-sample-pages", | ||
438 | 8988 | po::value<uint64_t>(&srv_stats_sample_pages)->default_value(8), | ||
439 | 8989 | "The number of index pages to sample when calculating statistics (default 8)"); | ||
440 | 8990 | context("adaptive-hash-index", | ||
441 | 8991 | po::value<bool>(&btr_search_enabled)->default_value(true)->zero_tokens(), | ||
442 | 8992 | "Enable InnoDB adaptive hash index (enabled by default)"); | ||
443 | 8993 | context("replication-delay", | ||
444 | 8994 | po::value<unsigned long>(&srv_replication_delay)->default_value(0), | ||
445 | 8995 | "Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)"); | ||
446 | 8996 | context("additional-mem-pool-size", | ||
447 | 8997 | po::value<long>(&innobase_additional_mem_pool_size)->default_value(8*1024*1024L), | ||
448 | 8998 | "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures."); | ||
449 | 8999 | context("autoextend-increment", | ||
450 | 9000 | po::value<uint32_t>(&srv_auto_extend_increment)->default_value(8L), | ||
451 | 9001 | "Data file autoextend increment in megabytes"); | ||
452 | 9002 | context("buffer-pool-size", | ||
453 | 9003 | po::value<int64_t>(&innobase_buffer_pool_size)->default_value(8*1024*1024L), | ||
454 | 9004 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables."); | ||
455 | 9005 | context("commit-concurrency", | ||
456 | 9006 | po::value<unsigned long>(&innobase_commit_concurrency)->default_value(0), | ||
457 | 9007 | "Helps in performance tuning in heavily concurrent environments."); | ||
458 | 9008 | context("concurrency-tickets", | ||
459 | 9009 | po::value<unsigned long>(&srv_n_free_tickets_to_enter)->default_value(500L), | ||
460 | 9010 | "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket"); | ||
461 | 9011 | context("file-io-threads", | ||
462 | 9012 | po::value<long>(&innobase_file_io_threads)->default_value(4), | ||
463 | 9013 | "Number of file I/O threads in InnoDB."); | ||
464 | 9014 | context("read-io-threads", | ||
465 | 9015 | po::value<unsigned long>(&innobase_read_io_threads)->default_value(4), | ||
466 | 9016 | "Number of background read I/O threads in InnoDB."); | ||
467 | 9017 | context("write-io-threads", | ||
468 | 9018 | po::value<unsigned long>(&innobase_write_io_threads)->default_value(4), | ||
469 | 9019 | "Number of background write I/O threads in InnoDB."); | ||
470 | 9020 | context("force-recovery", | ||
471 | 9021 | po::value<long>(&innobase_force_recovery)->default_value(0), | ||
472 | 9022 | "Helps to save your data in case the disk image of the database becomes corrupt."); | ||
473 | 9023 | context("log-buffer-size", | ||
474 | 9024 | po::value<long>(&innobase_log_buffer_size)->default_value(8*1024*1024L), | ||
475 | 9025 | "The size of the buffer which InnoDB uses to write log to the log files on disk."); | ||
476 | 9026 | context("log-file-size", | ||
477 | 9027 | po::value<int64_t>(&innobase_log_file_size)->default_value(20*1024*1024L), | ||
478 | 9028 | "The size of the buffer which InnoDB uses to write log to the log files on disk."); | ||
479 | 9029 | context("log-files-in-group", | ||
480 | 9030 | po::value<long>(&innobase_log_files_in_group)->default_value(2), | ||
481 | 9031 | "Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here."); | ||
482 | 9032 | context("mirrored-log-groups", | ||
483 | 9033 | po::value<long>(&innobase_mirrored_log_groups)->default_value(1), | ||
484 | 9034 | "Number of identical copies of log groups we keep for the database. Currently this should be set to 1."); | ||
485 | 9035 | context("open-files", | ||
486 | 9036 | po::value<long>(&innobase_open_files)->default_value(300L), | ||
487 | 9037 | "How many files at the maximum InnoDB keeps open at the same time."); | ||
488 | 9038 | context("sync-spin-loops", | ||
489 | 9039 | po::value<unsigned long>(&srv_n_spin_wait_rounds)->default_value(30L), | ||
490 | 9040 | "Count of spin-loop rounds in InnoDB mutexes (30 by default)"); | ||
491 | 9041 | context("spin-wait-delay", | ||
492 | 9042 | po::value<unsigned long>(&srv_spin_wait_delay)->default_value(6L), | ||
493 | 9043 | "Maximum delay between polling for a spin lock (6 by default)"); | ||
494 | 9044 | context("thread-concurrency", | ||
495 | 9045 | po::value<unsigned long>(&srv_thread_concurrency)->default_value(0), | ||
496 | 9046 | "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling."); | ||
497 | 9047 | context("thread-sleep-delay", | ||
498 | 9048 | po::value<unsigned long>(&srv_thread_sleep_delay)->default_value(10000L), | ||
499 | 9049 | "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep"); | ||
500 | 9050 | context("data-file-path", | ||
501 | 9051 | po::value<string>(), | ||
502 | 9052 | "Path to individual files and their sizes."); | ||
503 | 9053 | context("version", | ||
504 | 9054 | po::value<string>(), | ||
505 | 9055 | "InnoDB version"); | ||
506 | 9056 | context("use-sys-malloc", | ||
507 | 9057 | po::value<bool>(&srv_use_sys_malloc)->default_value(true)->zero_tokens(), | ||
508 | 9058 | "Use OS memory allocator instead of InnoDB's internal memory allocator"); | ||
509 | 9059 | context("change-buffering", | ||
510 | 9060 | po::value<string>(), | ||
511 | 9061 | "Buffer changes to reduce random access: OFF, ON, inserting, deleting, changing, or purging."); | ||
512 | 9062 | context("read-ahead-threshold", | ||
513 | 9063 | po::value<unsigned long>(&srv_read_ahead_threshold)->default_value(56), | ||
514 | 9064 | "Number of pages that must be accessed sequentially for InnoDB to trigger a readahead."); | ||
515 | 9065 | context("support-xa", | ||
516 | 9066 | po::value<bool>()->default_value(true)->zero_tokens(), | ||
517 | 9067 | "Enable InnoDB support for the XA two-phase commit"); | ||
518 | 9068 | context("table-locks", | ||
519 | 9069 | po::value<bool>()->default_value(true)->zero_tokens(), | ||
520 | 9070 | "Enable InnoDB locking in LOCK TABLES"); | ||
521 | 9071 | context("strict-mode", | ||
522 | 9072 | po::value<bool>()->default_value(false)->zero_tokens(), | ||
523 | 9073 | "Use strict mode when evaluating create options."); | ||
524 | 9074 | context("lock-wait-timeout", | ||
525 | 9075 | po::value<unsigned long>()->default_value(50), | ||
526 | 9076 | "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout."); | ||
527 | 9077 | } | ||
528 | 9078 | |||
529 | 8585 | static drizzle_sys_var* innobase_system_variables[]= { | 9079 | static drizzle_sys_var* innobase_system_variables[]= { |
530 | 8586 | DRIZZLE_SYSVAR(additional_mem_pool_size), | 9080 | DRIZZLE_SYSVAR(additional_mem_pool_size), |
531 | 8587 | DRIZZLE_SYSVAR(autoextend_increment), | 9081 | DRIZZLE_SYSVAR(autoextend_increment), |
532 | @@ -8646,7 +9140,7 @@ | |||
533 | 8646 | PLUGIN_LICENSE_GPL, | 9140 | PLUGIN_LICENSE_GPL, |
534 | 8647 | innobase_init, /* Plugin Init */ | 9141 | innobase_init, /* Plugin Init */ |
535 | 8648 | innobase_system_variables, /* system variables */ | 9142 | innobase_system_variables, /* system variables */ |
537 | 8649 | NULL /* reserved */ | 9143 | init_options /* reserved */ |
538 | 8650 | } | 9144 | } |
539 | 8651 | DRIZZLE_DECLARE_PLUGIN_END; | 9145 | DRIZZLE_DECLARE_PLUGIN_END; |
540 | 8652 | 9146 | ||
541 | 8653 | 9147 | ||
542 | === modified file 'po/POTFILES.in' | |||
543 | --- po/POTFILES.in 2010-07-27 00:41:57 +0000 | |||
544 | +++ po/POTFILES.in 2010-08-10 11:52:47 +0000 | |||
545 | @@ -66,6 +66,7 @@ | |||
546 | 66 | plugin/filtered_replicator/filtered_replicator.cc | 66 | plugin/filtered_replicator/filtered_replicator.cc |
547 | 67 | plugin/hello_events/hello_events.cc | 67 | plugin/hello_events/hello_events.cc |
548 | 68 | plugin/innobase/handler/data_dictionary.cc | 68 | plugin/innobase/handler/data_dictionary.cc |
549 | 69 | plugin/innobase/handler/ha_innodb.cc | ||
550 | 69 | plugin/innobase/ut/ut0auxconf_pause.c | 70 | plugin/innobase/ut/ut0auxconf_pause.c |
551 | 70 | plugin/logging_gearman/logging_gearman.cc | 71 | plugin/logging_gearman/logging_gearman.cc |
552 | 71 | plugin/logging_query/logging_query.cc | 72 | plugin/logging_query/logging_query.cc |
553 | 72 | 73 | ||
554 | === modified file 'tests/t/unsafe_binlog_innodb-master.opt' | |||
555 | --- tests/t/unsafe_binlog_innodb-master.opt 2010-03-15 16:12:10 +0000 | |||
556 | +++ tests/t/unsafe_binlog_innodb-master.opt 2010-08-10 11:52:47 +0000 | |||
557 | @@ -1,1 +1,1 @@ | |||
559 | 1 | --innodb_lock_wait_timeout=1 | 1 | --innodb.lock-wait-timeout=1 |
560 | 2 | 2 | ||
561 | === modified file 'tests/test-run.pl' | |||
562 | --- tests/test-run.pl 2010-08-02 14:35:48 +0000 | |||
563 | +++ tests/test-run.pl 2010-08-10 11:52:47 +0000 | |||
564 | @@ -2592,9 +2592,7 @@ | |||
565 | 2592 | $idx > 0 ? $idx + 101 : 1); | 2592 | $idx > 0 ? $idx + 101 : 1); |
566 | 2593 | 2593 | ||
567 | 2594 | mtr_add_arg($args, | 2594 | mtr_add_arg($args, |
571 | 2595 | "%s--loose-innodb_data_file_path=ibdata1:20M:autoextend", $prefix); | 2595 | "%s--innodb.data-file-path=ibdata1:20M:autoextend", $prefix); |
569 | 2596 | |||
570 | 2597 | mtr_add_arg($args, "%s--loose-innodb-lock-wait-timeout=5", $prefix); | ||
572 | 2598 | 2596 | ||
573 | 2599 | } | 2597 | } |
574 | 2600 | else | 2598 | else |
The UNIV_LOG_ARCHIVE #ifdef should not be removed. It's not something we want end users seeing. It is *always* a bad idea to set this (unless you're an InnoDB hacker).
I don't see innobase_ data_home_ dir being freed (or a bunch of the other ones actually)
innobase_ additional_ mem_pool_ size/= 1024; additional_ mem_pool_ size*= 1024;
166 + innobase_
you meant innobase_ additional_ mem_pool_ size -= innobase_ additional_ mem_pool_ size % 1024 ?
as the above just looks a bit odd.
"Enable InnoDB checksums validation (enabled by default). Disable with --skip- innodb- checksums.
needs to be fixed
+ "Speeds up the shutdown process of the InnoDB storage engine. Possible values are(faster) or 2 (fastest - crash-like).");
missing the "1"