Merge InnoDB 5.7 from mysql-5.7.9.

Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
This commit is contained in:
Jan Lindström 2016-08-12 11:17:45 +03:00
commit 2e814d4702
835 changed files with 173885 additions and 83591 deletions

View file

@ -197,14 +197,14 @@ log_blocks_crypt(
block can't be encrypted. */
if (info == NULL ||
info->key_version == UNENCRYPTED_KEY_VER ||
(log_block_checksum_is_ok_or_old_format(log_block, false) &&
(log_block_checksum_is_ok(log_block, false) &&
what == ENCRYPTION_FLAG_DECRYPT)) {
memcpy(dst_block, log_block, OS_FILE_LOG_BLOCK_SIZE);
goto next;
}
ut_ad(what == ENCRYPTION_FLAG_DECRYPT ? !log_block_checksum_is_ok_or_old_format(log_block, false) :
log_block_checksum_is_ok_or_old_format(log_block, false));
ut_ad(what == ENCRYPTION_FLAG_DECRYPT ? !log_block_checksum_is_ok(log_block, false) :
log_block_checksum_is_ok(log_block, false));
// Assume log block header is not encrypted
memcpy(dst_block, log_block, LOG_BLOCK_HDR_SIZE);
@ -260,11 +260,13 @@ init_crypt_key(
rc = encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY, info->key_version, mysqld_key, &keylen);
if (rc) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Redo log crypto: getting mysqld crypto key "
"from key version failed err = %u. Reason could be that requested"
" key_version %u is not found or required encryption "
" key management is not found.", rc, info->key_version);
ib::error()
<< "Redo log crypto: getting mysqld crypto key "
<< "from key version failed err = " << rc
<< " Reason could be that requested key_version "
<< info->key_version
<< "is not found or required encryption "
<< " key management is not found.";
return false;
}
@ -372,18 +374,18 @@ log_crypt_set_ver_and_key(
memset(info.crypt_nonce, 0, sizeof(info.crypt_nonce));
} else {
if (my_random_bytes(info.crypt_msg, MY_AES_BLOCK_SIZE) != MY_AES_OK) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Redo log crypto: generate "
"%u-byte random number as crypto msg failed.",
MY_AES_BLOCK_SIZE);
ib::error()
<< "Redo log crypto: generate "
<< MY_AES_BLOCK_SIZE
<< "-byte random number as crypto msg failed.";
ut_error;
}
if (my_random_bytes(info.crypt_nonce, MY_AES_BLOCK_SIZE) != MY_AES_OK) {
ib_logf(IB_LOG_LEVEL_ERROR,
"Redo log crypto: generate "
"%u-byte random number as AES_CTR nonce failed.",
MY_AES_BLOCK_SIZE);
ib::error()
<< "Redo log crypto: generate "
<< MY_AES_BLOCK_SIZE
<< "-byte random number as AES_CTR nonce failed.";
ut_error;
}
@ -619,19 +621,19 @@ log_crypt_print_error(
{
switch(err_info) {
case LOG_CRYPT_KEY_NOT_FOUND:
ib_logf(IB_LOG_LEVEL_ERROR,
"Redo log crypto: getting mysqld crypto key "
"from key version failed. Reason could be that "
"requested key version is not found or required "
"encryption key management plugin is not found.");
ib::error()
<< "Redo log crypto: getting mysqld crypto key "
<< "from key version failed. Reason could be that "
<< "requested key version is not found or required "
<< "encryption key management plugin is not found.";
break;
case LOG_DECRYPT_MAYBE_FAILED:
ib_logf(IB_LOG_LEVEL_ERROR,
"Redo log crypto: failed to decrypt log block. "
"Reason could be that requested key version is "
"not found, required encryption key management "
"plugin is not found or configured encryption "
"algorithm and/or method does not match.");
ib::error()
<< "Redo log crypto: failed to decrypt log block. "
<< "Reason could be that requested key version is "
<< "not found, required encryption key management "
<< "plugin is not found or configured encryption "
<< "algorithm and/or method does not match.";
break;
default:
ut_error; /* Real bug */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff