Skip to content

Commit 5b8ac23

Browse files
committed
5.6.29-76.2
1 parent d76eba6 commit 5b8ac23

21 files changed

+601
-162
lines changed

storage/xtradb/buf/buf0dump.cc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2011, 2012, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -167,6 +167,25 @@ buf_load_status(
167167
va_end(ap);
168168
}
169169

170+
/** Returns the directory path where the buffer pool dump file will be created.
171+
@return directory path */
172+
static
173+
const char*
174+
get_buf_dump_dir()
175+
{
176+
const char* dump_dir;
177+
178+
/* The dump file should be created in the default data directory if
179+
innodb_data_home_dir is set as an empty string. */
180+
if (strcmp(srv_data_home, "") == 0) {
181+
dump_dir = fil_path_to_mysql_datadir;
182+
} else {
183+
dump_dir = srv_data_home;
184+
}
185+
186+
return(dump_dir);
187+
}
188+
170189
/*****************************************************************//**
171190
Perform a buffer pool dump into the file specified by
172191
innodb_buffer_pool_filename. If any errors occur then the value of
@@ -190,7 +209,7 @@ buf_dump(
190209
int ret;
191210

192211
ut_snprintf(full_filename, sizeof(full_filename),
193-
"%s%c%s", srv_data_home, SRV_PATH_SEPARATOR,
212+
"%s%c%s", get_buf_dump_dir(), SRV_PATH_SEPARATOR,
194213
srv_buf_dump_filename);
195214

196215
ut_snprintf(tmp_filename, sizeof(tmp_filename),
@@ -387,7 +406,7 @@ buf_load()
387406
buf_load_abort_flag = FALSE;
388407

389408
ut_snprintf(full_filename, sizeof(full_filename),
390-
"%s%c%s", srv_data_home, SRV_PATH_SEPARATOR,
409+
"%s%c%s", get_buf_dump_dir(), SRV_PATH_SEPARATOR,
391410
srv_buf_dump_filename);
392411

393412
buf_load_status(STATUS_NOTICE,

storage/xtradb/buf/buf0flu.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ UNIV_INTERN mysql_pfs_key_t buf_page_cleaner_thread_key;
6767
UNIV_INTERN mysql_pfs_key_t buf_lru_manager_thread_key;
6868
#endif /* UNIV_PFS_THREAD */
6969

70-
/** If LRU list of a buf_pool is less than this size then LRU eviction
71-
should not happen. This is because when we do LRU flushing we also put
72-
the blocks on free list. If LRU list is very small then we can end up
73-
in thrashing. */
74-
#define BUF_LRU_MIN_LEN 256
75-
7670
/* @} */
7771

7872
/** Handled page counters for a single flush */

storage/xtradb/dict/dict0dict.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ dict_init(void)
10661066
&dict_operation_lock, SYNC_DICT_OPERATION);
10671067

10681068
if (!srv_read_only_mode) {
1069-
dict_foreign_err_file = os_file_create_tmpfile();
1069+
dict_foreign_err_file = os_file_create_tmpfile(NULL);
10701070
ut_a(dict_foreign_err_file);
10711071

10721072
mutex_create(dict_foreign_err_mutex_key,

storage/xtradb/dict/dict0stats.cc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2009, 2014, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2009, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -1434,16 +1434,14 @@ on the leaf page.
14341434
when comparing records
14351435
@param[out] n_diff number of distinct records
14361436
@param[out] n_external_pages number of external pages
1437-
@param[in,out] mtr mini-transaction
14381437
@return number of distinct records on the leaf page */
14391438
static
14401439
void
14411440
dict_stats_analyze_index_below_cur(
14421441
const btr_cur_t* cur,
14431442
ulint n_prefix,
14441443
ib_uint64_t* n_diff,
1445-
ib_uint64_t* n_external_pages,
1446-
mtr_t* mtr)
1444+
ib_uint64_t* n_external_pages)
14471445
{
14481446
dict_index_t* index;
14491447
ulint space;
@@ -1457,6 +1455,7 @@ dict_stats_analyze_index_below_cur(
14571455
ulint* offsets2;
14581456
ulint* offsets_rec;
14591457
ulint size;
1458+
mtr_t mtr;
14601459

14611460
index = btr_cur_get_index(cur);
14621461

@@ -1495,12 +1494,14 @@ dict_stats_analyze_index_below_cur(
14951494
function without analyzing any leaf pages */
14961495
*n_external_pages = 0;
14971496

1497+
mtr_start(&mtr);
1498+
14981499
/* descend to the leaf level on the B-tree */
14991500
for (;;) {
15001501

15011502
block = buf_page_get_gen(space, zip_size, page_no, RW_S_LATCH,
15021503
NULL /* no guessed block */,
1503-
BUF_GET, __FILE__, __LINE__, mtr);
1504+
BUF_GET, __FILE__, __LINE__, &mtr);
15041505

15051506
page = buf_block_get_frame(block);
15061507

@@ -1522,6 +1523,8 @@ dict_stats_analyze_index_below_cur(
15221523
ut_a(*n_diff > 0);
15231524

15241525
if (*n_diff == 1) {
1526+
mtr_commit(&mtr);
1527+
15251528
/* page has all keys equal and the end of the page
15261529
was reached by dict_stats_scan_page(), no need to
15271530
descend to the leaf level */
@@ -1546,7 +1549,7 @@ dict_stats_analyze_index_below_cur(
15461549
}
15471550

15481551
/* make sure we got a leaf page as a result from the above loop */
1549-
ut_ad(btr_page_get_level(page, mtr) == 0);
1552+
ut_ad(btr_page_get_level(page, &mtr) == 0);
15501553

15511554
/* scan the leaf page and find the number of distinct keys,
15521555
when looking only at the first n_prefix columns; also estimate
@@ -1563,6 +1566,7 @@ dict_stats_analyze_index_below_cur(
15631566
__func__, page_no, n_diff);
15641567
#endif
15651568

1569+
mtr_commit(&mtr);
15661570
mem_heap_free(heap);
15671571
}
15681572

@@ -1772,8 +1776,7 @@ dict_stats_analyze_index_for_n_prefix(
17721776
dict_stats_analyze_index_below_cur(btr_pcur_get_btr_cur(&pcur),
17731777
n_prefix,
17741778
&n_diff_on_leaf_page,
1775-
&n_external_pages,
1776-
mtr);
1779+
&n_external_pages);
17771780

17781781
/* We adjust n_diff_on_leaf_page here to avoid counting
17791782
one record twice - once as the last on some page and once

storage/xtradb/fts/fts0opt.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ fts_zip_read_word(
580580
#ifdef UNIV_DEBUG
581581
ulint i;
582582
#endif
583-
byte len = 0;
583+
short len = 0;
584584
void* null = NULL;
585585
byte* ptr = word->f_str;
586586
int flush = Z_NO_FLUSH;
@@ -590,7 +590,7 @@ fts_zip_read_word(
590590
return(NULL);
591591
}
592592

593-
zip->zp->next_out = &len;
593+
zip->zp->next_out = reinterpret_cast<byte*>(&len);
594594
zip->zp->avail_out = sizeof(len);
595595

596596
while (zip->status == Z_OK && zip->zp->avail_out > 0) {
@@ -688,11 +688,12 @@ fts_fetch_index_words(
688688
fts_zip_t* zip = static_cast<fts_zip_t*>(user_arg);
689689
que_node_t* exp = sel_node->select_list;
690690
dfield_t* dfield = que_node_get_val(exp);
691-
byte len = (byte) dfield_get_len(dfield);
691+
short len = static_cast<short>(dfield_get_len(dfield));
692692
void* data = dfield_get_data(dfield);
693693

694694
/* Skip the duplicate words. */
695-
if (zip->word.f_len == len && !memcmp(zip->word.f_str, data, len)) {
695+
if (zip->word.f_len == static_cast<ulint>(len)
696+
&& !memcmp(zip->word.f_str, data, len)) {
696697

697698
return(TRUE);
698699
}
@@ -706,7 +707,7 @@ fts_fetch_index_words(
706707
ut_a(zip->zp->next_in == NULL);
707708

708709
/* The string is prefixed by len. */
709-
zip->zp->next_in = &len;
710+
zip->zp->next_in = reinterpret_cast<byte*>(&len);
710711
zip->zp->avail_in = sizeof(len);
711712

712713
/* Compress the word, create output blocks as necessary. */

0 commit comments

Comments
 (0)