Skip to content

Commit

Permalink
Merge 10.0 into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Sep 6, 2017
2 parents 1758998 + 6b45355 commit cd694d7
Show file tree
Hide file tree
Showing 33 changed files with 164 additions and 262 deletions.
10 changes: 5 additions & 5 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5077,6 +5077,11 @@ ($$)
}
}

# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
# Use it to restart the server at testing a failing server start (e.g
# due to incompatible options).
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";

if ( $opt_gdb || $opt_manual_gdb )
{
gdb_arguments(\$args, \$exe, $mysqld->name());
Expand Down Expand Up @@ -5173,11 +5178,6 @@ ($$)
# Remember options used when starting
$mysqld->{'started_opts'}= $extra_opts;

# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
# Use it to restart the server at testing a failing server start (e.g
# due to incompatible options).
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";

return;
}

Expand Down
5 changes: 4 additions & 1 deletion pcre/pcre_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ else

if ((c = *ptr) >= CHAR_8) break;

/* fall through */
/* Fall through with a digit less than 8 */

/* \0 always starts an octal number, but we may drop through to here with a
Expand Down Expand Up @@ -5097,6 +5098,8 @@ for (;; ptr++)
either not match or match, depending on whether the class is or is
not negated. */

/* fall through */

default:
if (local_negate &&
(xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
Expand Down Expand Up @@ -7165,7 +7168,7 @@ for (;; ptr++)
goto FAILED;
}
/* Fall through to handle (?P< as (?< is handled */

/* fall through */

/* ------------------------------------------------------------ */
DEFINE_NAME: /* Come here from (?< handling */
Expand Down
2 changes: 2 additions & 0 deletions pcre/pcre_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,8 @@ for (;;)
group. At this point, the return is converted into MATCH_NOMATCH so that
previous backup points can be taken. */

/* fall through */

case OP_ONCE:
case OP_BRA:
case OP_SBRA:
Expand Down
8 changes: 0 additions & 8 deletions plugin/metadata_lock_info/metadata_lock_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ static const LEX_STRING metadata_lock_info_lock_mode[] = {
{ C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
};

static const LEX_STRING metadata_lock_info_duration[] = {
{ C_STRING_WITH_LEN("MDL_STATEMENT") },
{ C_STRING_WITH_LEN("MDL_TRANSACTION") },
{ C_STRING_WITH_LEN("MDL_EXPLICIT") },
};

static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] =
{
{"THREAD_ID", 20, MYSQL_TYPE_LONGLONG, 0,
Expand Down Expand Up @@ -128,8 +122,6 @@ static int i_s_metadata_lock_info_init(
== MDL_key::NAMESPACE_END);
compile_time_assert(sizeof(metadata_lock_info_lock_mode)/sizeof(LEX_STRING)
== MDL_TYPE_END);
compile_time_assert(sizeof(metadata_lock_info_duration)/sizeof(LEX_STRING)
== MDL_DURATION_END);

ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
DBUG_ENTER("i_s_metadata_lock_info_init");
Expand Down
2 changes: 1 addition & 1 deletion sql/ha_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7897,7 +7897,7 @@ uint32 ha_partition::calculate_key_hash_value(Field **field_array)
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_GEOMETRY:
/* fall through. */
/* fall through */
default:
DBUG_ASSERT(0); // New type?
/* Fall through for default hashing (5.5). */
Expand Down
86 changes: 29 additions & 57 deletions storage/innobase/btr/btr0btr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ btr_corruption_report(
index->name, index->table_name);
if (block->page.zip.data) {
buf_page_print(block->page.zip.data,
buf_block_get_zip_size(block),
BUF_PAGE_PRINT_NO_CRASH);
buf_block_get_zip_size(block));
}
buf_page_print(buf_block_get_frame(block), 0, 0);
buf_page_print(buf_block_get_frame(block), 0);
}

#ifndef UNIV_HOTBACKUP
Expand Down Expand Up @@ -1582,11 +1581,9 @@ btr_page_get_father_node_ptr_func(
if (btr_node_ptr_get_child_page_no(node_ptr, offsets) != page_no) {
rec_t* print_rec;
fputs("InnoDB: Dump of the child page:\n", stderr);
buf_page_print(page_align(user_rec), 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page_align(user_rec), 0);
fputs("InnoDB: Dump of the parent page:\n", stderr);
buf_page_print(page_align(node_ptr), 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page_align(node_ptr), 0);

fputs("InnoDB: Corruption of an index tree: table ", stderr);
ut_print_name(stderr, NULL, TRUE, index->table_name);
Expand Down Expand Up @@ -2046,8 +2043,8 @@ btr_page_reorganize_low(
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);

if (data_size1 != data_size2 || max_ins_size1 != max_ins_size2) {
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(temp_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);
buf_page_print(temp_page, 0);

fprintf(stderr,
"InnoDB: Error: page old data size %lu"
Expand Down Expand Up @@ -4575,7 +4572,7 @@ btr_index_rec_validate(
(ulong) rec_get_n_fields_old(rec), (ulong) n);

if (dump_on_error) {
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);

fputs("InnoDB: corrupt record ", stderr);
rec_print_old(stderr, rec);
Expand Down Expand Up @@ -4613,8 +4610,7 @@ btr_index_rec_validate(
(ulong) i, (ulong) len, (ulong) fixed_size);

if (dump_on_error) {
buf_page_print(page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);

fputs("InnoDB: corrupt record ", stderr);
rec_print_new(stderr, rec, offsets);
Expand Down Expand Up @@ -4891,17 +4887,17 @@ btr_validate_level(
btr_validate_report2(index, level, block, right_block);
fputs("InnoDB: broken FIL_PAGE_NEXT"
" or FIL_PAGE_PREV links\n", stderr);
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);
buf_page_print(right_page, 0);

ret = false;
}

if (page_is_comp(right_page) != page_is_comp(page)) {
btr_validate_report2(index, level, block, right_block);
fputs("InnoDB: 'compact' flag mismatch\n", stderr);
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);
buf_page_print(right_page, 0);

ret = false;

Expand All @@ -4923,8 +4919,8 @@ btr_validate_level(
fputs("InnoDB: records in wrong order"
" on adjacent pages\n", stderr);

buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);
buf_page_print(right_page, 0);

fputs("InnoDB: record ", stderr);
rec = page_rec_get_prev(page_get_supremum_rec(page));
Expand Down Expand Up @@ -4972,8 +4968,8 @@ btr_validate_level(
fputs("InnoDB: node pointer to the page is wrong\n",
stderr);

buf_page_print(father_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(father_page, 0);
buf_page_print(page, 0);

fputs("InnoDB: node ptr ", stderr);
rec_print(stderr, node_ptr, index);
Expand Down Expand Up @@ -5005,10 +5001,8 @@ btr_validate_level(

btr_validate_report1(index, level, block);

buf_page_print(father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(father_page, 0);
buf_page_print(page, 0);

fputs("InnoDB: Error: node ptrs differ"
" on levels > 0\n"
Expand Down Expand Up @@ -5053,15 +5047,9 @@ btr_validate_level(
btr_validate_report1(index, level,
block);

buf_page_print(
father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(father_page, 0);
buf_page_print(page, 0);
buf_page_print(right_page, 0);
}
} else {
page_t* right_father_page
Expand All @@ -5079,18 +5067,10 @@ btr_validate_level(
btr_validate_report1(index, level,
block);

buf_page_print(
father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(father_page, 0);
buf_page_print(right_father_page, 0);
buf_page_print(page, 0);
buf_page_print(right_page, 0);
}

if (page_get_page_no(right_father_page)
Expand All @@ -5104,18 +5084,10 @@ btr_validate_level(
btr_validate_report1(index, level,
block);

buf_page_print(
father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(father_page, 0);
buf_page_print(right_father_page, 0);
buf_page_print(page, 0);
buf_page_print(right_page, 0);
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions storage/innobase/btr/btr0sea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1982,9 +1982,7 @@ btr_search_validate(void)
(ulong) block->curr_left_side);

if (n_page_dumps < 20) {
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0);
n_page_dumps++;
}
}
Expand Down
35 changes: 12 additions & 23 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1034,19 +1034,12 @@ buf_page_is_corrupted(
}

#ifndef UNIV_INNOCHECKSUM
/********************************************************************//**
Prints a page to stderr. */
/** Dump a page to stderr.
@param[in] read_buf database page
@param[in] zip_size compressed page size, or 0 for uncompressed */
UNIV_INTERN
void
buf_page_print(
/*===========*/
const byte* read_buf, /*!< in: a database page */
ulint zip_size, /*!< in: compressed page size, or
0 for uncompressed pages */
ulint flags) /*!< in: 0 or
BUF_PAGE_PRINT_NO_CRASH or
BUF_PAGE_PRINT_NO_FULL */

buf_page_print(const byte* read_buf, ulint zip_size)
{
#ifndef UNIV_HOTBACKUP
dict_index_t* index;
Expand All @@ -1057,14 +1050,12 @@ buf_page_print(
size = UNIV_PAGE_SIZE;
}

if (!(flags & BUF_PAGE_PRINT_NO_FULL)) {
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Page dump in ascii and hex (" ULINTPF " bytes):\n",
size);
ut_print_buf(stderr, read_buf, size);
fputs("\nInnoDB: End of page dump\n", stderr);
}
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Page dump in ascii and hex (" ULINTPF " bytes):\n",
size);
ut_print_buf(stderr, read_buf, size);
fputs("\nInnoDB: End of page dump\n", stderr);

if (zip_size) {
/* Print compressed page. */
Expand Down Expand Up @@ -1219,8 +1210,6 @@ buf_page_print(
stderr);
break;
}

ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH);
}

#ifndef UNIV_HOTBACKUP
Expand Down Expand Up @@ -4883,8 +4872,8 @@ buf_page_io_complete(buf_page_t* bpage, bool evict)
space->name,
bpage->space, bpage->offset);

buf_page_print(frame, buf_page_get_zip_size(bpage),
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(frame,
buf_page_get_zip_size(bpage));

ib_logf(IB_LOG_LEVEL_INFO,
"It is also possible that your"
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/buf/buf0dblwr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ buf_dblwr_assert_on_corrupt_block(
/*==============================*/
const buf_block_t* block) /*!< in: block to check */
{
buf_page_print(block->frame, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(block->frame, 0);

ut_print_timestamp(stderr);
fprintf(stderr,
Expand Down
7 changes: 4 additions & 3 deletions storage/innobase/fil/fil0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,12 @@ fil_space_encrypt(
fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n",
ok , corrupted, corrupted1, err, different);
fprintf(stderr, "src_frame\n");
buf_page_print(src_frame, zip_size, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(src_frame, zip_size);
fprintf(stderr, "encrypted_frame\n");
buf_page_print(tmp, zip_size, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(tmp, zip_size);
fprintf(stderr, "decrypted_frame\n");
buf_page_print(tmp_mem, zip_size, 0);
buf_page_print(tmp_mem, zip_size);
ut_ad(0);
}

free(tmp_mem);
Expand Down
3 changes: 2 additions & 1 deletion storage/innobase/fil/fil0pagecompress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ fil_compress_page(
fil_decompress_page(uncomp_page, comp_page, ulong(len), NULL);

if (buf_page_is_corrupted(false, uncomp_page, 0, space)) {
buf_page_print(uncomp_page, 0, 0);
buf_page_print(uncomp_page, 0);
ut_ad(0);
}

ut_free(comp_page);
Expand Down
Loading

0 comments on commit cd694d7

Please sign in to comment.