Merge lp:~laurynas-biveinis/percona-server/warning-fixes-5.5-2 into lp:percona-server/5.5

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 207
Proposed branch: lp:~laurynas-biveinis/percona-server/warning-fixes-5.5-2
Merge into: lp:percona-server/5.5
Diff against target: 769 lines (+73/-210)
3 files modified
patches/group_commit.patch (+1/-1)
patches/innodb_adaptive_hash_index_partitions.patch (+47/-184)
patches/innodb_split_buf_pool_mutex.patch (+25/-25)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/warning-fixes-5.5-2
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+88307@code.launchpad.net

Description of the change

Fix the compilation warnings (bug 878164):

- sql/log.cc: In function ‘void mysql_bin_log_commit_pos(THD*, ulonglong*, const char**)’:
  sql/log.cc:7116:15: error: converting to non-pointer type ‘ulonglong
  {aka long long unsigned int}’ from NULL [-Werror=conversion-null]

- storage/innobase/btr/btr0sea.c: In function
  ‘btr_search_drop_page_hash_index’:
  storage/innobase/btr/btr0sea.c:1070:16: error: unused parameter
  ‘index_in’ [-Werror=unused-parameter]

- storage/innobase/buf/buf0buf.c: In function ‘buf_pool_watch_set’:
  storage/innobase/buf/buf0buf.c:1607: warning: ‘block_mutex’ may be
  used uninitialized in this function

The fixes:

- innodb_adaptive_hash_index_partitions.patch: remove unused second
  arg of btr_search_drop_page_hash_index, update all callers.
- group_commmit.patch: set ulonglong variable with 0ULL, not NULL.
- innodb_split_buf_pool_mutex.patch: join two identical if statements,
  as a bonus the first one will get a branch prediction too.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

http://jenkins.percona.com/view/Percona%20Server%205.5/job/percona-server-5.5-param-debug/4/
(A custom Jenkins job with -DMYSQL_MAINTAINER_MODE=ON)

There are mysterious mysql_plugin failures. Hopefully these won't be present once we flip the main Jenkins config.

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/group_commit.patch'
2--- patches/group_commit.patch 2011-12-27 15:32:16 +0000
3+++ patches/group_commit.patch 2012-01-12 06:33:24 +0000
4@@ -1206,7 +1206,7 @@
5 + }
6 + else
7 + {
8-+ *out_pos= NULL;
9++ *out_pos= 0ULL;
10 + *out_file= NULL;
11 + }
12 +}
13
14=== modified file 'patches/innodb_adaptive_hash_index_partitions.patch'
15--- patches/innodb_adaptive_hash_index_partitions.patch 2011-12-27 15:32:16 +0000
16+++ patches/innodb_adaptive_hash_index_partitions.patch 2012-01-12 06:33:24 +0000
17@@ -5,80 +5,6 @@
18 #!!! notice !!!
19 # Any small change to this file in the main branch
20 # should be done or reviewed by the maintainer!
21---- a/storage/innobase/btr/btr0btr.c
22-+++ b/storage/innobase/btr/btr0btr.c
23-@@ -1523,7 +1523,7 @@
24- }
25- ut_a(block);
26-
27-- btr_search_drop_page_hash_index(block);
28-+ btr_search_drop_page_hash_index(block, NULL);
29-
30- header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP;
31- #ifdef UNIV_BTR_DEBUG
32-@@ -1592,7 +1592,7 @@
33-
34- #ifndef UNIV_HOTBACKUP
35- if (UNIV_LIKELY(!recovery)) {
36-- btr_search_drop_page_hash_index(block);
37-+ btr_search_drop_page_hash_index(block, index);
38- }
39-
40- block->check_index_page_at_flush = TRUE;
41-@@ -1760,7 +1760,7 @@
42- ut_a(!page_zip || page_zip_validate(page_zip, page));
43- #endif /* UNIV_ZIP_DEBUG */
44-
45-- btr_search_drop_page_hash_index(block);
46-+ btr_search_drop_page_hash_index(block, index);
47- btr_blob_dbg_remove(page, index, "btr_page_empty");
48-
49- /* Recreate the page: note that global data on page (possible
50-@@ -3093,7 +3093,7 @@
51- mem_heap_free(heap);
52- }
53-
54-- btr_search_drop_page_hash_index(block);
55-+ btr_search_drop_page_hash_index(block, index);
56-
57- /* Make the father empty */
58- btr_page_empty(father_block, father_page_zip, index, page_level, mtr);
59-@@ -3317,7 +3317,7 @@
60- goto err_exit;
61- }
62-
63-- btr_search_drop_page_hash_index(block);
64-+ btr_search_drop_page_hash_index(block, index);
65-
66- /* Remove the page from the level list */
67- btr_level_list_remove(space, zip_size, page, index, mtr);
68-@@ -3358,7 +3358,7 @@
69- goto err_exit;
70- }
71-
72-- btr_search_drop_page_hash_index(block);
73-+ btr_search_drop_page_hash_index(block, index);
74-
75- #ifdef UNIV_BTR_DEBUG
76- if (UNIV_LIKELY_NULL(merge_page_zip)) {
77-@@ -3473,7 +3473,7 @@
78- ut_a(btr_page_get_next(page, mtr) == FIL_NULL);
79-
80- ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
81-- btr_search_drop_page_hash_index(block);
82-+ btr_search_drop_page_hash_index(block, index);
83-
84- btr_page_get_father(index, block, mtr, &cursor);
85- father = btr_cur_get_block(&cursor);
86-@@ -3578,7 +3578,7 @@
87-
88- page = buf_block_get_frame(block);
89- ut_a(page_is_comp(merge_page) == page_is_comp(page));
90-- btr_search_drop_page_hash_index(block);
91-+ btr_search_drop_page_hash_index(block, index);
92-
93- if (left_page_no == FIL_NULL && !page_is_leaf(page)) {
94-
95 --- a/storage/innobase/btr/btr0cur.c
96 +++ b/storage/innobase/btr/btr0cur.c
97 @@ -500,7 +500,7 @@
98@@ -436,31 +362,15 @@
99 }
100 failure:
101 cursor->flag = BTR_CUR_HASH_FAIL;
102-@@ -1032,10 +1063,11 @@
103- void
104- btr_search_drop_page_hash_index(
105- /*============================*/
106-- buf_block_t* block) /*!< in: block containing index page,
107-+ buf_block_t* block, /*!< in: block containing index page,
108- s- or x-latched, or an index page
109- for which we know that
110- block->buf_fix_count == 0 */
111-+ dict_index_t* index_in)
112- {
113- hash_table_t* table;
114- ulint n_fields;
115-@@ -1054,23 +1086,55 @@
116+@@ -1053,24 +1084,49 @@
117+ const dict_index_t* index;
118 ulint* offsets;
119
120- #ifdef UNIV_SYNC_DEBUG
121+-#ifdef UNIV_SYNC_DEBUG
122 - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
123 - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
124-+ if (index_in) {
125-+ ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_SHARED));
126-+ ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_EX));
127-+ }
128- #endif /* UNIV_SYNC_DEBUG */
129-
130+-#endif /* UNIV_SYNC_DEBUG */
131+-
132 retry:
133 - rw_lock_s_lock(&btr_search_latch);
134 - index = block->index;
135@@ -512,7 +422,7 @@
136
137 #ifdef UNIV_SYNC_DEBUG
138 ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
139-@@ -1080,12 +1144,14 @@
140+@@ -1080,12 +1136,14 @@
141
142 n_fields = block->curr_n_fields;
143 n_bytes = block->curr_n_bytes;
144@@ -528,7 +438,7 @@
145
146 ut_a(n_fields + n_bytes > 0);
147
148-@@ -1136,7 +1202,7 @@
149+@@ -1136,7 +1194,7 @@
150 mem_heap_free(heap);
151 }
152
153@@ -537,7 +447,7 @@
154
155 if (UNIV_UNLIKELY(!block->index)) {
156 /* Someone else has meanwhile dropped the hash index */
157-@@ -1152,7 +1218,7 @@
158+@@ -1152,7 +1210,7 @@
159 /* Someone else has meanwhile built a new hash index on the
160 page, with different parameters */
161
162@@ -546,7 +456,7 @@
163
164 mem_free(folds);
165 goto retry;
166-@@ -1167,6 +1233,7 @@
167+@@ -1167,6 +1225,7 @@
168 index->search_info->ref_count--;
169
170 block->index = NULL;
171@@ -554,7 +464,7 @@
172
173 cleanup:
174 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
175-@@ -1179,14 +1246,14 @@
176+@@ -1179,14 +1238,14 @@
177 "InnoDB: the hash index to a page of %s,"
178 " still %lu hash nodes remain.\n",
179 index->name, (ulong) block->n_pointers);
180@@ -572,7 +482,7 @@
181 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
182
183 mem_free(folds);
184-@@ -1218,9 +1285,9 @@
185+@@ -1218,9 +1277,9 @@
186 ulint* offsets;
187 ibool released_search_latch;
188
189@@ -584,7 +494,7 @@
190
191 for (j = 0; j < srv_buf_pool_instances; j++) {
192 buf_pool_t* buf_pool;
193-@@ -1254,7 +1321,7 @@
194+@@ -1254,7 +1313,7 @@
195
196
197 /* keeping latch order */
198@@ -593,7 +503,7 @@
199 released_search_latch = TRUE;
200 rw_lock_x_lock(&block->lock);
201
202-@@ -1306,7 +1373,7 @@
203+@@ -1306,7 +1365,7 @@
204 mem_heap_empty(heap);
205 }
206
207@@ -602,7 +512,7 @@
208
209 if (UNIV_UNLIKELY(!block->index)) {
210 goto cleanup;
211-@@ -1316,12 +1383,12 @@
212+@@ -1316,12 +1375,12 @@
213
214 if (UNIV_UNLIKELY(block->curr_n_fields != n_fields)
215 || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) {
216@@ -617,7 +527,7 @@
217 goto retry;
218 }
219
220-@@ -1334,6 +1401,7 @@
221+@@ -1334,6 +1393,7 @@
222 index->search_info->ref_count--;
223
224 block->index = NULL;
225@@ -625,7 +535,7 @@
226
227 cleanup:
228 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
229-@@ -1346,18 +1414,18 @@
230+@@ -1346,18 +1406,18 @@
231 index->name, (ulong) block->n_pointers);
232 }
233 #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
234@@ -647,16 +557,7 @@
235
236 if (UNIV_LIKELY_NULL(heap)) {
237 mem_heap_free(heap);
238-@@ -1395,7 +1463,7 @@
239-
240- buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH);
241-
242-- btr_search_drop_page_hash_index(block);
243-+ btr_search_drop_page_hash_index(block, NULL);
244- }
245-
246- mtr_commit(&mtr);
247-@@ -1436,31 +1504,26 @@
248+@@ -1436,31 +1496,26 @@
249 ut_ad(index);
250 ut_a(!dict_index_is_ibuf(index));
251
252@@ -690,15 +591,14 @@
253 - rw_lock_s_unlock(&btr_search_latch);
254 + rw_lock_s_unlock(btr_search_get_latch(index->id));
255
256-- btr_search_drop_page_hash_index(block);
257-+ btr_search_drop_page_hash_index(block, index);
258+ btr_search_drop_page_hash_index(block);
259 } else {
260 - rw_lock_s_unlock(&btr_search_latch);
261 + rw_lock_s_unlock(btr_search_get_latch(index->id));
262 }
263
264 n_recs = page_get_n_recs(page);
265-@@ -1554,9 +1617,9 @@
266+@@ -1554,9 +1609,9 @@
267 fold = next_fold;
268 }
269
270@@ -710,7 +610,7 @@
271
272 if (UNIV_UNLIKELY(!btr_search_enabled)) {
273 goto exit_func;
274-@@ -1583,6 +1646,7 @@
275+@@ -1583,6 +1638,7 @@
276 block->curr_n_bytes = n_bytes;
277 block->curr_left_side = left_side;
278 block->index = index;
279@@ -718,7 +618,7 @@
280
281 for (i = 0; i < n_cached; i++) {
282
283-@@ -1590,7 +1654,7 @@
284+@@ -1590,7 +1646,7 @@
285 }
286
287 exit_func:
288@@ -727,7 +627,7 @@
289
290 mem_free(folds);
291 mem_free(recs);
292-@@ -1625,7 +1689,7 @@
293+@@ -1625,7 +1681,7 @@
294 ut_ad(rw_lock_own(&(new_block->lock), RW_LOCK_EX));
295 #endif /* UNIV_SYNC_DEBUG */
296
297@@ -736,19 +636,16 @@
298
299 ut_a(!new_block->index || new_block->index == index);
300 ut_a(!block->index || block->index == index);
301-@@ -1634,9 +1698,9 @@
302+@@ -1634,7 +1690,7 @@
303
304 if (new_block->index) {
305
306 - rw_lock_s_unlock(&btr_search_latch);
307 + rw_lock_s_unlock(btr_search_get_latch(index->id));
308
309-- btr_search_drop_page_hash_index(block);
310-+ btr_search_drop_page_hash_index(block, index);
311+ btr_search_drop_page_hash_index(block);
312
313- return;
314- }
315-@@ -1651,7 +1715,7 @@
316+@@ -1651,7 +1707,7 @@
317 new_block->n_bytes = block->curr_n_bytes;
318 new_block->left_side = left_side;
319
320@@ -757,7 +654,7 @@
321
322 ut_a(n_fields + n_bytes > 0);
323
324-@@ -1663,7 +1727,7 @@
325+@@ -1663,7 +1719,7 @@
326 return;
327 }
328
329@@ -766,7 +663,7 @@
330 }
331
332 /********************************************************************//**
333-@@ -1702,7 +1766,7 @@
334+@@ -1702,7 +1758,7 @@
335 ut_a(block->curr_n_fields + block->curr_n_bytes > 0);
336 ut_a(!dict_index_is_ibuf(index));
337
338@@ -775,7 +672,7 @@
339
340 rec = btr_cur_get_rec(cursor);
341
342-@@ -1713,7 +1777,7 @@
343+@@ -1713,7 +1769,7 @@
344 mem_heap_free(heap);
345 }
346
347@@ -784,7 +681,7 @@
348
349 if (block->index) {
350 ut_a(block->index == index);
351-@@ -1721,7 +1785,7 @@
352+@@ -1721,7 +1777,7 @@
353 ha_search_and_delete_if_found(table, fold, rec);
354 }
355
356@@ -793,7 +690,7 @@
357 }
358
359 /********************************************************************//**
360-@@ -1758,7 +1822,7 @@
361+@@ -1758,7 +1814,7 @@
362 ut_a(cursor->index == index);
363 ut_a(!dict_index_is_ibuf(index));
364
365@@ -802,7 +699,7 @@
366
367 if (!block->index) {
368
369-@@ -1772,15 +1836,15 @@
370+@@ -1772,15 +1828,15 @@
371 && (cursor->n_bytes == block->curr_n_bytes)
372 && !block->curr_left_side) {
373
374@@ -821,7 +718,7 @@
375
376 btr_search_update_hash_on_insert(cursor);
377 }
378-@@ -1815,9 +1879,9 @@
379+@@ -1815,9 +1871,9 @@
380 ulint* offsets = offsets_;
381 rec_offs_init(offsets_);
382
383@@ -833,7 +730,7 @@
384
385 rec = btr_cur_get_rec(cursor);
386
387-@@ -1862,7 +1926,7 @@
388+@@ -1862,7 +1918,7 @@
389 } else {
390 if (left_side) {
391
392@@ -842,7 +739,7 @@
393
394 locked = TRUE;
395
396-@@ -1880,7 +1944,7 @@
397+@@ -1880,7 +1936,7 @@
398
399 if (!locked) {
400
401@@ -851,7 +748,7 @@
402
403 locked = TRUE;
404
405-@@ -1902,7 +1966,7 @@
406+@@ -1902,7 +1958,7 @@
407 if (!left_side) {
408
409 if (!locked) {
410@@ -860,7 +757,7 @@
411
412 locked = TRUE;
413
414-@@ -1921,7 +1985,7 @@
415+@@ -1921,7 +1977,7 @@
416
417 if (!locked) {
418
419@@ -869,7 +766,7 @@
420
421 locked = TRUE;
422
423-@@ -1948,7 +2012,7 @@
424+@@ -1948,7 +2004,7 @@
425 mem_heap_free(heap);
426 }
427 if (locked) {
428@@ -878,7 +775,7 @@
429 }
430 }
431
432-@@ -1964,7 +2028,7 @@
433+@@ -1964,7 +2020,7 @@
434 ha_node_t* node;
435 ulint n_page_dumps = 0;
436 ibool ok = TRUE;
437@@ -887,7 +784,7 @@
438 ulint cell_count;
439 mem_heap_t* heap = NULL;
440 ulint offsets_[REC_OFFS_NORMAL_SIZE];
441-@@ -1976,23 +2040,25 @@
442+@@ -1976,23 +2032,25 @@
443
444 rec_offs_init(offsets_);
445
446@@ -918,7 +815,7 @@
447
448 for (; node != NULL; node = node->next) {
449 const buf_block_t* block
450-@@ -2099,19 +2165,21 @@
451+@@ -2099,19 +2157,21 @@
452 give other queries a chance to run. */
453 if (i != 0) {
454 buf_pool_page_hash_x_unlock_all();
455@@ -994,8 +891,7 @@
456 + btr_search_s_unlock_all();
457
458 rw_lock_x_lock(&block->lock);
459-- btr_search_drop_page_hash_index(block);
460-+ btr_search_drop_page_hash_index(block, NULL);
461+ btr_search_drop_page_hash_index(block);
462 rw_lock_x_unlock(&block->lock);
463
464 - rw_lock_s_lock(&btr_search_latch);
465@@ -1007,15 +903,6 @@
466 }
467 }
468
469-@@ -1744,7 +1744,7 @@
470-
471- UNIV_MEM_VALID(((buf_block_t*) bpage)->frame,
472- UNIV_PAGE_SIZE);
473-- btr_search_drop_page_hash_index((buf_block_t*) bpage);
474-+ btr_search_drop_page_hash_index((buf_block_t*) bpage, NULL);
475- UNIV_MEM_INVALID(((buf_block_t*) bpage)->frame,
476- UNIV_PAGE_SIZE);
477-
478 --- a/storage/innobase/dict/dict0dict.c
479 +++ b/storage/innobase/dict/dict0dict.c
480 @@ -1846,7 +1846,7 @@
481@@ -1041,7 +928,7 @@
482 static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay,
483 PLUGIN_VAR_RQCMDARG,
484 "Replication thread delay (ms) on the slave server if "
485-@@ -12213,6 +12218,7 @@
486+@@ -12253,6 +12258,7 @@
487 MYSQL_SYSVAR(use_sys_stats_table),
488 MYSQL_SYSVAR(stats_sample_pages),
489 MYSQL_SYSVAR(adaptive_hash_index),
490@@ -1061,20 +948,7 @@
491 /*********************************************************************//**
492 Updates the search info. */
493 UNIV_INLINE
494-@@ -136,10 +137,11 @@
495- void
496- btr_search_drop_page_hash_index(
497- /*============================*/
498-- buf_block_t* block); /*!< in: block containing index page,
499-+ buf_block_t* block, /*!< in: block containing index page,
500- s- or x-latched, or an index page
501- for which we know that
502- block->buf_fix_count == 0 */
503-+ dict_index_t* index_in);
504- /************************************************************************
505- Drops a page hash index based on index */
506- UNIV_INTERN
507-@@ -199,6 +201,40 @@
508+@@ -199,6 +200,40 @@
509 # define btr_search_validate() TRUE
510 #endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */
511
512@@ -1115,7 +989,7 @@
513 /** The search info struct in an index */
514 struct btr_search_struct{
515 ulint ref_count; /*!< Number of blocks in this index tree
516-@@ -259,7 +295,7 @@
517+@@ -259,7 +294,7 @@
518
519 /** The hash index system */
520 struct btr_search_sys_struct{
521@@ -1210,17 +1084,6 @@
522 + }
523 +}
524 +
525---- a/storage/innobase/page/page0zip.c
526-+++ b/storage/innobase/page/page0zip.c
527-@@ -4456,7 +4456,7 @@
528-
529- #ifndef UNIV_HOTBACKUP
530- temp_block = buf_block_alloc(buf_pool);
531-- btr_search_drop_page_hash_index(block);
532-+ btr_search_drop_page_hash_index(block, index);
533- block->check_index_page_at_flush = TRUE;
534- #else /* !UNIV_HOTBACKUP */
535- ut_ad(block == back_block1);
536 --- a/storage/innobase/row/row0mysql.c
537 +++ b/storage/innobase/row/row0mysql.c
538 @@ -2594,7 +2594,7 @@
539@@ -1402,7 +1265,7 @@
540
541 --- a/storage/innobase/srv/srv0srv.c
542 +++ b/storage/innobase/srv/srv0srv.c
543-@@ -2051,7 +2051,9 @@
544+@@ -2054,7 +2054,9 @@
545 "-------------------------------------\n", file);
546 ibuf_print(file);
547
548@@ -1413,7 +1276,7 @@
549
550 fprintf(file,
551 "%.2f hash searches/s, %.2f non-hash searches/s\n",
552-@@ -2076,14 +2078,15 @@
553+@@ -2079,14 +2081,15 @@
554 ut_total_allocated_memory,
555 mem_pool_get_reserved(mem_comm_pool));
556 /* Calcurate reserved memories */
557@@ -1433,7 +1296,7 @@
558
559 lock_sys_subtotal = 0;
560 if (trx_sys) {
561-@@ -2109,10 +2112,10 @@
562+@@ -2112,10 +2115,10 @@
563 " Recovery system %lu \t(%lu + %lu)\n",
564
565 (ulong) (btr_search_sys
566
567=== modified file 'patches/innodb_split_buf_pool_mutex.patch'
568--- patches/innodb_split_buf_pool_mutex.patch 2012-01-10 07:01:07 +0000
569+++ patches/innodb_split_buf_pool_mutex.patch 2012-01-12 06:33:24 +0000
570@@ -551,12 +551,12 @@
571
572 + rw_lock_x_lock(&buf_pool->page_hash_latch);
573 bpage = buf_page_hash_get_low(buf_pool, space, offset, fold);
574-+ if (bpage) {
575+
576+ if (UNIV_LIKELY_NULL(bpage)) {
577++
578 + block_mutex = buf_page_get_mutex_enter(bpage);
579 + ut_a(block_mutex);
580-+ }
581-
582- if (UNIV_LIKELY_NULL(bpage)) {
583++
584 if (!buf_pool_watch_is_sentinel(buf_pool, bpage)) {
585 /* The page was loaded meanwhile. */
586 + rw_lock_x_unlock(&buf_pool->page_hash_latch);
587@@ -1871,7 +1871,7 @@
588 ut_ad(buf_flush_ready_for_flush(bpage, flush_type));
589
590 buf_page_set_io_fix(bpage, BUF_IO_WRITE);
591-@@ -1457,14 +1467,16 @@
592+@@ -1455,14 +1465,16 @@
593
594 buf_pool = buf_pool_get(space, i);
595
596@@ -1890,7 +1890,7 @@
597 if (srv_flush_neighbor_pages == 2) {
598
599 /* This is contiguous neighbor page flush and
600-@@ -1482,11 +1494,9 @@
601+@@ -1480,11 +1492,9 @@
602 if (flush_type != BUF_FLUSH_LRU
603 || i == offset
604 || buf_page_is_old(bpage)) {
605@@ -1904,7 +1904,7 @@
606 && (i == offset || !bpage->buf_fix_count)) {
607 /* We only try to flush those
608 neighbors != offset where the buf fix
609-@@ -1502,11 +1512,12 @@
610+@@ -1500,11 +1510,12 @@
611 ut_ad(!buf_pool_mutex_own(buf_pool));
612 count++;
613 continue;
614@@ -1917,9 +1917,9 @@
615 + //buf_pool_mutex_exit(buf_pool);
616 + rw_lock_s_unlock(&buf_pool->page_hash_latch);
617
618- if (srv_flush_neigbor_pages == 2) {
619+ if (srv_flush_neighbor_pages == 2) {
620
621-@@ -1555,21 +1566,25 @@
622+@@ -1553,21 +1564,25 @@
623 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
624 #endif /* UNIV_DEBUG */
625
626@@ -1951,7 +1951,7 @@
627
628 /* These fields are protected by both the
629 buffer pool mutex and block mutex. */
630-@@ -1585,13 +1600,18 @@
631+@@ -1583,13 +1598,18 @@
632 *count,
633 n_to_flush);
634
635@@ -1973,7 +1973,7 @@
636
637 return(flushed);
638 }
639-@@ -1612,7 +1632,8 @@
640+@@ -1610,7 +1630,8 @@
641 buf_page_t* bpage;
642 ulint count = 0;
643
644@@ -1983,7 +1983,7 @@
645
646 do {
647 /* Start from the end of the list looking for a
648-@@ -1634,7 +1655,8 @@
649+@@ -1632,7 +1653,8 @@
650 should be flushed, we factor in this value. */
651 buf_lru_flush_page_count += count;
652
653@@ -1993,7 +1993,7 @@
654
655 return(count);
656 }
657-@@ -1662,9 +1684,10 @@
658+@@ -1660,9 +1682,10 @@
659 {
660 ulint len;
661 buf_page_t* bpage;
662@@ -2005,7 +2005,7 @@
663
664 /* If we have flushed enough, leave the loop */
665 do {
666-@@ -1683,6 +1706,7 @@
667+@@ -1681,6 +1704,7 @@
668
669 if (bpage) {
670 ut_a(bpage->oldest_modification > 0);
671@@ -2013,7 +2013,7 @@
672 }
673
674 if (!bpage || bpage->oldest_modification >= lsn_limit) {
675-@@ -1724,9 +1748,17 @@
676+@@ -1722,9 +1746,17 @@
677 break;
678 }
679
680@@ -2033,7 +2033,7 @@
681
682 buf_flush_list_mutex_exit(buf_pool);
683
684-@@ -1735,7 +1767,7 @@
685+@@ -1733,7 +1765,7 @@
686
687 } while (count < min_n && bpage != NULL && len > 0);
688
689@@ -2042,7 +2042,7 @@
690
691 return(count);
692 }
693-@@ -1774,13 +1806,15 @@
694+@@ -1772,13 +1804,15 @@
695 || sync_thread_levels_empty_except_dict());
696 #endif /* UNIV_SYNC_DEBUG */
697
698@@ -2059,7 +2059,7 @@
699 break;
700 case BUF_FLUSH_LIST:
701 count = buf_flush_flush_list_batch(buf_pool, min_n, lsn_limit);
702-@@ -1789,7 +1823,7 @@
703+@@ -1787,7 +1821,7 @@
704 ut_error;
705 }
706
707@@ -2068,7 +2068,7 @@
708
709 buf_flush_buffered_writes();
710
711-@@ -2045,7 +2079,7 @@
712+@@ -2059,7 +2093,7 @@
713 retry:
714 //buf_pool_mutex_enter(buf_pool);
715 if (have_LRU_mutex)
716@@ -2077,7 +2077,7 @@
717
718 n_replaceable = UT_LIST_GET_LEN(buf_pool->free);
719
720-@@ -2062,15 +2096,15 @@
721+@@ -2076,15 +2110,15 @@
722 bpage = UT_LIST_GET_LAST(buf_pool->LRU);
723 continue;
724 }
725@@ -2098,7 +2098,7 @@
726
727 distance++;
728
729-@@ -2079,7 +2113,7 @@
730+@@ -2093,7 +2127,7 @@
731
732 //buf_pool_mutex_exit(buf_pool);
733 if (have_LRU_mutex)
734@@ -2107,7 +2107,7 @@
735
736 if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool)) {
737
738-@@ -2278,7 +2312,7 @@
739+@@ -2292,7 +2326,7 @@
740
741 ut_ad(buf_flush_list_mutex_own(buf_pool));
742
743@@ -2116,7 +2116,7 @@
744 ut_ad(ut_list_node_313->in_flush_list));
745
746 bpage = UT_LIST_GET_FIRST(buf_pool->flush_list);
747-@@ -2318,7 +2352,7 @@
748+@@ -2332,7 +2366,7 @@
749 rnode = rbt_next(buf_pool->flush_rbt, rnode);
750 }
751
752@@ -3695,7 +3695,7 @@
753 Otherwise, this is 0. */
754 --- a/storage/innobase/srv/srv0srv.c
755 +++ b/storage/innobase/srv/srv0srv.c
756-@@ -3102,7 +3102,7 @@
757+@@ -3105,7 +3105,7 @@
758 level += log_sys->max_checkpoint_age
759 - (lsn - oldest_modification);
760 }
761@@ -3704,7 +3704,7 @@
762 n_blocks++;
763 }
764
765-@@ -3188,7 +3188,7 @@
766+@@ -3191,7 +3191,7 @@
767 found = TRUE;
768 break;
769 }

Subscribers

People subscribed via source and target branches