Merge lp:~akopytov/percona-server/bug858467-5.1 into lp:percona-server/5.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 295
Proposed branch: lp:~akopytov/percona-server/bug858467-5.1
Merge into: lp:percona-server/5.1
Diff against target: 994 lines (+117/-115)
10 files modified
patches/innodb_admin_command_base.patch (+10/-10)
patches/innodb_extend_slow.patch (+7/-7)
patches/innodb_lru_dump_restore.patch (+9/-9)
patches/innodb_pass_corrupt_table.patch (+28/-28)
patches/innodb_purge_thread.patch (+12/-12)
patches/innodb_recovery_patches.patch (+5/-5)
patches/innodb_separate_doublewrite.patch (+6/-6)
patches/innodb_show_lock_name.patch (+5/-5)
patches/innodb_stats.patch (+34/-32)
patches/series (+1/-1)
To merge this branch: bzr merge lp:~akopytov/percona-server/bug858467-5.1
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+76870@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/innodb_admin_command_base.patch'
2--- patches/innodb_admin_command_base.patch 2011-09-06 08:23:51 +0000
3+++ patches/innodb_admin_command_base.patch 2011-09-25 06:33:23 +0000
4@@ -7,18 +7,18 @@
5 # should be done or reviewed by the maintainer!
6 --- a/storage/innodb_plugin/handler/ha_innodb.cc
7 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
8-@@ -11608,6 +11608,7 @@
9+@@ -11534,6 +11534,7 @@
10+ i_s_innodb_cmp_reset,
11+ i_s_innodb_cmpmem,
12 i_s_innodb_cmpmem_reset,
13- i_s_innodb_table_stats,
14- i_s_innodb_index_stats,
15 +i_s_innodb_admin_command,
16 i_s_innodb_patches
17 mysql_declare_plugin_end;
18
19 --- a/storage/innodb_plugin/handler/i_s.cc
20 +++ b/storage/innodb_plugin/handler/i_s.cc
21-@@ -2947,3 +2947,139 @@
22- STRUCT_FLD(system_vars, NULL),
23+@@ -2602,3 +2602,139 @@
24+ /* void* */
25 STRUCT_FLD(__reserved1, NULL)
26 };
27 +
28@@ -159,17 +159,17 @@
29 +};
30 --- a/storage/innodb_plugin/handler/i_s.h
31 +++ b/storage/innodb_plugin/handler/i_s.h
32-@@ -40,5 +40,6 @@
33+@@ -38,5 +38,6 @@
34+ extern struct st_mysql_plugin i_s_innodb_cmpmem_reset;
35+ extern struct st_mysql_plugin i_s_innodb_patches;
36 extern struct st_mysql_plugin i_s_innodb_rseg;
37- extern struct st_mysql_plugin i_s_innodb_table_stats;
38- extern struct st_mysql_plugin i_s_innodb_index_stats;
39 +extern struct st_mysql_plugin i_s_innodb_admin_command;
40
41 #endif /* i_s_h */
42 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
43 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
44-@@ -38,5 +38,6 @@
45- {"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
46+@@ -37,5 +37,6 @@
47+ {"innodb_split_buf_pool_mutex","More fix of buffer_pool mutex","Spliting buf_pool_mutex and optimizing based on innodb_opt_lru_count","http://www.percona.com/docs/wiki/percona-xtradb"},
48 {"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
49 {"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
50 +{"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
51
52=== modified file 'patches/innodb_extend_slow.patch'
53--- patches/innodb_extend_slow.patch 2011-08-09 13:35:34 +0000
54+++ patches/innodb_extend_slow.patch 2011-09-25 06:33:23 +0000
55@@ -374,7 +374,7 @@
56
57 --- a/storage/innodb_plugin/handler/ha_innodb.cc
58 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
59-@@ -1391,6 +1391,16 @@
60+@@ -1390,6 +1390,16 @@
61 trx->check_unique_secondary = !thd_test_options(
62 thd, OPTION_RELAXED_UNIQUE_CHECKS);
63
64@@ -391,7 +391,7 @@
65 DBUG_VOID_RETURN;
66 }
67
68-@@ -1446,6 +1456,32 @@
69+@@ -1445,6 +1455,32 @@
70 }
71
72
73@@ -424,7 +424,7 @@
74 /*********************************************************************//**
75 Construct ha_innobase handler. */
76 UNIV_INTERN
77-@@ -9024,6 +9060,25 @@
78+@@ -8975,6 +9011,25 @@
79 statement has ended */
80
81 if (trx->n_mysql_tables_in_use == 0) {
82@@ -452,7 +452,7 @@
83 prebuilt->used_in_HANDLER = FALSE;
84 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
85 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
86-@@ -40,5 +40,6 @@
87+@@ -39,5 +39,6 @@
88 {"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
89 {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
90 {"innodb_show_lock_name","Show mutex/lock name instead of crated file/line","","http://www.percona.com/docs/wiki/percona-xtradb"},
91@@ -802,7 +802,7 @@
92 /* This is set to TRUE if the MySQL user has set it in MySQL; currently
93 affects only FOREIGN KEY definition parsing */
94 UNIV_INTERN ibool srv_lower_case_table_names = FALSE;
95-@@ -1159,6 +1162,10 @@
96+@@ -1156,6 +1159,10 @@
97 ibool has_slept = FALSE;
98 srv_conc_slot_t* slot = NULL;
99 ulint i;
100@@ -813,7 +813,7 @@
101
102 if (trx->mysql_thd != NULL
103 && thd_is_replication_slave_thread(trx->mysql_thd)) {
104-@@ -1235,6 +1242,7 @@
105+@@ -1232,6 +1239,7 @@
106 switches. */
107 if (SRV_THREAD_SLEEP_DELAY > 0) {
108 os_thread_sleep(SRV_THREAD_SLEEP_DELAY);
109@@ -821,7 +821,7 @@
110 }
111
112 trx->op_info = "";
113-@@ -1290,12 +1298,25 @@
114+@@ -1287,12 +1295,25 @@
115 /* Go to wait for the event; when a thread leaves InnoDB it will
116 release this thread */
117
118
119=== modified file 'patches/innodb_lru_dump_restore.patch'
120--- patches/innodb_lru_dump_restore.patch 2011-08-09 13:35:34 +0000
121+++ patches/innodb_lru_dump_restore.patch 2011-09-25 06:33:23 +0000
122@@ -405,7 +405,7 @@
123 Waits for an aio operation to complete. This function is used to write the
124 --- a/storage/innodb_plugin/handler/ha_innodb.cc
125 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
126-@@ -11547,6 +11547,12 @@
127+@@ -11478,6 +11478,12 @@
128 "Limit the allocated memory for dictionary cache. (0: unlimited)",
129 NULL, NULL, 0, 0, LONG_MAX, 0);
130
131@@ -418,7 +418,7 @@
132 static struct st_mysql_sys_var* innobase_system_variables[]= {
133 MYSQL_SYSVAR(additional_mem_pool_size),
134 MYSQL_SYSVAR(autoextend_increment),
135-@@ -11629,6 +11635,7 @@
136+@@ -11557,6 +11563,7 @@
137 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
138 MYSQL_SYSVAR(read_ahead_threshold),
139 MYSQL_SYSVAR(io_capacity),
140@@ -428,15 +428,15 @@
141 };
142 --- a/storage/innodb_plugin/handler/i_s.cc
143 +++ b/storage/innodb_plugin/handler/i_s.cc
144-@@ -46,6 +46,7 @@
145+@@ -45,6 +45,7 @@
146+ #include "btr0btr.h" /* for btr_page_get_index_id */
147 #include "trx0rseg.h" /* for trx_rseg_struct */
148 #include "trx0sys.h" /* for trx_sys */
149- #include "dict0dict.h" /* for dict_sys */
150 +#include "buf0lru.h" /* for XTRA_LRU_[DUMP/RESTORE] */
151 }
152
153 static const char plugin_author[] = "Innobase Oy";
154-@@ -3040,6 +3041,36 @@
155+@@ -2695,6 +2696,36 @@
156 "Hello!");
157 goto end_func;
158 }
159@@ -475,7 +475,7 @@
160 "Undefined XTRA_* command.");
161 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
162 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
163-@@ -41,5 +41,6 @@
164+@@ -40,5 +40,6 @@
165 {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
166 {"innodb_show_lock_name","Show mutex/lock name instead of crated file/line","","http://www.percona.com/docs/wiki/percona-xtradb"},
167 {"innodb_extend_slow","Extended statistics in slow.log","It is InnoDB-part only. It needs to patch also to mysqld.","http://www.percona.com/docs/wiki/percona-xtradb"},
168@@ -562,7 +562,7 @@
169 handler for completed requests. The aio array of pending requests is divided
170 --- a/storage/innodb_plugin/include/srv0srv.h
171 +++ b/storage/innodb_plugin/include/srv0srv.h
172-@@ -335,6 +335,9 @@
173+@@ -332,6 +332,9 @@
174 reading of a disk page */
175 extern ulint srv_buf_pool_reads;
176
177@@ -572,7 +572,7 @@
178 /** Status variables to be passed to MySQL */
179 typedef struct export_var_struct export_struc;
180
181-@@ -616,6 +619,16 @@
182+@@ -613,6 +616,16 @@
183 /*=====================*/
184 void* arg); /*!< in: a dummy parameter required by
185 os_thread_create */
186@@ -601,7 +601,7 @@
187 /* structure to pass status variables to MySQL */
188 UNIV_INTERN export_struc export_vars;
189
190-@@ -2555,6 +2558,56 @@
191+@@ -2552,6 +2555,56 @@
192 OS_THREAD_DUMMY_RETURN;
193 }
194
195
196=== modified file 'patches/innodb_pass_corrupt_table.patch'
197--- patches/innodb_pass_corrupt_table.patch 2011-08-09 13:35:34 +0000
198+++ patches/innodb_pass_corrupt_table.patch 2011-09-25 06:33:23 +0000
199@@ -468,7 +468,7 @@
200 goto next_loop;
201
202 cached_foreign_tables = 0;
203-@@ -4657,6 +4658,12 @@
204+@@ -4328,6 +4329,12 @@
205 }
206
207 do {
208@@ -481,7 +481,7 @@
209 if (UNIV_LIKELY
210 (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE
211 || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO
212-@@ -5460,4 +5467,42 @@
213+@@ -5054,4 +5061,42 @@
214 rw_lock_free(&dict_table_stats_latches[i]);
215 }
216 }
217@@ -757,7 +757,7 @@
218 if (descr != NULL) {
219 --- a/storage/innodb_plugin/handler/ha_innodb.cc
220 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
221-@@ -3735,6 +3735,12 @@
222+@@ -3732,6 +3732,12 @@
223 DBUG_RETURN(1);
224 }
225
226@@ -770,7 +770,7 @@
227 /* Create buffers for packing the fields of a record. Why
228 table->reclength did not work here? Obviously, because char
229 fields when packed actually became 1 byte longer, when we also
230-@@ -3762,6 +3768,19 @@
231+@@ -3759,6 +3765,19 @@
232 /* Get pointer to a table object in InnoDB dictionary cache */
233 ib_table = dict_table_get(norm_name, TRUE);
234
235@@ -790,7 +790,7 @@
236 if (NULL == ib_table) {
237 if (is_part && retries < 10) {
238 ++retries;
239-@@ -4928,6 +4947,10 @@
240+@@ -4925,6 +4944,10 @@
241
242 ha_statistic_increment(&SSV::ha_write_count);
243
244@@ -801,7 +801,7 @@
245 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
246 table->timestamp_field->set_time();
247
248-@@ -5145,6 +5168,10 @@
249+@@ -5138,6 +5161,10 @@
250 func_exit:
251 innobase_active_small();
252
253@@ -812,7 +812,7 @@
254 DBUG_RETURN(error_result);
255 }
256
257-@@ -5321,6 +5348,10 @@
258+@@ -5314,6 +5341,10 @@
259
260 ha_statistic_increment(&SSV::ha_update_count);
261
262@@ -823,7 +823,7 @@
263 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
264 table->timestamp_field->set_time();
265
266-@@ -5410,6 +5441,10 @@
267+@@ -5399,6 +5430,10 @@
268
269 innobase_active_small();
270
271@@ -834,7 +834,7 @@
272 DBUG_RETURN(error);
273 }
274
275-@@ -5431,6 +5466,10 @@
276+@@ -5420,6 +5455,10 @@
277
278 ha_statistic_increment(&SSV::ha_delete_count);
279
280@@ -845,7 +845,7 @@
281 if (!prebuilt->upd_node) {
282 row_get_prebuilt_update_vector(prebuilt);
283 }
284-@@ -5457,6 +5496,10 @@
285+@@ -5442,6 +5481,10 @@
286
287 innobase_active_small();
288
289@@ -856,7 +856,7 @@
290 DBUG_RETURN(error);
291 }
292
293-@@ -5696,6 +5739,10 @@
294+@@ -5681,6 +5724,10 @@
295
296 ha_statistic_increment(&SSV::ha_read_key_count);
297
298@@ -867,7 +867,7 @@
299 index = prebuilt->index;
300
301 if (UNIV_UNLIKELY(index == NULL)) {
302-@@ -5761,6 +5808,10 @@
303+@@ -5746,6 +5793,10 @@
304 ret = DB_UNSUPPORTED;
305 }
306
307@@ -878,7 +878,7 @@
308 switch (ret) {
309 case DB_SUCCESS:
310 error = 0;
311-@@ -5876,6 +5927,10 @@
312+@@ -5856,6 +5907,10 @@
313 {
314 DBUG_ENTER("change_active_index");
315
316@@ -889,7 +889,7 @@
317 ut_ad(user_thd == ha_thd());
318 ut_a(prebuilt->trx == thd_to_trx(user_thd));
319
320-@@ -5966,6 +6021,10 @@
321+@@ -5946,6 +6001,10 @@
322
323 DBUG_ENTER("general_fetch");
324
325@@ -900,7 +900,7 @@
326 ut_a(prebuilt->trx == thd_to_trx(user_thd));
327
328 innodb_srv_conc_enter_innodb(prebuilt->trx);
329-@@ -5975,6 +6034,10 @@
330+@@ -5955,6 +6014,10 @@
331
332 innodb_srv_conc_exit_innodb(prebuilt->trx);
333
334@@ -911,7 +911,7 @@
335 switch (ret) {
336 case DB_SUCCESS:
337 error = 0;
338-@@ -7227,6 +7290,10 @@
339+@@ -7202,6 +7265,10 @@
340 DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND);
341 }
342
343@@ -922,7 +922,7 @@
344 /* Truncate the table in InnoDB */
345
346 error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx);
347-@@ -7235,6 +7302,10 @@
348+@@ -7210,6 +7277,10 @@
349 goto fallback;
350 }
351
352@@ -933,7 +933,7 @@
353 error = convert_error_code_to_mysql(error, prebuilt->table->flags,
354 NULL);
355
356-@@ -7739,6 +7810,16 @@
357+@@ -7714,6 +7785,16 @@
358 return(ranges + (double) rows / (double) total_rows * time_for_scan);
359 }
360
361@@ -950,7 +950,7 @@
362 /*********************************************************************//**
363 Calculates the key number used inside MySQL for an Innobase index. We will
364 first check the "index translation table" for a match of the index to get
365-@@ -7919,7 +8000,7 @@
366+@@ -7894,7 +7975,7 @@
367 ib_table = prebuilt->table;
368
369 if (flag & HA_STATUS_TIME) {
370@@ -959,7 +959,7 @@
371 /* In sql_show we call with this flag: update
372 then statistics so that they are up-to-date */
373
374-@@ -8209,10 +8290,18 @@
375+@@ -8160,10 +8241,18 @@
376 THD* thd, /*!< in: connection thread handle */
377 HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
378 {
379@@ -978,7 +978,7 @@
380 return(0);
381 }
382
383-@@ -8394,6 +8483,10 @@
384+@@ -8345,6 +8434,10 @@
385 my_error(ER_QUERY_INTERRUPTED, MYF(0));
386 }
387
388@@ -989,7 +989,7 @@
389 DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
390 }
391
392-@@ -9127,6 +9220,10 @@
393+@@ -9078,6 +9171,10 @@
394
395 update_thd(thd);
396
397@@ -1000,7 +1000,7 @@
398 if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) {
399 ut_print_timestamp(stderr);
400 fprintf(stderr,
401-@@ -11561,6 +11658,14 @@
402+@@ -11492,6 +11589,14 @@
403 "0 (the default) disables automatic dumps.",
404 NULL, NULL, 0, 0, UINT_MAX32, 0);
405
406@@ -1015,7 +1015,7 @@
407 static struct st_mysql_sys_var* innobase_system_variables[]= {
408 MYSQL_SYSVAR(additional_mem_pool_size),
409 MYSQL_SYSVAR(autoextend_increment),
410-@@ -11646,6 +11751,7 @@
411+@@ -11574,6 +11679,7 @@
412 MYSQL_SYSVAR(io_capacity),
413 MYSQL_SYSVAR(auto_lru_dump),
414 MYSQL_SYSVAR(use_purge_thread),
415@@ -1043,7 +1043,7 @@
416 int update_row(const uchar * old_data, uchar * new_data);
417 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
418 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
419-@@ -43,5 +43,6 @@
420+@@ -42,5 +42,6 @@
421 {"innodb_extend_slow","Extended statistics in slow.log","It is InnoDB-part only. It needs to patch also to mysqld.","http://www.percona.com/docs/wiki/percona-xtradb"},
422 {"innodb_lru_dump_restore","Dump and restore command for content of buffer pool","","http://www.percona.com/docs/wiki/percona-xtradb"},
423 {"innodb_separate_doublewrite","Add option 'innodb_doublewrite_file' to separate doublewrite dedicated tablespace","","http://www.percona.com/docs/wiki/percona-xtradb"},
424@@ -1117,7 +1117,7 @@
425 switch (buf_block_get_state(block)) {
426 --- a/storage/innodb_plugin/include/dict0dict.h
427 +++ b/storage/innodb_plugin/include/dict0dict.h
428-@@ -1206,6 +1206,15 @@
429+@@ -1197,6 +1197,15 @@
430 dict_close(void);
431 /*============*/
432
433@@ -1224,7 +1224,7 @@
434 Decompress a page. This function should tolerate errors on the compressed
435 --- a/storage/innodb_plugin/include/srv0srv.h
436 +++ b/storage/innodb_plugin/include/srv0srv.h
437-@@ -231,6 +231,7 @@
438+@@ -228,6 +228,7 @@
439 extern ulint srv_adaptive_checkpoint;
440
441 extern ulint srv_expand_import;
442@@ -1319,7 +1319,7 @@
443 fprintf(stderr,
444 --- a/storage/innodb_plugin/srv/srv0srv.c
445 +++ b/storage/innodb_plugin/srv/srv0srv.c
446-@@ -406,6 +406,7 @@
447+@@ -403,6 +403,7 @@
448 UNIV_INTERN ulint srv_adaptive_checkpoint = 0; /* 0: none 1: reflex 2: estimate */
449
450 UNIV_INTERN ulint srv_expand_import = 0; /* 0:disable 1:enable */
451
452=== modified file 'patches/innodb_purge_thread.patch'
453--- patches/innodb_purge_thread.patch 2011-08-09 13:35:34 +0000
454+++ patches/innodb_purge_thread.patch 2011-09-25 06:33:23 +0000
455@@ -7,7 +7,7 @@
456 # should be done or reviewed by the maintainer!
457 --- a/storage/innodb_plugin/handler/ha_innodb.cc
458 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
459-@@ -11060,6 +11060,11 @@
460+@@ -11011,6 +11011,11 @@
461 "Output statistics of recovery process after it.",
462 NULL, NULL, FALSE);
463
464@@ -19,7 +19,7 @@
465 static MYSQL_SYSVAR_BOOL(overwrite_relay_log_info, innobase_overwrite_relay_log_info,
466 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
467 "During InnoDB crash recovery on slave overwrite relay-log.info "
468-@@ -11571,6 +11576,7 @@
469+@@ -11499,6 +11504,7 @@
470 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
471 MYSQL_SYSVAR(read_ahead_threshold),
472 MYSQL_SYSVAR(io_capacity),
473@@ -29,9 +29,9 @@
474
475 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
476 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
477-@@ -37,5 +37,6 @@
478+@@ -36,5 +36,6 @@
479+ {"innodb_dict_size_limit","Limit dictionary cache size","Variable innodb_dict_size_limit in bytes","http://www.percona.com/docs/wiki/percona-xtradb"},
480 {"innodb_split_buf_pool_mutex","More fix of buffer_pool mutex","Spliting buf_pool_mutex and optimizing based on innodb_opt_lru_count","http://www.percona.com/docs/wiki/percona-xtradb"},
481- {"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
482 {"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
483 +{"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
484 {NULL, NULL, NULL, NULL}
485@@ -47,7 +47,7 @@
486 extern ibool srv_auto_extend_last_data_file;
487 extern ulint srv_last_file_size_max;
488 extern char** srv_log_group_home_dirs;
489-@@ -421,6 +423,8 @@
490+@@ -418,6 +420,8 @@
491 SRV_RECOVERY, /**< threads finishing a recovery */
492 SRV_INSERT, /**< thread flushing the insert buffer to disk */
493 #endif
494@@ -56,7 +56,7 @@
495 SRV_MASTER /**< the master thread, (whose type number must
496 be biggest) */
497 };
498-@@ -494,6 +498,21 @@
499+@@ -491,6 +495,21 @@
500 /*==============*/
501 void* arg); /*!< in: a dummy parameter required by
502 os_thread_create */
503@@ -148,7 +148,7 @@
504 /* if TRUE, then we auto-extend the last data file */
505 UNIV_INTERN ibool srv_auto_extend_last_data_file = FALSE;
506 /* if != 0, this tells the max size auto-extending may increase the
507-@@ -2639,10 +2641,10 @@
508+@@ -2636,10 +2638,10 @@
509 srv_main_thread_process_no = os_proc_get_number();
510 srv_main_thread_id = os_thread_pf(os_thread_get_curr_id());
511
512@@ -160,7 +160,7 @@
513 srv_n_threads_active[SRV_MASTER]++;
514
515 mutex_exit(&kernel_mutex);
516-@@ -3100,6 +3102,7 @@
517+@@ -3097,6 +3099,7 @@
518 /* Flush logs if needed */
519 srv_sync_log_buffer_in_background();
520
521@@ -168,7 +168,7 @@
522 /* We run a full purge every 10 seconds, even if the server
523 were active */
524 do {
525-@@ -3116,6 +3119,7 @@
526+@@ -3113,6 +3116,7 @@
527 srv_sync_log_buffer_in_background();
528
529 } while (n_pages_purged);
530@@ -176,7 +176,7 @@
531
532 srv_main_thread_op_info = "flushing buffer pool pages";
533
534-@@ -3184,6 +3188,7 @@
535+@@ -3181,6 +3185,7 @@
536 os_thread_sleep(100000);
537 }
538
539@@ -184,7 +184,7 @@
540 srv_main_thread_op_info = "purging";
541
542 /* Run a full purge */
543-@@ -3200,6 +3205,7 @@
544+@@ -3197,6 +3202,7 @@
545 srv_sync_log_buffer_in_background();
546
547 } while (n_pages_purged);
548@@ -192,7 +192,7 @@
549
550 srv_main_thread_op_info = "reserving kernel mutex";
551
552-@@ -3352,3 +3358,143 @@
553+@@ -3349,3 +3355,143 @@
554
555 OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
556 }
557
558=== modified file 'patches/innodb_recovery_patches.patch'
559--- patches/innodb_recovery_patches.patch 2011-08-09 13:35:34 +0000
560+++ patches/innodb_recovery_patches.patch 2011-09-25 06:33:23 +0000
561@@ -116,7 +116,7 @@
562 static my_bool innobase_locks_unsafe_for_binlog = FALSE;
563 static my_bool innobase_overwrite_relay_log_info = FALSE;
564 static my_bool innobase_rollback_on_timeout = FALSE;
565-@@ -2368,6 +2370,8 @@
566+@@ -2365,6 +2367,8 @@
567
568 srv_force_recovery = (ulint) innobase_force_recovery;
569
570@@ -125,7 +125,7 @@
571 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
572 srv_use_checksums = (ibool) innobase_use_checksums;
573
574-@@ -11046,6 +11050,16 @@
575+@@ -10997,6 +11001,16 @@
576 "don't use the datafile for normal mysqld or ibbackup! ####",
577 NULL, NULL, FALSE);
578
579@@ -142,7 +142,7 @@
580 static MYSQL_SYSVAR_BOOL(overwrite_relay_log_info, innobase_overwrite_relay_log_info,
581 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
582 "During InnoDB crash recovery on slave overwrite relay-log.info "
583-@@ -11486,6 +11500,8 @@
584+@@ -11417,6 +11431,8 @@
585 MYSQL_SYSVAR(data_home_dir),
586 MYSQL_SYSVAR(doublewrite),
587 MYSQL_SYSVAR(extra_undoslots),
588@@ -153,10 +153,10 @@
589 MYSQL_SYSVAR(read_io_threads),
590 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
591 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
592-@@ -36,5 +36,6 @@
593+@@ -35,5 +35,6 @@
594+ {"innodb_expand_import","convert .ibd file automatically when import tablespace","the files are generated by xtrabackup export mode.","http://www.percona.com/docs/wiki/percona-xtradb"},
595 {"innodb_dict_size_limit","Limit dictionary cache size","Variable innodb_dict_size_limit in bytes","http://www.percona.com/docs/wiki/percona-xtradb"},
596 {"innodb_split_buf_pool_mutex","More fix of buffer_pool mutex","Spliting buf_pool_mutex and optimizing based on innodb_opt_lru_count","http://www.percona.com/docs/wiki/percona-xtradb"},
597- {"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
598 +{"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
599 {NULL, NULL, NULL, NULL}
600 };
601
602=== modified file 'patches/innodb_separate_doublewrite.patch'
603--- patches/innodb_separate_doublewrite.patch 2011-09-06 08:23:51 +0000
604+++ patches/innodb_separate_doublewrite.patch 2011-09-25 06:33:23 +0000
605@@ -341,7 +341,7 @@
606
607 /* Note: This variable can be set to on/off and any of the supported
608 file formats in the configuration file, but can only be set to any
609-@@ -2267,6 +2268,8 @@
610+@@ -2266,6 +2267,8 @@
611 goto error;
612 }
613
614@@ -349,8 +349,8 @@
615 +
616 srv_extra_undoslots = (ibool) innobase_extra_undoslots;
617
618- srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
619-@@ -11388,6 +11391,11 @@
620+ /* -------------- Log files ---------------------------*/
621+@@ -11319,6 +11322,11 @@
622 "Path to individual files and their sizes.",
623 NULL, NULL, NULL);
624
625@@ -362,7 +362,7 @@
626 static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
627 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
628 "The AUTOINC lock modes supported by InnoDB: "
629-@@ -11561,6 +11569,7 @@
630+@@ -11492,6 +11500,7 @@
631 MYSQL_SYSVAR(commit_concurrency),
632 MYSQL_SYSVAR(concurrency_tickets),
633 MYSQL_SYSVAR(data_file_path),
634@@ -372,7 +372,7 @@
635 MYSQL_SYSVAR(extra_undoslots),
636 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
637 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
638-@@ -42,5 +42,6 @@
639+@@ -41,5 +41,6 @@
640 {"innodb_show_lock_name","Show mutex/lock name instead of crated file/line","","http://www.percona.com/docs/wiki/percona-xtradb"},
641 {"innodb_extend_slow","Extended statistics in slow.log","It is InnoDB-part only. It needs to patch also to mysqld.","http://www.percona.com/docs/wiki/percona-xtradb"},
642 {"innodb_lru_dump_restore","Dump and restore command for content of buffer pool","","http://www.percona.com/docs/wiki/percona-xtradb"},
643@@ -515,7 +515,7 @@
644 UNIV_INLINE
645 --- a/storage/innodb_plugin/row/row0mysql.c
646 +++ b/storage/innodb_plugin/row/row0mysql.c
647-@@ -3401,7 +3401,7 @@
648+@@ -3331,7 +3331,7 @@
649 /* Do not drop possible .ibd tablespace if something went
650 wrong: we do not want to delete valuable data of the user */
651
652
653=== modified file 'patches/innodb_show_lock_name.patch'
654--- patches/innodb_show_lock_name.patch 2011-08-09 13:35:34 +0000
655+++ patches/innodb_show_lock_name.patch 2011-09-25 06:33:23 +0000
656@@ -7,7 +7,7 @@
657 # should be done or reviewed by the maintainer!
658 --- a/storage/innodb_plugin/handler/ha_innodb.cc
659 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
660-@@ -9317,8 +9317,8 @@
661+@@ -9268,8 +9268,8 @@
662 rw_lock_wait_time += mutex->lspent_time;
663 }
664 #else /* UNIV_DEBUG */
665@@ -18,7 +18,7 @@
666 buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
667 (ulong) mutex->count_os_wait);
668
669-@@ -9333,9 +9333,8 @@
670+@@ -9284,9 +9284,8 @@
671
672 if (block_mutex) {
673 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
674@@ -30,7 +30,7 @@
675 buf2len = (uint) my_snprintf(buf2, sizeof buf2,
676 "os_waits=%lu",
677 (ulong) block_mutex_oswait_count);
678-@@ -9364,8 +9363,8 @@
679+@@ -9315,8 +9314,8 @@
680 continue;
681 }
682
683@@ -41,7 +41,7 @@
684 buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
685 (ulong) lock->count_os_wait);
686
687-@@ -9379,9 +9378,8 @@
688+@@ -9330,9 +9329,8 @@
689
690 if (block_lock) {
691 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
692@@ -55,7 +55,7 @@
693 (ulong) block_lock_oswait_count);
694 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
695 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
696-@@ -39,5 +39,6 @@
697+@@ -38,5 +38,6 @@
698 {"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
699 {"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
700 {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
701
702=== modified file 'patches/innodb_stats.patch'
703--- patches/innodb_stats.patch 2011-08-09 13:35:34 +0000
704+++ patches/innodb_stats.patch 2011-09-25 06:33:23 +0000
705@@ -347,7 +347,7 @@
706 not of the right form.
707 --- a/storage/innodb_plugin/dict/dict0dict.c
708 +++ b/storage/innodb_plugin/dict/dict0dict.c
709-@@ -739,7 +739,7 @@
710+@@ -740,7 +740,7 @@
711 print an error message and return without doing
712 anything. */
713 dict_update_statistics(table, TRUE /* only update stats
714@@ -356,7 +356,7 @@
715 }
716
717 return(table);
718-@@ -4282,6 +4282,313 @@
719+@@ -4283,6 +4283,313 @@
720 }
721
722 /*********************************************************************//**
723@@ -670,7 +670,7 @@
724 Calculates new estimates for table and index statistics. The statistics
725 are used in query optimization. */
726 UNIV_INTERN
727-@@ -4289,10 +4596,11 @@
728+@@ -4290,10 +4597,11 @@
729 dict_update_statistics(
730 /*===================*/
731 dict_table_t* table, /*!< in/out: table */
732@@ -683,7 +683,7 @@
733 {
734 dict_index_t* index;
735 ulint sum_of_index_sizes = 0;
736-@@ -4309,6 +4617,27 @@
737+@@ -4310,6 +4618,27 @@
738 return;
739 }
740
741@@ -711,7 +711,7 @@
742 /* Find out the sizes of the indexes and how many different values
743 for the key they approximately have */
744
745-@@ -4373,6 +4702,11 @@
746+@@ -4380,6 +4709,11 @@
747 index = dict_table_get_next_index(index);
748 } while (index);
749
750@@ -723,7 +723,7 @@
751 index = dict_table_get_first_index(table);
752
753 table->stat_n_rows = index->stat_n_diff_key_vals[
754-@@ -4390,6 +4724,78 @@
755+@@ -4397,6 +4731,78 @@
756 dict_table_stats_unlock(table, RW_X_LATCH);
757 }
758
759@@ -802,7 +802,7 @@
760 /**********************************************************************//**
761 Prints info of a foreign key constraint. */
762 static
763-@@ -4467,7 +4873,7 @@
764+@@ -4474,7 +4880,7 @@
765
766 ut_ad(mutex_own(&(dict_sys->mutex)));
767
768@@ -813,7 +813,7 @@
769
770 --- a/storage/innodb_plugin/dict/dict0load.c
771 +++ b/storage/innodb_plugin/dict/dict0load.c
772-@@ -223,7 +223,7 @@
773+@@ -224,7 +224,7 @@
774
775 if (dict_table_get_first_index(table)) {
776 dict_update_statistics(table, FALSE /* update
777@@ -824,7 +824,7 @@
778 dict_table_print_low(table);
779 --- a/storage/innodb_plugin/handler/ha_innodb.cc
780 +++ b/storage/innodb_plugin/handler/ha_innodb.cc
781-@@ -190,6 +190,7 @@
782+@@ -193,6 +193,7 @@
783 static my_bool innobase_rollback_on_timeout = FALSE;
784 static my_bool innobase_create_status_file = FALSE;
785 static my_bool innobase_stats_on_metadata = TRUE;
786@@ -832,7 +832,7 @@
787
788 static char* internal_innobase_data_file_path = NULL;
789
790-@@ -2230,6 +2231,8 @@
791+@@ -2271,6 +2272,8 @@
792
793 srv_extra_undoslots = (ibool) innobase_extra_undoslots;
794
795@@ -841,7 +841,7 @@
796 /* -------------- Log files ---------------------------*/
797
798 /* The default dir for log files is the datadir of MySQL */
799-@@ -5000,6 +5003,10 @@
800+@@ -5066,6 +5069,10 @@
801
802 error = row_insert_for_mysql((byte*) record, prebuilt);
803
804@@ -852,7 +852,7 @@
805 /* Handle duplicate key errors */
806 if (auto_inc_used) {
807 ulint err;
808-@@ -5336,6 +5343,10 @@
809+@@ -5410,6 +5417,10 @@
810 }
811 }
812
813@@ -863,7 +863,7 @@
814 innodb_srv_conc_exit_innodb(trx);
815
816 error = convert_error_code_to_mysql(error,
817-@@ -5389,6 +5400,10 @@
818+@@ -5471,6 +5482,10 @@
819
820 error = row_update_for_mysql((byte*) record, prebuilt);
821
822@@ -874,7 +874,7 @@
823 innodb_srv_conc_exit_innodb(trx);
824
825 error = convert_error_code_to_mysql(
826-@@ -5707,6 +5722,11 @@
827+@@ -5801,6 +5816,11 @@
828 case DB_SUCCESS:
829 error = 0;
830 table->status = 0;
831@@ -886,7 +886,7 @@
832 break;
833 case DB_RECORD_NOT_FOUND:
834 error = HA_ERR_KEY_NOT_FOUND;
835-@@ -5916,6 +5936,11 @@
836+@@ -6022,6 +6042,11 @@
837 case DB_SUCCESS:
838 error = 0;
839 table->status = 0;
840@@ -898,7 +898,7 @@
841 break;
842 case DB_RECORD_NOT_FOUND:
843 error = HA_ERR_END_OF_FILE;
844-@@ -7855,11 +7880,35 @@
845+@@ -7979,11 +8004,35 @@
846 /* In sql_show we call with this flag: update
847 then statistics so that they are up-to-date */
848
849@@ -935,7 +935,7 @@
850
851 prebuilt->trx->op_info = "returning various info to MySQL";
852 }
853-@@ -7937,7 +7986,7 @@
854+@@ -8061,7 +8110,7 @@
855 are asked by MySQL to avoid locking. Another reason to
856 avoid the call is that it uses quite a lot of CPU.
857 See Bug#38185. */
858@@ -944,7 +944,7 @@
859 /* We do not update delete_length if no
860 locking is requested so the "old" value can
861 remain. delete_length is initialized to 0 in
862-@@ -11122,6 +11171,26 @@
863+@@ -11294,6 +11343,26 @@
864 "The number of index pages to sample when calculating statistics (default 8)",
865 NULL, NULL, 8, 1, ~0ULL, 0);
866
867@@ -971,7 +971,7 @@
868 static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
869 PLUGIN_VAR_OPCMDARG,
870 "Enable InnoDB adaptive hash index (enabled by default). "
871-@@ -11447,6 +11516,9 @@
872+@@ -11641,6 +11710,9 @@
873 MYSQL_SYSVAR(overwrite_relay_log_info),
874 MYSQL_SYSVAR(rollback_on_timeout),
875 MYSQL_SYSVAR(stats_on_metadata),
876@@ -981,15 +981,15 @@
877 MYSQL_SYSVAR(stats_sample_pages),
878 MYSQL_SYSVAR(adaptive_hash_index),
879 MYSQL_SYSVAR(stats_method),
880-@@ -11512,6 +11584,8 @@
881+@@ -11709,6 +11781,8 @@
882 i_s_innodb_cmp_reset,
883 i_s_innodb_cmpmem,
884 i_s_innodb_cmpmem_reset,
885 +i_s_innodb_table_stats,
886 +i_s_innodb_index_stats,
887+ i_s_innodb_admin_command,
888 i_s_innodb_patches
889 mysql_declare_plugin_end;
890-
891 --- a/storage/innodb_plugin/handler/i_s.cc
892 +++ b/storage/innodb_plugin/handler/i_s.cc
893 @@ -45,6 +45,7 @@
894@@ -997,11 +997,11 @@
895 #include "trx0rseg.h" /* for trx_rseg_struct */
896 #include "trx0sys.h" /* for trx_sys */
897 +#include "dict0dict.h" /* for dict_sys */
898+ #include "buf0lru.h" /* for XTRA_LRU_[DUMP/RESTORE] */
899 }
900
901- static const char plugin_author[] = "Innobase Oy";
902-@@ -2602,3 +2603,347 @@
903- /* void* */
904+@@ -2769,3 +2770,347 @@
905+ STRUCT_FLD(system_vars, NULL),
906 STRUCT_FLD(__reserved1, NULL)
907 };
908 +
909@@ -1350,23 +1350,25 @@
910 +};
911 --- a/storage/innodb_plugin/handler/i_s.h
912 +++ b/storage/innodb_plugin/handler/i_s.h
913-@@ -38,5 +38,7 @@
914+@@ -38,6 +38,8 @@
915 extern struct st_mysql_plugin i_s_innodb_cmpmem_reset;
916 extern struct st_mysql_plugin i_s_innodb_patches;
917 extern struct st_mysql_plugin i_s_innodb_rseg;
918 +extern struct st_mysql_plugin i_s_innodb_table_stats;
919 +extern struct st_mysql_plugin i_s_innodb_index_stats;
920+ extern struct st_mysql_plugin i_s_innodb_admin_command;
921
922 #endif /* i_s_h */
923 --- a/storage/innodb_plugin/handler/innodb_patch_info.h
924 +++ b/storage/innodb_plugin/handler/innodb_patch_info.h
925-@@ -35,5 +35,6 @@
926+@@ -35,6 +35,7 @@
927 {"innodb_expand_import","convert .ibd file automatically when import tablespace","the files are generated by xtrabackup export mode.","http://www.percona.com/docs/wiki/percona-xtradb"},
928 {"innodb_dict_size_limit","Limit dictionary cache size","Variable innodb_dict_size_limit in bytes","http://www.percona.com/docs/wiki/percona-xtradb"},
929 {"innodb_split_buf_pool_mutex","More fix of buffer_pool mutex","Spliting buf_pool_mutex and optimizing based on innodb_opt_lru_count","http://www.percona.com/docs/wiki/percona-xtradb"},
930 +{"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
931- {NULL, NULL, NULL, NULL}
932- };
933+ {"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"},
934+ {"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"},
935+ {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
936 --- a/storage/innodb_plugin/include/dict0boot.h
937 +++ b/storage/innodb_plugin/include/dict0boot.h
938 @@ -101,6 +101,7 @@
939@@ -1531,7 +1533,7 @@
940 should be called after the indexes for a table have been created.
941 --- a/storage/innodb_plugin/include/srv0srv.h
942 +++ b/storage/innodb_plugin/include/srv0srv.h
943-@@ -197,6 +197,9 @@
944+@@ -206,6 +206,9 @@
945 extern ibool srv_innodb_status;
946
947 extern unsigned long long srv_stats_sample_pages;
948@@ -1585,7 +1587,7 @@
949 } else {
950 --- a/storage/innodb_plugin/row/row0ins.c
951 +++ b/storage/innodb_plugin/row/row0ins.c
952-@@ -2020,6 +2020,8 @@
953+@@ -2026,6 +2026,8 @@
954 }
955
956 #ifdef UNIV_DEBUG
957@@ -1596,7 +1598,7 @@
958 rec_t* first_rec = page_rec_get_next(
959 --- a/storage/innodb_plugin/row/row0merge.c
960 +++ b/storage/innodb_plugin/row/row0merge.c
961-@@ -2021,6 +2021,8 @@
962+@@ -2028,6 +2028,8 @@
963 "UPDATE SYS_INDEXES SET NAME=CONCAT('"
964 TEMP_INDEX_PREFIX_STR "', NAME) WHERE ID = :indexid;\n"
965 "COMMIT WORK;\n"
966@@ -1784,7 +1786,7 @@
967 dfield = dtuple_get_nth_field(entry, i);
968 --- a/storage/innodb_plugin/srv/srv0srv.c
969 +++ b/storage/innodb_plugin/srv/srv0srv.c
970-@@ -369,6 +369,9 @@
971+@@ -381,6 +381,9 @@
972 /* When estimating number of different key values in an index, sample
973 this many index pages */
974 UNIV_INTERN unsigned long long srv_stats_sample_pages = 8;
975
976=== modified file 'patches/series'
977--- patches/series 2011-09-06 08:23:51 +0000
978+++ patches/series 2011-09-25 06:33:23 +0000
979@@ -20,7 +20,6 @@
980 innodb_dict_size_limit.patch
981 innodb_split_buf_pool_mutex.patch
982 innodb_expand_import.patch
983-innodb_stats.patch
984 innodb_recovery_patches.patch
985 innodb_purge_thread.patch
986 innodb_admin_command_base.patch
987@@ -29,6 +28,7 @@
988 innodb_lru_dump_restore.patch
989 innodb_separate_doublewrite.patch
990 innodb_pass_corrupt_table.patch
991+innodb_stats.patch
992 innodb_fast_checksum.patch
993 innodb_files_extend.patch
994 innodb_show_sys_tables.patch

Subscribers

People subscribed via source and target branches