Merge lp:~mordred/drizzle/bug702571 into lp:drizzle/7.0

Proposed by Monty Taylor
Status: Rejected
Rejected by: Andrew Hutchings
Proposed branch: lp:~mordred/drizzle/bug702571
Merge into: lp:drizzle/7.0
Diff against target: 585 lines (+106/-102)
13 files modified
plugin/innobase/handler/ha_innodb.cc (+48/-50)
plugin/innobase/include/srv0srv.h (+1/-1)
plugin/innobase/include/trx0sys.h (+2/-2)
plugin/innobase/srv/srv0srv.cc (+1/-1)
plugin/innobase/srv/srv0start.cc (+10/-11)
plugin/innobase/tests/r/innodb-system-table-view.result (+9/-9)
plugin/innobase/tests/r/innodb_bug53591.result (+3/-3)
plugin/innobase/tests/r/innodb_cmpmem.result (+8/-8)
plugin/innobase/tests/r/innodb_cmpmem_reset.result (+8/-8)
plugin/innobase/tests/t/innodb-system-table-view.test (+1/-1)
plugin/innobase/tests/t/innodb_cmpmem.test (+1/-0)
plugin/innobase/tests/t/innodb_cmpmem_reset.test (+1/-0)
plugin/innobase/trx/trx0sys.cc (+13/-8)
To merge this branch: bzr merge lp:~mordred/drizzle/bug702571
Reviewer Review Type Date Requested Status
Stewart Smith Pending
Review via email: mp+46371@code.launchpad.net

This proposal supersedes a proposal from 2011-01-13.

Description of the change

Sets innodb_file_per_table to on by default (which doesn't break things that were previously set to the other thing, btw) and sets O_DIRECT as the default innodb_flush_sync_method on linux.

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

1) have you tested fallback for when O_DIRECT doesn't work? (if have ext3/4 mount with data=journal as it doesn't allow O_DIRECT)
2) defaults should also be changed in HailDB engine.

review: Needs Fixing
Revision history for this message
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal

Tested fallback? No - not any more than if a user supplied O_DIRECT as a config option - but it does appear that the code tests for the error, prints a warning "InnoDB: Failed to set O_DIRECT on file %s: %s: %s, continuing anyway\n" and goes on.

I'll see about changing them in haildb too though.

Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :

Brian had to back out this patch

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Rejected because we aren't doing this now after benchmark results

Unmerged revisions

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 2011-01-11 03:35:19 +0000
3+++ plugin/innobase/handler/ha_innodb.cc 2011-01-15 07:08:51 +0000
4@@ -240,14 +240,16 @@
5 std::string innobase_data_home_dir;
6 std::string innobase_data_file_path;
7 std::string innobase_log_group_home_dir;
8+static string innobase_change_buffering;
9 static string innobase_file_format_name;
10-static string innobase_change_buffering;
11-
12 /* The highest file format being used in the database. The value can be
13 set by user, however, it will be adjusted to the newer file format if
14 a table of such format is created/opened. */
15 static string innobase_file_format_max;
16
17+static bool innobase_single_data_file= false;
18+
19+
20 /* Below we have boolean-valued start-up parameters, and their default
21 values */
22
23@@ -625,7 +627,7 @@
24 uint
25 innobase_file_format_name_lookup(
26 /*=============================*/
27- const char* format_name); /*!< in: pointer to file format
28+ const string &format_name); /*!< in: pointer to file format
29 name */
30 /************************************************************//**
31 Validate the file format check config parameters, as a side effect it
32@@ -635,7 +637,7 @@
33 int
34 innobase_file_format_validate_and_set(
35 /*================================*/
36- const char* format_max); /*!< in: parameter value */
37+ const string &format_max); /*!< in: parameter value */
38
39 static const char innobase_engine_name[]= "InnoDB";
40
41@@ -1930,15 +1932,17 @@
42 Session* , /*!< in: thread handle */
43 set_var *var)
44 {
45- const char *file_format_input = var->value->str_value.ptr();
46- if (file_format_input == NULL)
47+ const char *str_value_ptr= var->value->str_value.ptr();
48+ const string file_format_input(str_value_ptr ? str_value_ptr : "");
49+ if (file_format_input.empty())
50+ {
51 return 1;
52-
53- if (file_format_input != NULL) {
54+ }
55+ else
56+ {
57 uint format_id;
58
59- format_id = innobase_file_format_name_lookup(
60- file_format_input);
61+ format_id = innobase_file_format_name_lookup(file_format_input);
62
63 if (format_id <= DICT_TF_FORMAT_MAX) {
64 innobase_file_format_name =
65@@ -2012,13 +2016,13 @@
66 trx_sys_file_format_id_to_name((uint)format_id));
67
68 /* Update the max format id in the system tablespace. */
69- const char *name_buff;
70+ std::string name_buff;
71
72- if (trx_sys_file_format_max_set(format_id, &name_buff))
73+ if (trx_sys_file_format_max_set(format_id, name_buff))
74 {
75 errmsg_printf(ERRMSG_LVL_WARN,
76 " [Info] InnoDB: the file format in the system "
77- "tablespace is now set to %s.\n", name_buff);
78+ "tablespace is now set to %s.\n", name_buff.c_str());
79 innobase_file_format_max= name_buff;
80 }
81 return(0);
82@@ -2038,7 +2042,6 @@
83 return(1);
84 }
85
86-
87 /*********************************************************************//**
88 Opens an InnoDB database.
89 @return 0 on success, error code on failure */
90@@ -2072,6 +2075,7 @@
91
92 /* Inverted Booleans */
93
94+ srv_file_per_table= not innobase_single_data_file;
95 innobase_use_checksums= (vm.count("disable-checksums")) ? false : true;
96 innobase_use_doublewrite= (vm.count("disable-doublewrite")) ? false : true;
97 srv_adaptive_flushing= (vm.count("disable-adaptive-flushing")) ? false : true;
98@@ -2187,8 +2191,7 @@
99 /* Validate the file format by animal name */
100 if (vm.count("file-format"))
101 {
102- format_id = innobase_file_format_name_lookup(
103- vm["file-format"].as<string>().c_str());
104+ format_id= innobase_file_format_name_lookup(vm["file-format"].as<string>());
105
106 if (format_id > DICT_TF_FORMAT_MAX) {
107
108@@ -2257,11 +2260,6 @@
109
110 /* --------------------------------------------------*/
111
112- if (vm.count("flush-method") != 0)
113- {
114- srv_file_flush_method_str = (char *)vm["flush-method"].as<string>().c_str();
115- }
116-
117 srv_n_log_groups = (ulint) innobase_mirrored_log_groups;
118 srv_n_log_files = (ulint) innobase_log_files_in_group;
119 srv_log_file_size = (ulint) innobase_log_file_size;
120@@ -2393,7 +2391,7 @@
121
122 context.registerVariable(new sys_var_const_string_val("data-home-dir", innobase_data_home_dir));
123 context.registerVariable(new sys_var_const_string_val("flush-method",
124- vm.count("flush-method") ? vm["flush-method"].as<string>() : ""));
125+ vm["flush-method"].as<string>()));
126 context.registerVariable(new sys_var_const_string_val("log-group-home-dir", innobase_log_group_home_dir));
127 context.registerVariable(new sys_var_const_string_val("data-file-path", innobase_data_file_path));
128 context.registerVariable(new sys_var_const_string_val("version", vm["version"].as<string>()));
129@@ -2427,15 +2425,15 @@
130 innodb_n_purge_threads,
131 purge_threads_update));
132 context.registerVariable(new sys_var_constrained_value<uint32_t>("fast_shutdown", innobase_fast_shutdown));
133+ context.registerVariable(new sys_var_std_string("file_format_max",
134+ innobase_file_format_max,
135+ innodb_file_format_max_validate));
136 context.registerVariable(new sys_var_std_string("file_format",
137 innobase_file_format_name,
138 innodb_file_format_name_validate));
139 context.registerVariable(new sys_var_std_string("change_buffering",
140 innobase_change_buffering,
141 innodb_change_buffering_validate));
142- context.registerVariable(new sys_var_std_string("file_format_max",
143- innobase_file_format_max,
144- innodb_file_format_max_validate));
145 context.registerVariable(new sys_var_constrained_value_readonly<size_t>("buffer_pool_size", innobase_buffer_pool_size));
146 context.registerVariable(new sys_var_constrained_value_readonly<int64_t>("log_file_size", innobase_log_file_size));
147 context.registerVariable(new sys_var_constrained_value_readonly<uint32_t>("flush_log_at_trx_commit",
148@@ -3581,11 +3579,8 @@
149 /* We update the highest file format in the system table
150 space, if this table has higher file format setting. */
151
152- char changed_file_format_max[100];
153- strcpy(changed_file_format_max, innobase_file_format_max.c_str());
154- trx_sys_file_format_max_upgrade((const char **)&changed_file_format_max,
155+ trx_sys_file_format_max_upgrade(innobase_file_format_max,
156 dict_table_get_format(prebuilt->table));
157- innobase_file_format_max= changed_file_format_max;
158 }
159
160 /* Only if the table has an AUTOINC column. */
161@@ -6384,11 +6379,8 @@
162 /* We update the highest file format in the system table
163 space, if this table has higher file format setting. */
164
165- char changed_file_format_max[100];
166- strcpy(changed_file_format_max, innobase_file_format_max.c_str());
167- trx_sys_file_format_max_upgrade((const char **)&changed_file_format_max,
168+ trx_sys_file_format_max_upgrade(innobase_file_format_max,
169 dict_table_get_format(innobase_table));
170- innobase_file_format_max= changed_file_format_max;
171 }
172
173 /* Note: We can't call update_session() as prebuilt will not be
174@@ -9171,19 +9163,19 @@
175 uint
176 innobase_file_format_name_lookup(
177 /*=============================*/
178- const char* format_name) /*!< in: pointer to file format name */
179+ const std::string &format_name) /*!< in: pointer to file format name */
180 {
181 char* endp;
182 uint format_id;
183
184- ut_a(format_name != NULL);
185+ ut_a(not format_name.empty());
186
187 /* The format name can contain the format id itself instead of
188 the name and we check for that. */
189- format_id = (uint) strtoul(format_name, &endp, 10);
190+ format_id = (uint) strtoul(format_name.c_str(), &endp, 10);
191
192 /* Check for valid parse. */
193- if (*endp == '\0' && *format_name != '\0') {
194+ if (*endp == '\0' && format_name[0] != '\0') {
195
196 if (format_id <= DICT_TF_FORMAT_MAX) {
197
198@@ -9193,11 +9185,9 @@
199
200 for (format_id = 0; format_id <= DICT_TF_FORMAT_MAX;
201 format_id++) {
202- const char* name;
203-
204- name = trx_sys_file_format_id_to_name(format_id);
205-
206- if (!innobase_strcasecmp(format_name, name)) {
207+ const char* name = trx_sys_file_format_id_to_name(format_id);
208+
209+ if (!innobase_strcasecmp(format_name.c_str(), name)) {
210
211 return(format_id);
212 }
213@@ -9215,7 +9205,7 @@
214 int
215 innobase_file_format_validate_and_set(
216 /*================================*/
217- const char* format_max) /*!< in: parameter value */
218+ const string &format_max) /*!< in: parameter value */
219 {
220 uint format_id;
221
222@@ -9253,23 +9243,31 @@
223 context("purge-threads",
224 po::value<purge_threads_constraint>(&innodb_n_purge_threads)->default_value(0),
225 "Purge threads can be either 0 or 1. Defalut is 0.");
226- context("file-per-table",
227- po::value<bool>(&srv_file_per_table)->default_value(false)->zero_tokens(),
228+ context("disable-file-per-table",
229+ po::value<bool>(&innobase_single_data_file)->default_value(false)->zero_tokens(),
230 "Stores each InnoDB table to an .ibd file in the database dir.");
231- context("file-format",
232- po::value<string>(&innobase_file_format_name)->default_value("Antelope"),
233- "File format to use for new tables in .ibd files.");
234 context("file-format-max",
235- po::value<string>(&innobase_file_format_max)->default_value("Antelope"),
236+ po::value<string>(&innobase_file_format_max)->default_value("Barracuda"),
237 "The highest file format in the tablespace.");
238 context("file-format-check",
239 po::value<bool>(&innobase_file_format_check)->default_value(true)->zero_tokens(),
240 "Whether to perform system file format check.");
241+ context("file-format",
242+ po::value<string>(&innobase_file_format_name)->default_value("Barracuda"),
243+ "File format to use for new tables in .ibd files.");
244 context("flush-log-at-trx-commit",
245 po::value<trinary_constraint>(&innodb_flush_log_at_trx_commit)->default_value(1),
246 "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).");
247 context("flush-method",
248- po::value<string>(),
249+ po::value<string>(&srv_file_flush_method_str)->default_value(
250+#if defined(TARGET_OS_LINUX)
251+ "O_DIRECT"
252+#elif defined(__WIN__)
253+ "normal"
254+#else
255+ "fsync"
256+#endif
257+ ),
258 "With which method to flush data.");
259 context("log-group-home-dir",
260 po::value<string>(),
261
262=== modified file 'plugin/innobase/include/srv0srv.h'
263--- plugin/innobase/include/srv0srv.h 2010-12-27 18:39:11 +0000
264+++ plugin/innobase/include/srv0srv.h 2011-01-15 07:08:51 +0000
265@@ -188,7 +188,7 @@
266 extern ib_uint64_t srv_archive_recovery_limit_lsn;
267 #endif /* UNIV_LOG_ARCHIVE */
268
269-extern char* srv_file_flush_method_str;
270+extern std::string srv_file_flush_method_str;
271 extern ulint srv_unix_file_flush_method;
272 extern ulint srv_win_file_flush_method;
273
274
275=== modified file 'plugin/innobase/include/trx0sys.h'
276--- plugin/innobase/include/trx0sys.h 2010-12-18 04:43:40 +0000
277+++ plugin/innobase/include/trx0sys.h 2011-01-15 07:08:51 +0000
278@@ -358,7 +358,7 @@
279 trx_sys_file_format_max_set(
280 /*========================*/
281 ulint format_id, /*!< in: file format id */
282- const char** name); /*!< out: max file format name or
283+ std::string& name); /*!< out: max file format name or
284 NULL if not needed. */
285 /*****************************************************************//**
286 Get the name representation of the file format from its id.
287@@ -383,7 +383,7 @@
288 ibool
289 trx_sys_file_format_max_upgrade(
290 /*============================*/
291- const char** name, /*!< out: max file format name */
292+ std::string &name, /*!< out: max file format name */
293 ulint format_id); /*!< in: file format identifier */
294 #else /* !UNIV_HOTBACKUP */
295 /*****************************************************************//**
296
297=== modified file 'plugin/innobase/srv/srv0srv.cc'
298--- plugin/innobase/srv/srv0srv.cc 2010-12-27 18:39:11 +0000
299+++ plugin/innobase/srv/srv0srv.cc 2011-01-15 07:08:51 +0000
300@@ -284,7 +284,7 @@
301
302 UNIV_INTERN ulong srv_insert_buffer_batch_size = 20;
303
304-UNIV_INTERN char* srv_file_flush_method_str = NULL;
305+UNIV_INTERN std::string srv_file_flush_method_str("");
306 UNIV_INTERN ulint srv_unix_file_flush_method = SRV_UNIX_FSYNC;
307 UNIV_INTERN ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
308
309
310=== modified file 'plugin/innobase/srv/srv0start.cc'
311--- plugin/innobase/srv/srv0start.cc 2010-12-27 19:41:48 +0000
312+++ plugin/innobase/srv/srv0start.cc 2011-01-15 07:08:51 +0000
313@@ -1174,45 +1174,44 @@
314
315 #endif
316
317- if (srv_file_flush_method_str == NULL) {
318+ if (srv_file_flush_method_str.empty()) {
319 /* These are the default options */
320
321 srv_unix_file_flush_method = SRV_UNIX_FSYNC;
322
323 srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
324 #ifndef __WIN__
325- } else if (0 == ut_strcmp(srv_file_flush_method_str, "fsync")) {
326+ } else if (srv_file_flush_method_str == "fsync") {
327 srv_unix_file_flush_method = SRV_UNIX_FSYNC;
328
329- } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DSYNC")) {
330+ } else if (srv_file_flush_method_str == "O_DSYNC") {
331 srv_unix_file_flush_method = SRV_UNIX_O_DSYNC;
332
333- } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
334+ } else if (srv_file_flush_method_str == "O_DIRECT") {
335 srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
336
337- } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) {
338+ } else if (srv_file_flush_method_str == "littlesync") {
339 srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC;
340
341- } else if (0 == ut_strcmp(srv_file_flush_method_str, "nosync")) {
342+ } else if (srv_file_flush_method_str == "nosync") {
343 srv_unix_file_flush_method = SRV_UNIX_NOSYNC;
344 #else
345- } else if (0 == ut_strcmp(srv_file_flush_method_str, "normal")) {
346+ } else if (srv_file_flush_method_str == "normal") {
347 srv_win_file_flush_method = SRV_WIN_IO_NORMAL;
348 srv_use_native_aio = FALSE;
349
350- } else if (0 == ut_strcmp(srv_file_flush_method_str, "unbuffered")) {
351+ } else if (srv_file_flush_method_str == "unbuffered") {
352 srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
353 srv_use_native_aio = FALSE;
354
355- } else if (0 == ut_strcmp(srv_file_flush_method_str,
356- "async_unbuffered")) {
357+ } else if (srv_file_flush_method_str == "async_unbuffered") {
358 srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
359 #endif
360 } else {
361 fprintf(stderr,
362 "InnoDB: Unrecognized value %s for"
363 " innodb_flush_method\n",
364- srv_file_flush_method_str);
365+ srv_file_flush_method_str.c_str());
366 return(DB_ERROR);
367 }
368
369
370=== modified file 'plugin/innobase/tests/r/innodb-system-table-view.result'
371--- plugin/innobase/tests/r/innodb-system-table-view.result 2010-12-02 03:39:51 +0000
372+++ plugin/innobase/tests/r/innodb-system-table-view.result 2011-01-15 07:08:51 +0000
373@@ -2,14 +2,14 @@
374 TABLE_ID NAME FLAG N_COLS SPACE
375 11 SYS_FOREIGN 0 7 0
376 12 SYS_FOREIGN_COLS 0 7 0
377-13 SYS_REPLICATION_LOG 0 5 0
378+13 SYS_REPLICATION_LOG 0 5 1
379 SELECT * FROM DATA_DICTIONARY.INNODB_SYS_INDEXES;
380 INDEX_ID NAME TABLE_ID TYPE N_FIELDS PAGE_NO SPACE
381 11 ID_IND 11 3 1 302 0
382 12 FOR_IND 11 0 1 303 0
383 13 REF_IND 11 0 1 304 0
384 14 ID_IND 12 3 2 305 0
385-15 ID_IND 13 3 1 307 0
386+15 ID_IND 13 3 1 3 1
387 SELECT * FROM DATA_DICTIONARY.INNODB_SYS_COLUMNS;
388 TABLE_ID NAME POS MTYPE PRTYPE LEN
389 11 ID 0 1 2949124 0
390@@ -58,13 +58,13 @@
391 WHERE name LIKE "%parent";
392 name num_rows handles_opened
393 test/parent 1 1
394-SELECT NAME, FLAG, N_COLS, SPACE FROM DATA_DICTIONARY.INNODB_SYS_TABLES;
395-NAME FLAG N_COLS SPACE
396-SYS_FOREIGN 0 7 0
397-SYS_FOREIGN_COLS 0 7 0
398-SYS_REPLICATION_LOG 0 5 0
399-test/child 1 5 0
400-test/parent 1 4 0
401+SELECT NAME, FLAG, N_COLS FROM DATA_DICTIONARY.INNODB_SYS_TABLES;
402+NAME FLAG N_COLS
403+SYS_FOREIGN 0 7
404+SYS_FOREIGN_COLS 0 7
405+SYS_REPLICATION_LOG 0 5
406+test/child 41 5
407+test/parent 41 4
408 SELECT name, n_fields
409 from DATA_DICTIONARY.INNODB_SYS_INDEXES
410 WHERE table_id In (SELECT table_id from
411
412=== modified file 'plugin/innobase/tests/r/innodb_bug53591.result'
413--- plugin/innobase/tests/r/innodb_bug53591.result 2010-11-17 01:35:21 +0000
414+++ plugin/innobase/tests/r/innodb_bug53591.result 2011-01-15 07:08:51 +0000
415@@ -8,6 +8,6 @@
416 Level Code Message
417 Error 1071 Specified key was too long; max key length is 1023 bytes
418 DROP TABLE bug53591;
419-SET GLOBAL innodb_file_format=Antelope;
420-SET GLOBAL innodb_file_format_max=Antelope;
421-SET GLOBAL innodb_file_per_table=0;
422+SET GLOBAL innodb_file_format=Barracuda;
423+SET GLOBAL innodb_file_format_max=Barracuda;
424+SET GLOBAL innodb_file_per_table=1;
425
426=== modified file 'plugin/innobase/tests/r/innodb_cmpmem.result'
427--- plugin/innobase/tests/r/innodb_cmpmem.result 2010-11-11 11:27:58 +0000
428+++ plugin/innobase/tests/r/innodb_cmpmem.result 2011-01-15 07:08:51 +0000
429@@ -1,14 +1,14 @@
430 use data_dictionary;
431 select * from INNODB_CMPMEM where PAGE_SIZE > 64;
432 BUF_POOL PAGE_SIZE PAGES_USED PAGES_FREE RELOCATION_OPS RELOCATION_TIME
433-0 128 0 0 0 0
434-0 256 0 0 0 0
435-0 512 0 0 0 0
436-0 1024 0 0 0 0
437-0 2048 0 0 0 0
438-0 4096 0 0 0 0
439-0 8192 0 0 0 0
440-0 16384 0 0 0 0
441+0 128 0 0 # 0
442+0 256 0 0 # 0
443+0 512 0 0 # 0
444+0 1024 0 0 # 0
445+0 2048 0 0 # 0
446+0 4096 0 0 # 0
447+0 8192 0 0 # 0
448+0 16384 0 0 # 0
449 show create table INNODB_CMPMEM;
450 Table Create Table
451 INNODB_CMPMEM CREATE TABLE `INNODB_CMPMEM` (
452
453=== modified file 'plugin/innobase/tests/r/innodb_cmpmem_reset.result'
454--- plugin/innobase/tests/r/innodb_cmpmem_reset.result 2010-11-11 11:27:58 +0000
455+++ plugin/innobase/tests/r/innodb_cmpmem_reset.result 2011-01-15 07:08:51 +0000
456@@ -1,14 +1,14 @@
457 use data_dictionary;
458 select * from INNODB_CMPMEM_RESET where PAGE_SIZE > 64;
459 BUF_POOL PAGE_SIZE PAGES_USED PAGES_FREE RELOCATION_OPS RELOCATION_TIME
460-0 128 0 0 0 0
461-0 256 0 0 0 0
462-0 512 0 0 0 0
463-0 1024 0 0 0 0
464-0 2048 0 0 0 0
465-0 4096 0 0 0 0
466-0 8192 0 0 0 0
467-0 16384 0 0 0 0
468+0 128 0 0 # 0
469+0 256 0 0 # 0
470+0 512 0 0 # 0
471+0 1024 0 0 # 0
472+0 2048 0 0 # 0
473+0 4096 0 0 # 0
474+0 8192 0 0 # 0
475+0 16384 0 0 # 0
476 show create table INNODB_CMPMEM_RESET;
477 Table Create Table
478 INNODB_CMPMEM_RESET CREATE TABLE `INNODB_CMPMEM_RESET` (
479
480=== modified file 'plugin/innobase/tests/t/innodb-system-table-view.test'
481--- plugin/innobase/tests/t/innodb-system-table-view.test 2010-11-16 05:44:59 +0000
482+++ plugin/innobase/tests/t/innodb-system-table-view.test 2011-01-15 07:08:51 +0000
483@@ -42,7 +42,7 @@
484 FROM DATA_DICTIONARY.INNODB_SYS_TABLESTATS
485 WHERE name LIKE "%parent";
486
487-SELECT NAME, FLAG, N_COLS, SPACE FROM DATA_DICTIONARY.INNODB_SYS_TABLES;
488+SELECT NAME, FLAG, N_COLS FROM DATA_DICTIONARY.INNODB_SYS_TABLES;
489
490 SELECT name, n_fields
491 from DATA_DICTIONARY.INNODB_SYS_INDEXES
492
493=== modified file 'plugin/innobase/tests/t/innodb_cmpmem.test'
494--- plugin/innobase/tests/t/innodb_cmpmem.test 2010-03-23 23:47:56 +0000
495+++ plugin/innobase/tests/t/innodb_cmpmem.test 2011-01-15 07:08:51 +0000
496@@ -2,6 +2,7 @@
497
498 # Add in the qualification because there is an extra row on 32-bit for
499 # PAGE_SIZE==64. But we don't care about that.
500+--replace_column 5 #
501 select * from INNODB_CMPMEM where PAGE_SIZE > 64;
502
503 show create table INNODB_CMPMEM;
504
505=== modified file 'plugin/innobase/tests/t/innodb_cmpmem_reset.test'
506--- plugin/innobase/tests/t/innodb_cmpmem_reset.test 2010-03-23 23:47:56 +0000
507+++ plugin/innobase/tests/t/innodb_cmpmem_reset.test 2011-01-15 07:08:51 +0000
508@@ -2,6 +2,7 @@
509
510 # Add in the qualification because there is an extra row on 32-bit for
511 # PAGE_SIZE==64. But we don't care about that.
512+--replace_column 5 #
513 select * from INNODB_CMPMEM_RESET where PAGE_SIZE > 64;
514
515 show create table INNODB_CMPMEM_RESET;
516
517=== modified file 'plugin/innobase/trx/trx0sys.cc'
518--- plugin/innobase/trx/trx0sys.cc 2010-12-27 05:42:16 +0000
519+++ plugin/innobase/trx/trx0sys.cc 2011-01-15 07:08:51 +0000
520@@ -1056,7 +1056,7 @@
521 trx_sys_file_format_max_write(
522 /*==========================*/
523 ulint format_id, /*!< in: file format id */
524- const char** name) /*!< out: max file format name, can
525+ std::string& name) /*!< out: max file format name, can
526 be NULL */
527 {
528 mtr_t mtr;
529@@ -1075,9 +1075,7 @@
530 ptr = buf_block_get_frame(block) + TRX_SYS_FILE_FORMAT_TAG;
531 tag_value = format_id + TRX_SYS_FILE_FORMAT_TAG_MAGIC_N;
532
533- if (name) {
534- *name = file_format_max.name;
535- }
536+ name = file_format_max.name;
537
538 mlog_write_ull(ptr, tag_value, &mtr);
539
540@@ -1199,7 +1197,7 @@
541 trx_sys_file_format_max_set(
542 /*========================*/
543 ulint format_id, /*!< in: file format id */
544- const char** name) /*!< out: max file format name or
545+ std::string &name) /*!< out: max file format name or
546 NULL if not needed. */
547 {
548 ibool ret = FALSE;
549@@ -1219,6 +1217,13 @@
550 return(ret);
551 }
552
553+static ibool
554+trx_sys_file_format_max_set(ulint format_id)
555+{
556+ std::string unused;
557+ return trx_sys_file_format_max_set(format_id, unused);
558+}
559+
560 /********************************************************************//**
561 Tags the system table space with minimum format id if it has not been
562 tagged yet.
563@@ -1235,7 +1240,7 @@
564
565 /* If format_id is not set then set it to the minimum. */
566 if (format_id == ULINT_UNDEFINED) {
567- trx_sys_file_format_max_set(DICT_TF_FORMAT_MIN, NULL);
568+ trx_sys_file_format_max_set(DICT_TF_FORMAT_MIN);
569 }
570 }
571
572@@ -1247,12 +1252,12 @@
573 ibool
574 trx_sys_file_format_max_upgrade(
575 /*============================*/
576- const char** name, /*!< out: max file format name */
577+ std::string &name, /*!< out: max file format name */
578 ulint format_id) /*!< in: file format identifier */
579 {
580 ibool ret = FALSE;
581
582- ut_a(name);
583+ ut_a(not name.empty());
584 ut_a(file_format_max.name != NULL);
585 ut_a(format_id <= DICT_TF_FORMAT_MAX);
586

Subscribers

People subscribed via source and target branches