summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/disabled.def1
-rw-r--r--mysql-test/include/default_client.cnf6
-rw-r--r--mysql-test/include/default_mysqld.cnf4
-rw-r--r--mysql-test/include/require_openssl_client.inc5
-rw-r--r--mysql-test/include/write_var_to_file.inc3
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm56
-rwxr-xr-xmysql-test/lib/generate-ssl-certs.sh21
-rwxr-xr-xmysql-test/mysql-test-run.pl17
-rw-r--r--mysql-test/r/events_2.result4
-rw-r--r--mysql-test/r/explain_json.result4
-rw-r--r--mysql-test/r/gis.result14
-rw-r--r--mysql-test/r/handlersocket.result2
-rw-r--r--mysql-test/r/innodb_icp.result2
-rw-r--r--mysql-test/r/join_cache.result9
-rw-r--r--mysql-test/r/join_outer.result2
-rw-r--r--mysql-test/r/join_outer_jcl6.result2
-rw-r--r--mysql-test/r/limit_rows_examined.result24
-rw-r--r--mysql-test/r/loaddata.result2
-rw-r--r--mysql-test/r/loadxml.result4
-rw-r--r--mysql-test/r/log_tables-big.result14
-rw-r--r--mysql-test/r/myisam_icp.result4
-rw-r--r--mysql-test/r/mysql_plugin.result132
-rw-r--r--mysql-test/r/mysqldump.result63
-rw-r--r--mysql-test/r/mysqltest.result4
-rw-r--r--mysql-test/r/openssl_1.result2
-rw-r--r--mysql-test/r/openssl_6975,tlsv10.result10
-rw-r--r--mysql-test/r/openssl_6975,tlsv12.result6
-rw-r--r--mysql-test/r/plugin.result6
-rw-r--r--mysql-test/r/query_cache_innodb.result90
-rw-r--r--mysql-test/r/ssl.result4
-rw-r--r--mysql-test/r/stat_tables_par.result2
-rw-r--r--mysql-test/r/stat_tables_par_innodb.result2
-rw-r--r--mysql-test/r/subselect3.result8
-rw-r--r--mysql-test/r/subselect3_jcl6.result8
-rw-r--r--mysql-test/r/subselect4.result8
-rw-r--r--mysql-test/r/subselect_exists2in.result50
-rw-r--r--mysql-test/r/subselect_innodb.result16
-rw-r--r--mysql-test/r/subselect_mat.result111
-rw-r--r--mysql-test/r/subselect_mat_cost_bugs.result42
-rw-r--r--mysql-test/r/subselect_sj.result2
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result2
-rw-r--r--mysql-test/r/subselect_sj_mat.result111
-rw-r--r--mysql-test/r/symlink.result11
-rw-r--r--mysql-test/std_data/cacert.pem115
-rw-r--r--mysql-test/std_data/cakey.pem28
-rw-r--r--mysql-test/std_data/client-cert.pem90
-rw-r--r--mysql-test/std_data/client-key.pem26
-rw-r--r--mysql-test/std_data/keys.txt2
-rw-r--r--mysql-test/std_data/keys2.txt3
-rw-r--r--mysql-test/std_data/keys3.txt2
-rw-r--r--mysql-test/std_data/server-cert.pem90
-rw-r--r--mysql-test/std_data/server-key.pem26
-rw-r--r--mysql-test/std_data/server8k-cert.pem248
-rw-r--r--mysql-test/std_data/server8k-key.pem194
-rw-r--r--mysql-test/std_data/serversan-cert.pem60
-rw-r--r--mysql-test/std_data/serversan-key.pem16
-rw-r--r--mysql-test/suite.pm4
-rw-r--r--mysql-test/suite/encryption/r/create_or_replace.result1
-rw-r--r--mysql-test/suite/encryption/r/encrypt_and_grep.result37
-rw-r--r--mysql-test/suite/encryption/r/filekeys_syntax.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result57
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result61
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result18
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change5.result20
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-shutdown.result16
-rw-r--r--mysql-test/suite/encryption/r/innodb-compressed-blob.result20
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result23
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_compression.result115
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result139
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-badkey.result36
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-nokeys.result37
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption-page-compression.result120
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_discard_import.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb_scrub.result2
-rw-r--r--mysql-test/suite/encryption/t/create_or_replace.test3
-rw-r--r--mysql-test/suite/encryption/t/encrypt_and_grep.opt2
-rw-r--r--mysql-test/suite/encryption/t/encrypt_and_grep.test42
-rw-r--r--mysql-test/suite/encryption/t/innochecksum.test3
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test60
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.test93
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.opt (renamed from mysql-test/suite/encryption/t/innodb-bad-key-change5.opt)0
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.test38
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change5.test42
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-shutdown.test52
-rw-r--r--mysql-test/suite/encryption/t/innodb-compressed-blob.opt4
-rw-r--r--mysql-test/suite/encryption/t/innodb-compressed-blob.test38
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test27
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test84
-rw-r--r--mysql-test/suite/encryption/t/innodb-missing-key.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption_compression.test71
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test78
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.opt5
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.test91
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.opt3
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.test80
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption-page-compression.test59
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_discard_import.test7
-rw-r--r--mysql-test/suite/encryption/t/innodb_onlinealter_encryption.opt3
-rw-r--r--mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test10
-rw-r--r--mysql-test/suite/galera/disabled.def13
-rw-r--r--mysql-test/suite/galera/r/MW-329.result8
-rw-r--r--mysql-test/suite/galera/r/galera_restart_on_unknown_option.result8
-rw-r--r--mysql-test/suite/galera/r/galera_var_retry_autocommit.result12
-rw-r--r--mysql-test/suite/galera/t/MW-329.test4
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test4
-rw-r--r--mysql-test/suite/galera/t/galera_pc_ignore_sb.test1
-rw-r--r--mysql-test/suite/galera/t/galera_restart_on_unknown_option.test6
-rw-r--r--mysql-test/suite/innodb/disabled.def11
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result19
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-timestamp.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb-blob.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns2.result64
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14147491.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb_xtradb_compat.result313
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result1
-rw-r--r--mysql-test/suite/innodb/r/truncate_debug.result2
-rw-r--r--mysql-test/suite/innodb/r/truncate_purge_debug.result2
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-timestamp.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb-blob.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns2.test54
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test58
-rw-r--r--mysql-test/suite/innodb/t/innodb_xtradb_compat-master.opt38
-rw-r--r--mysql-test/suite/innodb/t/innodb_xtradb_compat.test160
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test2
-rw-r--r--mysql-test/suite/innodb/t/truncate_debug.test2
-rw-r--r--mysql-test/suite/innodb/t/truncate_purge_debug.test2
-rw-r--r--mysql-test/suite/innodb_zip/r/recover.result17
-rw-r--r--mysql-test/suite/innodb_zip/t/recover.test24
-rw-r--r--mysql-test/suite/maria/icp.result4
-rw-r--r--mysql-test/suite/mariabackup/bug1509812-master.opt1
-rw-r--r--mysql-test/suite/mariabackup/filekeys-data.encbin0 -> 416 bytes
-rw-r--r--mysql-test/suite/mariabackup/filekeys-data.key2
-rw-r--r--mysql-test/suite/mariabackup/full_backup.result13
-rw-r--r--mysql-test/suite/mariabackup/full_backup.test23
-rw-r--r--mysql-test/suite/mariabackup/include/have_file_key_management.inc4
-rw-r--r--mysql-test/suite/mariabackup/include/restart_and_restore.inc15
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup.result20
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup.test35
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.opt3
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.result20
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.test45
-rw-r--r--mysql-test/suite/mariabackup/partial.result13
-rw-r--r--mysql-test/suite/mariabackup/partial.test31
-rw-r--r--mysql-test/suite/mariabackup/partial_exclude.result12
-rw-r--r--mysql-test/suite/mariabackup/partial_exclude.test30
-rw-r--r--mysql-test/suite/mariabackup/small_ibd.result1
-rw-r--r--mysql-test/suite/mariabackup/small_ibd.test18
-rw-r--r--mysql-test/suite/mariabackup/suite.opt1
-rw-r--r--mysql-test/suite/mariabackup/suite.pm38
-rw-r--r--mysql-test/suite/mariabackup/tar.result12
-rw-r--r--mysql-test/suite/mariabackup/tar.test30
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.opt3
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.result11
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.test22
-rw-r--r--mysql-test/suite/mariabackup/xb_compressed_encrypted.opt9
-rw-r--r--mysql-test/suite/mariabackup/xb_compressed_encrypted.result25
-rw-r--r--mysql-test/suite/mariabackup/xb_compressed_encrypted.test35
-rw-r--r--mysql-test/suite/mariabackup/xb_file_key_management.opt6
-rw-r--r--mysql-test/suite/mariabackup/xb_file_key_management.result17
-rw-r--r--mysql-test/suite/mariabackup/xb_file_key_management.test40
-rw-r--r--mysql-test/suite/mariabackup/xb_fulltext_encrypted.opt8
-rw-r--r--mysql-test/suite/mariabackup/xb_fulltext_encrypted.result14
-rw-r--r--mysql-test/suite/mariabackup/xb_fulltext_encrypted.test23
-rw-r--r--mysql-test/suite/mariabackup/xb_history.result5
-rw-r--r--mysql-test/suite/mariabackup/xb_history.test8
-rw-r--r--mysql-test/suite/mariabackup/xb_page_compress.result28
-rw-r--r--mysql-test/suite/mariabackup/xb_page_compress.test44
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.result64
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.test87
-rw-r--r--mysql-test/suite/mariabackup/xbstream.result13
-rw-r--r--mysql-test/suite/mariabackup/xbstream.test22
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result2
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result2
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result4
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff291
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result504
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result2
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_wsrep.test2
-rw-r--r--mysql-test/t/events_2.test2
-rw-r--r--mysql-test/t/gis.test15
-rw-r--r--mysql-test/t/join_cache.test12
-rw-r--r--mysql-test/t/limit_rows_examined.test1
-rw-r--r--mysql-test/t/loaddata.test2
-rw-r--r--mysql-test/t/loadxml.test4
-rw-r--r--mysql-test/t/log_tables-big.test16
-rw-r--r--mysql-test/t/mysql_plugin.test368
-rw-r--r--mysql-test/t/mysqldump.test52
-rw-r--r--mysql-test/t/mysqltest.test28
-rw-r--r--mysql-test/t/openssl_1.test2
-rw-r--r--mysql-test/t/openssl_6975.test16
-rw-r--r--mysql-test/t/query_cache_innodb.test85
-rw-r--r--mysql-test/t/ssl_7937.combinations5
-rw-r--r--mysql-test/t/ssl_7937.test2
-rw-r--r--mysql-test/t/ssl_8k_key.test4
-rw-r--r--mysql-test/t/stat_tables_par.test2
-rw-r--r--mysql-test/t/subselect_exists2in.test28
-rw-r--r--mysql-test/t/subselect_innodb.test21
-rw-r--r--mysql-test/t/subselect_mat_cost_bugs.test39
-rw-r--r--mysql-test/t/subselect_sj_mat.test93
-rw-r--r--mysql-test/t/symlink.test16
-rw-r--r--mysql-test/unstable-tests588
-rw-r--r--mysql-test/valgrind.supp2
207 files changed, 4975 insertions, 2443 deletions
diff --git a/mysql-test/disabled.def b/mysql-test/disabled.def
index e82ddcf92d1..b489139a59f 100644
--- a/mysql-test/disabled.def
+++ b/mysql-test/disabled.def
@@ -12,7 +12,6 @@
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
events_time_zone : Test is not predictable as it depends on precise timing.
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
-log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
#show_explain : Psergey: random timeout in range-checked-for-each record query.
ssl_crl_clients_valid : broken upstream
diff --git a/mysql-test/include/default_client.cnf b/mysql-test/include/default_client.cnf
index bcd6a4849d2..e326b308f5f 100644
--- a/mysql-test/include/default_client.cnf
+++ b/mysql-test/include/default_client.cnf
@@ -20,3 +20,9 @@ default-character-set=latin1
[mysql_upgrade]
default-character-set=latin1
+
+[mysqltest]
+loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
+loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
+loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/client-key.pem
+loose-skip-ssl
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index b5b16461781..44a7fd12d27 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -108,6 +108,10 @@ binlog-direct-non-transactional-updates
default-storage-engine=myisam
+loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
+loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
+loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
+
# here, at the end of [mysqld] group mtr will automatically disable
# all optional plugins.
diff --git a/mysql-test/include/require_openssl_client.inc b/mysql-test/include/require_openssl_client.inc
new file mode 100644
index 00000000000..9b19960041b
--- /dev/null
+++ b/mysql-test/include/require_openssl_client.inc
@@ -0,0 +1,5 @@
+if ($CLIENT_TLS_LIBRARY != "OpenSSL") {
+ if ($CLIENT_TLS_LIBRARY != "LibreSSL") {
+ skip "Test requires Connector/C with OpenSSL library";
+ }
+}
diff --git a/mysql-test/include/write_var_to_file.inc b/mysql-test/include/write_var_to_file.inc
index 08de195ccbb..7982c6fab31 100644
--- a/mysql-test/include/write_var_to_file.inc
+++ b/mysql-test/include/write_var_to_file.inc
@@ -43,9 +43,8 @@ if ($write_to_file == 'GENERATE')
if (`SELECT LENGTH(@@secure_file_priv) > 0`)
{
- --let $_wvtf_secure_file_priv= `SELECT @@secure_file_priv`
--let $_wvtf_suffix= `SELECT UUID()`
- --let $_wvtf_tmp_file= $_wvtf_secure_file_priv/_wvtf_$_wvtf_suffix
+ --let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix
--eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file'
--copy_file $_wvtf_tmp_file $write_to_file
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 12c0095e80e..830b49d431f 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -182,55 +182,6 @@ sub fix_log_slow_queries {
return "$dir/mysqld-slow.log";
}
-sub fix_std_data {
- my ($self, $config, $group_name, $group)= @_;
- my $testdir= $self->get_testdir($group);
- return "$testdir/std_data";
-}
-
-sub ssl_supported {
- my ($self)= @_;
- return $self->{ARGS}->{ssl};
-}
-
-sub fix_skip_ssl {
- return if !ssl_supported(@_);
- # Add skip-ssl if ssl is supported to avoid
- # that mysqltest connects with SSL by default
- return 1;
-}
-
-sub fix_ssl_ca {
- return if !ssl_supported(@_);
- my $std_data= fix_std_data(@_);
- return "$std_data/cacert.pem"
-}
-
-sub fix_ssl_server_cert {
- return if !ssl_supported(@_);
- my $std_data= fix_std_data(@_);
- return "$std_data/server-cert.pem"
-}
-
-sub fix_ssl_client_cert {
- return if !ssl_supported(@_);
- my $std_data= fix_std_data(@_);
- return "$std_data/client-cert.pem"
-}
-
-sub fix_ssl_server_key {
- return if !ssl_supported(@_);
- my $std_data= fix_std_data(@_);
- return "$std_data/server-key.pem"
-}
-
-sub fix_ssl_client_key {
- return if !ssl_supported(@_);
- my $std_data= fix_std_data(@_);
- return "$std_data/client-key.pem"
-}
-
-
#
# Rules to run for each mysqld in the config
# - will be run in order listed here
@@ -255,9 +206,6 @@ my @mysqld_rules=
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, },
- { 'ssl-ca' => \&fix_ssl_ca },
- { 'ssl-cert' => \&fix_ssl_server_cert },
- { 'ssl-key' => \&fix_ssl_server_key },
{ 'bind-address' => \&fix_bind_address },
);
@@ -284,10 +232,6 @@ my @client_rules=
#
my @mysqltest_rules=
(
- { 'ssl-ca' => \&fix_ssl_ca },
- { 'ssl-cert' => \&fix_ssl_client_cert },
- { 'ssl-key' => \&fix_ssl_client_key },
- { 'skip-ssl' => \&fix_skip_ssl },
);
diff --git a/mysql-test/lib/generate-ssl-certs.sh b/mysql-test/lib/generate-ssl-certs.sh
index cc919dfe32e..8f15ba9d521 100755
--- a/mysql-test/lib/generate-ssl-certs.sh
+++ b/mysql-test/lib/generate-ssl-certs.sh
@@ -1,30 +1,39 @@
-#!/bin/sh -xe
+#!/bin/sh
+
+set -xe
# simply run me from mysql-test/
cd std_data/
# boilerplace for "openssl ca" and /etc/ssl/openssl.cnf
rm -rf demoCA
-mkdir demoCA demoCA/private demoCA/newcerts
+mkdir demoCA demoCA/newcerts
touch demoCA/index.txt
echo 01 > demoCA/serial
# CA certificate, self-signed
-openssl req -x509 -newkey rsa:2048 -keyout demoCA/private/cakey.pem -out cacert.pem -days 7300 -nodes -subj '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB' -text
+openssl req -x509 -newkey rsa:2048 -keyout cakey.pem -out cacert.pem -days 7300 -nodes -subj '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB' -text
# server certificate signing request and private key. Note the very long subject (for MDEV-7859)
openssl req -newkey rsa:1024 -keyout server-key.pem -out demoCA/server-req.pem -days 7300 -nodes -subj '/CN=localhost/C=FI/ST=state or province within country, in other certificates in this file it is the same as L/L=location, usually an address but often ambiguously used/OU=organizational unit name, a division name within an organization/O=organization name, typically a company name'
# convert the key to yassl compatible format
openssl rsa -in server-key.pem -out server-key.pem
# sign the server certificate with CA certificate
-openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -infiles demoCA/server-req.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -infiles demoCA/server-req.pem
openssl req -newkey rsa:8192 -keyout server8k-key.pem -out demoCA/server8k-req.pem -days 7300 -nodes -subj '/CN=server8k/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl rsa -in server8k-key.pem -out server8k-key.pem
-openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out server8k-cert.pem -infiles demoCA/server8k-req.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server8k-cert.pem -infiles demoCA/server8k-req.pem
openssl req -newkey rsa:1024 -keyout client-key.pem -out demoCA/client-req.pem -days 7300 -nodes -subj '/CN=client/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl rsa -in client-key.pem -out client-key.pem
-openssl ca -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -infiles demoCA/client-req.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -infiles demoCA/client-req.pem
+
+# with SubjectAltName, only for OpenSSL 1.0.2+
+cat > demoCA/sanext.conf <<EOF
+subjectAltName=DNS:localhost
+EOF
+openssl req -newkey rsa:1024 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
+openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -infiles demoCA/serversan-req.pem
rm -rf demoCA
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 0b61bfc9b78..1d41067bb1e 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -185,6 +185,7 @@ my @DEFAULT_SUITES= qw(
innodb_zip-
json-
maria-
+ mariabackup-
multi_source-
optimizer_unfixed_bugs-
parts-
@@ -2280,6 +2281,11 @@ sub environment_setup {
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
+ my $client_config_exe=
+ native_path("$bindir/libmariadb/mariadb_config$opt_vs_config/mariadb_config");
+ my $tls_info= `$client_config_exe --tlsinfo`;
+ ($ENV{CLIENT_TLS_LIBRARY},$ENV{CLIENT_TLS_LIBRARY_VERSION})=
+ split(/ /, $tls_info, 2);
my $exe_mysqld= find_mysqld($basedir);
$ENV{'MYSQLD'}= $exe_mysqld;
my $extra_opts= join (" ", @opt_extra_mysqld_opt);
@@ -2793,13 +2799,10 @@ sub mysql_server_start($) {
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
{
# Copy datadir from installed system db
- for my $path ( "$opt_vardir", "$opt_vardir/..") {
- my $install_db= "$path/install.db";
- copytree($install_db, $datadir)
- if -d $install_db;
- }
- mtr_error("Failed to copy system db to '$datadir'")
- unless -d $datadir;
+ my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
+ my $install_db= "$path/install.db";
+ copytree($install_db, $datadir) if -d $install_db;
+ mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir;
}
}
else
diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result
index ab5d47b5118..6d2ebda03d0 100644
--- a/mysql-test/r/events_2.result
+++ b/mysql-test/r/events_2.result
@@ -2,10 +2,10 @@ set sql_mode="";
drop database if exists events_test;
create database events_test;
use events_test;
-create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
+create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
-events_test e_26 set @a = 5 root@localhost 2027-01-01 00:00:00 DROP
+events_test e_26 set @a = 5 root@localhost 2037-01-01 00:00:00 DROP
drop event e_26;
create event e_26 on schedule at NULL disable do set @a = 5;
ERROR HY000: Incorrect AT value: 'NULL'
diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result
index ab9fd528ad2..a64d4af5890 100644
--- a/mysql-test/r/explain_json.result
+++ b/mysql-test/r/explain_json.result
@@ -827,7 +827,7 @@ EXPLAIN
"buffer_type": "flat",
"buffer_size": "256Kb",
"join_type": "BNL",
- "attached_condition": "t2.b <> outer_t1.a and trigcond(<cache>(outer_t1.a) = t1.a or t1.a is null)"
+ "attached_condition": "t2.b <> outer_t1.a"
}
}
}
@@ -1575,7 +1575,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 10,
"filtered": 100,
- "attached_condition": "t0.a < 5 and t1.b < t0.a"
+ "attached_condition": "t1.b < t0.a"
}
}
}
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 5e6716b94de..3530eb14499 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1698,7 +1698,19 @@ SELECT ASTEXT(p) FROM v1;
ASTEXT(p)
POINT(1 1)
DROP VIEW v1;
-End of 5.5 tests
+#
+# Start of 10.0 tests
+#
+#
+# MDEV-12495 Conditional jump depends on uninitialised value for: SELECT NULL UNION geom_expression
+#
+SELECT AsText(g) FROM (SELECT NULL AS g UNION SELECT Point(1,1)) AS t1;
+AsText(g)
+NULL
+POINT(1 1)
+#
+# End 10.0 tests
+#
SHOW CREATE TABLE information_schema.geometry_columns;
Table Create Table
GEOMETRY_COLUMNS CREATE TEMPORARY TABLE `GEOMETRY_COLUMNS` (
diff --git a/mysql-test/r/handlersocket.result b/mysql-test/r/handlersocket.result
index 26c77813b26..1b3fc573548 100644
--- a/mysql-test/r/handlersocket.result
+++ b/mysql-test/r/handlersocket.result
@@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
-plugin_library_version 1.12
+plugin_library_version 1.13
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index 207317c1add..8a58a769ed9 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -432,7 +432,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using where
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index 5cb76a93d9a..eb845c63a76 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -5949,4 +5949,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where
1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join)
set join_cache_level=default;
+create table t1 (c1 date not null, key (c1)) engine=innodb;
+insert t1 values ('2017-12-27');
+create table t2 (pk int, f1 int, f2 int);
+insert t2 values (4,1,1), (6,1,1);
+set join_buffer_size = 222222208;
+select f2 from t2,t1 where f2 = 0;
+f2
+drop table t1, t2;
+set join_buffer_size = default;
set @@optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index f1c37e568a2..d7b4e107a8d 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1743,7 +1743,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using where; Using index
+2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.t2.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`pk` AS `pk`,<expr_cache><`test`.`t2`.`pk`>((/* select#2 */ select `test`.`t3`.`pk` + if(`test`.`t4`.`pk` is null,0,`test`.`t4`.`pk`) from `test`.`t3` left join `test`.`t4` on(`test`.`t4`.`pk` = `test`.`t3`.`pk`) where `test`.`t3`.`pk` = `test`.`t2`.`pk` + 1000 limit 1)) AS `t` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`pk` = `test`.`t1`.`pk` + 1000 and `test`.`t1`.`pk` > 1000 group by `test`.`t2`.`pk`
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index 7da77683186..cab4c78eb3a 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -1754,7 +1754,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
-2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using where; Using index
+2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.t2.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`pk` AS `pk`,<expr_cache><`test`.`t2`.`pk`>((/* select#2 */ select `test`.`t3`.`pk` + if(`test`.`t4`.`pk` is null,0,`test`.`t4`.`pk`) from `test`.`t3` left join `test`.`t4` on(`test`.`t4`.`pk` = `test`.`t3`.`pk`) where `test`.`t3`.`pk` = `test`.`t2`.`pk` + 1000 limit 1)) AS `t` from `test`.`t1` join `test`.`t2` where `test`.`t2`.`pk` = `test`.`t1`.`pk` + 1000 and `test`.`t1`.`pk` > 1000 group by `test`.`t2`.`pk`
diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result
index 01fad7b43dc..3bc97859303 100644
--- a/mysql-test/r/limit_rows_examined.result
+++ b/mysql-test/r/limit_rows_examined.result
@@ -749,23 +749,25 @@ FROM t1, t2 AS alias2, t2 AS alias3
WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 )
GROUP BY field1, field2, field3, field4, field5
LIMIT ROWS EXAMINED 120;
-ERROR HY000: Sort aborted:
+field1 field2 field3 field4 field5
+Warnings:
+Warning 1931 Query execution was interrupted. The query examined at least 121 rows, which exceeds LIMIT ROWS EXAMINED (120). The query result may be incomplete
SHOW STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 1
-Handler_read_key 5
+Handler_read_key 4
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 4
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
-Handler_read_rnd_next 38
+Handler_read_rnd_next 46
SHOW STATUS LIKE 'Handler_tmp%';
Variable_name Value
Handler_tmp_delete 0
Handler_tmp_update 0
-Handler_tmp_write 70
+Handler_tmp_write 66
FLUSH STATUS;
SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5
FROM t1, t2 AS alias2, t2 AS alias3
@@ -773,20 +775,20 @@ WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 )
GROUP BY field1, field2, field3, field4, field5
LIMIT ROWS EXAMINED 124;
field1 field2 field3 field4 field5
-00:21:38 06:07:10 a 2007-06-08 04:35:26 2007-05-28 00:00:00
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 125 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete
+Warning 1931 Query execution was interrupted. The query examined at least 127 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete
SHOW STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 1
-Handler_read_key 5
+Handler_read_key 4
Handler_read_last 0
-Handler_read_next 7
+Handler_read_next 4
Handler_read_prev 0
Handler_read_retry 0
-Handler_read_rnd 2
-Handler_read_rnd_deleted 1
-Handler_read_rnd_next 39
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 48
SHOW STATUS LIKE 'Handler_tmp%';
Variable_name Value
Handler_tmp_delete 0
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index b91dd1b87ae..4f59e9cdbe3 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -340,7 +340,7 @@ FIELDS ESCAPED BY '\\'
TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n' (c0, c2);
-ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA
+ERROR HY000: Column 'c0' is not updatable
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
FIELDS ESCAPED BY '\\'
diff --git a/mysql-test/r/loadxml.result b/mysql-test/r/loadxml.result
index 711fea9e854..34719a27afc 100644
--- a/mysql-test/r/loadxml.result
+++ b/mysql-test/r/loadxml.result
@@ -129,8 +129,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TEXT);
CREATE VIEW v1 AS SELECT CONCAT(c1,'') AS c1, NULL AS c2 FROM t1;
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c1);
-ERROR HY000: Invalid column reference (v1.c1) in LOAD DATA
+ERROR HY000: Column 'c1' is not updatable
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c2);
-ERROR HY000: Invalid column reference (v1.c2) in LOAD DATA
+ERROR HY000: Column 'c2' is not updatable
DROP VIEW v1;
DROP TABLE t1;
diff --git a/mysql-test/r/log_tables-big.result b/mysql-test/r/log_tables-big.result
index 9b81127c825..1e189a7726f 100644
--- a/mysql-test/r/log_tables-big.result
+++ b/mysql-test/r/log_tables-big.result
@@ -1,29 +1,31 @@
+set @@global.log_output = 'TABLE';
set session long_query_time=10;
select get_lock('bug27638', 1);
get_lock('bug27638', 1)
1
set session long_query_time=1;
-truncate table mysql.slow_log;
select get_lock('bug27638', 2);
get_lock('bug27638', 2)
0
-select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
+select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+where sql_text = 'select get_lock(\'bug27638\', 2)';
qt sql_text
OK select get_lock('bug27638', 2)
-truncate table mysql.slow_log;
select get_lock('bug27638', 60);
get_lock('bug27638', 60)
0
-select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
+select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+where sql_text = 'select get_lock(\'bug27638\', 60)';
qt sql_text
OK select get_lock('bug27638', 60)
-truncate table mysql.slow_log;
select get_lock('bug27638', 101);
get_lock('bug27638', 101)
0
-select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
+select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+where sql_text = 'select get_lock(\'bug27638\', 101)';
qt sql_text
OK select get_lock('bug27638', 101)
select release_lock('bug27638');
release_lock('bug27638')
1
+set @@global.log_output=default;
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index 458d0195a19..6a70521cd72 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -430,7 +430,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -804,7 +804,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
1 PRIMARY t2 ref g g 5 test.t.c 19 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index
-2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index condition; Using where
+2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
WHERE c = g
AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
diff --git a/mysql-test/r/mysql_plugin.result b/mysql-test/r/mysql_plugin.result
deleted file mode 100644
index 0bcb47e4a10..00000000000
--- a/mysql-test/r/mysql_plugin.result
+++ /dev/null
@@ -1,132 +0,0 @@
-#
-# Ensure the plugin isn't loaded.
-#
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
-name dl
-#
-# Enable the plugin...
-#
-#
-# Simulate loading a plugin libary with multiple entry points.
-# This will test the DISABLE to ensure all rows are removed.
-#
-INSERT INTO mysql.plugin VALUES ('wicky', 'libdaemon_example.so');
-INSERT INTO mysql.plugin VALUES ('wacky', 'libdaemon_example.so');
-INSERT INTO mysql.plugin VALUES ('wonky', 'libdaemon_example.so');
-#
-# Ensure the plugin is now loaded.
-#
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
-name dl
-daemon_example libdaemon_example.so
-wacky libdaemon_example.so
-wicky libdaemon_example.so
-wonky libdaemon_example.so
-#
-# Ensure the plugin is loaded.
-#
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-name dl
-daemon_example libdaemon_example.so
-#
-# Ensure the plugin is replaced.
-#
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-name dl
-daemon_example liblibdaemon_example.so
-#
-# Disable the plugin...
-#
-#
-# Ensure the plugin isn't loaded.
-#
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-name dl
-#
-# Attempt to load non-existant plugin
-#
-ERROR: Cannot read plugin config file NOT_THERE_AT_ALL. File does not exist.
-#
-# Attempt to use non-existant plugin.ini file
-#
-ERROR: Cannot read plugin config file daemon_example. File does not exist.
-#
-# Attempt to omit the plugin
-#
-ERROR: No plugin specified.
-#
-# Attempt to omit DISABLE|ENABLE
-#
-ERROR: missing operation. Please specify either '<plugin> ENABLE' or '<plugin> DISABLE'.
-#
-# Attempt to use bad paths - datadir
-#
-ERROR: Cannot access datadir at '/data_not_there/'.
-#
-# Attempt to use bad paths - basedir
-#
-ERROR: Cannot access basedir at '/basedir_not_there/'.
-#
-# Attempt to use bad paths - plugin_dir
-#
-ERROR: Cannot read plugin config file daemon_example. File does not exist.
-#
-# Attempt to use bad paths - mysqld
-#
-ERROR: Cannot access mysqld path '/mysqld_not_there/'.
-#
-# Attempt to use bad paths - my_print_defaults
-#
-ERROR: Cannot access my-print-defaults path '/my_print_defaults_not_there/'.
-#
-# Missing library
-#
-ERROR: The plugin library is missing or in a different location.
-#
-# Bad format for config file
-#
-ERROR: Cannot read plugin config file daemon_example. Bad format in plugin configuration file.
-#
-# Missing base_dir option
-#
-ERROR: Missing --basedir option.
-#
-# Missing data_dir option
-#
-ERROR: Missing --datadir option.
-#
-# Missing plugin_dir option
-#
-ERROR: Missing --plugin_dir option.
-#
-# Show the help.
-#
-mysql_plugin Ver V.V.VV Distrib XX.XX.XX
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
-
-Enable or disable plugins.
-
-Usage: mysql_plugin [options] <plugin> ENABLE|DISABLE
-
-Options:
- -?, --help Display this help and exit.
- -b, --basedir=name The basedir for the server.
- -d, --datadir=name The datadir for the server.
- -p, --plugin-dir=name
- The plugin dir for the server.
- -i, --plugin-ini=name
- Read plugin information from configuration file specified
- instead of from <plugin-dir>/<plugin_name>.ini.
- -n, --no-defaults Do not read values from configuration file.
- -P, --print-defaults
- Show default values from configuration file.
- -m, --mysqld=name Path to mysqld executable. Example: /sbin/temp1/mysql/bin
- -f, --my-print-defaults=name
- Path to my_print_defaults executable. Example:
- /source/temp11/extra
- -v, --verbose More verbose output; you can use this multiple times to
- get even more verbose output.
- -V, --version Output version information and exit.
-
-
-mysql_plugin Ver V.V.VV Distrib XX.XX.XX
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 66b501e8278..5a8c1e7a8ae 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -5330,6 +5330,69 @@ DROP TABLE t1;
DROP TABLE t2;
DROP DATABASE db_20772273;
USE test;
+#
+# Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
+#
+CREATE DATABASE bug25717383;
+use bug25717383;
+CREATE TABLE `tab
+one` (a int);
+CREATE VIEW `view
+one` as SELECT * FROM `tab
+one`;
+CREATE PROCEDURE `proc
+one`() SELECT * from `tab
+one`;
+CREATE TEMPORARY TABLE `temp
+one` (id INT);
+CREATE TRIGGER `trig
+one` BEFORE INSERT ON `tab
+one` FOR EACH ROW SET NEW.a = 1;
+CREATE EVENT `event
+one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
+SHOW TABLES FROM bug25717383;
+Tables_in_bug25717383
+tab
+one
+view
+one
+SHOW TRIGGERS FROM bug25717383;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trig
+one INSERT tab
+one SET NEW.a = 1 BEFORE # root@localhost utf8 utf8_general_ci latin1_swedish_ci
+SHOW EVENTS FROM bug25717383;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+bug25717383 event
+one root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci latin1_swedish_ci
+SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
+WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
+ ORDER BY ROUTINE_NAME;
+ROUTINE_NAME
+proc
+one
+SHOW TABLES FROM bug25717383;
+Tables_in_bug25717383
+tab
+one
+view
+one
+SHOW TRIGGERS FROM bug25717383;
+Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
+trig
+one INSERT tab
+one SET NEW.a = 1 BEFORE # root@localhost utf8 utf8_general_ci latin1_swedish_ci
+SHOW EVENTS FROM bug25717383;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+bug25717383 event
+one root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci latin1_swedish_ci
+SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
+WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
+ ORDER BY ROUTINE_NAME;
+ROUTINE_NAME
+proc
+one
+DROP DATABASE bug25717383;
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index f8f0b8e379d..237f04d6d28 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -684,7 +684,9 @@ drop table t1;
y
txt
b is b and more is more
-txt
+txt2
+b is b or more is more
+txt3
a is a and less is more
sflfdt 'ABCDfF bbddff h' bs txt;
txt
diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result
index f28c399ce74..5495f8ffd34 100644
--- a/mysql-test/r/openssl_1.result
+++ b/mysql-test/r/openssl_1.result
@@ -209,7 +209,7 @@ DROP TABLE t1;
Variable_name Value
Ssl_cipher AES256-SHA
Variable_name Value
-Ssl_cipher DES-CBC3-SHA
+Ssl_cipher AES128-SHA
select 'is still running; no cipher request crashed the server' as result from dual;
result
is still running; no cipher request crashed the server
diff --git a/mysql-test/r/openssl_6975,tlsv10.result b/mysql-test/r/openssl_6975,tlsv10.result
index a65167ff427..b76a91bd134 100644
--- a/mysql-test/r/openssl_6975,tlsv10.result
+++ b/mysql-test/r/openssl_6975,tlsv10.result
@@ -1,11 +1,11 @@
create user ssl_sslv3@localhost;
-grant select on test.* to ssl_sslv3@localhost require cipher "RC4-SHA";
+grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
create user ssl_tls12@localhost;
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
TLS1.2 ciphers: user is ok with any cipher
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
-TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA
+TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256
@@ -13,12 +13,12 @@ ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
SSLv3 ciphers: user is ok with any cipher
Variable_name Value
-Ssl_cipher RC4-SHA
+Ssl_cipher AES256-SHA
Variable_name Value
Ssl_cipher DHE-RSA-AES256-SHA
-SSLv3 ciphers: user requires SSLv3 cipher RC4-SHA
+SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA
Variable_name Value
-Ssl_cipher RC4-SHA
+Ssl_cipher AES128-SHA
ERROR 1045 (28000): Access denied for user 'ssl_sslv3'@'localhost' (using password: NO)
SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256
ERROR 1045 (28000): Access denied for user 'ssl_tls12'@'localhost' (using password: NO)
diff --git a/mysql-test/r/openssl_6975,tlsv12.result b/mysql-test/r/openssl_6975,tlsv12.result
index 8758daa7011..c16e503c339 100644
--- a/mysql-test/r/openssl_6975,tlsv12.result
+++ b/mysql-test/r/openssl_6975,tlsv12.result
@@ -1,5 +1,5 @@
create user ssl_sslv3@localhost;
-grant select on test.* to ssl_sslv3@localhost require cipher "RC4-SHA";
+grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
create user ssl_tls12@localhost;
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
TLS1.2 ciphers: user is ok with any cipher
@@ -7,7 +7,7 @@ Variable_name Value
Ssl_cipher AES128-SHA256
Variable_name Value
Ssl_cipher DHE-RSA-AES256-GCM-SHA384
-TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA
+TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA
ERROR 1045 (28000): Access denied for user 'ssl_sslv3'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'ssl_sslv3'@'localhost' (using password: NO)
TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256
@@ -17,7 +17,7 @@ ERROR 1045 (28000): Access denied for user 'ssl_tls12'@'localhost' (using passwo
SSLv3 ciphers: user is ok with any cipher
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
-SSLv3 ciphers: user requires SSLv3 cipher RC4-SHA
+SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index f278724cc9a..3a141a25b5c 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -12,7 +12,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -25,7 +25,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
@@ -64,7 +64,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
diff --git a/mysql-test/r/query_cache_innodb.result b/mysql-test/r/query_cache_innodb.result
new file mode 100644
index 00000000000..643a065612f
--- /dev/null
+++ b/mysql-test/r/query_cache_innodb.result
@@ -0,0 +1,90 @@
+#
+# MDEV-12485: foreign key on delete cascade stale entries with
+# query cache enabled
+#
+SET NAMES utf8;
+set global query_cache_type=1;
+set global query_cache_size=1024*1024;
+set query_cache_type=1;
+create table t1 ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references t1(`id`) on delete cascade ) engine=innodb;
+insert into t1 values (1);
+insert into t2 values (1,1);
+select * from t2;
+t2id id
+1 1
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 1
+delete from t1;
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+select * from t2;
+t2id id
+optimize table t2;
+Table Op Msg_type Msg_text
+test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t2 optimize status OK
+select * from t2;
+t2id id
+drop table t2;
+drop table t1;
+create database `testdatabase$Ñ—`;
+use `testdatabase$Ñ—`;
+create table `t1$Ñ—` ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+create table `t2$Ñ—` ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references `t1$Ñ—`(`id`) on delete cascade ) engine=innodb;
+insert into `t1$Ñ—` values (1);
+insert into `t2$Ñ—`values (1,1);
+select * from `t2$Ñ—`;
+t2id id
+1 1
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 1
+delete from `t1$Ñ—`;
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+select * from `t2$Ñ—`;
+t2id id
+optimize table `t2$Ñ—`;
+Table Op Msg_type Msg_text
+testdatabase$Ñ—.t2$Ñ— optimize note Table does not support optimize, doing recreate + analyze instead
+testdatabase$Ñ—.t2$Ñ— optimize status OK
+select * from `t2$Ñ—`;
+t2id id
+use test;
+drop database `testdatabase$Ñ—`;
+SET NAMES default;
+create database `#mysql50#-`;
+use `#mysql50#-`;
+create table `#mysql50#t-1` ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+create table `#mysql50#t-2` ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references `#mysql50#t-1`(`id`) on delete cascade ) engine=innodb;
+insert into `#mysql50#t-1` values (1);
+insert into `#mysql50#t-2`values (1,1);
+select * from `#mysql50#t-2`;
+t2id id
+1 1
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 1
+delete from `#mysql50#t-1`;
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+select * from `#mysql50#t-2`;
+t2id id
+optimize table `#mysql50#t-2`;
+Table Op Msg_type Msg_text
+#mysql50#-.#mysql50#t-2 optimize note Table does not support optimize, doing recreate + analyze instead
+#mysql50#-.#mysql50#t-2 optimize status OK
+select * from `#mysql50#t-2`;
+t2id id
+use test;
+drop database `#mysql50#-`;
+SET NAMES default;
+FOUND 12 /\[ERROR\] Invalid \(old\?\) table or database name/ in mysqld.1.err
+set global query_cache_type=DEFAULT;
+set global query_cache_size=DEFAULT;
+End of 10.2 tests
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index ac18da81b93..5de9e5174d8 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -4,10 +4,10 @@ have_ssl
1
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
-Ssl_server_not_before Apr 25 14:55:05 2015 GMT
+Ssl_server_not_before Apr 25 20:52:21 2017 GMT
SHOW STATUS LIKE 'Ssl_server_not_after';
Variable_name Value
-Ssl_server_not_after Apr 20 14:55:05 2035 GMT
+Ssl_server_not_after Apr 20 20:52:21 2037 GMT
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
diff --git a/mysql-test/r/stat_tables_par.result b/mysql-test/r/stat_tables_par.result
index 006df89f358..09ee2bbf16a 100644
--- a/mysql-test/r/stat_tables_par.result
+++ b/mysql-test/r/stat_tables_par.result
@@ -235,7 +235,7 @@ connect con1, localhost, root,,;
connect con2, localhost, root,,;
connection con1;
set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1';
-set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2';
+set debug_sync='thr_multi_lock_before_thr_lock SIGNAL go2 EXECUTE 3';
use dbt3_s001;
analyze table lineitem persistent for all;
connection con2;
diff --git a/mysql-test/r/stat_tables_par_innodb.result b/mysql-test/r/stat_tables_par_innodb.result
index 8fc0483d9aa..54579aff990 100644
--- a/mysql-test/r/stat_tables_par_innodb.result
+++ b/mysql-test/r/stat_tables_par_innodb.result
@@ -266,7 +266,7 @@ connect con1, localhost, root,,;
connect con2, localhost, root,,;
connection con1;
set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1';
-set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2';
+set debug_sync='thr_multi_lock_before_thr_lock SIGNAL go2 EXECUTE 3';
use dbt3_s001;
analyze table lineitem persistent for all;
connection con2;
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index 66998565944..ca151daf146 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -267,7 +267,7 @@ from t2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(/* select#2 */ select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where `test`.`t1`.`c` = `test`.`t2`.`oref` and trigcond(trigcond(<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a` or `test`.`t1`.`a` is null)) and trigcond(trigcond(<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b` or `test`.`t1`.`b` is null)) having trigcond(`test`.`t1`.`a` is null) and trigcond(`test`.`t1`.`b` is null)))) AS `Z` from `test`.`t2`
@@ -1242,19 +1242,19 @@ explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select straight_join * from t2 X, t2 Y
where X.a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY X ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY Y ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
create table t0 (a int, b int);
insert into t0 values(1,1);
explain select * from t0, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30);
diff --git a/mysql-test/r/subselect3_jcl6.result b/mysql-test/r/subselect3_jcl6.result
index 124ae70114e..adb3ec80394 100644
--- a/mysql-test/r/subselect3_jcl6.result
+++ b/mysql-test/r/subselect3_jcl6.result
@@ -277,7 +277,7 @@ from t2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`b`,`test`.`t2`.`oref`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(/* select#2 */ select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where `test`.`t1`.`c` = `test`.`t2`.`oref` and trigcond(trigcond(<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a` or `test`.`t1`.`a` is null)) and trigcond(trigcond(<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b` or `test`.`t1`.`b` is null)) having trigcond(`test`.`t1`.`a` is null) and trigcond(`test`.`t1`.`b` is null)))) AS `Z` from `test`.`t2`
@@ -1252,19 +1252,19 @@ explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select straight_join * from t2 X, t2 Y
where X.a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY X ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY Y ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY A ALL NULL NULL NULL NULL 10 Using where
-2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
create table t0 (a int, b int);
insert into t0 values(1,1);
explain select * from t0, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30);
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 526250bb2b9..6126a7ed3f5 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -19,7 +19,7 @@ SELECT 1 FROM t1
WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3))
ORDER BY count(*);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL a 5 NULL 2 Using where; Using index
+1 PRIMARY t1 index NULL a 5 NULL 2 Using index
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
3 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 const row not found
# should not crash the next statement
@@ -1409,7 +1409,7 @@ GROUP BY f9;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
SELECT COUNT(t2.f3),
(SELECT COUNT(f3) FROM t1 WHERE t2.f1) AS f9
FROM t2 JOIN t1 ON t1.f3
@@ -1425,7 +1425,7 @@ ORDER BY f9;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
-2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
SELECT COUNT(t2.f3),
(SELECT COUNT(f3) FROM t1 WHERE t2.f1) AS f9
FROM t2 JOIN t1 ON t1.f3
@@ -2435,9 +2435,11 @@ WHERE EXISTS (
)";
EXECUTE stmt;
i
+4
6
EXECUTE stmt;
i
+4
6
drop table t1, t2, t3;
#
diff --git a/mysql-test/r/subselect_exists2in.result b/mysql-test/r/subselect_exists2in.result
index 2332073a108..8b525436c2f 100644
--- a/mysql-test/r/subselect_exists2in.result
+++ b/mysql-test/r/subselect_exists2in.result
@@ -884,5 +884,55 @@ a
deallocate prepare stmt;
drop view v1;
drop table t1,t2;
+#
+#MDEV-10053: EXIST to IN transformation turned down
+#
+CREATE TABLE t1 (
+pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk))
+ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7);
+set @optimizer_switch_save=@@optimizer_switch;
+set optimizer_switch='exists_to_in=off';
+explain extended SELECT STRAIGHT_JOIN sq1.f2
+FROM ( SELECT * FROM t1 ) AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT SUBQUERY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00
+3 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
+4 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1276 Field or reference 'sq1.pk' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'sq1.f1' of SELECT #3 was resolved in SELECT #1
+Note 1003 /* select#1 */ select straight_join `test`.`t1`.`f2` AS `f2` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`,`test`.`t1`.`pk`>(exists(/* select#3 */ select 1 from `test`.`t1` `sq2` semi join (`test`.`t1`) where `test`.`sq2`.`f1` = `test`.`t1`.`f1` and `test`.`t1`.`pk` = `test`.`t1`.`f1`))
+SELECT STRAIGHT_JOIN sq1.f2
+FROM ( SELECT * FROM t1 ) AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set optimizer_switch='exists_to_in=on';
+explain extended SELECT STRAIGHT_JOIN sq1.f2
+FROM ( SELECT * FROM t1 ) AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT SUBQUERY <subquery4> eq_ref distinct_key distinct_key 4 func 1 100.00
+3 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
+4 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1276 Field or reference 'sq1.pk' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'sq1.f1' of SELECT #3 was resolved in SELECT #1
+Note 1003 /* select#1 */ select straight_join `test`.`t1`.`f2` AS `f2` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`,`test`.`t1`.`pk`>(<in_optimizer>(`test`.`t1`.`f1`,<exists>(/* select#3 */ select `test`.`sq2`.`f1` from `test`.`t1` `sq2` semi join (`test`.`t1`) where `test`.`t1`.`pk` = `test`.`t1`.`f1` and <cache>(`test`.`t1`.`f1`) = `test`.`sq2`.`f1`)))
+SELECT STRAIGHT_JOIN sq1.f2
+FROM ( SELECT * FROM t1 ) AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set optimizer_switch= @optimizer_switch_save;
+DROP TABLE t1;
# End of 10.0 tests
set optimizer_switch=default;
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result
index 11221c797ff..01257c33361 100644
--- a/mysql-test/r/subselect_innodb.result
+++ b/mysql-test/r/subselect_innodb.result
@@ -312,7 +312,7 @@ EXPLAIN SELECT 1 FROM t1 WHERE NOT EXISTS
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1 Using where
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY,d PRIMARY 1 func 1 Using where
-3 DEPENDENT SUBQUERY t2 index NULL d 2 NULL 1 Using where; Using index
+3 DEPENDENT SUBQUERY t2 index NULL d 2 NULL 1 Using index
DROP TABLE t2;
CREATE TABLE t2 (b INT, c INT, UNIQUE KEY (b), UNIQUE KEY (b, c )) ENGINE=INNODB;
INSERT INTO t2 VALUES (1, 1);
@@ -509,6 +509,20 @@ set join_cache_level = default;
drop view v1;
drop table t1,t2;
#
+# MDEV-10693: cost-based choice between materialization and in-to-exists
+# for a subquery from the expression used in ref access
+#
+CREATE TABLE t1 (i1 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (i2 INT) ENGINE=InnoDB;
+CREATE TABLE t3 (i3 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+SELECT * FROM t1
+WHERE NULL IN ( SELECT i2 FROM t2
+WHERE i1 IN ( i2 IN ( SELECT i3 FROM t3 ) ) AND i2 = 2 );
+i1
+DROP TABLE t1,t2,t3;
+#
# MDEV-6041: ORDER BY+subqueries: subquery_table.key=outer_table.col is not recongized as binding
#
create table t1(a int) engine=innodb;
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result
index 84329095cef..cae0e76042e 100644
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@ -2192,6 +2192,117 @@ execute stmt;
a
0
drop table t1;
+#
+# MDEV-12429: IN subquery used in WHERE of EXISTS subquery
+#
+CREATE TABLE t1 (
+pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7);
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch='exists_to_in=off';
+EXPLAIN
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY sq1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1
+2 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2
+# this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1;
+#
+# MDEV-12145: IN subquery used in WHERE of EXISTS subquery
+#
+CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(6);
+CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8),(7),(1);
+CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch='exists_to_in=off';
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+f1
+6
+EXPLAIN EXTENDED
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+2 DEPENDENT SUBQUERY t2 index i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t3 ref i3 i3 5 test.t2.i2 2 100.00 Using index
+3 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 100.00
+Warnings:
+Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select `test`.`t1`.`f1` AS `f1` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`>(exists(/* select#2 */ select 1 from `test`.`t2` semi join (`test`.`t3`) join `test`.`t3` where `test`.`t3`.`i3` = `test`.`t2`.`i2` and `test`.`t1`.`f1` = `test`.`t3`.`f3`))
+# this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+f1
+6
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1,t2,t3;
+#
+# MDEV-9686: IN subquery used in WHERE of a subquery from select list
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT);
+INSERT INTO t1 VALUES (1, 4),(2, 3),(3, 3),(4, 6),(5, 3);
+CREATE TABLE t2 (f2 INT);
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+# t1.pk is always IN ( SELECT f2 FROM t2 ),
+# so the IN condition should be true for every row,
+# and thus COUNT(*) should always return 5
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+pk f1 sq
+1 4 5
+2 3 5
+3 3 5
+4 6 5
+5 3 5
+EXPLAIN EXTENDED
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join)
+3 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00
+Warnings:
+Note 1276 Field or reference 'test.t1.pk' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache><`test`.`t1`.`pk`>((/* select#2 */ select count(0) from `test`.`t2` semi join (`test`.`t2`) where `test`.`t1`.`pk` = `test`.`t2`.`f2`)) AS `sq` from `test`.`t1`
+# this checks the result set above
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+pk f1 sq
+1 4 5
+2 3 5
+3 3 5
+4 6 5
+5 3 5
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1,t2;
# End of 5.5 tests
#
# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
diff --git a/mysql-test/r/subselect_mat_cost_bugs.result b/mysql-test/r/subselect_mat_cost_bugs.result
index 5476353e268..b4ddd5e5849 100644
--- a/mysql-test/r/subselect_mat_cost_bugs.result
+++ b/mysql-test/r/subselect_mat_cost_bugs.result
@@ -400,3 +400,45 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t1 where c1 = 'a2' and (c1, c2) not in (select * from t2);
c1 c2
drop table t1, t2;
+#
+# MDEV-12673: cost-based choice between materialization and in-to-exists
+#
+CREATE TABLE t1 (
+pk1 int, a1 varchar(3), b1 varchar(3), PRIMARY KEY (pk1), KEY(a1), KEY(b1)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'foo','bar'),(2,'bar','foo');
+CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 VARCHAR(3), KEY(a2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'abc'),(2,'xyz'),(3,'foo');
+SELECT 'qux' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+'qux' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 )
+0
+SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 )
+1
+EXPLAIN
+SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+2 SUBQUERY t2 const PRIMARY,a2 PRIMARY 4 const 1
+2 SUBQUERY t1 ref a1,b1 b1 6 const 1 Using where
+DROP TABLE t1,t2;
+CREATE TABLE t1 (i1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (i2 int, c2 varchar(3), KEY(i2,c2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'abc'),(2,'foo');
+CREATE TABLE t3 (pk3 int PRIMARY KEY, c3 varchar(3)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (1,'foo'),(2,'bar');
+SELECT * FROM t1 WHERE i1 NOT IN (
+SELECT i2 FROM t2 RIGHT JOIN t3 ON (c3 = c2) WHERE pk3 = i1
+);
+i1
+1
+EXPLAIN
+SELECT * FROM t1 WHERE i1 NOT IN (
+SELECT i2 FROM t2 RIGHT JOIN t3 ON (c3 = c2) WHERE pk3 = i1
+);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 1
+2 DEPENDENT SUBQUERY t3 const PRIMARY PRIMARY 4 const 1
+2 DEPENDENT SUBQUERY t2 index NULL i2 11 NULL 2 Using where; Using index
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 2f9ad405094..861360ddf9a 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -178,7 +178,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY m16 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY m17 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY m18 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
-2 DEPENDENT SUBQUERY m19 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY m19 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
select * from
t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10))
where t1.a < 5;
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index b54184d7754..bcfa1b14be9 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -191,7 +191,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY m16 ALL NULL NULL NULL NULL 3 Using join buffer (incremental, BNL join)
2 DEPENDENT SUBQUERY m17 ALL NULL NULL NULL NULL 3 Using join buffer (incremental, BNL join)
2 DEPENDENT SUBQUERY m18 ALL NULL NULL NULL NULL 3 Using join buffer (incremental, BNL join)
-2 DEPENDENT SUBQUERY m19 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (incremental, BNL join)
+2 DEPENDENT SUBQUERY m19 ALL NULL NULL NULL NULL 3 Using join buffer (incremental, BNL join)
select * from
t1 left join t2 on (t2.a= t1.a and t2.a in (select pk from t10))
where t1.a < 5;
diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result
index 50404037f89..8b5e6c2d6a0 100644
--- a/mysql-test/r/subselect_sj_mat.result
+++ b/mysql-test/r/subselect_sj_mat.result
@@ -2232,6 +2232,117 @@ execute stmt;
a
0
drop table t1;
+#
+# MDEV-12429: IN subquery used in WHERE of EXISTS subquery
+#
+CREATE TABLE t1 (
+pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7);
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch='exists_to_in=off';
+EXPLAIN
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY sq1 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1
+2 DEPENDENT SUBQUERY sq2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2
+# this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT sq1.f2 FROM t1 AS sq1
+WHERE EXISTS ( SELECT * FROM t1 AS sq2
+WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+f2
+foo
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1;
+#
+# MDEV-12145: IN subquery used in WHERE of EXISTS subquery
+#
+CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(6);
+CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8),(7),(1);
+CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch='exists_to_in=off';
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+f1
+6
+EXPLAIN EXTENDED
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+2 DEPENDENT SUBQUERY t2 index i2 i2 5 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t3 ref i3 i3 5 test.t2.i2 2 100.00 Using index
+3 MATERIALIZED t3 ALL NULL NULL NULL NULL 8 100.00
+Warnings:
+Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select `test`.`t1`.`f1` AS `f1` from `test`.`t1` where <expr_cache><`test`.`t1`.`f1`>(exists(/* select#2 */ select 1 from `test`.`t2` semi join (`test`.`t3`) join `test`.`t3` where `test`.`t3`.`i3` = `test`.`t2`.`i2` and `test`.`t1`.`f1` = `test`.`t3`.`f3`))
+# this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT * FROM t1
+WHERE EXISTS ( SELECT * FROM t2, t3
+WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+f1
+6
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1,t2,t3;
+#
+# MDEV-9686: IN subquery used in WHERE of a subquery from select list
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT);
+INSERT INTO t1 VALUES (1, 4),(2, 3),(3, 3),(4, 6),(5, 3);
+CREATE TABLE t2 (f2 INT);
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+# t1.pk is always IN ( SELECT f2 FROM t2 ),
+# so the IN condition should be true for every row,
+# and thus COUNT(*) should always return 5
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+pk f1 sq
+1 4 5
+2 3 5
+3 3 5
+4 6 5
+5 3 5
+EXPLAIN EXTENDED
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 5 100.00
+2 DEPENDENT SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join)
+3 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00
+Warnings:
+Note 1276 Field or reference 'test.t1.pk' of SELECT #2 was resolved in SELECT #1
+Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`f1` AS `f1`,<expr_cache><`test`.`t1`.`pk`>((/* select#2 */ select count(0) from `test`.`t2` semi join (`test`.`t2`) where `test`.`t1`.`pk` = `test`.`t2`.`f2`)) AS `sq` from `test`.`t1`
+# this checks the result set above
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+pk f1 sq
+1 4 5
+2 3 5
+3 3 5
+4 6 5
+5 3 5
+set optimizer_switch= @save_optimizer_switch;
+DROP TABLE t1,t2;
# End of 5.5 tests
#
# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index 2385e3887c4..1764ea6a7dd 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -226,3 +226,14 @@ t2 CREATE TABLE `t2` (
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop tables t1, t2;
+#
+# Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
+# WITH DATA DIRECTORY
+#
+# Make sure we have no current database
+CREATE DATABASE x;
+USE x;
+DROP DATABASE x;
+CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
+DATA DIRECTORY "MYSQLTEST_VARDIR/tmp";
+DROP TABLE test.t1;
diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem
index e934823eea3..cc5d9100e30 100644
--- a/mysql-test/std_data/cacert.pem
+++ b/mysql-test/std_data/cacert.pem
@@ -1,78 +1,79 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 11580370790696127632 (0xa0b5bde0f2c08c90)
- Signature Algorithm: sha1WithRSAEncryption
+ Serial Number:
+ e5:b1:e3:71:e9:6f:a9:e1
+ Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 14:55:05 2015 GMT
- Not After : Apr 20 14:55:05 2035 GMT
+ Not Before: Apr 25 20:52:21 2017 GMT
+ Not After : Apr 20 20:52:21 2037 GMT
Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:c0:1f:90:7c:2b:c2:ea:01:93:ce:e0:c5:72:e8:
- 1c:06:bd:63:4e:b6:d2:c6:00:32:13:27:42:9e:c9:
- 3c:91:33:4d:15:90:67:7d:9d:d8:be:9b:12:e2:f6:
- 1b:46:81:4a:8b:10:c5:b8:14:53:ab:6a:2c:c3:7f:
- 66:87:6c:0e:18:51:4e:9c:93:7a:6d:a1:d4:06:47:
- 58:61:a6:04:21:2c:bd:74:7a:e4:68:45:fe:91:fe:
- fb:a6:29:47:ec:c5:c3:88:c8:c9:e7:d7:c6:1a:0d:
- b8:f5:c5:02:57:25:01:cc:d5:8c:37:46:58:c6:71:
- 30:ee:63:38:99:84:5e:9e:3c:af:40:d4:f0:f2:12:
- 44:6e:2f:4d:cd:f9:da:4d:0e:1f:a6:fe:35:c3:9d:
- 40:08:82:5e:6f:7d:4d:09:16:7d:a1:78:d6:9f:9f:
- 44:d6:b1:ad:e7:50:25:1a:f3:4e:16:92:4a:17:5e:
- 0b:e1:c8:9f:62:22:c4:e2:01:96:63:ed:37:a2:e5:
- 70:b9:dc:c8:8e:c4:fe:00:21:f5:b9:48:c0:43:55:
- 4a:d8:0c:9d:ce:d6:60:30:bb:81:31:c8:e9:0e:aa:
- 1c:18:3d:e4:10:47:42:17:c0:4d:fb:f5:d9:c2:e4:
- 07:33:f7:15:94:63:6d:11:ad:4f:d4:1d:11:41:c1:
- e2:dd
+ 00:a0:ad:d5:b1:ec:45:6f:d6:33:fc:5a:03:29:14:
+ f1:8e:78:d5:27:53:79:e0:92:7c:10:3b:79:a0:d7:
+ b6:9d:a8:5c:4d:fa:68:11:b3:03:9e:ee:5e:20:79:
+ 23:d8:9c:49:34:9c:1d:c4:6e:53:1f:9a:92:1f:08:
+ c1:15:e2:ad:cf:59:cd:1e:55:84:79:f9:09:ca:36:
+ 8a:50:83:c6:38:48:c6:d3:fa:f6:f2:2a:4f:bd:5d:
+ 60:9d:eb:21:c4:8c:f2:dd:2d:49:10:63:46:47:de:
+ 2d:59:a0:4a:e0:58:e6:c0:ae:d8:d4:5e:9a:f8:f5:
+ 68:1d:ea:80:8a:d6:01:b0:d5:5f:30:4d:88:5a:c5:
+ 1f:81:92:c1:40:54:c8:bb:a6:a1:43:de:81:3c:4b:
+ 79:95:82:bb:52:da:a3:a4:a0:69:ff:7e:00:8c:86:
+ 85:ec:af:03:68:a8:83:48:a0:e4:1d:31:a9:5c:47:
+ 99:9d:3a:3f:b5:3e:12:7c:4d:47:15:72:f1:11:5c:
+ 4a:ef:08:1c:7b:8f:e6:03:06:07:4f:94:21:b0:5e:
+ 27:fa:93:8c:b4:cc:56:34:3b:6d:c4:4a:14:57:b2:
+ 21:1a:3e:2f:c5:9e:47:1a:59:05:22:0e:56:b1:a7:
+ e8:80:9b:82:c3:54:57:12:05:94:79:a2:03:d9:64:
+ 3c:63
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
- C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
+ 1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
X509v3 Authority Key Identifier:
- keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
+ keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
X509v3 Basic Constraints:
CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 40:6f:6a:54:f3:29:30:48:46:bd:da:46:71:64:52:14:a7:c2:
- 34:b7:5e:1e:42:3d:e7:47:92:cd:87:e7:9d:5d:1a:82:77:82:
- 62:32:d4:9d:b6:44:11:dc:88:78:38:a5:d3:1f:1e:be:c2:d6:
- 14:b0:58:35:cd:66:22:43:97:ba:bb:e3:44:4f:9d:75:14:9f:
- 6f:37:d3:50:07:09:36:bc:58:92:e8:fe:c0:a8:ba:29:55:65:
- e2:6f:8f:ab:a5:1d:4f:56:37:de:c7:b4:39:20:4c:a8:4c:db:
- 56:51:12:7e:e7:7f:83:9d:c4:c7:72:8f:6f:83:f0:af:e3:37:
- 1c:40:fe:5e:38:26:2f:05:46:a7:0c:a5:81:79:d6:9c:9c:d7:
- 56:eb:96:fe:c7:ae:8e:4f:5e:4a:6c:3a:fa:68:be:65:60:a2:
- d3:3f:07:76:45:b3:95:3e:11:ef:3a:0e:6f:73:47:4c:90:dd:
- 0b:36:b4:22:df:62:8d:58:d2:a6:34:5b:f0:06:5d:cd:bf:52:
- fa:ee:9b:4f:e8:79:18:6e:1c:6e:5f:96:10:6d:2f:02:1b:dd:
- bf:14:c9:32:3c:83:a5:6e:56:56:78:9d:ce:84:50:a4:df:cc:
- b5:a9:b1:ec:09:07:74:02:27:7a:9d:d2:96:a9:80:95:9a:f2:
- 8c:e9:ef:99
+ Signature Algorithm: sha256WithRSAEncryption
+ 0d:4b:21:52:fa:49:34:56:14:db:83:ae:1c:3d:a7:4d:3e:ea:
+ 55:7e:1a:37:7a:65:89:ee:19:05:94:9d:3a:ad:59:c4:38:16:
+ b2:bd:02:ee:5a:a6:7e:e2:b1:21:a3:ad:af:8c:ae:c3:30:71:
+ ad:d7:d2:24:0f:c4:d9:47:80:c5:95:05:1d:7c:8a:49:0a:7d:
+ 8b:61:ca:b5:68:3d:3e:4e:f1:c7:45:62:c8:cc:a9:2f:f3:12:
+ f1:3f:92:34:7f:07:ab:d3:ac:ab:af:2d:c9:69:63:8a:b2:e5:
+ 35:ea:7d:b8:17:38:72:82:5f:96:3d:dc:8d:e5:11:bb:ae:f3:
+ 02:2d:20:77:5c:64:59:18:a6:e7:fa:c7:89:e8:30:12:14:04:
+ 40:5b:e9:b1:8f:86:81:b9:0d:6c:b6:fc:98:f9:b7:52:ab:8f:
+ 7e:53:c8:a0:05:e4:cd:0d:6b:d2:74:9f:17:7a:a1:c3:76:5e:
+ f3:29:1c:c6:be:56:ab:02:f7:5d:e1:c9:21:27:6d:66:7a:41:
+ 29:49:a3:f8:f5:2a:e7:03:2a:7c:52:4b:f5:46:58:45:be:a4:
+ 4c:a0:65:37:1d:d8:ac:f8:1f:81:ca:9c:79:f0:ff:22:8c:1d:
+ ce:2b:d0:1e:ce:99:f2:db:fa:66:84:e6:86:6f:19:3b:10:f1:
+ 92:ac:57:b2
-----BEGIN CERTIFICATE-----
-MIIDfzCCAmegAwIBAgIJAKC1veDywIyQMA0GCSqGSIb3DQEBBQUAMFYxDzANBgNV
+MIIDfzCCAmegAwIBAgIJAOWx43Hpb6nhMA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV
BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD
-VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xNTA0MjUxNDU1MDVa
-Fw0zNTA0MjAxNDU1MDVaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
+VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xNzA0MjUyMDUyMjFa
+Fw0zNzA0MjAyMDUyMjFaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH
-TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAfkHwrwuoB
-k87gxXLoHAa9Y0620sYAMhMnQp7JPJEzTRWQZ32d2L6bEuL2G0aBSosQxbgUU6tq
-LMN/ZodsDhhRTpyTem2h1AZHWGGmBCEsvXR65GhF/pH++6YpR+zFw4jIyefXxhoN
-uPXFAlclAczVjDdGWMZxMO5jOJmEXp48r0DU8PISRG4vTc352k0OH6b+NcOdQAiC
-Xm99TQkWfaF41p+fRNaxredQJRrzThaSShdeC+HIn2IixOIBlmPtN6LlcLncyI7E
-/gAh9blIwENVStgMnc7WYDC7gTHI6Q6qHBg95BBHQhfATfv12cLkBzP3FZRjbRGt
-T9QdEUHB4t0CAwEAAaNQME4wHQYDVR0OBBYEFMcsAZUa9T7NBKYkNTUE2acWASp5
-MB8GA1UdIwQYMBaAFMcsAZUa9T7NBKYkNTUE2acWASp5MAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQEFBQADggEBAEBvalTzKTBIRr3aRnFkUhSnwjS3Xh5CPedHks2H
-551dGoJ3gmIy1J22RBHciHg4pdMfHr7C1hSwWDXNZiJDl7q740RPnXUUn28301AH
-CTa8WJLo/sCouilVZeJvj6ulHU9WN97HtDkgTKhM21ZREn7nf4OdxMdyj2+D8K/j
-NxxA/l44Ji8FRqcMpYF51pyc11brlv7Hro5PXkpsOvpovmVgotM/B3ZFs5U+Ee86
-Dm9zR0yQ3Qs2tCLfYo1Y0qY0W/AGXc2/Uvrum0/oeRhuHG5flhBtLwIb3b8UyTI8
-g6VuVlZ4nc6EUKTfzLWpsewJB3QCJ3qd0papgJWa8ozp75k=
+TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKCt1bHsRW/W
+M/xaAykU8Y541SdTeeCSfBA7eaDXtp2oXE36aBGzA57uXiB5I9icSTScHcRuUx+a
+kh8IwRXirc9ZzR5VhHn5Cco2ilCDxjhIxtP69vIqT71dYJ3rIcSM8t0tSRBjRkfe
+LVmgSuBY5sCu2NRemvj1aB3qgIrWAbDVXzBNiFrFH4GSwUBUyLumoUPegTxLeZWC
+u1Lao6Sgaf9+AIyGheyvA2iog0ig5B0xqVxHmZ06P7U+EnxNRxVy8RFcSu8IHHuP
+5gMGB0+UIbBeJ/qTjLTMVjQ7bcRKFFeyIRo+L8WeRxpZBSIOVrGn6ICbgsNUVxIF
+lHmiA9lkPGMCAwEAAaNQME4wHQYDVR0OBBYEFBzHK6obsbsumvQPsYZgVzjCQQUS
+MB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMAwGA1UdEwQFMAMBAf8w
+DQYJKoZIhvcNAQELBQADggEBAA1LIVL6STRWFNuDrhw9p00+6lV+Gjd6ZYnuGQWU
+nTqtWcQ4FrK9Au5apn7isSGjra+MrsMwca3X0iQPxNlHgMWVBR18ikkKfYthyrVo
+PT5O8cdFYsjMqS/zEvE/kjR/B6vTrKuvLclpY4qy5TXqfbgXOHKCX5Y93I3lEbuu
+8wItIHdcZFkYpuf6x4noMBIUBEBb6bGPhoG5DWy2/Jj5t1Krj35TyKAF5M0Na9J0
+nxd6ocN2XvMpHMa+VqsC913hySEnbWZ6QSlJo/j1KucDKnxSS/VGWEW+pEygZTcd
+2Kz4H4HKnHnw/yKMHc4r0B7OmfLb+maE5oZvGTsQ8ZKsV7I=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/cakey.pem b/mysql-test/std_data/cakey.pem
new file mode 100644
index 00000000000..88e251f00e2
--- /dev/null
+++ b/mysql-test/std_data/cakey.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCgrdWx7EVv1jP8
+WgMpFPGOeNUnU3ngknwQO3mg17adqFxN+mgRswOe7l4geSPYnEk0nB3EblMfmpIf
+CMEV4q3PWc0eVYR5+QnKNopQg8Y4SMbT+vbyKk+9XWCd6yHEjPLdLUkQY0ZH3i1Z
+oErgWObArtjUXpr49Wgd6oCK1gGw1V8wTYhaxR+BksFAVMi7pqFD3oE8S3mVgrtS
+2qOkoGn/fgCMhoXsrwNoqINIoOQdMalcR5mdOj+1PhJ8TUcVcvERXErvCBx7j+YD
+BgdPlCGwXif6k4y0zFY0O23EShRXsiEaPi/FnkcaWQUiDlaxp+iAm4LDVFcSBZR5
+ogPZZDxjAgMBAAECggEAWmy6AGFpSmEP7IpzkOEaeAWEX5dY1YtaioAOGPiM6vje
+yXuMqblG5mBbVIcYJ0T85cCd9/fmi7ifVxvEHh7tle2Bw/p4jXQbkFNVT655FR/P
+1Wg9JVeufHFaeETlQgnYe6SKo9BaswNUHkZZHRyq7/D2Ub3UFRt2tq9MG9YIKY1m
+rP9s7E+EDuH9UhYmaWdQfNm8muIXWK8WjicI5+PX0CQ1NtUy6vS7qBzcBzvT0chC
+Jtja29S6Nvg12A96nHsRmQyUaQjRlqosSwiagpc5mZmNeCEUoY+3deIdYIUMSQnf
+judZOKVPq0GOW5Y1U068LGODWaifPkinGBj+04VH0QKBgQDOp/jVCOUdEeqFJ/8m
+wEsfsRIrXvtGJHgbDXcVJ69FwlX+yaKGEuC+4f21uyxPn6GoFw+NKAyTmGKH7VAX
+OFQLrMQ/DMlNbZrCAAFcXMqrnLaVwqMeIIoVNfKAa8u15K40qc+B0it61Nlay5wq
+wvXoSZrdqXSgsI29pav20+8pTQKBgQDHC3l1+gMZ1rCar+5KdVBN1Wq4Xh7cwZw6
+FxEvyrDCJePEU2L7FpH1pFuB4WpXdBu3CPo70ZgwfqBXn4qLOOI3gTtDHActyiUm
++WRG62O+5Ye7aLB4xy0MfnKNA2g/yHj1ozwM8kA5JRptAzDnzWfVE0k47/pVAVzt
+E2bZuSykbwKBgQCL6SkMgjMr1T9j20phn/q8gBN/DZUtTe+K0Tj4N5/wqLuz/its
+fkdutG4ipZBAcCDwPnym4qBxJNBAmqiIr/gm11ceILgBFd2azoodUC1etoDfL6Fj
++j/CUH3X+CM5CJPwz67Pg80wIf7t+7/FK611ELAqtllhmWa9KPcd6yqWWQKBgHh5
+Xnvk5kmWY3BNOgrBNOjXWu/asA1n9lpGqfVmVlQ8wL6MxiU5xQCMCYL0X/ws37WK
+boMUWmxHyF8gxqd7t5hm1OrKpSG274PGgUZXpRjfLqdlNyLzUzXztvvY6xloCqaK
+tYcUfYDZD0SaINi8v7L9KF2ZCsi2uXsZOjBf30BrAoGAXPPotkw/CkcPQBS13cha
+ZWeeH5NDKBADWXfLfcRUs108c9xw4BYr5yGilSPscN2ZP0/iWONKp/c6/STS54t5
+lkOKKUbkAFbQu8UKa1J7zrnHZv+Mr4I/iBBy6VkN8Spp2vBI3Ng6jhPIJg3Gum9p
+943wWtAnIhe/UqCRT3a/GZg=
+-----END PRIVATE KEY-----
diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem
index cbe8bc2c677..9f6f0cfde7c 100644
--- a/mysql-test/std_data/client-cert.pem
+++ b/mysql-test/std_data/client-cert.pem
@@ -2,25 +2,25 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number: 3 (0x3)
- Signature Algorithm: sha1WithRSAEncryption
+ Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 14:55:16 2015 GMT
- Not After : Apr 20 14:55:16 2035 GMT
+ Not Before: Apr 25 20:52:33 2017 GMT
+ Not After : Apr 20 20:52:33 2037 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:ce:a0:3d:3c:a4:bb:4f:a1:4f:91:0d:05:ac:5b:
- 8a:15:7f:d7:aa:0c:a3:a7:9f:b2:c7:26:9d:65:28:
- b1:84:d3:a0:ef:9e:b1:45:0f:33:df:98:6e:71:ff:
- 2b:66:9c:9c:c1:25:13:27:42:b6:20:46:e7:e7:47:
- a1:88:47:c2:9e:e2:45:25:99:9f:f9:28:1a:9a:13:
- 67:5d:3e:b3:b8:fe:40:25:ac:26:49:46:2c:03:43:
- 83:67:d8:0f:41:ae:2e:f4:d8:71:60:3c:8e:e7:91:
- d0:bb:2c:ca:12:da:71:1a:7b:e3:fa:8c:8f:c3:bb:
- 62:55:89:b3:bf:85:45:01:61
+ 00:a1:10:ea:cc:8e:2c:73:6b:33:1a:5e:26:19:b6:
+ 4b:4c:bc:04:b8:c2:e2:33:eb:67:a2:7a:27:af:3f:
+ f7:ef:49:5f:c1:d2:b9:d9:71:fe:17:a0:93:da:dc:
+ f1:47:de:fa:1f:c3:c1:d1:a5:2a:06:cb:b3:e8:9a:
+ c1:bd:78:77:68:45:c1:55:cd:b1:c1:d3:df:8c:12:
+ 4f:c2:3a:0d:b7:58:dc:ca:13:08:b9:fb:12:24:90:
+ aa:b7:4e:04:eb:43:0d:45:be:1c:17:d6:a8:b1:af:
+ 10:3c:39:d6:08:45:ed:a9:7e:3a:69:ae:70:22:86:
+ 7e:71:1f:f1:0e:d0:0d:32:c3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,42 +28,42 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 5A:73:74:8E:14:29:C3:FB:B4:19:0F:97:8F:AA:6F:E1:E1:A8:F7:5B
+ 0C:20:76:A1:80:9C:2F:30:3D:F7:AB:8D:31:19:AD:E2:F7:E2:8D:12
X509v3 Authority Key Identifier:
- keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
+ keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
- Signature Algorithm: sha1WithRSAEncryption
- 32:42:4b:36:44:a5:6c:fb:70:d8:08:2b:cb:16:34:15:db:39:
- 60:7b:7e:b4:4a:bc:fb:e5:16:04:97:0d:eb:f5:68:95:da:2f:
- 23:57:4c:c9:29:2b:d1:1b:1b:9f:bd:f4:79:75:df:62:7f:63:
- b4:84:7a:95:5c:c4:ee:f3:77:16:e4:0b:8a:5e:c9:64:bd:7c:
- 04:50:ac:ff:9a:41:6b:b1:6a:9f:cd:45:10:72:83:10:8a:26:
- 1d:7f:6c:84:34:5a:41:79:72:91:ee:87:5d:1d:3a:55:ff:91:
- 7e:52:85:ff:42:41:eb:76:56:23:e5:bc:bc:79:b1:aa:4e:4c:
- bf:7b:df:63:8b:1a:3c:4b:01:72:89:35:bb:0d:92:97:16:6e:
- ae:50:cb:89:ee:c6:7a:d0:d3:32:22:0f:19:33:1e:ee:ff:41:
- a5:a1:25:c5:4c:ce:8f:98:4c:b5:2c:1f:ec:cc:f1:21:e2:3a:
- ff:7d:6a:87:fe:89:fd:2c:20:3e:fb:9b:b8:c0:f9:09:99:ce:
- 45:63:82:09:1c:bb:79:d8:a8:40:21:46:c7:ae:3e:dd:89:9d:
- 56:46:4a:f4:ed:7d:5b:a6:1e:a6:1b:26:f9:ec:26:b4:51:3a:
- 87:b6:50:13:84:33:22:1a:8a:20:c5:44:64:b8:bb:de:32:ec:
- 6b:58:db:17
+ Signature Algorithm: sha256WithRSAEncryption
+ 39:c0:90:13:19:85:47:9d:c6:ab:8c:c6:c9:0f:33:11:19:f7:
+ 01:2c:1b:08:f6:81:98:11:ab:48:05:d9:b2:29:56:32:9c:ba:
+ e5:40:df:85:5e:6d:fd:6e:36:9a:14:eb:90:50:57:de:2f:ed:
+ 2d:89:a6:8a:40:1c:41:84:9b:da:e1:6d:e6:7c:46:b2:e0:90:
+ 93:02:1c:52:2e:af:b4:d4:a1:d8:9d:19:cf:0a:67:bf:c3:3e:
+ 2e:02:f4:3e:bc:2e:59:57:30:85:8a:32:ab:22:88:72:37:6e:
+ ee:ed:f8:53:72:c9:28:87:50:47:81:1b:80:4c:f8:80:ce:2f:
+ 47:ca:78:ce:38:51:70:ec:df:ee:fc:ea:5a:40:1e:4d:1c:fd:
+ 4e:f6:74:d0:22:a4:7e:57:df:16:1a:a0:8d:be:fe:ee:f2:07:
+ 2e:39:a1:97:40:19:f9:3b:b8:e7:c4:98:6e:1d:1a:27:d3:19:
+ 4c:5c:c9:c3:31:98:c1:3c:27:0e:6a:de:cf:88:72:cf:e4:65:
+ c9:0d:33:32:f1:ea:f7:dd:5b:9d:42:6d:ee:c7:a8:b7:85:d2:
+ 41:e0:84:38:ce:86:81:ba:6e:7d:d5:ad:7a:00:58:d7:c5:83:
+ 9e:5c:1d:38:32:72:49:f5:42:4b:e7:c6:5c:12:6d:e1:5d:51:
+ 2c:f5:52:f0
-----BEGIN CERTIFICATE-----
-MIIDHjCCAgagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIDHjCCAgagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTUwNDI1MTQ1NTE2WhcNMzUwNDIw
-MTQ1NTE2WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
+MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZjbGllbnQw
-gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM6gPTyku0+hT5ENBaxbihV/16oM
-o6efsscmnWUosYTToO+esUUPM9+YbnH/K2acnMElEydCtiBG5+dHoYhHwp7iRSWZ
-n/koGpoTZ10+s7j+QCWsJklGLANDg2fYD0GuLvTYcWA8jueR0LssyhLacRp74/qM
-j8O7YlWJs7+FRQFhAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
-HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRac3SOFCnD
-+7QZD5ePqm/h4aj3WzAfBgNVHSMEGDAWgBTHLAGVGvU+zQSmJDU1BNmnFgEqeTAN
-BgkqhkiG9w0BAQUFAAOCAQEAMkJLNkSlbPtw2AgryxY0Fds5YHt+tEq8++UWBJcN
-6/VoldovI1dMySkr0Rsbn730eXXfYn9jtIR6lVzE7vN3FuQLil7JZL18BFCs/5pB
-a7Fqn81FEHKDEIomHX9shDRaQXlyke6HXR06Vf+RflKF/0JB63ZWI+W8vHmxqk5M
-v3vfY4saPEsBcok1uw2SlxZurlDLie7GetDTMiIPGTMe7v9BpaElxUzOj5hMtSwf
-7MzxIeI6/31qh/6J/SwgPvubuMD5CZnORWOCCRy7edioQCFGx64+3YmdVkZK9O19
-W6Yephsm+ewmtFE6h7ZQE4QzIhqKIMVEZLi73jLsa1jbFw==
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKEQ6syOLHNrMxpeJhm2S0y8BLjC
+4jPrZ6J6J68/9+9JX8HSudlx/hegk9rc8Ufe+h/DwdGlKgbLs+iawb14d2hFwVXN
+scHT34wST8I6DbdY3MoTCLn7EiSQqrdOBOtDDUW+HBfWqLGvEDw51ghF7al+Ommu
+cCKGfnEf8Q7QDTLDAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
+HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQMIHahgJwv
+MD33q40xGa3i9+KNEjAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEFEjAN
+BgkqhkiG9w0BAQsFAAOCAQEAOcCQExmFR53Gq4zGyQ8zERn3ASwbCPaBmBGrSAXZ
+silWMpy65UDfhV5t/W42mhTrkFBX3i/tLYmmikAcQYSb2uFt5nxGsuCQkwIcUi6v
+tNSh2J0Zzwpnv8M+LgL0PrwuWVcwhYoyqyKIcjdu7u34U3LJKIdQR4EbgEz4gM4v
+R8p4zjhRcOzf7vzqWkAeTRz9TvZ00CKkflffFhqgjb7+7vIHLjmhl0AZ+Tu458SY
+bh0aJ9MZTFzJwzGYwTwnDmrez4hyz+RlyQ0zMvHq991bnUJt7seot4XSQeCEOM6G
+gbpufdWtegBY18WDnlwdODJySfVCS+fGXBJt4V1RLPVS8A==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem
index 5037c6e2728..b6b5507cd15 100644
--- a/mysql-test/std_data/client-key.pem
+++ b/mysql-test/std_data/client-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDOoD08pLtPoU+RDQWsW4oVf9eqDKOnn7LHJp1lKLGE06DvnrFF
-DzPfmG5x/ytmnJzBJRMnQrYgRufnR6GIR8Ke4kUlmZ/5KBqaE2ddPrO4/kAlrCZJ
-RiwDQ4Nn2A9Bri702HFgPI7nkdC7LMoS2nEae+P6jI/Du2JVibO/hUUBYQIDAQAB
-AoGAa/FgLFcul3oA9BjmdtVXfMXNp8N0l3QhVFLC9P7eRjK8p5GysA4yHkQmpp0U
-UkXMykYRDHiYZqJEMhnEtEowzBmodi7go+gpwAR2eUKwESmJoBhPvqDJAbS/fL5D
-H2Wk6FGsdKoPhEpigWefu6ZqlX5GCGa601eMYLMR9i+6bbUCQQDspD4j2q8oihTU
-RQt/XpF1l+5ZRHjQOokwRekuHdq0powtNxZ+X3V8Qy8JbDRNCM2YtfKMX4gXAfZp
-JWs7HoPvAkEA34doY3AKxZSpXD84m4dnJ0/Ubfk3+tcC1EPYyDJ1DHpfz7fy6aoX
-z8TWCQXtSBGaEa9Dgbz+EFXuctLbUR8/rwJACDjIo+xEK69oe9uOQ7WgbiqCMH3N
-iMaP36p+KIkHAUHMGwIP+QIODewzpSsqQgbtRcIElFX5X3tE+XBAYoRz5wJAKH3/
-CwRg7ynfBDbvqjz9EsIDWWisG2SXvpwLyThau8fvU1GfT3Tgm2Ks4zWPpl6J6mo1
-cGssGwl2CJbp4+glQQJBAJAwvKufpB+M6OjvKh89GGsCEaV1ENJ41FPcQwJ2pjed
-Fcq28ZP59v7bfBH2IkNu3pfEzmvQnmRlTEtXGjNn+i8=
+MIICXQIBAAKBgQChEOrMjixzazMaXiYZtktMvAS4wuIz62eieievP/fvSV/B0rnZ
+cf4XoJPa3PFH3vofw8HRpSoGy7PomsG9eHdoRcFVzbHB09+MEk/COg23WNzKEwi5
++xIkkKq3TgTrQw1FvhwX1qixrxA8OdYIRe2pfjpprnAihn5xH/EO0A0ywwIDAQAB
+AoGAaJMqT+vTcpDcmjcct78DPuwoiKmH4rvqCrUTRRbcbJGQSbD/F+6KUl7hAM5J
+Hifo8GzST8LT+ZuS0OiB9/naVGJjcLzpV+us+keMctB/cjmsPAAsRdeA8Xk0jTWv
+v+5a5ZWSSbRXycuUtywtoESY1RLEyB0k3Dcxvk6SD3LnNMkCQQDTyDJfP+eirhgC
+mKiNvHJjLtlRT11IMLMVTELEntsyKqzVgficZCWGkFRoF9iEO1OyCJaug7RZsuxs
+Z3lk/gq1AkEAwrHwzVPU+dTqsZ8tYHlq+d0xy+6eTtYy7e/5qH3AUz10us6BG/LY
+XVTwRFAOKQOciKZ/zPQa4oYeAc0oozSalwJBAIuMbyS0Rz262bdcQDSk5/rS8//P
++/eFn3t5NMW6p1T3KcvGSLtEgjWZBQVSMSlwrkWxwxhbUIuKip8jz6nse8ECQDgm
+g5FkLRdEfc9uXfLl8aFQVu0+y29nPVb8D9+1LMOVBNZfekLqPdZlCcpZ4EuZ3ApZ
+IqCkgiB0l7DjT2YKZM8CQQCp8z1JvoNRwhIuojh7JajY5QBkXtvHootXr+vDUHNf
+SgR5BRmqZb0F5/BK4/7JbumiHI11QUULxhOnNtlS7DDt
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/keys.txt b/mysql-test/std_data/keys.txt
index e511521d7ab..2d83b7fba60 100644
--- a/mysql-test/std_data/keys.txt
+++ b/mysql-test/std_data/keys.txt
@@ -9,4 +9,4 @@
5;966050D7777350B6FD5CCB3E5F648DA45C63BEFB6DEDDFA13443F156B7D35C84
6;B5EA210C8C09EF20DB95EC584714A89F # and yet another
-
+10;770A8A65DA156D24EE2A093277530143
diff --git a/mysql-test/std_data/keys2.txt b/mysql-test/std_data/keys2.txt
index 5b98fbeebd2..93fc537cd3e 100644
--- a/mysql-test/std_data/keys2.txt
+++ b/mysql-test/std_data/keys2.txt
@@ -1,7 +1,8 @@
-1;593E580927F47AB530D3B1237CDEF6D6
+1;770A8A65DA156D24EE2A093277530142
2;352E42F1B9DB5CB915C3262FE745520A
3;CFE065600F5EB57481075C65180C3F8A
4;205379930183490D3BECA139BDF4DB5B
5;E2D944D5D837A1DCB22FF7FD397892EE
6;BAFE99B0BB87F2CD33A6AF26A11F6BD1
19;678D6B0063824BACCE33224B385104B35F30FF5749F0EBC030A0955DBC7FAC34
+20;BAFE99B0BB87F2CD33A6AF26A11F6BD1
diff --git a/mysql-test/std_data/keys3.txt b/mysql-test/std_data/keys3.txt
index 4f6c618d2ad..be30acc6add 100644
--- a/mysql-test/std_data/keys3.txt
+++ b/mysql-test/std_data/keys3.txt
@@ -1,4 +1,4 @@
-1;593E580927F47AB530D3B1237CDEF6D6
+1;770A8A65DA156D24EE2A093277530142
2;E4B00A45BF775B4E07D634EC5CA5912B
3;6E35ACB162B29D1FB9E178021DAF16ED
4;971A664A88EE0022D408E40BFAB17E79
diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem
index 1cc1519ada9..b874f129ce3 100644
--- a/mysql-test/std_data/server-cert.pem
+++ b/mysql-test/std_data/server-cert.pem
@@ -2,25 +2,25 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
- Signature Algorithm: sha1WithRSAEncryption
+ Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 14:55:05 2015 GMT
- Not After : Apr 20 14:55:05 2035 GMT
+ Not Before: Apr 25 20:52:21 2017 GMT
+ Not After : Apr 20 20:52:21 2037 GMT
Subject: C=FI, ST=state or province within country, in other certificates in this file it is the same as L, L=location, usually an address but often ambiguously used, O=organization name, typically a company name, OU=organizational unit name, a division name within an organization, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:aa:e6:54:bd:dd:52:1e:16:f7:24:52:37:58:2b:
- a7:af:49:e1:cd:75:2a:18:52:e1:48:f0:59:82:c0:
- 7a:d9:66:b3:97:04:b3:77:f4:39:fd:d1:c0:1a:c5:
- a6:ab:44:84:d2:17:39:53:25:63:9b:c3:24:78:51:
- 5c:77:6b:df:b4:82:1d:e4:43:f4:67:0a:5d:89:a2:
- fe:b0:ea:64:3a:1d:9d:49:78:c8:7f:79:a5:cd:45:
- 4b:0c:ad:ae:4f:e2:d4:5d:ec:e8:73:06:ed:98:92:
- 85:49:b2:9c:31:3b:44:38:5f:bb:5a:f1:68:84:a9:
- c3:5b:31:39:d4:47:98:38:55
+ 00:c9:fe:83:3f:0b:38:89:1d:43:15:93:5c:26:b9:
+ 80:65:41:bd:2f:63:66:5e:db:fa:33:20:d9:c7:e1:
+ 35:f3:14:3c:c8:b4:f7:09:d8:f5:b5:44:8f:6b:7e:
+ a0:a4:3b:45:5f:e6:f4:0f:08:67:f8:5a:4c:49:e4:
+ e5:39:31:69:8c:cf:25:78:93:a6:7f:58:e9:90:9c:
+ 61:cb:2e:14:b1:57:b2:15:9c:ea:8d:6f:96:20:fe:
+ 29:ed:2c:71:b8:4f:1f:e0:05:6c:04:b1:7e:e0:bc:
+ 42:8e:bf:95:5e:a9:5e:c9:c9:a4:64:c2:1f:59:94:
+ 14:c2:06:44:79:bc:d2:65:2d
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,47 +28,47 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- E5:72:8F:57:72:D6:75:63:28:7F:E2:BF:00:B7:1D:B8:AA:FE:94:59
+ CB:22:3B:E6:DA:B8:3D:7E:39:61:18:38:50:C8:4D:B4:C8:9A:3E:2B
X509v3 Authority Key Identifier:
- keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
+ keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
- Signature Algorithm: sha1WithRSAEncryption
- 88:44:46:fa:7d:16:ae:9d:16:5b:95:26:03:3c:71:f4:29:3d:
- df:cb:f4:14:20:9f:87:24:b4:29:17:2d:7a:12:48:76:ac:00:
- 44:26:ba:93:83:ad:58:7e:b7:77:e4:b0:32:0d:e5:dd:fb:cc:
- 0e:9b:88:e0:24:82:e4:41:43:47:5a:4e:d3:b4:5b:47:4b:57:
- eb:67:02:63:bb:dd:05:12:f5:95:01:0b:89:81:ca:c2:91:14:
- 21:9a:9e:c9:84:91:46:35:0e:26:44:1e:91:88:74:4f:fe:d3:
- 19:9e:65:fa:46:e2:46:04:ad:91:79:4c:70:1b:68:b2:49:e9:
- 6c:f4:58:44:3b:43:15:85:56:64:1b:84:74:49:95:9f:cd:93:
- 9d:8e:69:ab:ca:46:97:b6:74:e9:2a:83:85:62:cd:e5:be:c3:
- 52:bd:cf:90:cc:60:27:76:ee:1b:3c:da:69:73:e2:11:68:14:
- dc:7d:9f:b8:6f:20:a2:0c:b7:8e:33:40:89:d1:a3:89:e2:60:
- 6a:ec:b5:9f:e8:c5:55:10:40:b2:95:5e:54:8a:10:8e:d5:90:
- d9:98:86:d8:f9:b6:01:41:8c:d7:0d:0e:86:0e:50:6d:a2:64:
- 00:2a:91:5e:35:64:15:e3:86:34:3a:39:eb:0f:4f:56:c7:15:
- 4c:74:2e:91
+ Signature Algorithm: sha256WithRSAEncryption
+ 8e:b7:3d:cc:2b:e5:27:49:49:5a:d4:3c:83:9b:2f:7d:11:de:
+ 6b:0f:b4:51:02:e4:37:d0:c4:b5:7b:4b:e3:42:93:75:32:d1:
+ eb:41:a2:27:fe:4d:91:ae:2b:a0:8b:3b:7f:e9:1b:47:85:73:
+ 9f:b7:05:74:34:eb:62:12:d8:f2:24:6a:b4:24:58:7a:6a:55:
+ 3e:ba:54:f9:51:de:54:0e:19:06:f6:01:23:32:0a:6c:81:e2:
+ 57:8a:9e:71:c5:ba:ca:c3:0f:18:d4:ef:54:4b:e1:ee:7c:3a:
+ f3:4d:c3:a3:44:21:9f:c8:ef:85:01:ab:fe:a9:7b:36:05:10:
+ 25:5e:61:b8:1d:7c:40:8a:5d:5b:c1:bb:7c:79:45:6e:84:63:
+ b5:3f:51:e9:9c:57:01:de:2d:1e:85:cb:83:f0:16:6d:78:bb:
+ 12:01:a5:e5:a2:a7:80:fa:54:8f:9a:5c:de:1c:52:a2:bd:00:
+ 49:e4:04:65:30:f9:b9:fc:4f:94:e2:d8:39:89:b6:a5:a5:2d:
+ db:25:a3:0d:5b:f9:e1:2a:13:19:5e:d7:1a:33:89:5b:ac:bd:
+ 29:26:da:1a:90:7e:08:19:dd:59:4b:50:fd:46:c3:0b:91:33:
+ 8b:c6:70:d1:22:18:37:a3:8b:d3:8f:f8:68:cf:38:8e:e1:ef:
+ ac:17:88:ca
-----BEGIN CERTIFICATE-----
-MIIEETCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQUFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIEETCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTUwNDI1MTQ1NTA1WhcNMzUwNDIw
-MTQ1NTA1WjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjIxWhcNMzcwNDIw
+MjA1MjIxWjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
aW5jZSB3aXRoaW4gY291bnRyeSwgaW4gb3RoZXIgY2VydGlmaWNhdGVzIGluIHRo
aXMgZmlsZSBpdCBpcyB0aGUgc2FtZSBhcyBMMUAwPgYDVQQHDDdsb2NhdGlvbiwg
dXN1YWxseSBhbiBhZGRyZXNzIGJ1dCBvZnRlbiBhbWJpZ3VvdXNseSB1c2VkMTQw
MgYDVQQKDCtvcmdhbml6YXRpb24gbmFtZSwgdHlwaWNhbGx5IGEgY29tcGFueSBu
YW1lMUkwRwYDVQQLDEBvcmdhbml6YXRpb25hbCB1bml0IG5hbWUsIGEgZGl2aXNp
b24gbmFtZSB3aXRoaW4gYW4gb3JnYW5pemF0aW9uMRIwEAYDVQQDDAlsb2NhbGhv
-c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKrmVL3dUh4W9yRSN1grp69J
-4c11KhhS4UjwWYLAetlms5cEs3f0Of3RwBrFpqtEhNIXOVMlY5vDJHhRXHdr37SC
-HeRD9GcKXYmi/rDqZDodnUl4yH95pc1FSwytrk/i1F3s6HMG7ZiShUmynDE7RDhf
-u1rxaISpw1sxOdRHmDhVAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
-BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTlco9X
-ctZ1Yyh/4r8Atx24qv6UWTAfBgNVHSMEGDAWgBTHLAGVGvU+zQSmJDU1BNmnFgEq
-eTANBgkqhkiG9w0BAQUFAAOCAQEAiERG+n0Wrp0WW5UmAzxx9Ck938v0FCCfhyS0
-KRctehJIdqwARCa6k4OtWH63d+SwMg3l3fvMDpuI4CSC5EFDR1pO07RbR0tX62cC
-Y7vdBRL1lQELiYHKwpEUIZqeyYSRRjUOJkQekYh0T/7TGZ5l+kbiRgStkXlMcBto
-sknpbPRYRDtDFYVWZBuEdEmVn82TnY5pq8pGl7Z06SqDhWLN5b7DUr3PkMxgJ3bu
-GzzaaXPiEWgU3H2fuG8gogy3jjNAidGjieJgauy1n+jFVRBAspVeVIoQjtWQ2ZiG
-2Pm2AUGM1w0Ohg5QbaJkACqRXjVkFeOGNDo56w9PVscVTHQukQ==
+c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMn+gz8LOIkdQxWTXCa5gGVB
+vS9jZl7b+jMg2cfhNfMUPMi09wnY9bVEj2t+oKQ7RV/m9A8IZ/haTEnk5TkxaYzP
+JXiTpn9Y6ZCcYcsuFLFXshWc6o1vliD+Ke0scbhPH+AFbASxfuC8Qo6/lV6pXsnJ
+pGTCH1mUFMIGRHm80mUtAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
+BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTLIjvm
+2rg9fjlhGDhQyE20yJo+KzAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEF
+EjANBgkqhkiG9w0BAQsFAAOCAQEAjrc9zCvlJ0lJWtQ8g5svfRHeaw+0UQLkN9DE
+tXtL40KTdTLR60GiJ/5Nka4roIs7f+kbR4Vzn7cFdDTrYhLY8iRqtCRYempVPrpU
++VHeVA4ZBvYBIzIKbIHiV4qeccW6ysMPGNTvVEvh7nw6803Do0Qhn8jvhQGr/ql7
+NgUQJV5huB18QIpdW8G7fHlFboRjtT9R6ZxXAd4tHoXLg/AWbXi7EgGl5aKngPpU
+j5pc3hxSor0ASeQEZTD5ufxPlOLYOYm2paUt2yWjDVv54SoTGV7XGjOJW6y9KSba
+GpB+CBndWUtQ/UbDC5Ezi8Zw0SIYN6OL04/4aM84juHvrBeIyg==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem
index 3125ae88a8a..feb7fbaf535 100644
--- a/mysql-test/std_data/server-key.pem
+++ b/mysql-test/std_data/server-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQCq5lS93VIeFvckUjdYK6evSeHNdSoYUuFI8FmCwHrZZrOXBLN3
-9Dn90cAaxaarRITSFzlTJWObwyR4UVx3a9+0gh3kQ/RnCl2Jov6w6mQ6HZ1JeMh/
-eaXNRUsMra5P4tRd7OhzBu2YkoVJspwxO0Q4X7ta8WiEqcNbMTnUR5g4VQIDAQAB
-AoGAblQWXyBzdBN1Z5BgRF6ieYpj6OT70QoogJMR5lRmutUPma4iQo17pr3znBT/
-nU+1w3/UtTXNEXCwqbA01q/gkbP2PaW/sbHLVow1B7u/o42WW6I3Btnl3ClnCNjD
-Mo7/Gj027hhp7mC61r81JeJVh8fJUgxdNqoH7AkDnA+FJAECQQDjIl3k6W2P+bHb
-bp+8eyY7ITQbppZh+3hFJKRL7DZKFYL5J6gejiBURnG9DKnhoSP2nqzqdrRhWZhB
-ZHr+ciEBAkEAwJ5rMpFoIwRzgPD4Q4iSqHcBbFcJE7dK1XLq6MYUVNQGfDU8pBvI
-EocXphpsJ8CbR35dGDY19rmO2LjG3RBDVQJAetRN9Inrjw2YCjNzvKjYTuew1zcq
-YghszO94zfoKjdu+PWEdwJBZmVmTDoo3oGXVHfxHRHA3MeISvWJKRSmRAQJAHL9H
-9msXJKrEZkkQdFvMr5HbR4UR2LxxUbvt7UGqxSJDuYPkggWXbZR15hdpbuFjC1+D
-m1pz4Ve+RwAExfdoZQJBANfmuWtlLU+SMpDG4zOyC7u4dz+TtnEOfDUECFNZtqvU
-MWz98MIXAjiBDYU1Z0BrA7b0/FVsPR3t6JZFQWWI2y8=
+MIICXQIBAAKBgQDJ/oM/CziJHUMVk1wmuYBlQb0vY2Ze2/ozINnH4TXzFDzItPcJ
+2PW1RI9rfqCkO0Vf5vQPCGf4WkxJ5OU5MWmMzyV4k6Z/WOmQnGHLLhSxV7IVnOqN
+b5Yg/intLHG4Tx/gBWwEsX7gvEKOv5VeqV7JyaRkwh9ZlBTCBkR5vNJlLQIDAQAB
+AoGAZzoeMJW3arr9kYUhTtj1+MlDuXf+1PNuRbrAERnSzErHVXrF1M5/owdKlBC+
+X6+6oGwSxavyFkVvP0QusK/D1DxSs60Mk1p3Ax5nVpNYiBdeBULcYiXCSUbKItYL
+vzyECIc02t+auWf/wp3Wy3g6sU6FoT2QCPSsy0qRC48VBzECQQD79P9w0XjJGk8y
+3zPc4JOr3a1UUu4VLjFdFDR2eZZRE02NcXfLHE0+Idk3TYnNDRLoWDJjdfZ0thZZ
+KuJ58wIDAkEAzTxGYmT/aieDC3G8sHMqLUvjN30TfTocv7mWlpxWo7zbRbQm7jsB
+S5weRKtu3yVmdb6rW+5IZSCazc/j4T5tDwJAUgDRSpTCrSFE+Zevt4nYRi2mBjXf
+i0E3i8XRtWWpSMXxjcGKba7ObRRzMA6qdPR2XOynqbtw9Vd2Ops8jthKpQJBAJJm
+8tZxsXlqIiLhyXYdUPLq9XS5tlNYRvXFT9S0RWGb8NbyQesjEDN9dGIL4JUxurs3
+fkmf2ui4r3UtXSNqQqUCQQDjatAhBdibh5UawO5VpI87OJMzATCkY/mX3R+TnbOm
+MkdydjF022P0M4N24DiM+2nBTDp+F45LwtQLa4vmB2No
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem
index 7e41195cea4..df27c77e8e0 100644
--- a/mysql-test/std_data/server8k-cert.pem
+++ b/mysql-test/std_data/server8k-cert.pem
@@ -2,85 +2,85 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2 (0x2)
- Signature Algorithm: sha1WithRSAEncryption
+ Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 14:55:16 2015 GMT
- Not After : Apr 20 14:55:16 2035 GMT
+ Not Before: Apr 25 20:52:33 2017 GMT
+ Not After : Apr 20 20:52:33 2037 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server8k
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (8192 bit)
Modulus:
- 00:e6:24:79:3d:3a:58:6a:12:1c:13:6a:43:d9:c1:
- 65:ec:55:c1:4f:7d:fc:f2:a6:56:a5:ab:c5:48:2c:
- ce:9c:9d:47:3d:94:93:d5:3b:a3:d0:09:a8:8f:e0:
- 4b:36:a0:95:ae:2d:ad:7f:a2:a3:c5:f6:87:80:4c:
- 6a:26:15:47:73:20:47:e1:f8:5f:49:b7:13:20:f7:
- 32:9f:db:7d:62:41:1b:60:26:7b:41:26:16:0c:92:
- 22:ef:b4:2e:b3:db:90:e9:09:ca:fe:1a:1b:e4:f3:
- 78:69:7d:ca:6e:c5:39:4b:46:72:09:51:08:40:78:
- 8e:04:2a:23:cb:d5:50:cf:96:dd:56:43:10:1b:d2:
- 71:28:8f:10:a9:e4:44:1c:39:8a:06:a7:fa:37:48:
- bd:5a:dd:37:7f:7a:00:cf:84:8a:48:a3:75:a5:67:
- fb:7b:47:2d:26:00:2e:65:ed:63:4e:b7:94:18:3f:
- 5a:08:74:54:e5:af:dd:86:1b:34:9b:4c:de:fe:d8:
- 69:3d:72:90:c7:5c:83:82:78:ea:ab:06:d4:f1:06:
- 20:ad:fd:24:bb:e9:94:e0:c6:32:f5:df:af:b4:14:
- 4d:9c:ce:0d:62:3a:3a:2b:11:f9:9e:d7:8e:63:2b:
- 57:35:10:7e:d5:44:64:8c:61:9b:4e:f8:e8:a5:fb:
- 47:bb:85:33:ea:c6:e0:3d:e2:2c:e8:41:e1:15:e2:
- a7:45:23:df:d0:f9:93:01:97:89:95:77:4d:d5:d4:
- c1:db:61:ca:e2:84:36:9c:01:9b:33:ec:53:83:2f:
- dd:d7:d8:20:c0:6b:4a:73:92:d2:6c:22:a6:a2:68:
- 46:8b:aa:3f:aa:fe:47:b7:98:70:fd:ba:59:88:af:
- 9f:0d:d7:cb:a0:42:44:f9:f0:54:39:c1:cd:fb:b4:
- e4:c6:d6:7e:1d:f5:ed:b9:1a:0f:d7:e6:a2:ab:a2:
- 25:1f:6c:f9:ab:9c:d8:a3:b9:da:32:72:51:6d:61:
- f1:3b:7d:06:2b:3d:43:d5:52:1f:cb:62:14:53:69:
- 4d:91:12:22:f0:55:f9:fc:4f:de:ee:e3:fc:fd:40:
- 57:50:eb:0e:7a:45:cc:52:0f:24:6f:45:02:72:6b:
- 6d:90:94:1c:d4:fb:34:f6:4b:4d:25:17:6f:df:4a:
- 64:f8:ad:1e:6e:df:ad:6c:b3:1d:1a:e6:0e:59:7b:
- f8:a7:13:77:78:85:bf:3f:7c:12:d4:8e:34:ff:01:
- 90:03:42:85:60:e4:99:d6:19:32:46:41:e8:50:ca:
- 2a:03:61:cd:c5:68:f4:92:0f:6e:48:89:41:9e:53:
- bc:41:62:ed:4a:92:64:b5:cb:3d:55:6c:d9:87:87:
- 9a:ab:fc:22:50:66:92:2b:b9:d7:9e:3b:ed:80:e3:
- fa:19:69:38:87:b6:25:3a:db:b5:d0:f2:80:4d:af:
- 6d:7d:92:90:de:aa:df:be:80:26:1c:69:ee:7a:e3:
- 45:c9:a4:4e:6a:e0:56:5f:1f:61:44:3f:62:34:c9:
- 1e:21:5f:f6:7f:68:c0:6e:bf:d2:35:1e:53:99:e4:
- e1:bd:64:a4:49:3c:c3:ce:b6:e8:a9:3d:27:54:ea:
- f1:3e:a1:fc:7b:bf:8d:71:60:90:c5:66:24:85:de:
- 7d:47:1f:62:83:e2:63:8e:10:5c:14:cd:d0:7e:86:
- 44:4d:df:05:10:43:b8:3c:87:64:69:ec:ea:fb:49:
- 9a:c6:76:c1:8f:ea:49:98:0a:d3:97:af:64:ef:da:
- 5f:a9:57:03:e3:a0:15:d8:68:c5:40:d8:7b:0f:26:
- 0d:5f:f0:be:5a:4c:fd:af:9e:bf:2d:31:40:71:25:
- de:d0:73:19:2d:ae:a6:cb:7c:f0:b8:a4:a9:5c:50:
- 80:41:4e:dc:f7:20:a4:a6:66:65:fb:92:d1:43:2d:
- bf:30:b2:0d:db:9b:a3:ac:28:08:c4:81:99:0c:0d:
- 45:e9:a9:e5:6c:da:bf:10:bb:a7:3e:5a:5f:b7:93:
- 4a:20:15:29:69:74:78:d1:eb:53:a8:88:49:cb:de:
- 0c:e2:9b:31:e2:2f:56:95:cf:55:92:a3:8e:a9:ef:
- 68:cb:00:11:d4:71:06:4b:e5:89:0c:b6:e7:2b:2f:
- 98:65:21:8e:2a:a3:86:73:bb:1b:76:e1:94:02:d8:
- a1:51:97:15:60:a2:39:d5:fd:dc:a8:be:30:12:44:
- b1:49:0b:94:82:cf:5f:93:61:1c:3c:eb:05:5b:a4:
- 17:ee:30:cd:7c:db:3f:ee:79:02:da:14:20:98:fd:
- 9a:0a:f1:39:c8:59:5b:4e:a3:ad:f8:04:e6:0b:b6:
- 81:7e:41:00:af:f7:37:ec:6e:bc:28:a3:3d:76:b6:
- fd:e9:88:c7:1e:78:79:27:62:a2:83:34:15:61:b8:
- e4:c3:ac:f5:7f:3e:4e:5f:5f:31:5b:e8:91:1b:80:
- 5e:cb:74:b2:e5:a3:8a:d5:5a:89:fa:63:f1:ff:67:
- bd:59:d0:70:77:b7:75:b5:34:74:3d:2e:99:46:0b:
- 4b:c4:64:2f:93:48:fe:47:92:6a:0b:42:5e:ef:c9:
- 06:64:84:60:89:2b:84:1f:31:0d:36:15:4e:6b:cd:
- 14:f7:a0:d1:b2:b8:ff:53:f5:aa:b9:ed:63:50:7a:
- 6f:62:e7:c7:7f:bc:f5:e2:0c:f8:28:a4:0d:ba:75:
- d0:b8:c7:9b:e3:94:62:66:1c:d8:6c:02:2e:a5:a2:
- 62:50:fe:cf:31
+ 00:b3:a7:81:cf:a3:9b:3c:57:2a:8e:de:13:08:a6:
+ 15:6a:68:08:ce:a1:a0:ef:fc:32:95:5a:9a:b5:cc:
+ 84:bb:a3:15:a0:fc:29:bb:71:0e:f3:40:20:97:35:
+ 92:92:89:36:6a:5f:be:a5:24:5a:c8:0e:f7:53:a8:
+ e0:74:05:90:38:21:a5:25:72:2b:56:70:74:aa:d6:
+ 30:25:e0:95:dd:3d:4a:48:4b:25:a7:a8:c4:eb:e5:
+ d6:10:4f:95:42:91:b0:cb:68:2f:bf:96:0f:0a:9b:
+ 2b:01:0d:03:ae:3f:b7:7e:f6:1e:c1:14:42:04:7f:
+ 09:21:e8:3e:87:c0:b3:d7:dd:4f:7e:95:b6:83:33:
+ 8f:cc:f4:bb:11:8e:66:5f:b4:32:22:8b:8e:34:93:
+ 82:0f:02:d1:6f:85:b2:a7:7e:36:0c:f3:0d:91:46:
+ f9:a5:91:dc:60:4a:0d:eb:e5:37:e3:76:d8:13:bb:
+ 55:33:23:4c:b3:90:df:6a:b6:80:3d:f6:bd:9d:bd:
+ ef:d3:8d:7a:9a:61:ac:02:3d:10:b5:c2:53:d2:7e:
+ ee:1c:90:a5:b0:e8:db:71:8f:d3:53:e4:80:b0:b6:
+ cc:b0:f2:eb:46:c3:d9:3c:48:01:1d:3a:5c:d0:f2:
+ 17:9c:9a:8e:fc:2a:36:e7:1c:59:41:66:ad:e1:d3:
+ 82:d8:95:ee:ae:dc:ab:72:94:cb:0b:8a:df:ef:70:
+ f7:f9:e2:77:76:64:67:2d:02:dc:1a:db:02:e9:5e:
+ 63:3f:3e:07:e9:65:e4:02:78:62:55:e1:52:18:5a:
+ a3:9c:56:dd:cd:d3:f7:f2:55:45:62:20:ce:fd:41:
+ 93:b9:c2:20:90:23:a4:41:4f:30:5c:5e:a0:97:6f:
+ a4:1f:87:6a:97:87:70:f9:d5:56:b7:6a:cc:f1:28:
+ d2:26:34:57:65:9c:2d:41:43:8b:6c:bd:15:6f:ec:
+ ce:3e:9f:4d:2f:a6:21:d8:f7:4d:d1:63:4f:f0:9e:
+ 04:c3:82:33:58:34:20:4b:81:0d:42:0d:44:62:48:
+ 1b:4c:cf:e0:69:e4:c8:f8:9c:98:1f:74:37:3a:3f:
+ 23:40:3a:88:80:c2:9c:9b:ba:6a:b9:2c:3a:67:a6:
+ b6:5c:83:fd:93:3f:6e:53:19:48:e3:3d:fa:f5:8e:
+ 03:40:8f:e6:af:c5:de:aa:f8:70:77:36:2b:6e:3a:
+ df:bc:d7:f6:c7:4f:02:7f:a1:ad:2f:3c:e9:08:45:
+ 2f:57:1a:f1:5b:9c:27:07:3a:44:43:3e:05:b1:4a:
+ 1b:42:a4:90:ab:ce:4b:f7:c1:9b:d7:dd:6f:05:11:
+ f9:e8:a3:a1:99:6c:2e:27:3d:b1:54:6f:eb:b2:e8:
+ f8:e6:12:6f:8a:69:05:cc:c6:f6:c4:2d:b0:06:b6:
+ 21:50:28:50:dc:8c:b2:8c:65:ce:d9:2b:51:b8:62:
+ 56:70:b4:46:4d:e4:4c:a1:86:31:3d:e3:07:7f:73:
+ e3:09:6e:ee:a7:29:2a:80:23:8a:b6:0c:22:9e:43:
+ 1c:a9:8c:47:2c:02:6d:13:ef:88:a7:d7:d1:60:d9:
+ 6b:28:80:97:8a:b7:ff:62:6b:28:54:0d:ab:63:3a:
+ ac:57:9e:2f:95:2b:f4:a0:3d:a1:60:a0:57:1a:09:
+ 23:ee:fc:4d:9b:45:83:f2:0a:1f:b3:77:0e:98:20:
+ b3:16:fc:97:03:30:fc:ab:3e:7e:fc:3e:76:64:cb:
+ 4b:4d:c9:6c:8f:aa:70:ec:03:c5:81:31:43:11:9a:
+ fc:2d:ba:25:94:0b:73:7e:c1:39:01:ca:68:70:1a:
+ ef:a4:ba:dc:13:d6:37:17:09:0d:ca:aa:21:94:bb:
+ 3e:43:fd:8c:80:e6:58:fd:75:23:5a:ca:1f:0b:2e:
+ 35:c2:cd:77:0c:73:b3:2f:9a:e4:03:68:58:c8:3f:
+ f3:76:8d:05:53:d2:34:db:09:af:70:ed:67:0b:ff:
+ 2f:64:35:2d:71:22:7a:f2:f2:2b:7d:6d:be:80:bd:
+ 18:38:37:01:67:a4:5f:48:29:52:78:9f:b5:b8:80:
+ 70:ca:10:6a:e1:27:3b:c0:61:4e:96:f8:e8:0f:42:
+ b1:fa:bc:05:ef:31:91:38:ab:0f:a7:ef:2c:86:c1:
+ ab:85:36:7c:10:9d:c7:0a:6b:e6:2b:11:dd:fa:45:
+ e7:d2:c3:3a:c1:cd:60:27:68:26:d7:87:49:5f:e3:
+ 7f:26:20:1f:99:a8:f9:00:a6:0d:d5:13:81:6e:fc:
+ 27:8a:03:58:6b:0e:3a:c7:20:a1:5c:24:d1:08:a6:
+ 5a:1e:e7:81:3d:21:05:2e:4b:5d:18:14:f1:4f:ab:
+ 5c:e5:81:da:c1:2c:f6:12:ff:25:09:97:1e:9d:51:
+ 6d:1f:63:2e:9c:ed:7d:86:45:b0:35:73:f6:9f:82:
+ 65:bc:7f:46:88:e1:a1:60:a1:37:50:26:9c:d7:76:
+ f3:dc:94:89:6d:d7:be:a6:17:a1:2b:71:14:37:17:
+ 5f:ed:5a:39:99:fc:69:af:bb:63:55:c6:60:7b:64:
+ d8:bb:b7:4a:9f:b9:aa:89:4b:30:1f:9c:ef:23:7a:
+ af:7e:31:dd:fb:dd:0a:d5:04:0a:8c:57:6f:64:80:
+ eb:f3:ee:6c:33:d2:72:c2:24:68:a2:4e:99:88:1c:
+ f7:3b:5d:10:cc:4e:ea:a5:cb:00:40:8a:a9:63:2e:
+ 18:92:eb:b1:28:05:fe:19:ea:7b:32:fb:63:56:2c:
+ 0b:20:01:92:a3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -88,61 +88,61 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- B3:A9:00:04:C7:9C:2B:CD:C0:5F:D1:28:5C:5C:C6:1F:26:F7:17:5A
+ 43:3B:26:15:A5:60:62:3F:07:2A:8C:8C:DA:F8:74:BE:36:B2:33:E4
X509v3 Authority Key Identifier:
- keyid:C7:2C:01:95:1A:F5:3E:CD:04:A6:24:35:35:04:D9:A7:16:01:2A:79
+ keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
- Signature Algorithm: sha1WithRSAEncryption
- 01:43:2c:d5:1d:b5:36:05:31:ca:b2:f3:9e:71:ce:62:fe:b2:
- e5:e3:2d:30:23:99:51:3d:50:ee:d6:ce:76:e8:43:8d:5d:9d:
- 28:9b:43:90:0c:d4:24:54:3c:53:3c:18:92:ec:93:86:87:7a:
- d6:7f:5d:3b:56:cd:9d:96:7a:06:c8:16:19:8b:ed:c8:21:cf:
- 15:b9:fb:06:7d:cb:5c:46:9c:c5:2e:8e:de:77:21:e5:9d:35:
- 95:00:c7:ad:d2:57:36:65:1a:43:6c:ee:75:ad:a2:d8:c0:60:
- d5:07:d7:5c:5d:8e:ae:af:4a:e6:fa:6a:13:78:98:b8:11:c7:
- dc:d2:a7:dd:29:b5:76:fa:ef:13:62:5f:9a:0d:e2:87:6a:04:
- 3c:5f:72:44:d0:d0:7a:70:c6:09:2b:bf:92:91:6d:f4:2e:53:
- f3:b4:c5:23:61:d6:87:c1:30:ef:fe:92:6f:97:78:f2:ea:3c:
- ff:e8:54:3a:9f:49:ac:a9:2b:46:c3:76:b1:f9:eb:31:a3:4f:
- 40:58:16:90:77:b6:3d:6f:85:95:12:a9:ca:70:0a:9a:cd:61:
- 46:27:84:ce:9e:33:54:8f:9a:41:6d:4d:11:bd:14:7f:ff:32:
- e9:06:bc:36:38:11:5c:0f:e9:a5:5a:0f:5c:7c:fa:f5:73:5b:
- 4c:47:f2:f2
+ Signature Algorithm: sha256WithRSAEncryption
+ 5c:c7:4e:56:eb:21:1b:f3:5d:c4:56:fa:bf:6d:e1:0d:fa:cc:
+ b0:7c:13:58:b9:d4:47:b3:de:b4:ae:f2:45:02:88:65:43:89:
+ cf:ea:9c:d0:ea:45:42:35:d2:ec:bc:b4:73:03:db:85:7b:c7:
+ f0:68:d7:dc:2b:70:71:63:ed:33:68:9f:29:ff:67:0a:69:3b:
+ c4:65:7c:25:00:cf:7f:ee:aa:fe:44:19:70:f2:74:db:da:9f:
+ 52:92:1a:03:e6:0a:49:85:2e:2a:02:c1:81:d4:6d:cf:98:d1:
+ e9:6a:2f:bb:fa:a6:d5:4b:55:38:c2:aa:8c:f5:d3:f9:e6:74:
+ db:00:d6:29:f9:d1:9c:7a:0e:98:c5:e5:8c:16:49:d8:cf:ee:
+ a0:cb:c2:2c:31:cf:62:2c:b1:7f:6d:60:b0:ce:d5:07:45:e8:
+ 44:17:7c:c4:12:fb:00:57:24:57:e8:17:78:3b:1e:0d:91:aa:
+ 67:98:d0:e5:9a:86:4b:88:4a:2f:55:5d:2e:13:ec:f5:4a:7d:
+ e7:13:a7:57:03:41:2f:f6:6c:08:8e:58:ef:b0:7a:79:32:e3:
+ bb:4b:eb:4d:42:cd:42:96:2d:67:f6:4c:c1:f6:62:fb:c0:3e:
+ 09:69:8f:36:7e:fa:c8:cd:ff:72:3e:df:92:f7:8f:44:cf:77:
+ fe:6e:74:de
-----BEGIN CERTIFICATE-----
-MIIGpDCCBYygAwIBAgIBAjANBgkqhkiG9w0BAQUFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIGpDCCBYygAwIBAgIBAjANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTUwNDI1MTQ1NTE2WhcNMzUwNDIw
-MTQ1NTE2WjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
+MjA1MjMzWjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMREwDwYDVQQDDAhzZXJ2ZXI4
-azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAOYkeT06WGoSHBNqQ9nB
-ZexVwU99/PKmVqWrxUgszpydRz2Uk9U7o9AJqI/gSzagla4trX+io8X2h4BMaiYV
-R3MgR+H4X0m3EyD3Mp/bfWJBG2Ame0EmFgySIu+0LrPbkOkJyv4aG+TzeGl9ym7F
-OUtGcglRCEB4jgQqI8vVUM+W3VZDEBvScSiPEKnkRBw5igan+jdIvVrdN396AM+E
-ikijdaVn+3tHLSYALmXtY063lBg/Wgh0VOWv3YYbNJtM3v7YaT1ykMdcg4J46qsG
-1PEGIK39JLvplODGMvXfr7QUTZzODWI6OisR+Z7XjmMrVzUQftVEZIxhm0746KX7
-R7uFM+rG4D3iLOhB4RXip0Uj39D5kwGXiZV3TdXUwdthyuKENpwBmzPsU4Mv3dfY
-IMBrSnOS0mwipqJoRouqP6r+R7eYcP26WYivnw3Xy6BCRPnwVDnBzfu05MbWfh31
-7bkaD9fmoquiJR9s+auc2KO52jJyUW1h8Tt9Bis9Q9VSH8tiFFNpTZESIvBV+fxP
-3u7j/P1AV1DrDnpFzFIPJG9FAnJrbZCUHNT7NPZLTSUXb99KZPitHm7frWyzHRrm
-Dll7+KcTd3iFvz98EtSONP8BkANChWDkmdYZMkZB6FDKKgNhzcVo9JIPbkiJQZ5T
-vEFi7UqSZLXLPVVs2YeHmqv8IlBmkiu515477YDj+hlpOIe2JTrbtdDygE2vbX2S
-kN6q376AJhxp7nrjRcmkTmrgVl8fYUQ/YjTJHiFf9n9owG6/0jUeU5nk4b1kpEk8
-w8626Kk9J1Tq8T6h/Hu/jXFgkMVmJIXefUcfYoPiY44QXBTN0H6GRE3fBRBDuDyH
-ZGns6vtJmsZ2wY/qSZgK05evZO/aX6lXA+OgFdhoxUDYew8mDV/wvlpM/a+evy0x
-QHEl3tBzGS2upst88LikqVxQgEFO3PcgpKZmZfuS0UMtvzCyDdubo6woCMSBmQwN
-Remp5WzavxC7pz5aX7eTSiAVKWl0eNHrU6iIScveDOKbMeIvVpXPVZKjjqnvaMsA
-EdRxBkvliQy25ysvmGUhjiqjhnO7G3bhlALYoVGXFWCiOdX93Ki+MBJEsUkLlILP
-X5NhHDzrBVukF+4wzXzbP+55AtoUIJj9mgrxOchZW06jrfgE5gu2gX5BAK/3N+xu
-vCijPXa2/emIxx54eSdiooM0FWG45MOs9X8+Tl9fMVvokRuAXst0suWjitVaifpj
-8f9nvVnQcHe3dbU0dD0umUYLS8RkL5NI/keSagtCXu/JBmSEYIkrhB8xDTYVTmvN
-FPeg0bK4/1P1qrntY1B6b2Lnx3+89eIM+CikDbp10LjHm+OUYmYc2GwCLqWiYlD+
-zzECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
-ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFLOpAATHnCvNwF/RKFxcxh8m
-9xdaMB8GA1UdIwQYMBaAFMcsAZUa9T7NBKYkNTUE2acWASp5MA0GCSqGSIb3DQEB
-BQUAA4IBAQABQyzVHbU2BTHKsvOecc5i/rLl4y0wI5lRPVDu1s526EONXZ0om0OQ
-DNQkVDxTPBiS7JOGh3rWf107Vs2dlnoGyBYZi+3IIc8VufsGfctcRpzFLo7edyHl
-nTWVAMet0lc2ZRpDbO51raLYwGDVB9dcXY6ur0rm+moTeJi4Ecfc0qfdKbV2+u8T
-Yl+aDeKHagQ8X3JE0NB6cMYJK7+SkW30LlPztMUjYdaHwTDv/pJvl3jy6jz/6FQ6
-n0msqStGw3ax+esxo09AWBaQd7Y9b4WVEqnKcAqazWFGJ4TOnjNUj5pBbU0RvRR/
-/zLpBrw2OBFcD+mlWg9cfPr1c1tMR/Ly
+azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBALOngc+jmzxXKo7eEwim
+FWpoCM6hoO/8MpVamrXMhLujFaD8KbtxDvNAIJc1kpKJNmpfvqUkWsgO91Oo4HQF
+kDghpSVyK1ZwdKrWMCXgld09SkhLJaeoxOvl1hBPlUKRsMtoL7+WDwqbKwENA64/
+t372HsEUQgR/CSHoPofAs9fdT36VtoMzj8z0uxGOZl+0MiKLjjSTgg8C0W+Fsqd+
+NgzzDZFG+aWR3GBKDevlN+N22BO7VTMjTLOQ32q2gD32vZ2979ONepphrAI9ELXC
+U9J+7hyQpbDo23GP01PkgLC2zLDy60bD2TxIAR06XNDyF5yajvwqNuccWUFmreHT
+gtiV7q7cq3KUywuK3+9w9/nid3ZkZy0C3BrbAuleYz8+B+ll5AJ4YlXhUhhao5xW
+3c3T9/JVRWIgzv1Bk7nCIJAjpEFPMFxeoJdvpB+HapeHcPnVVrdqzPEo0iY0V2Wc
+LUFDi2y9FW/szj6fTS+mIdj3TdFjT/CeBMOCM1g0IEuBDUINRGJIG0zP4GnkyPic
+mB90Nzo/I0A6iIDCnJu6arksOmemtlyD/ZM/blMZSOM9+vWOA0CP5q/F3qr4cHc2
+K24637zX9sdPAn+hrS886QhFL1ca8VucJwc6REM+BbFKG0KkkKvOS/fBm9fdbwUR
++eijoZlsLic9sVRv67Lo+OYSb4ppBczG9sQtsAa2IVAoUNyMsoxlztkrUbhiVnC0
+Rk3kTKGGMT3jB39z4wlu7qcpKoAjirYMIp5DHKmMRywCbRPviKfX0WDZayiAl4q3
+/2JrKFQNq2M6rFeeL5Ur9KA9oWCgVxoJI+78TZtFg/IKH7N3Dpggsxb8lwMw/Ks+
+fvw+dmTLS03JbI+qcOwDxYExQxGa/C26JZQLc37BOQHKaHAa76S63BPWNxcJDcqq
+IZS7PkP9jIDmWP11I1rKHwsuNcLNdwxzsy+a5ANoWMg/83aNBVPSNNsJr3DtZwv/
+L2Q1LXEievLyK31tvoC9GDg3AWekX0gpUniftbiAcMoQauEnO8BhTpb46A9Csfq8
+Be8xkTirD6fvLIbBq4U2fBCdxwpr5isR3fpF59LDOsHNYCdoJteHSV/jfyYgH5mo
++QCmDdUTgW78J4oDWGsOOscgoVwk0QimWh7ngT0hBS5LXRgU8U+rXOWB2sEs9hL/
+JQmXHp1RbR9jLpztfYZFsDVz9p+CZbx/RojhoWChN1AmnNd289yUiW3XvqYXoStx
+FDcXX+1aOZn8aa+7Y1XGYHtk2Lu3Sp+5qolLMB+c7yN6r34x3fvdCtUECoxXb2SA
+6/PubDPScsIkaKJOmYgc9ztdEMxO6qXLAECKqWMuGJLrsSgF/hnqezL7Y1YsCyAB
+kqMCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
+ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFEM7JhWlYGI/ByqMjNr4dL42
+sjPkMB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMA0GCSqGSIb3DQEB
+CwUAA4IBAQBcx05W6yEb813EVvq/beEN+sywfBNYudRHs960rvJFAohlQ4nP6pzQ
+6kVCNdLsvLRzA9uFe8fwaNfcK3BxY+0zaJ8p/2cKaTvEZXwlAM9/7qr+RBlw8nTb
+2p9SkhoD5gpJhS4qAsGB1G3PmNHpai+7+qbVS1U4wqqM9dP55nTbANYp+dGceg6Y
+xeWMFknYz+6gy8IsMc9iLLF/bWCwztUHRehEF3zEEvsAVyRX6Bd4Ox4NkapnmNDl
+moZLiEovVV0uE+z1Sn3nE6dXA0Ev9mwIjljvsHp5MuO7S+tNQs1Cli1n9kzB9mL7
+wD4JaY82fvrIzf9yPt+S949Ez3f+bnTe
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem
index 72d2756477c..a383b359275 100644
--- a/mysql-test/std_data/server8k-key.pem
+++ b/mysql-test/std_data/server8k-key.pem
@@ -1,99 +1,99 @@
-----BEGIN RSA PRIVATE KEY-----
-MIISKgIBAAKCBAEA5iR5PTpYahIcE2pD2cFl7FXBT3388qZWpavFSCzOnJ1HPZST
-1Tuj0Amoj+BLNqCVri2tf6KjxfaHgExqJhVHcyBH4fhfSbcTIPcyn9t9YkEbYCZ7
-QSYWDJIi77Qus9uQ6QnK/hob5PN4aX3KbsU5S0ZyCVEIQHiOBCojy9VQz5bdVkMQ
-G9JxKI8QqeREHDmKBqf6N0i9Wt03f3oAz4SKSKN1pWf7e0ctJgAuZe1jTreUGD9a
-CHRU5a/dhhs0m0ze/thpPXKQx1yDgnjqqwbU8QYgrf0ku+mU4MYy9d+vtBRNnM4N
-Yjo6KxH5nteOYytXNRB+1URkjGGbTvjopftHu4Uz6sbgPeIs6EHhFeKnRSPf0PmT
-AZeJlXdN1dTB22HK4oQ2nAGbM+xTgy/d19ggwGtKc5LSbCKmomhGi6o/qv5Ht5hw
-/bpZiK+fDdfLoEJE+fBUOcHN+7TkxtZ+HfXtuRoP1+aiq6IlH2z5q5zYo7naMnJR
-bWHxO30GKz1D1VIfy2IUU2lNkRIi8FX5/E/e7uP8/UBXUOsOekXMUg8kb0UCcmtt
-kJQc1Ps09ktNJRdv30pk+K0ebt+tbLMdGuYOWXv4pxN3eIW/P3wS1I40/wGQA0KF
-YOSZ1hkyRkHoUMoqA2HNxWj0kg9uSIlBnlO8QWLtSpJktcs9VWzZh4eaq/wiUGaS
-K7nXnjvtgOP6GWk4h7YlOtu10PKATa9tfZKQ3qrfvoAmHGnueuNFyaROauBWXx9h
-RD9iNMkeIV/2f2jAbr/SNR5TmeThvWSkSTzDzrboqT0nVOrxPqH8e7+NcWCQxWYk
-hd59Rx9ig+JjjhBcFM3QfoZETd8FEEO4PIdkaezq+0maxnbBj+pJmArTl69k79pf
-qVcD46AV2GjFQNh7DyYNX/C+Wkz9r56/LTFAcSXe0HMZLa6my3zwuKSpXFCAQU7c
-9yCkpmZl+5LRQy2/MLIN25ujrCgIxIGZDA1F6anlbNq/ELunPlpft5NKIBUpaXR4
-0etTqIhJy94M4psx4i9Wlc9VkqOOqe9oywAR1HEGS+WJDLbnKy+YZSGOKqOGc7sb
-duGUAtihUZcVYKI51f3cqL4wEkSxSQuUgs9fk2EcPOsFW6QX7jDNfNs/7nkC2hQg
-mP2aCvE5yFlbTqOt+ATmC7aBfkEAr/c37G68KKM9drb96YjHHnh5J2KigzQVYbjk
-w6z1fz5OX18xW+iRG4Bey3Sy5aOK1VqJ+mPx/2e9WdBwd7d1tTR0PS6ZRgtLxGQv
-k0j+R5JqC0Je78kGZIRgiSuEHzENNhVOa80U96DRsrj/U/Wque1jUHpvYufHf7z1
-4gz4KKQNunXQuMeb45RiZhzYbAIupaJiUP7PMQIDAQABAoIEAQDdg63OaSJAtj2f
-0mCMb8ISwFfYk4Osar5rp/Gzjq0vwZKYizHfxA/gZeuA0HqUkeyAQicE+x53pNq3
-etWQ4lprTV7i+ZV99mDLEiQACdudft1Cpsdr5aTDZMWLwvpQ072fEHX6Llc6/72e
-jB0UkXCcK6oHnZ87rs3C5Gyf/SpTJPrV1KbkoKGaUFnRrIyCPj/EOFp2a+UWWGba
-pCuzkfcoA21xT6yW8+NY+EOwh9VWJwy8af3WtWIh0ix+sCDqegsJcHObWXJQ8ZMD
-Oi9lfqXnd+ZskYOR+zn5P8w9LJiJ1CEAFLR9H15tpleFtCSw/z5pLP9ndvTwyeIb
-GSmU2VAqBgP6roGYDuL6iq6Dyi0GN4luM0pz9c/PtY2Ni8MrzeziKjAF6OXiDE41
-rxTwdG7RxnNa2q7+tjt9hrCgLbYqd6W/6VKYZY1YKvIE+PhdwGtzxwbKsOf6phqt
-6DZr0BKIX7VwMeXRHbhtjw6hR86diH2koLQPfH4crDIL3GQ2J13C/RxjTLAEOli2
-y4paeOYzOe6ANDXXBOhieFw5f6mqD9pTF2PWDTnTJhfMGJ6gXPapDYoycS8huNnM
-DnqtMVIOf2zOI8aSkumJyXq2bEpGSNK80IJgyKfpk0b4qOdbG7tklfbhVCxTida0
-qqgmJKLGrNmJNW8KLB1U4/hcowEVFz8MF0OZAnByDHi2axwSRSGD5aG2yhCfs3Sy
-C269M25v0WuTeOs02RnHUvLPIhvbOEVTu6AjvAtYIfjEq+xqrjbZqUqJeh/xo2tF
-SohWe5aQs5DntsMCkZWlqlXc4CCaCqVACegh5Rn+8JbpZvpzy4HUtThfVbB45a5P
-6uRAsoxiIHbPLyIaKHFqqfog98hzD4TZYKpfb4RCgqKgEAHGKh4/KPM9O4iw67Oj
-EnT2WduegazemzOxQIuZ1UcNu/2d7uy8v/zPGLEUfqhFLS8PMStEuLdQQZfU2DFM
-rHJZsH3UtgSreZuQnlTHYy073UhB44mhcYbwa03jMkLHb1bt9q9l8ZAZ5FjstKJD
-vN5hMqT5LBQtvArCB+aIVDQxEyZiqFxBlW658uAIhCkLXNB5BVfEUEB8w5vZXOPn
-UpNyM8v0dYOkiSOH6+Kk0i7eC8CSrSQAaLnuFZxepGCGMFksywMv7mDg6yX1sAkE
-RMakKaAaZ55QpUv1/heaBVK0xmwpjJBefAoMCyFh/I+o7BkFdWGsGF2Tc5ZxZB3F
-DF75An4WV2qFMNEIb2SGBBUHGoG75C7tRC9ll39SqX7X2pXMaHvJvEx76CmhC9ub
-TzkRDV0Zi/GqiBQXz5kn4AP3GCuJUQJIvK2l0HPqbqNULrhahwQWBOpIek/SLBFV
-3fRQc5ABAoICAQDzqaS5/JEKUGMzVikWYnxl6fXgMp/l3Hq2DyifRqgYVoSr/wOJ
-PTOOJrtuvwHK6kbOv4YRfKwgVWlJgoAP9Tz0GGpE7toSk3biHY4tTF4KR3xIIOnI
-LQLNDR0LDrJSjQhAH5z8U/E+dpOCBHLfXodZ0/ZuXx9YS/pNDQBW/+HOmDtCfqpb
-kLmxjZcvZnAZyrlSjGrHJoPjiFrVA/1xvY68TNWHWu8EXphKO/aBi5/e4wWS7I8q
-0lDjjPB3GIm0rhumowoGYDPtchcTIvip9aGSPsw56elV+PiwbZaPHZXwHeI0Q25j
-UAdkmkwO4VaYGeR4JSUTjoOwWdXXediRq9SKRwhOoat3GJdDwYByYgZb8MKdQCZV
-H9hD0rEF4JOrUnOsCteXMNEczQocfSxduLD7XLie+oXoEggNE/hD9EJ397sOvyUg
-rgmJLBPCbIPdnfCwm9rdLMsWUjvd4JFq1dyQ9QM1LkdOGQdSoUixtN8X75BdkWhL
-/LUqVV/L5/1DStYniO6k4ry67u4POisAZa4czPAJrBEOakVxkCIoaH+mZ/J3GxWc
-DvnV6myvcNXUEENhfMt2mikP5zcPthq1O1nm7RFqiow4s/f0jc6Epr/LToXwhm8j
-5ch0TkcM+ioguCyYXWEzRJUt3GBWpHoSvxqKLxaWbo1mtxHpGxHDIIFAoQKCAgEA
-8cuU0H0OE3JJaG+9Hp6q5mJfdrAzeIPTCT1jxVDptZaplMVo8X0+LIKYpzWqbGWa
-Z3cTmReOZBukuKPKXuZEufYqzwIh7lEv1ls2SJ8Gedf3Dq3C2fCITHzXlsg58mrf
-tD6cKE85EmI/GhXtaBc51Qa60w5MyXfzK3EPi8lD1v5Il5K1MG6sv+7+P1LgAQVj
-c9mPVT1WmgBFVG2/syJ9L94smwhrtM2NhxMkMtEBrOiv0Wy0bEb1wIo5ndBGBoeF
-KXBfz87HDbUCSxItDFZ5mDk2ARnzl/13+wr81aKcxW2LyQ0eiiN+HczmM1xpavU6
-KI/QnIvUNqW9XRSNpz/w+DO9+gs9BPIODMww4KpLVtgFfy5KYre1/MpgZHVlHDCI
-r72WaDFHdMs75JN1rPNnYx81LtKp0JnE2bIDda3qlCKTBtwaFEUg1F0v9NK9yiZF
-JytwUUIfURayT34hfDAJDaSemWT3b4U2kYBr7Fp+g6R5iAosx/TnCYxtuGhdSLA7
-JkL4gy6Ll6hQkIyxRxC6R38wzwUFg4pbV6qrhjP1qyuU1BsZrBSV1RSbcHghSAZj
-UmT/sCKOhnliptnnz3e6ceP8I9Y2/TOeJXPdH6zvfaTpnVLiZC48FBKnXFCM4SaS
-v5qejQChBBOyd9ybO40sxC/Db8WsPa1LCMnHzm9YtJECggIBAOitGIYZ7o7A0NnW
-7wlXJp9TWN2suhAQCIYN16axHBeRlsN/k2rcLH0T82v/rcCNEuye63GLcfq2VQJD
-QfL7JieZoPEOfOO8OYwW2QvcnviF5uIhu9zRTplsak2CzToTPsus5IX3yqjxJk7D
-3MX8SJe41tvyrcXtV6l4PtjVJFXZ/My0lA04GHq6UKKM2YNnmKyBNf3Sg6MlNEex
-tbWFY+XgIQ9OAGxVwGsy82QlZpa6hzoT92rWxzNkBMRVhDorAHCRxCLufufBSNOX
-U4lI6+7xVKgA/DaCt0gSffFQOTu/7aAmvCTN6SFiTjrvZ3d7UjaAkfUo5Avk3VUU
-H4CLazxYNFCSBWCG9PtYrkWL4bKuJ8lt1qz26ddqPGz2VU0GQTsKZ3ESxr0P9xXZ
-WiJtGWQO2KXHaVOA1HtYlHyfpVFWGSQt11BroOOCWaQRZ6KbDZo4WjlWauB3yn9H
-0NUKP8OUlGmWNbUYJWv8Y6R+qYL72wnero/RU1aHjCD0+V3m+rVqBykg80Q2oNGd
-pC6O6kLKWHWEAA2Z4ZJeJqAbmbnYDSs7i9koW96wKvUldKs6lH1lZA1vjMKI8oVo
-SfzCHklsHHN2tgv3n1HCkHEPopqL808JsNvAsziM/0AfK1dvR/Z/RTBlz2apyL0z
-9vYr0zYdXR5tl018h/fnR4Dja0nBAoICAG7z5Ui6adAgnHDQ/W5kjrWDJJ05A5Vk
-oF1YD0VG+Md76Ds9TwepWfNgxh3McXSmNvENYi/Y8F0dljun5UAg2B6hSEmPh/Rs
-ys/JMSKn3nfg0xyoPYZ2aoT2sJMfM//6bMawCEYy/FRkQuJ8d2FRbxdCrE4W/MNi
-SHKBwgl6BKhOLQ9oob4kux6j04VJSUMOrvFFPxF1QR0PzMCOT+4qgFmL0NofRhVE
-UZJPBUhQQj2O1Mb749rfwPtmMkQpg0iRvVgjmcOo9gxjKDc8kvFbaRaiAhcFSpNP
-G1RWWWjK4rdxqjhKzd3DpaaVFHkzCair+NEOFUMQowOkkD17Jfk+TRwH2kA4EfsH
-+8yBklg1rLagD/2pRzb/aAIk95CBkjEaUE6cZ71OB6UfcU9VHyWK18FTW7strgDr
-3rmqhw3kDYWGTANU0p7EjekFDfGBFtgBMbBkrXiMKAS0roPts/3hqPXauXBYNXa2
-ITEpRdzCNdXAjogPazciOTZXey2ork2hmLLY/mJr5GBmOvnppZufoGsYgVQt0Lbo
-sTuMNIMzqqKuL/AYs3IUTCDoAN/eMB911vPDJtUzNkWcw9kemtHH9gU3AceMD9Wm
-bwZuoWRcndUA7LZlhz9DPAxV9vhUeiEC60oC8IhxZnGRfE6mK5FrGcS4yiyq/3uZ
-3pmcxhQDYigRAoICAQCzK0SUG9tSzwpyuEb7hbS7isT0XOnVvLDEXL2jTwVqbN8a
-pC9jebbzJgxk5EA+np/eZlRU7h4aZjRhtDwi4HsarXzgIni6z1vswAiOSZRCfC17
-8/tjfER9w3pJMRTJ5MFeN7JvNUhWnXY5fX6SBl/Eocwwy8S/eIWUY53aI2k8UZMR
-eLUb9I6eL21qZAPp/XD8/3pF5DH0ECOS96C8mDKTGnARUyfkKrlaASSTfe5XToNb
-IpDEYtLwpHN0missq+ObqPc5lwot/nBy2fdllksb3mCCK8AxuKEDsVtWbb2maoa9
-lRGxIxr++ZV8n0dAwGCV18CbhBYh/B2YnrexI2ZfYOQbzPjHiuUgSLGBJvIUX+S+
-O8ij0vQBqECfwCq63SrdW340Huob52d/cod9pNolO5edftPNJVJP+44sZtEJoDBW
-WgzdpVV9fA8TYsO6B3Dci960fbpWnKZ01uLFWVTkou8IwqcaxJIyMzS3Gmqo4UEF
-oxBSrg9rTAMJSnm2YWBHK1Z8DDlLzw3SkNZVKm6Ai4yEcLs1PzGZejsJvsu3zGgq
-nM4liRHK2QqY1SJf6PsJGxAI62tlyTRfjxtC3Jq9oJbmJs+jl0gtNKEbkfQc83IL
-8wCHOm9G7KK7XJjMCb50Dh80YIDFj5GTQLU1tKdpDBfq6YTKUHqjPA8GRnz8vA==
+MIISKAIBAAKCBAEAs6eBz6ObPFcqjt4TCKYVamgIzqGg7/wylVqatcyEu6MVoPwp
+u3EO80AglzWSkok2al++pSRayA73U6jgdAWQOCGlJXIrVnB0qtYwJeCV3T1KSEsl
+p6jE6+XWEE+VQpGwy2gvv5YPCpsrAQ0Drj+3fvYewRRCBH8JIeg+h8Cz191PfpW2
+gzOPzPS7EY5mX7QyIouONJOCDwLRb4Wyp342DPMNkUb5pZHcYEoN6+U343bYE7tV
+MyNMs5DfaraAPfa9nb3v0416mmGsAj0QtcJT0n7uHJClsOjbcY/TU+SAsLbMsPLr
+RsPZPEgBHTpc0PIXnJqO/Co25xxZQWat4dOC2JXurtyrcpTLC4rf73D3+eJ3dmRn
+LQLcGtsC6V5jPz4H6WXkAnhiVeFSGFqjnFbdzdP38lVFYiDO/UGTucIgkCOkQU8w
+XF6gl2+kH4dql4dw+dVWt2rM8SjSJjRXZZwtQUOLbL0Vb+zOPp9NL6Yh2PdN0WNP
+8J4Ew4IzWDQgS4ENQg1EYkgbTM/gaeTI+JyYH3Q3Oj8jQDqIgMKcm7pquSw6Z6a2
+XIP9kz9uUxlI4z369Y4DQI/mr8XeqvhwdzYrbjrfvNf2x08Cf6GtLzzpCEUvVxrx
+W5wnBzpEQz4FsUobQqSQq85L98Gb191vBRH56KOhmWwuJz2xVG/rsuj45hJvimkF
+zMb2xC2wBrYhUChQ3IyyjGXO2StRuGJWcLRGTeRMoYYxPeMHf3PjCW7upykqgCOK
+tgwinkMcqYxHLAJtE++Ip9fRYNlrKICXirf/YmsoVA2rYzqsV54vlSv0oD2hYKBX
+Ggkj7vxNm0WD8gofs3cOmCCzFvyXAzD8qz5+/D52ZMtLTclsj6pw7APFgTFDEZr8
+LbollAtzfsE5AcpocBrvpLrcE9Y3FwkNyqohlLs+Q/2MgOZY/XUjWsofCy41ws13
+DHOzL5rkA2hYyD/zdo0FU9I02wmvcO1nC/8vZDUtcSJ68vIrfW2+gL0YODcBZ6Rf
+SClSeJ+1uIBwyhBq4Sc7wGFOlvjoD0Kx+rwF7zGROKsPp+8shsGrhTZ8EJ3HCmvm
+KxHd+kXn0sM6wc1gJ2gm14dJX+N/JiAfmaj5AKYN1ROBbvwnigNYaw46xyChXCTR
+CKZaHueBPSEFLktdGBTxT6tc5YHawSz2Ev8lCZcenVFtH2MunO19hkWwNXP2n4Jl
+vH9GiOGhYKE3UCac13bz3JSJbde+phehK3EUNxdf7Vo5mfxpr7tjVcZge2TYu7dK
+n7mqiUswH5zvI3qvfjHd+90K1QQKjFdvZIDr8+5sM9JywiRook6ZiBz3O10QzE7q
+pcsAQIqpYy4YkuuxKAX+Gep7MvtjViwLIAGSowIDAQABAoIEAG18dDwatQx9As62
+wFrQ/NQwOs3S6sXWqO0knoyU639+0Duf8b7uE/Ji7nm4iG8NeEAzwXfbRAgQNuKh
+VMjgaxgKSR8dCRRQzIkgp48t46dFJvQP+A7JZ9lr5J1kIs7DAz+zawYTaW9JSVgG
+mmujIS0ayXtZ4THkSaiEZTdOVUwE7+FxVB15WvXJYAg/BFzm8HblHfEkxGppiUGx
+9ULmRAJ4TZhv7Mzeq7Ny7jEJLJpPXzgHPtE/fgshC0d5mYYpzT1I99OxsTpMtAtZ
+M8nReEwcVvjJnnDGOJZo1J2X8GXBwdVE9eXWjZmTODqbytz77S/fcaxz/amzOSIG
+dYne4SsllKS0jzfxPhz2saq26ik7vxpD7i0cRQ+I0alvgISWRTQUiHSI8UTtYJ6+
+/l7VAa/isoTZOsOmwv7M7D6U9EtjrUKwBAUHFk+0Fg2w9WELhep7/bEiQWvnOMtX
+sruWBm5zv5CxW1MuujKn2t5jHNWhQaeOIrW9V6Hew3PJsLTTHUVX2Ikc8KZLObTP
+XTtGE993cADrYYxPH8l40QCHB2t6bM2maBTRy8PlMFMsYaM7rqnftlOuXyRYLm97
+oO7F8InpD1mDND4bBKbL3UOgl1QW9dbb8KOn8pERDXD9Z3K4ewyORiyuONXxBAz2
+QiaQ4gDJWD6sEySPEHcpDjemi6mKJFtDw935JxS2brso/NHoJSVdcNxisd2irA8P
+U8jyFTrTm7cO0nKFx9vv9r5dsbkqyQnJ9V0q4/DoWvnkPElKuvTeJMw6CvTjfvc1
+xIf8m3MQJTN8pqPpIOSj8DIhQIJBEVxtcajg+vlMuefR8hTCdLzQV2QEdLGjNGph
+OhFuHrHw1b3I4nCyi9MOLzpdUDgZkaw4hPg38u71RJ6bUF6pE89Yj04/svB7SZgA
+sE8+/pZcASZl1Y0T29OM3qFJvukBWwsNij5P5SLmTXDev+DXbzUvmVLCk8nJkJ5m
+n1peGst0ApHnEzxVhU+9d5FWBdIgN7fp7V2AlFt1r0TRWUYndBn9/B6xiyfd5iyK
+LpcbRjLpQ/9b3SYQZL9t65Hc40rP35rY0luQTzVd6E/D041E0NWdpAZai4GrpMKp
+NUBXBbmwnCZEzExLi78We6aF5tG9Vh+uxyYUXlrABR98jONgYIvnWaATaw6oLgam
+B84RhWUa1f+K70wrTorUO8QNvYO2n4jpwJikn4H9pFvvzzoOB7RaA+EF4HjaVmQr
+Jm6S18c7sksYFGIJYsPrXMtgOMQVYiQ3s8LDgsWKoEQYgvgxE24AoXGlXXbALrpo
+4WvRN7qLAm3n2OQYFUK0SGoELOADQFQhbNL91i0k4wzQ56ofQCb8aTmm3q76TnbK
+4gmIUIECggIBAOm3PhMqIKb3ZEZOWYMKByb7v8seuVh6mwXmgITcZIiA2f8rTfyH
+OZanYK72FsuGZEbf1ELwNUX0JobwklA1Uq9NajaJUdfe4wDpghf282APHK1nD3m3
+FX7Rsoof/dW9+bV/IIbQDwy+1ctB20m6dejt3kWyHSXly2y2L3bk1flee8oi+VCO
+ROp4u23KJcglIYlL+cL1z76lX41v8JW3deCTL/JStmK6zuvFhY5fTlOGxsLhAY3X
+VTZ0MNUpezlBaXTixi7ilgbh7rJSpCmeno5my1hdl/5Q5U/u5F5E7ZxKxlhuVWdA
+cf9qbtolSsgJ2w8axPD3dLnQ6wsNnl4yL77TdNr8OlbwIADXHH9VzZbfEgOhP4r9
+Cwz4hIUbylJ9QGZVsEVZhvqR3M6OgqlYOmC72nLPXVYbL/Rr7cTx8t+WJ4wJRP3l
+pi6AgDZXKbMKyMIhM1IscSR2swtAFyl6g6rcAjFyG+p1IKMOQ3YOqdVVUf5UYSpo
+NBTpJ+ho3CyQJK25yT2Maex5Q91M6Rk9vmXaIs+K40t/zu8cnCIH9j3In0BrpSi7
+WUyLgzXW+7ZrW7cugC93VVgjGNbgBiDimZ5duViI+xY+3OlrsUxzSHN+YY+8H2G2
+TfzT+Mgo8lJXH9tseFBLvRKhoPbbCyCwnOJ6k2k8/iqZ2eE7vQodyW/zAoICAQDE
+yK5Mlu0k3oTVasgYRNDYKJ9uyarVLaRcN6UjzNUSta2hABzQe/LG895EucK9yVa0
+4jT7EXILYQpHnQkaYtyHtN/deYWLRObT6RMws7te2MhwzQkaNavgi449dHP38TPS
+qy3Vh6v4nMhRjkhLqNiiJoDWThtkB216t+71GxdF2l9trrcvlC6q0Z65PR4LK3B/
+3m8KmlyGN940Ovb/4kEh2EZmNwbMq+3SaXiS4R7ZvKoboyNmwvCh4t5ne+NXz3Vm
+7srej0cnOM54dTuNVdXm6pajYjELNVJGsK0vo6CAZiAOyasFkwMFMr5w/ehBaZIo
+9ewWjvgDdvQ0+JBMVZJot7e5D4tUgVTaIMpQryzAp/u3r5KC1bkcC1Zie+44CaPr
+V2FspEyYQDPJHC2tRj33lbaCWDdfdhYhv6uzlcM9ExPj+RQA0xlCuxh1pxK43H4t
+PdWvcIeIKtFRWq9gsH1/wDBaIsB5Kykq4xyvMOj3dyV+dyIO1D3GG2+ZoBt8gklk
+ieDIzCMKsXbomgm64/Ewlx9tf1fbTouSWP1+Gh0Wne3sCEtCY72ebYgjtaA0w8Xr
+HGTsEdw/rSer46uULYWXYC6VYZwlyTbPh4NSD7ATrQo6HnaKugtuya9NPfYD9S9w
+PoXPXpNKvwSq9SA/XsodHet9uU+IlKnYI41hVGaukQKCAgEAu7dAFmh5vWFqmsWH
+Q6akQ/1j+KL+v0AKj1yp0Qyreq/zZ+3CP5fk+0oIb76cZG/Wzs4sUG9aeos0/qDv
+A5kwhjipnJACul38+diTcugYZgj9QZFLbrlMfIW03xf+6tQhYlNvLpih3dzRHuYQ
+WVF4LtQO+O+sVaoSD4js6pO2AQqQZrRchwUd+S1rbS0112FrZDkvrBV+/GMbMiC8
+naOy++N8WSdx8i6Uz+3f7ZBC+vd/YTsT4ncXrBr6tdsRa9VL/GPARhwb3/9LltKl
+pAAQ3dNWc+0IjW0wIVmA9u5p4mR0lsZXtgyfA0TbMD9PpwezeJhJojk++ZgBkOkp
+UAMDMkPo0ZJQ0U8ghUxBSU0DSbB1aZDz1pCTdaGN3tOJV2Pee9NLNwhHT64kKYtx
+Cs8gZF29gQVotCY2CB0/5jVmm4qgzOsNDNiM90CiugKcLX/162Z7L/8eCOmFuP2L
+HPeYFX2MDWbXYSMeSZjFOmdgpUZYCux+9m6nljwGn7bJUMmdjCNyrQrAcPydM3v4
+pRtgd7ISz5uAID3RWWAjT3oRn2Ip9rX++44ulTpg8rdviP8FtUWWE4nHdHkMFFnu
+0i7ur7Ibki7DbQSkrp6e0watJIZXmfjBQ9wHG5CteybYKqZrofOnVubeP76t6Ffa
+wjDYcVd+WsJwaosT4sH2fc+a4V0CggIAX703N+ISHGb6f47FLTGF3jTdZJxPNgpP
+teIIwUMtwz2K7RLN8gzr0Cnj0NID0iw7uCN6HVCeiLS8uJzJSgIhQxEX/XvbIify
+mdUC1iYLmhikZGUM8ah9J/Ed0f5vUYkTaoKH+SRZ4cn9l9g+ijjqtPFAq4Myxlbq
+x9LnOm7kwsJ8vTNMwqQ4lDkKHRuEG3EV+dAxfBofu9lAjW7GrzXX9Gxxy9cnwro/
+KajQ1b0bMloc9PdJCPz87/YduIFI2XcAqoSxRNi2iHmV0ntO7vN87yzg/zqNm+Nk
+VSouCEh2lSGapTcusraUuJm4l+agcfq39p+3Lj5+ocjlBUSNh+X2JmaDx1Ctu/50
+Vu+vHtQrVMwlpneQM4Fh3ygQ7jdXbgIasyw/JQlGjqhlyYmhG3VaPrOjKQVcY2Bj
+YiYLloLdi0BV5AtR1RjfaFz4iH0xmakE5mP4K7P27KPQVOFnBAa5+EZ7/856kDkU
+fV4jnYSRQ5y/LCkv88EFEPZWNIr19Hy60mRWbbsLrW8r5/zRkRDHTpmn27EiAHvV
+Ye1T3187Gb7ae4SJgRJftc2ad60s9Z7uEvYsj8Icwwoui+1nk98V6NENuPXVb3jW
+5t8KYAlr5BbDLAWYLORZHZyYYl8r6z8FxnlUxtA/nxUSY06BUvN+J+5fnTpkXJHf
+lF2vslPK5VECggIANpTlrc5Zp9c0jPOiBQT/92LdtMR9mB76WB8fX9xn1Tm7V/cI
+MatRrFzaTvi5HqHxPWJJ5cgMYKQw8kHHk1q9U7jeexZGCICFOUjk3N2Z0aXIWrx+
+hiS1i5DzRaZNI682s436cdaS4GpZIhqjIOR4/JS15Nfu+DVqyHOevWnd0D/tGoJB
+JpiePYl2k7b8sirM3bHnRDtBiMHrHyHxzpdTLImDLHXr7C5DTeQAzzo+YMu45mNm
+utKq3SRlO2wizj0qpONgJ6cHI7pypAPalliA+hPRRJqaHmTr7LpkP3+g73hf26wK
+PoF6CLkdaN945F4Z48/3zEOP3XRIQocMA46ayA+8TsOpx9rm8L1LrF1pgmJi5Ml9
+3yV93ZZ/w4Jy0pqZ28nn3gcX6JP7qtfgioLLeyuuBphpOQXl7Ys3w1d0EEErpATU
+tRG+BS16o+FhM1iXAN8c8HrqOtyJzCpYnuoWiNc+G8BIn6ox3xmihwK4hiR6s/OM
+Mxaa6T4FF/IWIzuCezYPGgybWMXj3nRHsD7eNP170irBLwS3GdD1HWM2BpmLdJa0
+m/7QQkONhCnNFtjIalfPWMX51z/8GOKRKWH5A8PY6CxVHRg1ZfHT4TlfbdRPIG8d
+6JrWt2s4eLv9VRdM+oMifHR4qvLDgg7R8pBr2FSsVXM9U2+j+drIeAhkjHI=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/serversan-cert.pem b/mysql-test/std_data/serversan-cert.pem
new file mode 100644
index 00000000000..e47779f420d
--- /dev/null
+++ b/mysql-test/std_data/serversan-cert.pem
@@ -0,0 +1,60 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 4 (0x4)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
+ Validity
+ Not Before: Apr 25 20:52:33 2017 GMT
+ Not After : Apr 20 20:52:33 2037 GMT
+ Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (1024 bit)
+ Modulus:
+ 00:a7:74:d4:2b:80:cb:96:08:2a:b9:c2:87:18:0d:
+ 69:2b:da:cf:ef:21:cb:05:d4:80:2c:f3:85:bc:78:
+ b2:42:d9:9f:f1:dc:47:68:c5:af:5a:c9:01:f0:dd:
+ 91:cb:3a:b9:38:b2:36:6b:a3:66:ef:cd:44:0f:8f:
+ 39:57:60:ad:3b:44:33:51:c2:7f:cb:5c:8d:55:b8:
+ 1e:e8:80:e0:ed:9d:8d:10:7a:42:68:73:06:63:83:
+ ce:db:05:5b:e1:7b:f9:0e:87:20:38:b8:11:6a:b7:
+ 59:3d:4a:ca:cb:60:e6:e1:73:d9:a2:24:4a:70:93:
+ 5e:cf:d5:04:d5:ad:ac:96:a5
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Subject Alternative Name:
+ DNS:localhost
+ Signature Algorithm: sha256WithRSAEncryption
+ 4b:78:d9:09:4c:25:cc:fb:17:8f:31:13:ac:d7:36:2d:5f:d4:
+ ce:94:84:d2:a7:fa:e2:1e:ae:b6:72:1f:01:56:0f:89:80:c0:
+ 01:ba:ad:d7:cb:24:c5:25:ec:f8:35:ac:52:1b:4f:af:7c:26:
+ 8d:d4:d4:91:05:21:b7:ba:3f:6b:1b:8d:1d:a5:6b:7e:7d:be:
+ 2f:6a:09:83:c2:c3:6c:2f:8a:31:fa:7b:36:3f:6d:e1:62:ca:
+ a0:3c:43:b8:53:5a:4a:b3:4d:7a:cb:9c:6e:db:a4:ce:a1:95:
+ 5e:26:d8:22:39:8c:34:0e:92:bd:87:a2:b1:7a:68:25:57:17:
+ b2:d8:43:3b:98:e4:80:6b:7d:3e:ab:32:82:6d:b8:80:45:83:
+ d6:55:f8:cd:31:74:17:8c:42:75:09:71:66:b9:e0:94:16:ca:
+ 1d:db:1e:89:12:a1:9f:00:cb:83:99:5d:5d:28:7a:df:2a:87:
+ b5:8d:f1:9c:b9:89:2a:0d:6c:af:61:00:41:cb:03:df:99:4a:
+ fe:93:81:88:ff:47:4e:2a:b5:2b:bf:85:0f:9a:21:7b:20:58:
+ 7a:1c:67:b5:8b:da:db:03:69:25:db:76:0e:f9:23:57:8d:8a:
+ 47:dc:15:16:7c:2d:66:8f:6a:10:f3:b2:ea:2e:31:c6:d4:2c:
+ 90:15:56:f4
+-----BEGIN CERTIFICATE-----
+MIICuzCCAaOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
+MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZzZXJ2ZXIw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKd01CuAy5YIKrnChxgNaSvaz+8h
+ywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+POVdgrTtEM1HC
+f8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1Kystg5uFz2aIk
+SnCTXs/VBNWtrJalAgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq
+hkiG9w0BAQsFAAOCAQEAS3jZCUwlzPsXjzETrNc2LV/UzpSE0qf64h6utnIfAVYP
+iYDAAbqt18skxSXs+DWsUhtPr3wmjdTUkQUht7o/axuNHaVrfn2+L2oJg8LDbC+K
+Mfp7Nj9t4WLKoDxDuFNaSrNNesucbtukzqGVXibYIjmMNA6SvYeisXpoJVcXsthD
+O5jkgGt9Pqsygm24gEWD1lX4zTF0F4xCdQlxZrnglBbKHdseiRKhnwDLg5ldXSh6
+3yqHtY3xnLmJKg1sr2EAQcsD35lK/pOBiP9HTiq1K7+FD5oheyBYehxntYva2wNp
+Jdt2DvkjV42KR9wVFnwtZo9qEPOy6i4xxtQskBVW9A==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/serversan-key.pem b/mysql-test/std_data/serversan-key.pem
new file mode 100644
index 00000000000..393c0bc9c1a
--- /dev/null
+++ b/mysql-test/std_data/serversan-key.pem
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKd01CuAy5YIKrnC
+hxgNaSvaz+8hywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+P
+OVdgrTtEM1HCf8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1K
+ystg5uFz2aIkSnCTXs/VBNWtrJalAgMBAAECgYBReSgZmmpzLroK8zhjXXMEIUv1
+3w02YvOR61HwJxEkMVn+hNxBf50XoKDPHh5nMMUZbqvHpxLYLZilsVuGxcTCPVzw
+YxTooPcJY8x61oUclI2Ls5czu/OfzoJhA9ESaFn6e4xReUFmNi8ygTMuPReZZ90T
+ZvDikonKtCCk99MSaQJBANrmlPtfY57KJ18f1TqLvqy73I1vQjffSOrK3deYbvvB
+jUJ79G9Wzj8Hje2y+XkkK+OIPcND1DnoTCTuqVazn+cCQQDD1jy8zrVg/JEPhQkS
+BM7nvm4PIb0cgTPrOhsHDIF4hbaAZnA0N4ZEJ2q7YitXfOeR98x+aH/WJOrzzhmE
+VXOTAkBQ4lK6b4zH57qUk5aeg3R5LxFX0XyOWJsA5uUB/PlFXUdtAZBYc6LR92Ci
+LDeyY4M0F+t6c12/5+3615UKzGSRAkA+SGV6utcOqGTOJcZTt7nCFFtWbqmBZkoH
+1qv/2udWWFhJj8rBoKMQC+UzAS69nVjcoI2l6kA17/nVXkfZQYAHAkEAmOHCZCVQ
+9CCYTJICvoZR2euUYdnatLN8d2/ARWjzcRDTdS82P2oscATwAsvJxsphDmbOmVWP
+Hfy1t8OOCHKYAQ==
+-----END PRIVATE KEY-----
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index f501e610e53..a662a600afe 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -68,6 +68,10 @@ sub skip_combinations {
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.1d";
+ $skip{'t/ssl_7937.combinations'} = [ 'x509v3' ]
+ unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
+ and $1 ge "1.0.2";
+
%skip;
}
diff --git a/mysql-test/suite/encryption/r/create_or_replace.result b/mysql-test/suite/encryption/r/create_or_replace.result
index d52572d6d23..1671043b50d 100644
--- a/mysql-test/suite/encryption/r/create_or_replace.result
+++ b/mysql-test/suite/encryption/r/create_or_replace.result
@@ -1,4 +1,3 @@
-call mtr.add_suppression("InnoDB: Error: trying to do an operation on a dropped tablespace.*");
SET default_storage_engine = InnoDB;
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
CREATE TABLE t2 AS SELECT * FROM t1;
diff --git a/mysql-test/suite/encryption/r/encrypt_and_grep.result b/mysql-test/suite/encryption/r/encrypt_and_grep.result
index b1ffbdb8134..38dc11e7850 100644
--- a/mysql-test/suite/encryption/r/encrypt_and_grep.result
+++ b/mysql-test/suite/encryption/r/encrypt_and_grep.result
@@ -1,10 +1,13 @@
SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Barracuda`;
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
+show warnings;
+Level Code Message
create table t3 (a varchar(255)) engine=innodb encrypted=no;
-insert t1 values (repeat('foobar', 42));
-insert t2 values (repeat('temp', 42));
-insert t3 values (repeat('dummy', 42));
+insert t1 values (repeat('foobarsecret', 12));
+insert t2 values (repeat('tempsecret', 12));
+insert t3 values (repeat('dummysecret', 12));
# Wait max 10 min for key encryption threads to encrypt all spaces
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
NAME
@@ -17,15 +20,14 @@ test/t1
test/t2
innodb_system
# t1 yes on expecting NOT FOUND
-NOT FOUND /foobar/ in t1.ibd
+NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... on expecting NOT FOUND
-NOT FOUND /temp/ in t2.ibd
+NOT FOUND /tempsecret/ in t2.ibd
# t3 no on expecting FOUND
-FOUND 42 /dummy/ in t3.ibd
+FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
-NOT FOUND /foobar/ in ibdata1
+NOT FOUND /foobarsecret/ in ibdata1
# Now turn off encryption and wait for threads to decrypt everything
-SET GLOBAL innodb_encryption_threads = 1;
SET GLOBAL innodb_encrypt_tables = off;
# Wait max 10 min for key encryption threads to decrypt all spaces
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
@@ -39,15 +41,14 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
NAME
test/t1
# t1 yes on expecting NOT FOUND
-NOT FOUND /foobar/ in t1.ibd
-# t2 ... on expecting FOUND
-NOT FOUND /temp/ in t2.ibd
+NOT FOUND /foobarsecret/ in t1.ibd
+# t2 ... default expecting FOUND
+FOUND 12 /tempsecret/ in t2.ibd
# t3 no on expecting FOUND
-FOUND 42 /dummy/ in t3.ibd
+FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
-NOT FOUND /foobar/ in ibdata1
+NOT FOUND /foobarsecret/ in ibdata1
# Now turn on encryption and wait for threads to encrypt all spaces
-SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
# Wait max 10 min for key encryption threads to encrypt all spaces
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
@@ -61,11 +62,11 @@ test/t1
test/t2
innodb_system
# t1 yes on expecting NOT FOUND
-NOT FOUND /foobar/ in t1.ibd
+NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... on expecting NOT FOUND
-NOT FOUND /temp/ in t2.ibd
+NOT FOUND /tempsecret/ in t2.ibd
# t3 no on expecting FOUND
-FOUND 42 /dummy/ in t3.ibd
+FOUND 12 /dummysecret/ in t3.ibd
# ibdata1 expecting NOT FOUND
-NOT FOUND /foobar/ in ibdata1
+NOT FOUND /foobarsecret/ in ibdata1
drop table t1, t2, t3;
diff --git a/mysql-test/suite/encryption/r/filekeys_syntax.result b/mysql-test/suite/encryption/r/filekeys_syntax.result
index 019446096b9..a7782bce17c 100644
--- a/mysql-test/suite/encryption/r/filekeys_syntax.result
+++ b/mysql-test/suite/encryption/r/filekeys_syntax.result
@@ -28,7 +28,7 @@ select plugin_status from information_schema.plugins
where plugin_name = 'file_key_management';
plugin_status
install soname 'file_key_management';
-ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 11
+ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 10
call mtr.add_suppression("Invalid key id");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 798057e3fb5..2e87b85489e 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -1,9 +1,9 @@
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
-call mtr.add_suppression("InnoDB: The page .* in file test/.* cannot be decrypted");
-call mtr.add_suppression("mysqld: File .* not found");
-
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
+call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
# Start server with keys2.txt
+SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
@@ -29,15 +29,13 @@ ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be
SHOW WARNINGS;
Level Code Message
Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id 2 is not available. Can't continue reading table.
+Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
-Warnings:
-Warning 192 Table in tablespace encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table.
SHOW WARNINGS;
Level Code Message
-Warning 192 Table in tablespace encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table.
-# Start server with keys.txt
+# Start server with keys3.txt
+SET GLOBAL innodb_default_encryption_key_id=5;
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
INSERT INTO t2 VALUES ('foobar',1,2);
@@ -47,69 +45,60 @@ ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be
SHOW WARNINGS;
Level Code Message
Warning 192 Table test/t2 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SELECT * FROM t2 where id = 1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SELECT * FROM t2 where b = 1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
INSERT INTO t2 VALUES ('tmp',3,3);
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DELETE FROM t2 where b = 3;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DELETE FROM t2 where id = 3;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
UPDATE t2 set b = b +1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 optimize Warning Tablespace is missing for table 'test/t2'
-test.t2 optimize Warning Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t2 optimize Warning Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
test.t2 optimize Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
test.t2 optimize error Corrupt
SHOW WARNINGS;
Level Code Message
-ALTER TABLE t2 ADD COLUMN c INT;
+ALTER TABLE t2 ADD COLUMN d INT;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 analyze Warning Tablespace is missing for table 'test/t2'
-test.t2 analyze Warning Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t2 analyze Warning Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
test.t2 analyze Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
test.t2 analyze error Corrupt
SHOW WARNINGS;
@@ -118,16 +107,8 @@ TRUNCATE TABLE t2;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t2'
-Warning 192 Table test/t2 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t2 in file ./test/t2.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t2;
-ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-SHOW WARNINGS;
-Level Code Message
-Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-# Restart server with keys.txt
-DROP TABLE t2;
-SHOW WARNINGS;
-Level Code Message
+# Start server with keys2.txt
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
index adf984b9708..b1f91c0d095 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -1,23 +1,56 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
+call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
+SET GLOBAL innodb_file_per_table = ON;
+CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
+ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
-select * from t1;
+SELECT * FROM t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-show warnings;
+SHOW WARNINGS;
Level Code Message
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-alter table t1 discard tablespace;
+ALTER TABLE t1 ENGINE=InnoDB;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-show warnings;
+SHOW WARNINGS;
Level Code Message
+Warning 192 Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-alter table t1 engine=InnoDB;
-ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-show warnings;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 optimize Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t1 optimize error Corrupt
+SHOW WARNINGS;
Level Code Message
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-DROP TABLE t1;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 check Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t1 check error Corrupt
+SHOW WARNINGS;
+Level Code Message
+FLUSH TABLES t1 FOR EXPORT;
+backup: t1
+UNLOCK TABLES;
+ALTER TABLE t1 DISCARD TABLESPACE;
+Warnings:
+Warning 192 Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+Warning 1812 Tablespace is missing for table 'test/t1'
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1814 Tablespace has been discarded for table `t1`
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `pk` int(11) NOT NULL,
+ `f` varchar(8) DEFAULT NULL,
+ PRIMARY KEY (`pk`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
+RENAME TABLE t1 TO t1new;
+ALTER TABLE t1new RENAME TO t2new;
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+DROP TABLE t1new;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index 69f11d8745b..7f4b1fbc151 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -1,11 +1,21 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
+SET GLOBAL innodb_file_per_table = ON;
+CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
+ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize Warning Table test/t1 in tablespace is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 optimize Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 optimize Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t1 optimize error Corrupt
+SHOW WARNINGS;
+Level Code Message
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Warning Table test/t1 in tablespace # is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-test.t1 check Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
+test.t1 check Warning Table t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 check Error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
deleted file mode 100644
index 13b74f3b23d..00000000000
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
+++ /dev/null
@@ -1,20 +0,0 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
-call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
-OPTIMIZE TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 optimize Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
-test.t1 optimize Warning InnoDB: Cannot defragment table test/t1: returned error code 192
-
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize error Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-test.t1 optimize status Operation failed
-Warnings:
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-SHOW WARNINGS;
-Level Code Message
-Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
-Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-shutdown.result b/mysql-test/suite/encryption/r/innodb-bad-key-shutdown.result
deleted file mode 100644
index 447329a74da..00000000000
--- a/mysql-test/suite/encryption/r/innodb-bad-key-shutdown.result
+++ /dev/null
@@ -1,16 +0,0 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
-call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-#
-# Restart the server with key 4 in the key file
-#
-CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1);
-#
-# Restart the server with a different value for key 4 in the key file
-#
-SELECT * FROM t1;
-ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-SELECT * FROM t1;
-i
-1
-DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
new file mode 100644
index 00000000000..5753188b168
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
@@ -0,0 +1,20 @@
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
+# Restart mysqld --file-key-management-filename=keys2.txt
+SET GLOBAL innodb_file_per_table = ON;
+set GLOBAL innodb_default_encryption_key_id=4;
+create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
+create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
+insert into t1 values (1, repeat('secret',6000));
+insert into t2 values (1, repeat('secret',6000));
+insert into t3 values (1, repeat('secret',6000));
+# Restart mysqld --file-key-management-filename=keys3.txt
+select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
+count(*)
+1
+# Restart mysqld --file-key-management-filename=keys2.txt
+drop table t1,t2,t3;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index d19124ab602..90668a3a395 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t[15] cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
create table t5 (
`intcol1` int(32) DEFAULT NULL,
@@ -16,20 +16,8 @@ CREATE TABLE `t1` (
`charcol3` varchar(128) DEFAULT NULL
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
-select * from t1;
-intcol1 intcol2 charcol1 charcol2 charcol3
-1 2 maria db encryption
-select * from t5;
-intcol1 intcol2 charcol1 charcol2 charcol3
-1 2 maria db encryption
alter table t1 encrypted='yes' `encryption_key_id`=1;
select * from t1;
-intcol1 intcol2 charcol1 charcol2 charcol3
-1 2 maria db encryption
-select * from t5;
-intcol1 intcol2 charcol1 charcol2 charcol3
-1 2 maria db encryption
-select * from t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
select * from t5;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
new file mode 100644
index 00000000000..67917ca5f82
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -0,0 +1,23 @@
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
+SET GLOBAL innodb_file_per_table = ON;
+set global innodb_compression_algorithm = 1;
+# Create and populate tables to be corrupted
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes;
+CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB row_format=compressed encrypted=yes;
+CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
+BEGIN;
+INSERT INTO t1 (b,c) VALUES ('corrupt me','secret');
+INSERT INTO t1 (b,c) VALUES ('corrupt me','moresecretmoresecret');
+INSERT INTO t2 select * from t1;
+INSERT INTO t3 select * from t1;
+COMMIT;
+# Backup tables before corrupting
+# Corrupt tables
+SELECT * FROM t1;
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+SELECT * FROM t2;
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+SELECT * FROM t3;
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+# Restore the original tables
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index 2d2bc91c321..3eb48409f13 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -1,5 +1,4 @@
-call mtr.add_suppression("InnoDB: The page .* in file test/t. cannot be decrypted");
-
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
# Start server with keys2.txt
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
index a5bd7da8421..808345ab4ca 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
@@ -36,73 +36,12 @@ set current_num = current_num + 1;
end while;
end//
commit;
-set autocommit=0;
-call innodb_insert_proc(5000);
-commit;
-set autocommit=1;
+begin;
+call innodb_insert_proc(2000);
insert into innodb_compact select * from innodb_normal;
insert into innodb_dynamic select * from innodb_normal;
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-count(*)
-5000
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-variable_value >= 0
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
-variable_value >= 0
+commit;
set global innodb_compression_algorithm = 1;
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-count(*)
-5000
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-variable_value >= 0
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
-variable_value >= 0
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
show create table innodb_normal;
Table Create Table
@@ -124,54 +63,6 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
-show create table innodb_normal;
-Table Create Table
-innodb_normal CREATE TABLE `innodb_normal` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-show create table innodb_compact;
-Table Create Table
-innodb_compact CREATE TABLE `innodb_compact` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
-show create table innodb_dynamic;
-Table Create Table
-innodb_dynamic CREATE TABLE `innodb_dynamic` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-count(*)
-5000
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-5000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-5000
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value = 0
-1
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value = 0
-1
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-variable_value = 0
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
-variable_value = 0
drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
index ce74ac52537..189be75b83f 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
@@ -1,6 +1,3 @@
-call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*");
-call mtr.add_suppression("Disabling redo log encryp*");
-call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
Level Code Message
@@ -50,49 +47,15 @@ set current_num = current_num + 1;
end while;
end//
commit;
-set autocommit=0;
+begin;
call innodb_insert_proc(2000);
-commit;
-set autocommit=1;
insert into innodb_compact select * from innodb_normal;
insert into innodb_compressed select * from innodb_normal;
insert into innodb_dynamic select * from innodb_normal;
insert into innodb_redundant select * from innodb_normal;
-update innodb_normal set c1 = c1 +1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_compressed set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compressed where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_redundant where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
+commit;
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+variable_value > 0
1
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
@@ -102,40 +65,13 @@ update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compressed where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_redundant where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+variable_value > 0
1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value >= 0
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
+variable_value > 0
1
+SET GLOBAL innodb_encrypt_tables=OFF;
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_compact;
Table Create Table
@@ -164,63 +100,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
-show create table innodb_compact;
-Table Create Table
-innodb_compact CREATE TABLE `innodb_compact` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
-show create table innodb_compressed;
-Table Create Table
-innodb_compressed CREATE TABLE `innodb_compressed` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
-show create table innodb_dynamic;
-Table Create Table
-innodb_dynamic CREATE TABLE `innodb_dynamic` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
-show create table innodb_redundant;
-Table Create Table
-innodb_redundant CREATE TABLE `innodb_redundant` (
- `c1` bigint(20) NOT NULL,
- `b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
-update innodb_normal set c1 = c1 +1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_compressed set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compressed where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_dynamic where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_redundant where c1 < 1500000;
-count(*)
-2000
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-count(*)
-2000
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
variable_value >= 0
1
diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
new file mode 100644
index 00000000000..9eba53622e8
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
@@ -0,0 +1,36 @@
+call mtr.add_suppression("Plugin 'file_key_management'");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[1-9][0-9]*, page number=[0-9]+\] in file test/t[1-4] cannot be decrypted");
+call mtr.add_suppression("InnoDB: Plugin initialization aborted");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
+# Restart mysqld --file-key-management-filename=keys2.txt
+# Wait max 10 min for key encryption threads to encrypt all spaces
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
+create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t3(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=4;
+create table t4(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb;
+begin;
+insert into t2 select * from t1;
+insert into t3 select * from t1;
+insert into t4 select * from t1;
+commit;
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+begin;
+update t1 set c = repeat('secret3', 20);
+update t2 set c = repeat('secret4', 20);
+update t3 set c = repeat('secret4', 20);
+update t4 set c = repeat('secret4', 20);
+insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
+insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
+insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
+insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
+COMMIT;
+# Kill the server
+# restart
+# Kill the server
+# Restart mysqld --innodb-force-recovery=1
+# Kill the server
+# Restart mysqld --file-key-management-filename=keys2.txt
+drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
new file mode 100644
index 00000000000..dcbe1f5a395
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
@@ -0,0 +1,37 @@
+call mtr.add_suppression("InnoDB: Block in space_id .*");
+call mtr.add_suppression("mysqld: File .*");
+call mtr.add_suppression("Plugin 'file_key_management' .*");
+call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
+# Restart mysqld --file-key-management-filename=keys2.txt
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
+create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t3(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=20;
+create table t4(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb;
+begin;
+insert into t2 select * from t1;
+insert into t3 select * from t1;
+insert into t4 select * from t1;
+commit;
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+begin;
+update t1 set c = repeat('secret3', 20);
+update t2 set c = repeat('secret4', 20);
+update t3 set c = repeat('secret4', 20);
+update t4 set c = repeat('secret4', 20);
+insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
+insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
+insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
+insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
+COMMIT;
+# Kill the server
+# restart
+# Restart mysqld --file-key-management-filename=keys2.txt
+drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
index 60b9ff57605..ec92825ac8e 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
@@ -1,3 +1,5 @@
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
set global innodb_compression_algorithm = 1;
@@ -95,13 +97,8 @@ set current_num = current_num + 1;
end while;
end//
commit;
-set autocommit=0;
-call innodb_insert_proc(5000);
-commit;
-set autocommit=1;
-select count(*) from innodb_normal;
-count(*)
-5000
+begin;
+call innodb_insert_proc(2000);
insert into innodb_page_compressed1 select * from innodb_normal;
insert into innodb_page_compressed2 select * from innodb_normal;
insert into innodb_page_compressed3 select * from innodb_normal;
@@ -114,120 +111,45 @@ insert into innodb_page_compressed9 select * from innodb_normal;
commit;
select count(*) from innodb_page_compressed1 where c1 < 500000;
count(*)
-5000
-select count(*) from innodb_page_compressed2 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed3 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed4 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed5 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed6 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed7 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed8 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed9 where c1 < 500000;
-count(*)
-5000
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
-variable_value >= 0
-1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
-variable_value >= 0
-1
-select count(*) from innodb_page_compressed1 where c1 < 500000;
-count(*)
-5000
+2000
select count(*) from innodb_page_compressed2 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed3 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed4 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed5 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed6 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed7 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed8 where c1 < 500000;
count(*)
-5000
+2000
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
-5000
-update innodb_page_compressed1 set c1 = c1 + 1;
-update innodb_page_compressed2 set c1 = c1 + 1;
-update innodb_page_compressed3 set c1 = c1 + 1;
-update innodb_page_compressed4 set c1 = c1 + 1;
-update innodb_page_compressed5 set c1 = c1 + 1;
-update innodb_page_compressed6 set c1 = c1 + 1;
-update innodb_page_compressed7 set c1 = c1 + 1;
-update innodb_page_compressed8 set c1 = c1 + 1;
-update innodb_page_compressed9 set c1 = c1 + 1;
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-variable_value >= 0
+2000
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+variable_value > 0
1
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
-variable_value >= 0
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
+variable_value > 0
1
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
variable_value >= 0
1
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = off;
-select count(*) from innodb_page_compressed1 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed2 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed3 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed4 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed5 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed6 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed7 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed8 where c1 < 500000;
-count(*)
-5000
-select count(*) from innodb_page_compressed9 where c1 < 500000;
-count(*)
-5000
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -240,11 +162,11 @@ update innodb_page_compressed9 set c1 = c1 + 1;
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
variable_value >= 0
1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-variable_value >= 0
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
+variable_value > 0
1
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
-variable_value >= 0
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
+variable_value > 0
1
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
variable_value >= 0
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
index 91581eb8837..b503d6c9d30 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
@@ -1,5 +1,3 @@
-call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
-call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
index 26765229a2e..f75268f3290 100644
--- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
@@ -10,8 +10,8 @@ begin
declare current_num int;
set current_num = 0;
while current_num < repeat_count do
-insert into t1 values (current_num,repeat('foobar',42));
-insert into t2 values (current_num,repeat('temp', 42));
+insert into t1 values (current_num,repeat('foobar',12));
+insert into t2 values (current_num,repeat('tempsecret', 12));
insert into t3 values (current_num,repeat('barfoo',42));
insert into t4 values (current_num,repeat('repeat',42));
insert into t5 values (current_num,substring('A BC DEF GHIJ KLM NOPQRS TUV WXYZ 012 3456789', rand()*36+1, 100), repeat('author new',22));
@@ -29,7 +29,7 @@ set autocommit=1;
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
# t2 ... on expecting NOT FOUND
-NOT FOUND /temp/ in t2.ibd
+NOT FOUND /tempsecret/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
# t4 ... on expecting NOT FOUND
@@ -124,7 +124,7 @@ t7 CREATE TABLE `t7` (
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
# t2 ... on expecting NOT FOUND
-NOT FOUND /temp/ in t2.ibd
+NOT FOUND /tempsecret/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
# t4 ... on expecting NOT FOUND
diff --git a/mysql-test/suite/encryption/r/innodb_scrub.result b/mysql-test/suite/encryption/r/innodb_scrub.result
index e3dd48b2c51..6e8febc762d 100644
--- a/mysql-test/suite/encryption/r/innodb_scrub.result
+++ b/mysql-test/suite/encryption/r/innodb_scrub.result
@@ -1,6 +1,6 @@
create table snapshot_status engine = myisam
select * from information_schema.global_status
-where variable_name like 'innodb_scrub_background%';
+where variable_name like 'innodb_scrub%';
# MDEV-8139 Fix scrubbing tests
# FIXME: Add index(b) to each table; ensure that undo logs are scrubbed.
create table delete_3 (
diff --git a/mysql-test/suite/encryption/t/create_or_replace.test b/mysql-test/suite/encryption/t/create_or_replace.test
index 98d5b7cc017..3b2970e5162 100644
--- a/mysql-test/suite/encryption/t/create_or_replace.test
+++ b/mysql-test/suite/encryption/t/create_or_replace.test
@@ -7,9 +7,6 @@
#
# MDEV-8164: Server crashes in pfs_mutex_enter_func after fil_crypt_is_closing or alike
#
-
-call mtr.add_suppression("InnoDB: Error: trying to do an operation on a dropped tablespace.*");
-
SET default_storage_engine = InnoDB;
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
diff --git a/mysql-test/suite/encryption/t/encrypt_and_grep.opt b/mysql-test/suite/encryption/t/encrypt_and_grep.opt
index 5c9aaf65b06..c50ec719307 100644
--- a/mysql-test/suite/encryption/t/encrypt_and_grep.opt
+++ b/mysql-test/suite/encryption/t/encrypt_and_grep.opt
@@ -1,7 +1,7 @@
--innodb-encrypt-tables=ON
--innodb-encrypt-log=ON
--innodb-encryption-rotate-key-age=15
---innodb-encryption-threads=1
+--innodb-encryption-threads=4
--innodb-tablespaces-encryption
diff --git a/mysql-test/suite/encryption/t/encrypt_and_grep.test b/mysql-test/suite/encryption/t/encrypt_and_grep.test
index 2ef69db237d..c5a10620f6e 100644
--- a/mysql-test/suite/encryption/t/encrypt_and_grep.test
+++ b/mysql-test/suite/encryption/t/encrypt_and_grep.test
@@ -14,15 +14,19 @@
--let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd
--let SEARCH_RANGE = 10000000
+--disable_warnings
SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Barracuda`;
+--enable_warnings
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
+show warnings;
create table t3 (a varchar(255)) engine=innodb encrypted=no;
-insert t1 values (repeat('foobar', 42));
-insert t2 values (repeat('temp', 42));
-insert t3 values (repeat('dummy', 42));
+insert t1 values (repeat('foobarsecret', 12));
+insert t2 values (repeat('tempsecret', 12));
+insert t3 values (repeat('dummysecret', 12));
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
--let $wait_timeout= 600
@@ -34,19 +38,19 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--source include/shutdown_mysqld.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=temp
+--let SEARCH_PATTERN=tempsecret
--echo # t2 ... on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=dummy
+--let SEARCH_PATTERN=dummysecret
--echo # t3 no on expecting FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # ibdata1 expecting NOT FOUND
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
@@ -54,12 +58,12 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
-- source include/start_mysqld.inc
--echo # Now turn off encryption and wait for threads to decrypt everything
-SET GLOBAL innodb_encryption_threads = 1;
+
SET GLOBAL innodb_encrypt_tables = off;
--echo # Wait max 10 min for key encryption threads to decrypt all spaces
--let $wait_timeout= 600
---let $wait_condition=SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND KEY_ROTATION_PAGE_NUMBER IS NULL;
+--let $wait_condition=SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND CURRENT_KEY_VERSION = 0;
--source include/wait_condition.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
@@ -67,27 +71,27 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--source include/shutdown_mysqld.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=temp
---echo # t2 ... on expecting FOUND
+--let SEARCH_PATTERN=tempsecret
+--echo # t2 ... default expecting FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=dummy
+--let SEARCH_PATTERN=dummysecret
--echo # t3 no on expecting FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # ibdata1 expecting NOT FOUND
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
+
-- source include/start_mysqld.inc
--echo # Now turn on encryption and wait for threads to encrypt all spaces
-SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
@@ -100,19 +104,19 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
--source include/shutdown_mysqld.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=temp
+--let SEARCH_PATTERN=tempsecret
--echo # t2 ... on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=dummy
+--let SEARCH_PATTERN=dummysecret
--echo # t3 no on expecting FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=foobar
+--let SEARCH_PATTERN=foobarsecret
--echo # ibdata1 expecting NOT FOUND
-- let SEARCH_FILE=$ib1_IBD
-- source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test
index 39e86d49674..cb1b97ebfb3 100644
--- a/mysql-test/suite/encryption/t/innochecksum.test
+++ b/mysql-test/suite/encryption/t/innochecksum.test
@@ -13,10 +13,7 @@ if (!$INNOCHECKSUM) {
--die Need innochecksum binary
}
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let MYSQLD_DATADIR= `SELECT @@datadir`;
---enable_query_log
# zlib
set global innodb_compression_algorithm = 1;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index e8b5de99d80..04c50e6f327 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -2,10 +2,6 @@
-- source include/have_file_key_management_plugin.inc
# embedded does not support restart
-- source include/not_embedded.inc
--- source include/not_valgrind.inc
-# Avoid CrashReporter popup on Mac
--- source include/not_crashrep.inc
--- source include/not_windows.inc
#
# MDEV-8588: Assertion failure in file ha_innodb.cc line 21140 if at least one encrypted
@@ -14,14 +10,15 @@
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
-call mtr.add_suppression("InnoDB: The page .* in file test/.* cannot be decrypted");
-call mtr.add_suppression("mysqld: File .* not found");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
+call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
---echo
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
+SET GLOBAL innodb_file_per_table = ON;
+
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
@@ -41,14 +38,14 @@ SELECT * FROM t1;
--error ER_GET_ERRMSG
SELECT * FROM t1;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keysbad3.txt
-- source include/restart_mysqld.inc
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
DROP TABLE t1;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
#
@@ -56,10 +53,11 @@ SHOW WARNINGS;
# line 2856 on querying a table using wrong default encryption key
#
---echo # Start server with keys.txt
--- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
+--echo # Start server with keys3.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
-- source include/restart_mysqld.inc
+SET GLOBAL innodb_default_encryption_key_id=5;
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
INSERT INTO t2 VALUES ('foobar',1,2);
@@ -70,58 +68,50 @@ INSERT INTO t2 VALUES ('foobar',1,2);
--error ER_GET_ERRMSG
SELECT * FROM t2;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
SELECT * FROM t2 where id = 1;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
SELECT * FROM t2 where b = 1;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
INSERT INTO t2 VALUES ('tmp',3,3);
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
DELETE FROM t2 where b = 3;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
DELETE FROM t2 where id = 3;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
UPDATE t2 set b = b +1;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
OPTIMIZE TABLE t2;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
-ALTER TABLE t2 ADD COLUMN c INT;
---replace_regex /tablespace [0-9]*/tablespace /
+ALTER TABLE t2 ADD COLUMN d INT;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
ANALYZE TABLE t2;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
--error ER_GET_ERRMSG
TRUNCATE TABLE t2;
---replace_regex /tablespace [0-9]*/tablespace /
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
---replace_regex /.*tablespace [0-9]*//
---error ER_GET_ERRMSG
+
DROP TABLE t2;
---replace_regex /tablespace [0-9]*/tablespace /
-SHOW WARNINGS;
--echo
---echo # Restart server with keys.txt
--- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
+--echo # Start server with keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
-
---replace_regex /.*tablespace [0-9]*//
-DROP TABLE t2;
---replace_regex /tablespace [0-9]*/tablespace /
-SHOW WARNINGS;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
index c7c9e66dcf8..3c9e10efc90 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
@@ -1,49 +1,88 @@
--source include/have_innodb.inc
# embedded does not support restart
-- source include/not_embedded.inc
--- source include/not_valgrind.inc
-# Avoid CrashReporter popup on Mac
--- source include/not_crashrep.inc
-- source filekeys_plugin_exists.inc
#
# MDEV-8750: Server crashes in page_cur_is_after_last on altering table using a wrong encryption key
+# MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
+# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
+# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
#
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
+call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
---write_file $MYSQLTEST_VARDIR/keys1.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530143
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--source include/restart_mysqld.inc
+
+SET GLOBAL innodb_file_per_table = ON;
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
+ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+--source include/restart_mysqld.inc
+
+--error ER_GET_ERRMSG
+SELECT * FROM t1;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+SHOW WARNINGS;
+--error ER_GET_ERRMSG
+ALTER TABLE t1 ENGINE=InnoDB;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+SHOW WARNINGS;
+OPTIMIZE TABLE t1;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+SHOW WARNINGS;
+
+CHECK TABLE t1;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+SHOW WARNINGS;
+
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+--source include/restart_mysqld.inc
+
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+
+FLUSH TABLES t1 FOR EXPORT;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
EOF
+UNLOCK TABLES;
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+# Discard should pass even with incorrect keys
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+ALTER TABLE t1 DISCARD TABLESPACE;
---write_file $MYSQLTEST_VARDIR/keys2.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530144
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
EOF
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt
+
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
---error ER_GET_ERRMSG
-select * from t1;
-show warnings;
---error ER_GET_ERRMSG
-alter table t1 discard tablespace;
-show warnings;
---error ER_GET_ERRMSG
-alter table t1 engine=InnoDB;
-show warnings;
+ALTER TABLE t1 IMPORT TABLESPACE;
+SHOW CREATE TABLE t1;
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
-DROP TABLE t1;
---remove_file $MYSQLTEST_VARDIR/keys1.txt
---remove_file $MYSQLTEST_VARDIR/keys2.txt
+# Rename table should pass even with incorrect keys
+RENAME TABLE t1 TO t1new;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+
+# Alter table rename is not allowed with incorrect keys
+--error ER_GET_ERRMSG
+ALTER TABLE t1new RENAME TO t2new;
+# Drop should pass even with incorrect keys
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+DROP TABLE t1new;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change5.opt b/mysql-test/suite/encryption/t/innodb-bad-key-change4.opt
index 6426bac41a0..6426bac41a0 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change5.opt
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.opt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
index 0459c433ece..a2305aa968b 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
@@ -1,43 +1,39 @@
--source include/have_innodb.inc
# embedded does not support restart
-- source include/not_embedded.inc
--- source include/not_valgrind.inc
-# Avoid CrashReporter popup on Mac
--- source include/not_crashrep.inc
-- source filekeys_plugin_exists.inc
#
+# MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
#
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
+
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
---write_file $MYSQLTEST_VARDIR/keys1.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530143
-EOF
-
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+SET GLOBAL innodb_file_per_table = ON;
---write_file $MYSQLTEST_VARDIR/keys2.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530144
-EOF
+CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
+ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
--source include/restart_mysqld.inc
---replace_regex /tablespace [0-9]*/tablespace #/
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+OPTIMIZE TABLE t1;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
+SHOW WARNINGS;
+
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
CHECK TABLE t1;
+--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
SHOW WARNINGS;
---let $restart_parameters= --innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
DROP TABLE t1;
---remove_file $MYSQLTEST_VARDIR/keys1.txt
---remove_file $MYSQLTEST_VARDIR/keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test b/mysql-test/suite/encryption/t/innodb-bad-key-change5.test
deleted file mode 100644
index b205d203374..00000000000
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test
+++ /dev/null
@@ -1,42 +0,0 @@
---source include/have_innodb.inc
-# embedded does not support restart
--- source include/not_embedded.inc
--- source include/not_valgrind.inc
-# Avoid CrashReporter popup on Mac
--- source include/not_crashrep.inc
--- source filekeys_plugin_exists.inc
-#
-# MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
-#
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
-# Suppression for builds where file_key_management plugin is linked statically
-call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-
---write_file $MYSQLTEST_VARDIR/keys1.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530143
-EOF
-
---let $restart_parameters= --innodb-encrypt-tables --innodb-defragment=1 --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
---source include/restart_mysqld.inc
-
-CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
-
---write_file $MYSQLTEST_VARDIR/keys2.txt
-1;770A8A65DA156D24EE2A093277530142
-4;770A8A65DA156D24EE2A093277530144
-EOF
-
---let $restart_parameters= --innodb-encrypt-tables --innodb-defragment=1 --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt
---source include/restart_mysqld.inc
-
-OPTIMIZE TABLE t1;
-SHOW WARNINGS;
-
---let $restart_parameters= --innodb-encrypt-tables --innodb-defragment=1 --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
---source include/restart_mysqld.inc
-
-DROP TABLE t1;
---remove_file $MYSQLTEST_VARDIR/keys1.txt
---remove_file $MYSQLTEST_VARDIR/keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-shutdown.test b/mysql-test/suite/encryption/t/innodb-bad-key-shutdown.test
deleted file mode 100644
index d1b009fad93..00000000000
--- a/mysql-test/suite/encryption/t/innodb-bad-key-shutdown.test
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
-#
-
---source include/have_innodb.inc
---source include/not_embedded.inc
-
-call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted");
-# Suppression for builds where file_key_management plugin is linked statically
-call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-
---echo #
---echo # Restart the server with key 4 in the key file
---echo #
-
---write_file $MYSQLTEST_VARDIR/keys1.txt
-1;770A8A65DA156D24EE2A093277530142
-4;18420B5CBA31CCDFFE9716E91EB61374D05914F3ADE23E03
-EOF
-
---let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
---source include/restart_mysqld.inc
-
-CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
-INSERT INTO t1 VALUES (1);
-
---echo #
---echo # Restart the server with a different value for key 4 in the key file
---echo #
-
---write_file $MYSQLTEST_VARDIR/keys2.txt
-1;770A8A65DA156D24EE2A093277530142
-4;22222222222222222222222222222222
-EOF
-
---let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt
---source include/restart_mysqld.inc
-
---error ER_GET_ERRMSG
-SELECT * FROM t1;
-
---let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
---source include/restart_mysqld.inc
-
-SELECT * FROM t1;
-DROP TABLE t1;
-
---let $restart_parameters=
---source include/restart_mysqld.inc
-
---remove_file $MYSQLTEST_VARDIR/keys2.txt
---remove_file $MYSQLTEST_VARDIR/keys1.txt
diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.opt b/mysql-test/suite/encryption/t/innodb-compressed-blob.opt
new file mode 100644
index 00000000000..36dcb6c6f26
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.opt
@@ -0,0 +1,4 @@
+--innodb-tablespaces-encryption
+--innodb-encrypt-tables=on
+--innodb-encryption-threads=2
+--max_allowed_packet=64K
diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
new file mode 100644
index 00000000000..6256aaf5c33
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
@@ -0,0 +1,38 @@
+-- source include/have_innodb.inc
+-- source include/have_file_key_management_plugin.inc
+
+# embedded does not support restart
+-- source include/not_embedded.inc
+
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
+
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/restart_mysqld.inc
+
+SET GLOBAL innodb_file_per_table = ON;
+
+set GLOBAL innodb_default_encryption_key_id=4;
+create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
+create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
+
+insert into t1 values (1, repeat('secret',6000));
+insert into t2 values (1, repeat('secret',6000));
+insert into t3 values (1, repeat('secret',6000));
+
+--echo # Restart mysqld --file-key-management-filename=keys3.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
+-- source include/restart_mysqld.inc
+
+--error ER_GET_ERRMSG
+select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
+--error ER_GET_ERRMSG
+select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
+select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
+
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/restart_mysqld.inc
+
+drop table t1,t2,t3;
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index fed9878ffbc..8c72cf6a3b2 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -1,22 +1,18 @@
-- source include/have_innodb.inc
# embedded does not support restart
-- source include/not_embedded.inc
--- source include/not_valgrind.inc
-# Avoid CrashReporter popup on Mac
--- source include/not_crashrep.inc
-- source filekeys_plugin_exists.inc
#
# MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
#
-call mtr.add_suppression("InnoDB: The page .* in file test/t[15] cannot be decrypted");
-call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
---write_file $MYSQLTEST_VARDIR/keys1.txt
-1;770A8A65DA156D24EE2A093277530142
-EOF
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
+
+# Suppression for builds where file_key_management plugin is linked statically
+call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
---let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
create table t5 (
@@ -38,16 +34,9 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
-
-select * from t1;
-select * from t5;
-
alter table t1 encrypted='yes' `encryption_key_id`=1;
-select * from t1;
-select * from t5;
-
---let $restart_parameters= --innodb-encrypt-tables=OFF
+--let $restart_parameters=--innodb-encrypt-tables=OFF
--source include/restart_mysqld.inc
--error ER_GET_ERRMSG
@@ -55,10 +44,8 @@ select * from t1;
--error ER_GET_ERRMSG
select * from t5;
---let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt
+--let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
--source include/restart_mysqld.inc
drop table t1;
drop table t5;
-
---remove_file $MYSQLTEST_VARDIR/keys1.txt
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
new file mode 100644
index 00000000000..4d3bfc2d1e9
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -0,0 +1,84 @@
+#
+# MDEV-11759: Encryption code in MariaDB 10.1/10.2 causes compatibility problems
+#
+
+-- source include/have_innodb.inc
+-- source include/have_file_key_management_plugin.inc
+# Don't test under embedded
+-- source include/not_embedded.inc
+
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
+
+SET GLOBAL innodb_file_per_table = ON;
+set global innodb_compression_algorithm = 1;
+
+--echo # Create and populate tables to be corrupted
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes;
+CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB row_format=compressed encrypted=yes;
+CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
+
+BEGIN;
+INSERT INTO t1 (b,c) VALUES ('corrupt me','secret');
+--disable_query_log
+--let $i = 100
+while ($i)
+{
+ INSERT INTO t1 (b,c) VALUES (REPEAT('abcabcabc', 100),'secretsecret');
+ dec $i;
+}
+--enable_query_log
+
+INSERT INTO t1 (b,c) VALUES ('corrupt me','moresecretmoresecret');
+INSERT INTO t2 select * from t1;
+INSERT INTO t3 select * from t1;
+COMMIT;
+
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+let MYSQLD_DATADIR=`select @@datadir`;
+
+--source include/shutdown_mysqld.inc
+
+--echo # Backup tables before corrupting
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd.backup
+--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t2.ibd.backup
+--copy_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t3.ibd.backup
+
+--echo # Corrupt tables
+
+perl;
+open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t1.ibd") or die "open";
+binmode FILE;
+seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
+print FILE pack("H*", "c00lcafedeadb017");
+close FILE or die "close";
+open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t2.ibd") or die "open";
+binmode FILE;
+seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
+print FILE pack("H*", "c00lcafedeadb017");
+close FILE or die "close";
+open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t3.ibd") or die "open";
+binmode FILE;
+seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
+print FILE pack("H*", "c00lcafedeadb017");
+close FILE or die "close";
+EOF
+
+--source include/start_mysqld.inc
+
+--error ER_GET_ERRMSG
+SELECT * FROM t1;
+--error ER_GET_ERRMSG
+SELECT * FROM t2;
+--error ER_GET_ERRMSG
+SELECT * FROM t3;
+
+--source include/shutdown_mysqld.inc
+
+--echo # Restore the original tables
+--move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
+--move_file $MYSQLD_DATADIR/test/t2.ibd.backup $MYSQLD_DATADIR/test/t2.ibd
+--move_file $MYSQLD_DATADIR/test/t3.ibd.backup $MYSQLD_DATADIR/test/t3.ibd
+
+--source include/start_mysqld.inc
+
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test
index 84ca92010e9..8091d23cf1c 100644
--- a/mysql-test/suite/encryption/t/innodb-missing-key.test
+++ b/mysql-test/suite/encryption/t/innodb-missing-key.test
@@ -6,9 +6,9 @@
#
# MDEV-11004: Unable to start (Segfault or os error 2) when encryption key missing
#
-call mtr.add_suppression("InnoDB: The page .* in file test/t. cannot be decrypted");
---echo
+call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
+
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
index 2fe29e0cb5c..d902fa38508 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
@@ -1,12 +1,8 @@
-- source include/have_innodb.inc
-- source include/not_embedded.inc
-- source include/have_file_key_management_plugin.inc
--- source include/big_test.inc
-# Test heavy not tested on valgrind
--- source include/not_valgrind.inc
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $encryption = `SELECT @@innodb_encrypt_tables`;
# zlib
set global innodb_compression_algorithm = 1;
@@ -35,79 +31,29 @@ end//
delimiter ;//
commit;
-set autocommit=0;
-call innodb_insert_proc(5000);
-commit;
-set autocommit=1;
-
+begin;
+call innodb_insert_proc(2000);
insert into innodb_compact select * from innodb_normal;
insert into innodb_dynamic select * from innodb_normal;
+commit;
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
+--source include/wait_condition.inc
+--let $restart_parameters=--innodb-encrypt-tables=OFF
--source include/restart_mysqld.inc
# zlib
set global innodb_compression_algorithm = 1;
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
-
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
show create table innodb_normal;
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
show create table innodb_compact;
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
show create table innodb_dynamic;
-
---source include/restart_mysqld.inc
-
-show create table innodb_normal;
-show create table innodb_compact;
-show create table innodb_dynamic;
-
-update innodb_normal set c1 = c1 + 1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-select count(*) from innodb_normal;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_compressed';
-SELECT variable_value = 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
+--source include/wait_condition.inc
drop procedure innodb_insert_proc;
drop table innodb_normal;
@@ -117,5 +63,4 @@ drop table innodb_dynamic;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_encrypt_tables = $encryption;
--enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
index f7eab67154d..5b472094653 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
@@ -2,10 +2,6 @@
-- source include/not_embedded.inc
-- source include/have_file_key_management_plugin.inc
-call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*");
-call mtr.add_suppression("Disabling redo log encryp*");
-call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
@@ -35,36 +31,19 @@ end//
delimiter ;//
commit;
-set autocommit=0;
+begin;
call innodb_insert_proc(2000);
-commit;
-set autocommit=1;
-
insert into innodb_compact select * from innodb_normal;
insert into innodb_compressed select * from innodb_normal;
insert into innodb_dynamic select * from innodb_normal;
insert into innodb_redundant select * from innodb_normal;
+commit;
-update innodb_normal set c1 = c1 +1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_compressed set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_compressed where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_redundant where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
+--source include/wait_condition.inc
# Note there that these variables are updated only when real I/O is done, thus they are not reliable
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
--source include/restart_mysqld.inc
@@ -74,22 +53,14 @@ update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_compressed where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_redundant where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
+--source include/wait_condition.inc
+
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
+SET GLOBAL innodb_encrypt_tables=OFF;
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_compact;
alter table innodb_compressed engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
@@ -99,30 +70,8 @@ show create table innodb_dynamic;
alter table innodb_redundant engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_redundant;
---source include/restart_mysqld.inc
-
-show create table innodb_compact;
-show create table innodb_compressed;
-show create table innodb_dynamic;
-show create table innodb_redundant;
-
-update innodb_normal set c1 = c1 +1;
-update innodb_compact set c1 = c1 + 1;
-update innodb_compressed set c1 = c1 + 1;
-update innodb_dynamic set c1 = c1 + 1;
-update innodb_redundant set c1 = c1 + 1;
-select count(*) from innodb_compact where c1 < 1500000;
-select count(*) from innodb_compressed where c1 < 1500000;
-select count(*) from innodb_dynamic where c1 < 1500000;
-select count(*) from innodb_redundant where c1 < 1500000;
-select count(*) from innodb_compact t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_dynamic t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_compressed t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
-select count(*) from innodb_redundant t1, innodb_normal t2 where
-t1.c1 = t2.c1 and t1.b = t2.b;
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
+--source include/wait_condition.inc
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
@@ -133,7 +82,6 @@ drop table innodb_compact;
drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
-
#
# MDEV-8143: InnoDB: Database page corruption on disk or a failed file read
#
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.opt b/mysql-test/suite/encryption/t/innodb-redo-badkey.opt
new file mode 100644
index 00000000000..343128e8803
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.opt
@@ -0,0 +1,5 @@
+--innodb-change-buffering=all
+--innodb-encrypt-tables=on
+--innodb-tablespaces-encryption
+--innodb-encryption-threads=2
+--innodb-default-encryption-key-id=4
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
new file mode 100644
index 00000000000..15cccf29fe1
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
@@ -0,0 +1,91 @@
+-- source include/have_innodb.inc
+-- source include/have_file_key_management_plugin.inc
+# embedded does not support restart
+-- source include/not_embedded.inc
+
+call mtr.add_suppression("Plugin 'file_key_management'");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[1-9][0-9]*, page number=[0-9]+\] in file test/t[1-4] cannot be decrypted");
+call mtr.add_suppression("InnoDB: Plugin initialization aborted");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
+
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/restart_mysqld.inc
+
+--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
+--source include/wait_condition.inc
+
+--disable_warnings
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+--enable_warnings
+
+create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
+create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t3(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=4;
+create table t4(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb;
+
+begin;
+--disable_query_log
+--let $i = 20
+begin;
+while ($i)
+{
+ insert into t1(c,b) values (repeat('secret1',20), repeat('secret2',6000));
+ dec $i;
+}
+--enable_query_log
+
+insert into t2 select * from t1;
+insert into t3 select * from t1;
+insert into t4 select * from t1;
+commit;
+
+--source ../../suite/innodb/include/no_checkpoint_start.inc
+
+#
+# We test redo log page read at recv_read_page using
+# incorrect keys from std_data/keys.txt. If checkpoint
+# happens we will skip this test. If no checkpoint
+# happens, InnoDB refuses to start as used
+# encryption key is incorrect.
+#
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+begin;
+update t1 set c = repeat('secret3', 20);
+update t2 set c = repeat('secret4', 20);
+update t3 set c = repeat('secret4', 20);
+update t4 set c = repeat('secret4', 20);
+insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
+insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
+insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
+insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
+COMMIT;
+let $cleanup= drop table t1,t2,t3,t4;
+--let CLEANUP_IF_CHECKPOINT= $cleanup;
+--source ../../suite/innodb/include/no_checkpoint_end.inc
+
+--echo # restart
+--error 1
+-- source include/start_mysqld.inc
+--source include/kill_mysqld.inc
+
+#
+# Now test with innodb-force-recovery=1 i.e. ignore corrupt pages
+#
+
+--echo # Restart mysqld --innodb-force-recovery=1
+-- let $restart_parameters=--innodb-force-recovery=1
+--error 1
+-- source include/start_mysqld.inc
+
+--source include/kill_mysqld.inc
+
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/start_mysqld.inc
+
+drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.opt b/mysql-test/suite/encryption/t/innodb-redo-nokeys.opt
new file mode 100644
index 00000000000..21afc19fc5d
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.opt
@@ -0,0 +1,3 @@
+--innodb-change-buffering=none
+--innodb-encrypt-tables=on
+--innodb-default-encryption-key-id=20
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
new file mode 100644
index 00000000000..e55e2ade153
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
@@ -0,0 +1,80 @@
+-- source include/have_innodb.inc
+-- source include/have_file_key_management_plugin.inc
+# embedded does not support restart
+-- source include/not_embedded.inc
+
+call mtr.add_suppression("InnoDB: Block in space_id .*");
+call mtr.add_suppression("mysqld: File .*");
+call mtr.add_suppression("Plugin 'file_key_management' .*");
+call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
+call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
+
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/restart_mysqld.inc
+
+--disable_warnings
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+--enable_warnings
+
+create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
+create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
+create table t3(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=20;
+create table t4(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb;
+
+begin;
+--disable_query_log
+--let $i = 20
+begin;
+while ($i)
+{
+ insert into t1(c,b) values (repeat('secret1',20), repeat('secret2',6000));
+ dec $i;
+}
+--enable_query_log
+
+insert into t2 select * from t1;
+insert into t3 select * from t1;
+insert into t4 select * from t1;
+commit;
+
+--source ../../suite/innodb/include/no_checkpoint_start.inc
+#
+# We test redo log page read at recv_read_page using
+# keys that are not in std_data/keys.txt. If checkpoint
+# happens we will skip this test. If no checkpoint
+# happens, InnoDB refuses to start as used
+# encryption key is not found.
+#
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+begin;
+update t1 set c = repeat('secret3', 20);
+update t2 set c = repeat('secret4', 20);
+update t3 set c = repeat('secret4', 20);
+update t4 set c = repeat('secret4', 20);
+insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
+insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
+insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
+insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
+COMMIT;
+let $cleanup= drop table t1,t2,t3,t4;
+--let CLEANUP_IF_CHECKPOINT= $cleanup;
+--source ../../suite/innodb/include/no_checkpoint_end.inc
+
+--echo # restart
+-- source include/start_mysqld.inc
+#
+# In above server does start but InnoDB refuses to start
+# thus we need to restart server with correct key file
+#
+--echo # Restart mysqld --file-key-management-filename=keys2.txt
+-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
+-- source include/restart_mysqld.inc
+
+drop table t1, t2,t3,t4;
diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
index 606662e44e6..113b5001f0f 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
@@ -1,9 +1,6 @@
-- source include/have_innodb.inc
-- source include/have_example_key_management_plugin.inc
-# embedded does not support restart
--- source include/not_embedded.inc
-
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
@@ -56,11 +53,8 @@ end//
delimiter ;//
commit;
-set autocommit=0;
-call innodb_insert_proc(5000);
-commit;
-set autocommit=1;
-select count(*) from innodb_normal;
+begin;
+call innodb_insert_proc(2000);
insert into innodb_page_compressed1 select * from innodb_normal;
insert into innodb_page_compressed2 select * from innodb_normal;
insert into innodb_page_compressed3 select * from innodb_normal;
@@ -71,23 +65,6 @@ insert into innodb_page_compressed7 select * from innodb_normal;
insert into innodb_page_compressed8 select * from innodb_normal;
insert into innodb_page_compressed9 select * from innodb_normal;
commit;
-select count(*) from innodb_page_compressed1 where c1 < 500000;
-select count(*) from innodb_page_compressed2 where c1 < 500000;
-select count(*) from innodb_page_compressed3 where c1 < 500000;
-select count(*) from innodb_page_compressed4 where c1 < 500000;
-select count(*) from innodb_page_compressed5 where c1 < 500000;
-select count(*) from innodb_page_compressed6 where c1 < 500000;
-select count(*) from innodb_page_compressed7 where c1 < 500000;
-select count(*) from innodb_page_compressed8 where c1 < 500000;
-select count(*) from innodb_page_compressed9 where c1 < 500000;
-
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
-
-
---source include/restart_mysqld.inc
select count(*) from innodb_page_compressed1 where c1 < 500000;
select count(*) from innodb_page_compressed2 where c1 < 500000;
@@ -98,33 +75,18 @@ select count(*) from innodb_page_compressed6 where c1 < 500000;
select count(*) from innodb_page_compressed7 where c1 < 500000;
select count(*) from innodb_page_compressed8 where c1 < 500000;
select count(*) from innodb_page_compressed9 where c1 < 500000;
-update innodb_page_compressed1 set c1 = c1 + 1;
-update innodb_page_compressed2 set c1 = c1 + 1;
-update innodb_page_compressed3 set c1 = c1 + 1;
-update innodb_page_compressed4 set c1 = c1 + 1;
-update innodb_page_compressed5 set c1 = c1 + 1;
-update innodb_page_compressed6 set c1 = c1 + 1;
-update innodb_page_compressed7 set c1 = c1 + 1;
-update innodb_page_compressed8 set c1 = c1 + 1;
-update innodb_page_compressed9 set c1 = c1 + 1;
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
+--source include/wait_condition.inc
+
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = off;
-select count(*) from innodb_page_compressed1 where c1 < 500000;
-select count(*) from innodb_page_compressed2 where c1 < 500000;
-select count(*) from innodb_page_compressed3 where c1 < 500000;
-select count(*) from innodb_page_compressed4 where c1 < 500000;
-select count(*) from innodb_page_compressed5 where c1 < 500000;
-select count(*) from innodb_page_compressed6 where c1 < 500000;
-select count(*) from innodb_page_compressed7 where c1 < 500000;
-select count(*) from innodb_page_compressed8 where c1 < 500000;
-select count(*) from innodb_page_compressed9 where c1 < 500000;
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
update innodb_page_compressed3 set c1 = c1 + 1;
@@ -135,9 +97,12 @@ update innodb_page_compressed7 set c1 = c1 + 1;
update innodb_page_compressed8 set c1 = c1 + 1;
update innodb_page_compressed9 set c1 = c1 + 1;
+let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
+--source include/wait_condition.inc
+
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
+SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
drop procedure innodb_insert_proc;
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
index 075cb1cf77e..3e78d468ab1 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
@@ -3,11 +3,7 @@
-- source include/not_valgrind.inc
-- source include/not_embedded.inc
-call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
-call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-
-let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
-let $MYSQLD_DATADIR = `SELECT @@datadir`;
+let MYSQLD_DATADIR = `SELECT @@datadir`;
--let SEARCH_RANGE = 10000000
--let $id = `SELECT RAND()`
@@ -59,7 +55,6 @@ set autocommit=1;
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
-let MYSQLD_DATADIR =`SELECT @@datadir`;
--list_files $MYSQLD_DATADIR/test
FLUSH TABLES t1, t2, t3 FOR EXPORT;
perl;
diff --git a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.opt b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.opt
index bcff011eb82..38d69691ed6 100644
--- a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.opt
+++ b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.opt
@@ -3,6 +3,3 @@
--innodb-encryption-rotate-key-age=15
--innodb-encryption-threads=4
--innodb-tablespaces-encryption
---innodb-max-dirty-pages-pct=0.001
-
-
diff --git a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
index e7e8405e839..b222e1882d5 100644
--- a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
@@ -17,8 +17,8 @@ begin
declare current_num int;
set current_num = 0;
while current_num < repeat_count do
- insert into t1 values (current_num,repeat('foobar',42));
- insert into t2 values (current_num,repeat('temp', 42));
+ insert into t1 values (current_num,repeat('foobar',12));
+ insert into t2 values (current_num,repeat('tempsecret', 12));
insert into t3 values (current_num,repeat('barfoo',42));
insert into t4 values (current_num,repeat('repeat',42));
insert into t5 values (current_num,substring('A BC DEF GHIJ KLM NOPQRS TUV WXYZ 012 3456789', rand()*36+1, 100), repeat('author new',22));
@@ -42,14 +42,13 @@ set autocommit=1;
--let $MYSQLD_DATADIR=`select @@datadir`
--source include/shutdown_mysqld.inc
---source include/wait_until_disconnected.inc
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=foobar
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t1.ibd
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=temp
+--let SEARCH_PATTERN=tempsecret
--echo # t2 ... on expecting NOT FOUND
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t2.ibd
-- source include/search_pattern_in_file.inc
@@ -103,13 +102,12 @@ SHOW CREATE TABLE t6;
SHOW CREATE TABLE t7;
--source include/shutdown_mysqld.inc
---source include/wait_until_disconnected.inc
--let SEARCH_PATTERN=foobar
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t1.ibd
-- source include/search_pattern_in_file.inc
---let SEARCH_PATTERN=temp
+--let SEARCH_PATTERN=tempsecret
--echo # t2 ... on expecting NOT FOUND
-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t2.ibd
-- source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 6c3efc77e20..5a10d161211 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -45,16 +45,3 @@ galera_lock_table : MDEV-11229
GAL-480 : Investigate
galera_fk_no_pk :Investigate
galera_account_management : Investigate
-galera.galera_var_retry_autocommit : MDEV-12319 #Sparodic Faliure
-galera.galera_gcs_fc_limit : MDEV-12319 #Sparodic Faliure
-galera.galera_toi_ddl_nonconflicting : MDEV-12319 #Sparodic Faliure
-galera.mysql-wsrep#198 : MDEV-12319 #Sparodic Faliure
-galera.galera_pc_ignore_sb : MDEV-12319 #Sparodic Faliure
-galera.MW-329 : MDEV-12319 #Sparodic Faliure
-galera.galera_ist_recv_bind : MDEV-12319 #Failed to start mysqld
-galera.galera_ist_restart_joiner : MDEV-12319 #Failed to start mysqld
-galera.galera_ssl_compression : MDEV-12319 #Failed to start mysqld
-galera.galera_wan : MDEV-12319 #Failed to start mysqld
-galera.rpl_row_annotate : MDEV-12319 #Failed to start mysqld
-galera_restart_on_unknown_option : Solve
-galera_kill_applier : Investigate; problem introduced in merge from 10.1
diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result
index 655d8e9e291..73796b5f868 100644
--- a/mysql-test/suite/galera/r/MW-329.result
+++ b/mysql-test/suite/galera/r/MW-329.result
@@ -1,3 +1,4 @@
+CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
FLUSH STATUS;
@@ -12,9 +13,16 @@ WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
END WHILE;
END|
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
CALL proc_insert();;
+connection node_2;
+CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
VARIABLE_VALUE > 0
1
+connection node_1;
+connection node_1b;
+connection node_1;
DROP PROCEDURE proc_insert;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
index a21b1edf3e7..ba6f30fcf30 100644
--- a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
+++ b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
@@ -1,5 +1,8 @@
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
+connection node_1;
+connection node_2;
+connection node_2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a');
SELECT * FROM t1;
@@ -8,6 +11,7 @@ f1 f2
2 a
3 a
Shutting down server ...
+connection node_1;
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
SELECT * FROM t1;
@@ -15,6 +19,7 @@ f1 f2
1 a
2 b
3 c
+connection node_2;
Starting server ...
Starting server ...
SELECT * FROM t1;
@@ -23,6 +28,7 @@ f1 f2
2 b
3 c
Shutting down server ...
+connection node_1;
UPDATE t1 SET f2 = 'd' WHERE f1 > 1;
UPDATE t1 SET f2 = 'd' WHERE f1 > 2;
SELECT * FROM t1;
@@ -30,6 +36,7 @@ f1 f2
1 a
2 d
3 d
+connection node_2;
Starting server ...
Starting server ...
SELECT * FROM t1;
@@ -37,4 +44,5 @@ f1 f2
1 a
2 d
3 d
+connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
index f4d17ad9a41..392728baf7d 100644
--- a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
@@ -1,16 +1,24 @@
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f2 = SLEEP(5);
+connection node_1;
SET SESSION wsrep_retry_autocommit = 0;
INSERT INTO t1 (f1) VALUES (1),(2);;
+connection node_2;
TRUNCATE TABLE t1;
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
SET SESSION wsrep_retry_autocommit = 1;
INSERT INTO t1 (f1) VALUES (3),(4);;
+connection node_2;
TRUNCATE TABLE t1;
+connection node_1;
SELECT * FROM test.t1;
f1 f2
3 0
4 0
+connection node_2;
CREATE PROCEDURE repeated_truncate ()
BEGIN
DECLARE i INT;
@@ -22,11 +30,15 @@ SET i = i + 1;
END WHILE;
END|
CALL repeated_truncate();
+connection node_1;
SET SESSION wsrep_retry_autocommit = 1;
INSERT INTO t1 (f1) VALUES (5),(6);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
SET SESSION wsrep_retry_autocommit = 1024;
INSERT INTO t1 (f1) VALUES (7),(8);;
+connection node_2;
+connection node_1;
include/diff_servers.inc [servers=1 2]
DROP TABLE t1;
DROP PROCEDURE repeated_truncate;
diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test
index acf6763b396..5a48352da9b 100644
--- a/mysql-test/suite/galera/t/MW-329.test
+++ b/mysql-test/suite/galera/t/MW-329.test
@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
# We start with a populated table
@@ -41,7 +42,8 @@ DELIMITER ;|
#
--connection node_2
---let $count = 10
+CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
+--let $count = 200
while ($count)
{
--let $signature = `SELECT LEFT(MD5(RAND()), 10)`
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index a8e6c9c8e79..6e3d7ea65d2 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -6,8 +6,8 @@
--source include/have_innodb.inc
--connection node_1
-
---let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND NOT STATE <=> 'wsrep aborter idle' AND STATE NOT LIKE 'InnoDB%' LIMIT 1`
+--sleep 1
+--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE IS NULL LIMIT 1`
--disable_query_log
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
index 84fd3a91857..89ef2f0f96b 100644
--- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
+++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
@@ -20,6 +20,7 @@ SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
--source include/kill_galera.inc
--connection node_1
+--sleep 2
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
index 2f27678b547..a8246e94591 100644
--- a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
+++ b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
@@ -6,6 +6,11 @@
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
#
# We should count the number of "Assertion failed" warnings
# in the log file before and after testing. To do this we need
@@ -125,6 +130,7 @@ SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
+--source include/auto_increment_offset_restore.inc
#
# We should count the number of "Assertion failed" warnings
diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def
index 631f01a8e65..16a8051bd1e 100644
--- a/mysql-test/suite/innodb/disabled.def
+++ b/mysql-test/suite/innodb/disabled.def
@@ -10,5 +10,12 @@
#
##############################################################################
-innodb_defragment_fill_factor : MDEV-10771
-innodb_bug14147491 : MDEV-12253 ut_ad(buf_pool->n_pend_reads > 0)
+innodb_defragment_fill_factor : MDEV-11336 Fix and enable innodb_defragment
+innodb.defrag_mdl-9155 : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defrag_concurrent : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defrag_stats : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defrag_stats_many_tables : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defragment : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defragment_fill_factor : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defragment_small : MDEV-11336 Fix and enable innodb_defragment
+innodb.innodb_defrag_binlog : MDEV-11336 Fix and enable innodb_defragment
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index c0a6b37c1a0..33b5ea1dc56 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -150,3 +150,22 @@ unique_constraint_name
PRIMARY
DROP TABLE t2;
DROP TABLE t1;
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE staff (
+staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
+store_id TINYINT UNSIGNED NOT NULL,
+PRIMARY KEY (staff_id),
+KEY idx_fk_store_id (store_id),
+CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB;
+CREATE TABLE store (
+store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
+manager_staff_id TINYINT UNSIGNED NOT NULL,
+PRIMARY KEY (store_id),
+UNIQUE KEY idx_unique_manager (manager_staff_id),
+CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB;
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+LOCK TABLE staff WRITE;
+UNLOCK TABLES;
+DROP TABLES staff, store;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
index 2ab81136d1f..96ce33ac097 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result
@@ -2,7 +2,7 @@ CREATE TABLE t1 (
`i1` INT(10) UNSIGNED NOT NULL,
`d1` TIMESTAMP NULL DEFAULT NULL
) ENGINE=innodb;
-show create table t1;
+SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i1` int(10) unsigned NOT NULL,
@@ -25,5 +25,26 @@ CREATE TABLE t1 (
) ENGINE=innodb;
INSERT INTO t1 (i1) VALUES (1), (2), (3), (4), (5);
ALTER TABLE t1 CHANGE `d1` `d1` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
-drop table t1;
-set sql_mode = '';
+ALTER TABLE t1 ADD COLUMN d2 TIMESTAMP DEFAULT '2017-05-08 16:23:45',
+LOCK=NONE;
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1, ALGORITHM=INPLACE;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1;
+SELECT d1-d3, d2 FROM t1;
+d1-d3 d2
+0 2017-05-08 16:23:45
+0 2017-05-08 16:23:45
+0 2017-05-08 16:23:45
+0 2017-05-08 16:23:45
+0 2017-05-08 16:23:45
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i1` int(10) unsigned NOT NULL,
+ `d1` timestamp NOT NULL DEFAULT current_timestamp(),
+ `d2` timestamp NOT NULL DEFAULT '2017-05-08 16:23:45',
+ `d3` timestamp NOT NULL DEFAULT `d1`
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-blob.result b/mysql-test/suite/innodb/r/innodb-blob.result
index ec37492c279..d48bfdf0f80 100644
--- a/mysql-test/suite/innodb/r/innodb-blob.result
+++ b/mysql-test/suite/innodb/r/innodb-blob.result
@@ -97,6 +97,12 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2
+connect con3,localhost,root,,;
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+DELETE FROM t1;
+ROLLBACK;
+disconnect con3;
+connection con2;
disconnect con2;
connection default;
ERROR HY000: Lost connection to MySQL server during query
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns2.result b/mysql-test/suite/innodb/r/innodb-virtual-columns2.result
new file mode 100644
index 00000000000..3574ba72849
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns2.result
@@ -0,0 +1,64 @@
+CREATE TABLE t1 (
+y YEAR NULL,
+i SMALLINT NULL,
+c VARCHAR(8) NOT NULL DEFAULT '',
+vi SMALLINT AS (i) VIRTUAL,
+INDEX(y)
+) ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `y` year(4) DEFAULT NULL,
+ `i` smallint(6) DEFAULT NULL,
+ `c` varchar(8) NOT NULL DEFAULT '',
+ `vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
+ KEY `y` (`y`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i c vi
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i c vi
+DROP TABLE t1;
+CREATE TABLE t1 (
+y YEAR NULL,
+i SMALLINT NULL,
+vi SMALLINT AS (i) VIRTUAL,
+INDEX(y)
+) ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `y` year(4) DEFAULT NULL,
+ `i` smallint(6) DEFAULT NULL,
+ `vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
+ KEY `y` (`y`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i vi
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i vi
+DROP TABLE t1;
+CREATE TABLE t1 (
+y YEAR NULL,
+i SMALLINT NULL,
+b BLOB NULL,
+vi SMALLINT AS (i) VIRTUAL,
+INDEX(y)
+) ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `y` year(4) DEFAULT NULL,
+ `i` smallint(6) DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
+ KEY `y` (`y`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i b vi
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+y i b vi
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug14147491.result b/mysql-test/suite/innodb/r/innodb_bug14147491.result
index cf960e3a6ee..40b9c7515c2 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result
@@ -1,17 +1,17 @@
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
+# Create and populate the table to be corrupted
+set global innodb_file_per_table=ON;
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
-# Backup the t1.ibd before corrupting
# Corrupt the table
Munged a string.
Munged a string.
-SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
-# Write file to make mysql-test-run.pl expect the "crash", but don't
-# start it until it's told to
-# The below SELECT query will crash the server because some pages
-# on the disk are corrupted
+# Now t1 is corrupted but we should not crash
SELECT * FROM t1;
-ERROR HY000: Lost connection to MySQL server during query
-# Restore the original t1.ibd
-# Cleanup
+Got one of the listed errors
+INSERT INTO t1(b) VALUES('abcdef');
+Got one of the listed errors
+UPDATE t1 set b = 'deadbeef' where a = 1;
+Got one of the listed errors
+# Cleanup, this must be possible
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_xtradb_compat.result b/mysql-test/suite/innodb/r/innodb_xtradb_compat.result
new file mode 100644
index 00000000000..20b6ac4c892
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_xtradb_compat.result
@@ -0,0 +1,313 @@
+select @@innodb_adaptive_hash_index_partitions, @@innodb_adaptive_hash_index_parts;
+@@innodb_adaptive_hash_index_partitions @@innodb_adaptive_hash_index_parts
+16 16
+set global innodb_adaptive_hash_index_partitions=1;
+ERROR HY000: Variable 'innodb_adaptive_hash_index_partitions' is a read only variable
+select @@innodb_buffer_pool_populate;
+@@innodb_buffer_pool_populate
+1
+set global innodb_buffer_pool_populate=1;
+ERROR HY000: Variable 'innodb_buffer_pool_populate' is a read only variable
+select @@innodb_cleaner_eviction_factor;
+@@innodb_cleaner_eviction_factor
+1
+set global innodb_cleaner_eviction_factor=1;
+Warnings:
+Warning 1287 Using innodb_cleaner_eviction_factor is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_eviction_factor;
+@@innodb_cleaner_eviction_factor
+1
+select @@innodb_cleaner_flush_chunk_size;
+@@innodb_cleaner_flush_chunk_size
+16
+set global innodb_cleaner_flush_chunk_size=8;
+Warnings:
+Warning 1287 Using innodb_cleaner_flush_chunk_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_flush_chunk_size;
+@@innodb_cleaner_flush_chunk_size
+16
+select @@innodb_cleaner_free_list_lwm;
+@@innodb_cleaner_free_list_lwm
+1
+set global innodb_cleaner_free_list_lwm=1;
+Warnings:
+Warning 1287 Using innodb_cleaner_free_list_lwm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_free_list_lwm;
+@@innodb_cleaner_free_list_lwm
+1
+select @@innodb_cleaner_lru_chunk_size;
+@@innodb_cleaner_lru_chunk_size
+1
+set global innodb_cleaner_lru_chunk_size=8;
+Warnings:
+Warning 1287 Using innodb_cleaner_lru_chunk_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_lru_chunk_size;
+@@innodb_cleaner_lru_chunk_size
+1
+select @@innodb_cleaner_lsn_age_factor;
+@@innodb_cleaner_lsn_age_factor
+HIGH_CHECKPOINT
+set global innodb_cleaner_lsn_age_factor=HIGH_CHECKPOINT;
+Warnings:
+Warning 1287 Using innodb_cleaner_lsn_age_factor is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_lsn_age_factor;
+@@innodb_cleaner_lsn_age_factor
+HIGH_CHECKPOINT
+select @@innodb_cleaner_max_flush_time;
+@@innodb_cleaner_max_flush_time
+1
+set global innodb_cleaner_max_flush_time=1;
+Warnings:
+Warning 1287 Using innodb_cleaner_max_flush_time is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_max_flush_time;
+@@innodb_cleaner_max_flush_time
+1
+select @@innodb_cleaner_max_lru_time;
+@@innodb_cleaner_max_lru_time
+1
+set global innodb_cleaner_max_lru_time=1;
+Warnings:
+Warning 1287 Using innodb_cleaner_max_lru_time is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_cleaner_max_lru_time;
+@@innodb_cleaner_max_lru_time
+1
+select @@innodb_corrupt_table_action;
+@@innodb_corrupt_table_action
+salvage
+set global innodb_corrupt_table_action=salvage;
+Warnings:
+Warning 1287 Using innodb_corrupt_table_action is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_corrupt_table_action;
+@@innodb_corrupt_table_action
+salvage
+select @@innodb_empty_free_list_algorithm;
+@@innodb_empty_free_list_algorithm
+BACKOFF
+set global innodb_empty_free_list_algorithm=BACKOFF;
+Warnings:
+Warning 1287 Using innodb_empty_free_list_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_empty_free_list_algorithm;
+@@innodb_empty_free_list_algorithm
+BACKOFF
+select @@innodb_fake_changes;
+@@innodb_fake_changes
+1
+set global innodb_fake_changes=1;
+Warnings:
+Warning 1287 Using innodb_fake_changes is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_fake_changes;
+@@innodb_fake_changes
+1
+# @@innodb_file_io_threads is absent
+select @@innodb_foreground_preflush;
+@@innodb_foreground_preflush
+EXPONENTIAL_BACKOFF
+set global innodb_foreground_preflush=EXPONENTIAL_BACKOFF;
+Warnings:
+Warning 1287 Using innodb_foreground_preflush is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_foreground_preflush;
+@@innodb_foreground_preflush
+EXPONENTIAL_BACKOFF
+select @@innodb_kill_idle_transaction;
+@@innodb_kill_idle_transaction
+1
+set global innodb_kill_idle_transaction=1;
+Warnings:
+Warning 1287 Using innodb_kill_idle_transaction is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_kill_idle_transaction;
+@@innodb_kill_idle_transaction
+1
+select @@innodb_locking_fake_changes;
+@@innodb_locking_fake_changes
+1
+set global innodb_locking_fake_changes=1;
+Warnings:
+Warning 1287 Using innodb_locking_fake_changes is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_locking_fake_changes;
+@@innodb_locking_fake_changes
+1
+select @@innodb_log_arch_expire_sec;
+@@innodb_log_arch_expire_sec
+1
+set global innodb_log_arch_expire_sec=1;
+Warnings:
+Warning 1287 Using innodb_log_arch_expire_sec is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_log_arch_expire_sec;
+@@innodb_log_arch_expire_sec
+1
+select @@innodb_log_block_size;
+@@innodb_log_block_size
+16
+set global innodb_log_block_size= 8;
+ERROR HY000: Variable 'innodb_log_block_size' is a read only variable
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+@@innodb_log_checksum_algorithm @@innodb_log_checksums
+STRICT_INNODB 1
+set global innodb_log_checksum_algorithm=NONE;
+Warnings:
+Warning 1287 Using innodb_log_checksum_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+@@innodb_log_checksum_algorithm @@innodb_log_checksums
+NONE 0
+set global innodb_log_checksum_algorithm=STRICT_INNODB;
+Warnings:
+Warning 1287 Using innodb_log_checksum_algorithm is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+@@innodb_log_checksum_algorithm @@innodb_log_checksums
+STRICT_INNODB 1
+select @@innodb_max_bitmap_file_size;
+@@innodb_max_bitmap_file_size
+1
+set global innodb_max_bitmap_file_size=1;
+Warnings:
+Warning 1287 Using innodb_max_bitmap_file_size is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_max_bitmap_file_size;
+@@innodb_max_bitmap_file_size
+1
+select @@innodb_max_changed_pages;
+@@innodb_max_changed_pages
+1
+set global innodb_max_changed_pages=1;
+Warnings:
+Warning 1287 Using innodb_max_changed_pages is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_max_changed_pages;
+@@innodb_max_changed_pages
+1
+select @@innodb_mirrored_log_groups;
+@@innodb_mirrored_log_groups
+8
+set global innodb_mirrored_log_groups= 4;
+ERROR HY000: Variable 'innodb_mirrored_log_groups' is a read only variable
+select @@innodb_priority_cleaner;
+@@innodb_priority_cleaner
+1
+set global innodb_priority_cleaner=1;
+Warnings:
+Warning 1287 Using innodb_priority_cleaner is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_priority_cleaner;
+@@innodb_priority_cleaner
+1
+select @@innodb_priority_io;
+@@innodb_priority_io
+1
+set global innodb_priority_io=1;
+Warnings:
+Warning 1287 Using innodb_priority_io is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_priority_io;
+@@innodb_priority_io
+1
+select @@innodb_priority_master;
+@@innodb_priority_master
+1
+set global innodb_priority_master=1;
+Warnings:
+Warning 1287 Using innodb_priority_master is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_priority_master;
+@@innodb_priority_master
+1
+select @@innodb_priority_purge;
+@@innodb_priority_purge
+1
+set global innodb_priority_purge=1;
+Warnings:
+Warning 1287 Using innodb_priority_purge is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_priority_purge;
+@@innodb_priority_purge
+1
+select @@innodb_sched_priority_cleaner;
+@@innodb_sched_priority_cleaner
+16
+set global innodb_sched_priority_cleaner=8;
+Warnings:
+Warning 1287 Using innodb_sched_priority_cleaner is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_sched_priority_cleaner;
+@@innodb_sched_priority_cleaner
+16
+select @@innodb_sched_priority_io;
+@@innodb_sched_priority_io
+16
+set global innodb_sched_priority_io=8;
+Warnings:
+Warning 1287 Using innodb_sched_priority_io is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_sched_priority_io;
+@@innodb_sched_priority_io
+16
+select @@innodb_sched_priority_master;
+@@innodb_sched_priority_master
+16
+set global innodb_sched_priority_master=8;
+Warnings:
+Warning 1287 Using innodb_sched_priority_master is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_sched_priority_master;
+@@innodb_sched_priority_master
+16
+select @@innodb_sched_priority_purge;
+@@innodb_sched_priority_purge
+16
+set global innodb_sched_priority_purge=8;
+Warnings:
+Warning 1287 Using innodb_sched_priority_purge is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_sched_priority_purge;
+@@innodb_sched_priority_purge
+16
+select @@innodb_show_locks_held;
+@@innodb_show_locks_held
+16
+set global innodb_show_locks_held=8;
+Warnings:
+Warning 1287 Using innodb_show_locks_held is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_show_locks_held;
+@@innodb_show_locks_held
+16
+select @@innodb_show_verbose_locks;
+@@innodb_show_verbose_locks
+1
+set global innodb_show_verbose_locks=1;
+Warnings:
+Warning 1287 Using innodb_show_verbose_locks is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_show_verbose_locks;
+@@innodb_show_verbose_locks
+1
+select @@innodb_track_changed_pages;
+@@innodb_track_changed_pages
+1
+set global innodb_track_changed_pages=1;
+ERROR HY000: Variable 'innodb_track_changed_pages' is a read only variable
+select @@innodb_track_redo_log_now;
+@@innodb_track_redo_log_now
+1
+set global innodb_track_redo_log_now=1;
+Warnings:
+Warning 1287 Using innodb_track_redo_log_now is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_track_redo_log_now;
+@@innodb_track_redo_log_now
+1
+select @@innodb_use_global_flush_log_at_trx_commit;
+@@innodb_use_global_flush_log_at_trx_commit
+1
+set global innodb_use_global_flush_log_at_trx_commit=1;
+Warnings:
+Warning 1287 Using innodb_use_global_flush_log_at_trx_commit is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_use_global_flush_log_at_trx_commit;
+@@innodb_use_global_flush_log_at_trx_commit
+1
+select @@innodb_use_stacktrace;
+@@innodb_use_stacktrace
+1
+set global innodb_use_stacktrace=1;
+ERROR HY000: Variable 'innodb_use_stacktrace' is a read only variable
+select @@innodb_log_archive;
+@@innodb_log_archive
+1
+set global innodb_log_archive=1;
+Warnings:
+Warning 1287 Using innodb_log_archive is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+select @@innodb_log_archive;
+@@innodb_log_archive
+1
+select @@innodb_log_arch_dir;
+@@innodb_log_arch_dir
+ttt
+set global innodb_log_arch_dir="ttt";
+ERROR HY000: Variable 'innodb_log_arch_dir' is a read only variable
+FOUND 36 /Using [A-Za-z\-]* is deprecated and the parameter may be removed in future releases. Ignoning the parameter./ in mysqld.1.err
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
index 72c5250934b..da5ff361eeb 100644
--- a/mysql-test/suite/innodb/r/temporary_table.result
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -130,7 +130,6 @@ ERROR HY000: The table 't1' is full
drop procedure populate_t1;
# test read-only mode
# files in MYSQL_DATA_DIR
-ibtmp1
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
show tables;
diff --git a/mysql-test/suite/innodb/r/truncate_debug.result b/mysql-test/suite/innodb/r/truncate_debug.result
index 47316fed2f7..eb4e9cfbc85 100644
--- a/mysql-test/suite/innodb/r/truncate_debug.result
+++ b/mysql-test/suite/innodb/r/truncate_debug.result
@@ -75,12 +75,12 @@ connect con2,localhost,root,,;
set global innodb_adaptive_hash_index=off;
connection default;
SET DEBUG_SYNC= 'now SIGNAL finish_scan';
-SET DEBUG_SYNC= 'RESET';
connection con1;
disconnect con1;
connection con2;
disconnect con2;
connection default;
+SET DEBUG_SYNC= 'RESET';
SET session lock_wait_timeout=default;
set global innodb_adaptive_hash_index=on;
drop table t1,t2,t3;
diff --git a/mysql-test/suite/innodb/r/truncate_purge_debug.result b/mysql-test/suite/innodb/r/truncate_purge_debug.result
index edece3019bc..164987083d5 100644
--- a/mysql-test/suite/innodb/r/truncate_purge_debug.result
+++ b/mysql-test/suite/innodb/r/truncate_purge_debug.result
@@ -22,8 +22,8 @@ connection default;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET DEBUG_SYNC = 'now SIGNAL finish_scan';
-SET DEBUG_SYNC = 'RESET';
connection con1;
disconnect con1;
connection default;
+SET DEBUG_SYNC = 'RESET';
drop table t1;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index 750465f2b85..4a8da381e8c 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -113,3 +113,27 @@ WHERE table_name = 't2';
DROP TABLE t2;
DROP TABLE t1;
+
+#
+# MDEV-12669 Circular foreign keys cause a loop and OOM upon LOCK TABLE
+#
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE staff (
+ staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
+ store_id TINYINT UNSIGNED NOT NULL,
+ PRIMARY KEY (staff_id),
+ KEY idx_fk_store_id (store_id),
+ CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB;
+CREATE TABLE store (
+ store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
+ manager_staff_id TINYINT UNSIGNED NOT NULL,
+ PRIMARY KEY (store_id),
+ UNIQUE KEY idx_unique_manager (manager_staff_id),
+ CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB;
+SET FOREIGN_KEY_CHECKS=DEFAULT;
+
+LOCK TABLE staff WRITE;
+UNLOCK TABLES;
+DROP TABLES staff, store;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-timestamp.test b/mysql-test/suite/innodb/t/innodb-alter-timestamp.test
index c0b17ee6440..935320fb553 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-timestamp.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-timestamp.test
@@ -5,7 +5,7 @@ CREATE TABLE t1 (
`d1` TIMESTAMP NULL DEFAULT NULL
) ENGINE=innodb;
-show create table t1;
+SHOW CREATE TABLE t1;
INSERT INTO t1 (i1) VALUES (1), (2), (3), (4), (5);
select * from t1;
@@ -19,9 +19,14 @@ CREATE TABLE t1 (
) ENGINE=innodb;
INSERT INTO t1 (i1) VALUES (1), (2), (3), (4), (5);
ALTER TABLE t1 CHANGE `d1` `d1` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
-drop table t1;
-set sql_mode = '';
-
-
-
+ALTER TABLE t1 ADD COLUMN d2 TIMESTAMP DEFAULT '2017-05-08 16:23:45',
+LOCK=NONE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1, LOCK=NONE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1, ALGORITHM=INPLACE;
+ALTER TABLE t1 ADD COLUMN d3 TIMESTAMP DEFAULT d1;
+SELECT d1-d3, d2 FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test
index d2484e2175d..1c91305b0ee 100644
--- a/mysql-test/suite/innodb/t/innodb-blob.test
+++ b/mysql-test/suite/innodb/t/innodb-blob.test
@@ -139,6 +139,14 @@ SET DEBUG_SYNC='now WAIT_FOR have_latch';
SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
+connect (con3,localhost,root,,);
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+DELETE FROM t1;
+ROLLBACK;
+disconnect con3;
+
+connection con2;
+
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns2.test b/mysql-test/suite/innodb/t/innodb-virtual-columns2.test
new file mode 100644
index 00000000000..474a6354576
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns2.test
@@ -0,0 +1,54 @@
+--source include/have_innodb.inc
+
+#
+# MDEV-11724: InnoDB: Failing assertion: len <= col->len || ((col->mtype) == 5 || (col->mtype) == 16 || (col->mtype) == 14) || (((col->mtype) == 15 || (col->mtype) == 16) && len == 2 * 2 * sizeof(double)) || (col->len == 0 && col->mtype == 1)
+#
+
+CREATE TABLE t1 (
+ y YEAR NULL,
+ i SMALLINT NULL,
+ c VARCHAR(8) NOT NULL DEFAULT '',
+ vi SMALLINT AS (i) VIRTUAL,
+ INDEX(y)
+) ENGINE=InnoDB;
+
+SHOW CREATE TABLE t1;
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+DROP TABLE t1;
+
+#
+# MDEV-11725: InnoDB: Failing assertion: !rec || !cmp_dtuple_rec(tuple, rec, *offsets)
+#
+
+CREATE TABLE t1 (
+ y YEAR NULL,
+ i SMALLINT NULL,
+ vi SMALLINT AS (i) VIRTUAL,
+ INDEX(y)
+) ENGINE=InnoDB;
+
+SHOW CREATE TABLE t1;
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+DROP TABLE t1;
+
+#
+# MDEV-11726: Server crashes in mach_read_from_n_little_endian
+#
+
+CREATE TABLE t1 (
+ y YEAR NULL,
+ i SMALLINT NULL,
+ b BLOB NULL,
+ vi SMALLINT AS (i) VIRTUAL,
+ INDEX(y)
+) ENGINE=InnoDB;
+
+SHOW CREATE TABLE t1;
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+INSERT INTO t1 (i) VALUES (1),(2);
+SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index c848d24294d..09f9d53eaff 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -1,28 +1,26 @@
#
# Test opening a corrupted table.
#
-# Valgrind can hang or return spurious messages on DBUG_SUICIDE
-source include/not_valgrind.inc;
-# Avoid CrashReporter popup on Mac
-source include/not_crashrep.inc;
# Restarting is not supported under embedded
-source include/not_embedded.inc;
+-- source include/not_embedded.inc
# Require InnoDB
-source include/have_innodb.inc;
-# Require Debug for SET DEBUG
-source include/have_debug.inc;
-# Not encrypted tables
-source include/not_encrypted.inc;
-# Test could open crash reporter on Windows
-# if compiler set up
-source include/not_windows.inc;
+-- source include/have_innodb.inc
+-- source include/not_encrypted.inc
--disable_query_log
-CALL mtr.add_suppression("\\[ERROR\\] \\[FATAL\\] InnoDB: Unable to read page \\[page id: space=.*, page number=.*\\] into the buffer pool after 100 attempts");
-CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Database page corruption on disk or a failed");
+call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
+call mtr.add_suppression("InnoDB: Cannot open table test/t1 from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \[page id: space=[0-9]+, page number=[0-9]+\]. You may have to recover from a backup.");
+call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table.*");
+call mtr.add_suppression("mysqld: Index for table 't1' is corrupt; try to repair it");
+call mtr.add_suppression("mysqld.exe: Index for table 't1' is corrupt; try to repair it");
--enable_query_log
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
+--echo # Create and populate the table to be corrupted
+
+set global innodb_file_per_table=ON;
+
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
--let $i = 10
@@ -39,9 +37,6 @@ let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
--source include/shutdown_mysqld.inc
---echo # Backup the t1.ibd before corrupting
---copy_file $t1_IBD $MYSQLD_DATADIR/test/t1.ibd.backup
-
--echo # Corrupt the table
perl;
@@ -71,27 +66,16 @@ EOF
--source include/start_mysqld.inc
-SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
+--echo # Now t1 is corrupted but we should not crash
---echo # Write file to make mysql-test-run.pl expect the "crash", but don't
---echo # start it until it's told to
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
---echo # The below SELECT query will crash the server because some pages
---echo # on the disk are corrupted
---error 2013
+--error 1030,1712,1932
SELECT * FROM t1;
-# The below mtr command --remove_file fails randomly on windows with
-# error number 13 which is permission denied on nix systems. We sleep
-# 1 second hoping that any process holding lock on t1.ibd is released.
-SLEEP 1;
-
---echo # Restore the original t1.ibd
---remove_file $MYSQLD_DATADIR/test/t1.ibd
---move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
+--error 126,1030,1034,1712,1932
+INSERT INTO t1(b) VALUES('abcdef');
---source include/start_mysqld.inc
+--error 1030,1712,1932
+UPDATE t1 set b = 'deadbeef' where a = 1;
---echo # Cleanup
+--echo # Cleanup, this must be possible
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_xtradb_compat-master.opt b/mysql-test/suite/innodb/t/innodb_xtradb_compat-master.opt
new file mode 100644
index 00000000000..1ee264ee868
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_xtradb_compat-master.opt
@@ -0,0 +1,38 @@
+--innodb-adaptive-hash-index-partitions=16
+--innodb-buffer-pool-populate=1
+--innodb-cleaner-eviction-factor
+--innodb-cleaner-flush-chunk-size=16
+--innodb-cleaner_free_list_lwm=1
+--innodb-cleaner-lru-chunk-size=1
+--innodb-cleaner-lsn-age-factor=HIGH_CHECKPOINT
+--innodb-cleaner-max-flush-time=1
+--innodb-cleaner-max-lru-time=1
+--innodb-corrupt-table-action=salvage
+--innodb-empty-free-list-algorithm=BACKOFF
+--innodb-fake-changes
+--innodb-file-io-threads=16
+--innodb-foreground-preflush=EXPONENTIAL_BACKOFF
+--innodb-kill-idle-transaction=1
+--innodb-locking-fake-changes
+--innodb-log-arch-expire-sec=1
+--innodb-log-arch-dir='ttt'
+--innodb-log-archive
+--innodb-log-block-size=16
+--innodb-log_checksum_algorithm=STRICT_INNODB
+--innodb-max-bitmap-file-size=1
+--innodb-max-changed-pages=1
+--innodb-mirrored-log-groups=8
+--innodb-priority-cleaner
+--innodb-priority-io
+--innodb-priority-master
+--innodb-priority-purge
+--innodb-sched-priority-cleaner=16
+--innodb-sched-priority-io=16
+--innodb-sched-priority-master=16
+--innodb-sched-priority-purge=16
+--innodb-show-locks-held=16
+--innodb-show-verbose-locks=1
+--innodb-track-changed-pages
+--innodb-track-redo-log-now
+--innodb-use-global-flush-log-at-trx-commit
+--innodb-use-stacktrace
diff --git a/mysql-test/suite/innodb/t/innodb_xtradb_compat.test b/mysql-test/suite/innodb/t/innodb_xtradb_compat.test
new file mode 100644
index 00000000000..359d93717d5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_xtradb_compat.test
@@ -0,0 +1,160 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/not_embedded.inc
+--source include/not_windows.inc
+
+select @@innodb_adaptive_hash_index_partitions, @@innodb_adaptive_hash_index_parts;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_adaptive_hash_index_partitions=1;
+
+select @@innodb_buffer_pool_populate;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_buffer_pool_populate=1;
+
+select @@innodb_cleaner_eviction_factor;
+set global innodb_cleaner_eviction_factor=1;
+select @@innodb_cleaner_eviction_factor;
+
+select @@innodb_cleaner_flush_chunk_size;
+set global innodb_cleaner_flush_chunk_size=8;
+select @@innodb_cleaner_flush_chunk_size;
+
+select @@innodb_cleaner_free_list_lwm;
+set global innodb_cleaner_free_list_lwm=1;
+select @@innodb_cleaner_free_list_lwm;
+
+select @@innodb_cleaner_lru_chunk_size;
+set global innodb_cleaner_lru_chunk_size=8;
+select @@innodb_cleaner_lru_chunk_size;
+
+select @@innodb_cleaner_lsn_age_factor;
+set global innodb_cleaner_lsn_age_factor=HIGH_CHECKPOINT;
+select @@innodb_cleaner_lsn_age_factor;
+
+select @@innodb_cleaner_max_flush_time;
+set global innodb_cleaner_max_flush_time=1;
+select @@innodb_cleaner_max_flush_time;
+
+select @@innodb_cleaner_max_lru_time;
+set global innodb_cleaner_max_lru_time=1;
+select @@innodb_cleaner_max_lru_time;
+
+select @@innodb_corrupt_table_action;
+set global innodb_corrupt_table_action=salvage;
+select @@innodb_corrupt_table_action;
+
+select @@innodb_empty_free_list_algorithm;
+set global innodb_empty_free_list_algorithm=BACKOFF;
+select @@innodb_empty_free_list_algorithm;
+
+select @@innodb_fake_changes;
+set global innodb_fake_changes=1;
+select @@innodb_fake_changes;
+
+--echo # @@innodb_file_io_threads is absent
+
+select @@innodb_foreground_preflush;
+set global innodb_foreground_preflush=EXPONENTIAL_BACKOFF;
+select @@innodb_foreground_preflush;
+
+select @@innodb_kill_idle_transaction;
+set global innodb_kill_idle_transaction=1;
+select @@innodb_kill_idle_transaction;
+
+select @@innodb_locking_fake_changes;
+set global innodb_locking_fake_changes=1;
+select @@innodb_locking_fake_changes;
+
+select @@innodb_log_arch_expire_sec;
+set global innodb_log_arch_expire_sec=1;
+select @@innodb_log_arch_expire_sec;
+
+select @@innodb_log_block_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_log_block_size= 8;
+
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+set global innodb_log_checksum_algorithm=NONE;
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+set global innodb_log_checksum_algorithm=STRICT_INNODB;
+select @@innodb_log_checksum_algorithm, @@innodb_log_checksums;
+
+select @@innodb_max_bitmap_file_size;
+set global innodb_max_bitmap_file_size=1;
+select @@innodb_max_bitmap_file_size;
+
+select @@innodb_max_changed_pages;
+set global innodb_max_changed_pages=1;
+select @@innodb_max_changed_pages;
+
+select @@innodb_mirrored_log_groups;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_mirrored_log_groups= 4;
+
+select @@innodb_priority_cleaner;
+set global innodb_priority_cleaner=1;
+select @@innodb_priority_cleaner;
+
+select @@innodb_priority_io;
+set global innodb_priority_io=1;
+select @@innodb_priority_io;
+
+select @@innodb_priority_master;
+set global innodb_priority_master=1;
+select @@innodb_priority_master;
+
+select @@innodb_priority_purge;
+set global innodb_priority_purge=1;
+select @@innodb_priority_purge;
+
+select @@innodb_sched_priority_cleaner;
+set global innodb_sched_priority_cleaner=8;
+select @@innodb_sched_priority_cleaner;
+
+select @@innodb_sched_priority_io;
+set global innodb_sched_priority_io=8;
+select @@innodb_sched_priority_io;
+
+select @@innodb_sched_priority_master;
+set global innodb_sched_priority_master=8;
+select @@innodb_sched_priority_master;
+
+select @@innodb_sched_priority_purge;
+set global innodb_sched_priority_purge=8;
+select @@innodb_sched_priority_purge;
+
+select @@innodb_show_locks_held;
+set global innodb_show_locks_held=8;
+select @@innodb_show_locks_held;
+
+select @@innodb_show_verbose_locks;
+set global innodb_show_verbose_locks=1;
+select @@innodb_show_verbose_locks;
+
+select @@innodb_track_changed_pages;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_track_changed_pages=1;
+
+select @@innodb_track_redo_log_now;
+set global innodb_track_redo_log_now=1;
+select @@innodb_track_redo_log_now;
+
+select @@innodb_use_global_flush_log_at_trx_commit;
+set global innodb_use_global_flush_log_at_trx_commit=1;
+select @@innodb_use_global_flush_log_at_trx_commit;
+
+select @@innodb_use_stacktrace;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_use_stacktrace=1;
+
+select @@innodb_log_archive;
+set global innodb_log_archive=1;
+select @@innodb_log_archive;
+
+select @@innodb_log_arch_dir;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_log_arch_dir="ttt";
+
+--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN=Using [A-Za-z\\-]* is deprecated and the parameter may be removed in future releases. Ignoning the parameter.
+--source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
index 0a8dc3e1fc0..f2b8dd06fd4 100644
--- a/mysql-test/suite/innodb/t/log_file_name.test
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -170,6 +170,7 @@ call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`u[1-3]` becaus
call mtr.add_suppression("InnoDB: Failed to find tablespace for table .* in the cache. Attempting to load the tablespace with space id");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' \(init function returned error\|registration as a STORAGE ENGINE failed\)");
+call mtr.add_suppression("InnoDB: Table test/u[123] in the InnoDB data dictionary has tablespace id [1-9][0-9]*, but tablespace with that id or name does not exist\\. Have you deleted or moved \\.ibd files\\?");
FLUSH TABLES;
--enable_query_log
@@ -265,7 +266,6 @@ let SEARCH_PATTERN= \[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5]
DROP TABLE u1,u2,u3,u6;
---remove_file $MYSQLD_DATADIR/test/u1.ibd
--echo # List of files:
--list_files $MYSQLD_DATADIR/test
diff --git a/mysql-test/suite/innodb/t/truncate_debug.test b/mysql-test/suite/innodb/t/truncate_debug.test
index fed5cf9392b..915688ed354 100644
--- a/mysql-test/suite/innodb/t/truncate_debug.test
+++ b/mysql-test/suite/innodb/t/truncate_debug.test
@@ -103,7 +103,6 @@ send set global innodb_adaptive_hash_index=off;
connection default;
SET DEBUG_SYNC= 'now SIGNAL finish_scan';
-SET DEBUG_SYNC= 'RESET';
connection con1;
reap;
@@ -114,6 +113,7 @@ reap;
disconnect con2;
connection default;
+SET DEBUG_SYNC= 'RESET';
SET session lock_wait_timeout=default;
set global innodb_adaptive_hash_index=on;
diff --git a/mysql-test/suite/innodb/t/truncate_purge_debug.test b/mysql-test/suite/innodb/t/truncate_purge_debug.test
index 70ebd28024d..513c59e12c8 100644
--- a/mysql-test/suite/innodb/t/truncate_purge_debug.test
+++ b/mysql-test/suite/innodb/t/truncate_purge_debug.test
@@ -55,12 +55,12 @@ echo $remaining transactions not purged;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET DEBUG_SYNC = 'now SIGNAL finish_scan';
-SET DEBUG_SYNC = 'RESET';
connection con1;
reap;
disconnect con1;
connection default;
+SET DEBUG_SYNC = 'RESET';
drop table t1;
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb_zip/r/recover.result b/mysql-test/suite/innodb_zip/r/recover.result
new file mode 100644
index 00000000000..97051efb645
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/recover.result
@@ -0,0 +1,17 @@
+#
+# MDEV-12720 recovery fails with "Generic error"
+# for ROW_FORMAT=compressed
+#
+CREATE TABLE a(i INT PRIMARY KEY AUTO_INCREMENT, s VARCHAR(255)) ENGINE=InnoDB
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+BEGIN;
+insert into a(i) select null;
+insert into a select null, uuid() from a a, a b, a c;
+insert into a select null, uuid() from a a, a b, a c;
+insert into a select null, uuid() from a a, a b, a c;
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+SELECT COUNT(*) from a;
+COUNT(*)
+1010
+DROP TABLE a;
diff --git a/mysql-test/suite/innodb_zip/t/recover.test b/mysql-test/suite/innodb_zip/t/recover.test
new file mode 100644
index 00000000000..3969cd2f44e
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/recover.test
@@ -0,0 +1,24 @@
+--source include/have_innodb.inc
+--source include/have_innodb_max_16k.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-12720 recovery fails with "Generic error"
+--echo # for ROW_FORMAT=compressed
+--echo #
+CREATE TABLE a(i INT PRIMARY KEY AUTO_INCREMENT, s VARCHAR(255)) ENGINE=InnoDB
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+BEGIN;
+insert into a(i) select null;
+insert into a select null, uuid() from a a, a b, a c;
+insert into a select null, uuid() from a a, a b, a c;
+insert into a select null, uuid() from a a, a b, a c;
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+
+--let $shutdown_timeout=0
+--source include/restart_mysqld.inc
+
+SELECT COUNT(*) from a;
+DROP TABLE a;
diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result
index 0ebdd726b4e..d22e705e6de 100644
--- a/mysql-test/suite/maria/icp.result
+++ b/mysql-test/suite/maria/icp.result
@@ -432,7 +432,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
-2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
+2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -806,7 +806,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
1 PRIMARY t2 ref g g 5 test.t.c 19 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index
-2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index condition; Using where
+2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
WHERE c = g
AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
diff --git a/mysql-test/suite/mariabackup/bug1509812-master.opt b/mysql-test/suite/mariabackup/bug1509812-master.opt
new file mode 100644
index 00000000000..de29ed41f59
--- /dev/null
+++ b/mysql-test/suite/mariabackup/bug1509812-master.opt
@@ -0,0 +1 @@
+--loose-skip-log-bin \ No newline at end of file
diff --git a/mysql-test/suite/mariabackup/filekeys-data.enc b/mysql-test/suite/mariabackup/filekeys-data.enc
new file mode 100644
index 00000000000..a8adb2f939c
--- /dev/null
+++ b/mysql-test/suite/mariabackup/filekeys-data.enc
Binary files differ
diff --git a/mysql-test/suite/mariabackup/filekeys-data.key b/mysql-test/suite/mariabackup/filekeys-data.key
new file mode 100644
index 00000000000..85fcd1fbb81
--- /dev/null
+++ b/mysql-test/suite/mariabackup/filekeys-data.key
@@ -0,0 +1,2 @@
+secret
+
diff --git a/mysql-test/suite/mariabackup/full_backup.result b/mysql-test/suite/mariabackup/full_backup.result
new file mode 100644
index 00000000000..c387f5328a7
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup.result
@@ -0,0 +1,13 @@
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+# xtrabackup backup
+INSERT INTO t VALUES(2);
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * FROM t;
+i
+1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/full_backup.test b/mysql-test/suite/mariabackup/full_backup.test
new file mode 100644
index 00000000000..a79f54c67e4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup.test
@@ -0,0 +1,23 @@
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+
+INSERT INTO t VALUES(2);
+
+
+echo # xtrabackup prepare;
+--disable_result_log
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$targetdir/backup-my.cnf --stats --datadir=$targetdir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * FROM t;
+DROP TABLE t;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/include/have_file_key_management.inc b/mysql-test/suite/mariabackup/include/have_file_key_management.inc
new file mode 100644
index 00000000000..06fbb510d6b
--- /dev/null
+++ b/mysql-test/suite/mariabackup/include/have_file_key_management.inc
@@ -0,0 +1,4 @@
+if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'file_key_management' AND PLUGIN_STATUS='ACTIVE'`)
+{
+ --skip Test requires file_key_management plugin
+}
diff --git a/mysql-test/suite/mariabackup/include/restart_and_restore.inc b/mysql-test/suite/mariabackup/include/restart_and_restore.inc
new file mode 100644
index 00000000000..39616cc6f15
--- /dev/null
+++ b/mysql-test/suite/mariabackup/include/restart_and_restore.inc
@@ -0,0 +1,15 @@
+let $_server_id= `SELECT @@server_id`;
+let $_datadir= `SELECT @@datadir`;
+let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect;
+exec echo "wait" > $_expect_file_name;
+echo # shutdown server;
+shutdown_server;
+echo # remove datadir;
+rmdir $_datadir;
+echo # xtrabackup move back;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2;
+echo # restart server;
+exec echo "restart" > $_expect_file_name;
+enable_reconnect;
+source include/wait_until_connected_again.inc;
+disable_reconnect;
diff --git a/mysql-test/suite/mariabackup/incremental_backup.result b/mysql-test/suite/mariabackup/incremental_backup.result
new file mode 100644
index 00000000000..eeedc751d83
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_backup.result
@@ -0,0 +1,20 @@
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+# Create full backup , modify table, then create incremental/differential backup
+INSERT INTO t VALUES(2);
+SELECT * FROM t;
+i
+1
+2
+# Prepare full backup, apply incremental one
+# Restore and check results
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * FROM t;
+i
+1
+2
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test
new file mode 100644
index 00000000000..b92d7b323ac
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_backup.test
@@ -0,0 +1,35 @@
+call mtr.add_suppression("InnoDB: New log files created");
+
+
+let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
+let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
+
+
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+
+echo # Create full backup , modify table, then create incremental/differential backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+INSERT INTO t VALUES(2);
+SELECT * FROM t;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
+
+--disable_result_log
+echo # Prepare full backup, apply incremental one;
+exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir;
+exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ;
+
+echo # Restore and check results;
+let $targetdir=$basedir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * FROM t;
+DROP TABLE t;
+
+# Cleanup
+rmdir $basedir;
+rmdir $incremental_dir;
+
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.opt b/mysql-test/suite/mariabackup/incremental_encrypted.opt
new file mode 100644
index 00000000000..ea644cef6ce
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.opt
@@ -0,0 +1,3 @@
+--innodb-tablespaces-encryption
+--plugin-load-add=$DEBUG_KEY_MANAGEMENT_SO
+--loose-debug_key_management_version=2
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.result b/mysql-test/suite/mariabackup/incremental_encrypted.result
new file mode 100644
index 00000000000..e8f81e9fa49
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.result
@@ -0,0 +1,20 @@
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t(i INT) ENGINE INNODB ENCRYPTED=YES;
+INSERT INTO t VALUES(1);
+# Create full backup , modify table, then create incremental/differential backup
+INSERT INTO t VALUES(2);
+SELECT * FROM t;
+i
+1
+2
+# Prepare full backup, apply incremental one
+# Restore and check results
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * FROM t;
+i
+1
+2
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.test b/mysql-test/suite/mariabackup/incremental_encrypted.test
new file mode 100644
index 00000000000..c379b3c8165
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.test
@@ -0,0 +1,45 @@
+if (!$EXAMPLE_KEY_MANAGEMENT_SO)
+{
+ --skip needs example_key_management plugin
+}
+call mtr.add_suppression("InnoDB: New log files created");
+
+
+let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
+let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
+
+
+CREATE TABLE t(i INT) ENGINE INNODB ENCRYPTED=YES;
+INSERT INTO t VALUES(1);
+
+
+echo # Create full backup , modify table, then create incremental/differential backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+--enable_result_log
+
+INSERT INTO t VALUES(2);
+SELECT * FROM t;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
+echo # Prepare full backup, apply incremental one;
+exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir;
+exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir;
+
+# stats also can support encryption, but needs plugin-load and plugin variables, they are stored in backup-my.cnf
+# We need to prepare again to create log files though.
+exec $XTRABACKUP --prepare --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$basedir/backup-my.cnf --stats --datadir=$basedir;
+
+echo # Restore and check results;
+let $targetdir=$basedir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * FROM t;
+DROP TABLE t;
+
+# Cleanup
+rmdir $basedir;
+rmdir $incremental_dir;
diff --git a/mysql-test/suite/mariabackup/partial.result b/mysql-test/suite/mariabackup/partial.result
new file mode 100644
index 00000000000..98c59be91bb
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partial.result
@@ -0,0 +1,13 @@
+CREATE TABLE t1(i INT) ENGINE INNODB;
+INSERT INTO t1 VALUES(1);
+CREATE TABLE t2(i int) ENGINE INNODB;
+# xtrabackup backup
+t1.ibd
+# xtrabackup prepare
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+SELECT * FROM t1;
+i
+1
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/mariabackup/partial.test b/mysql-test/suite/mariabackup/partial.test
new file mode 100644
index 00000000000..3b1de8ebc25
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partial.test
@@ -0,0 +1,31 @@
+# Export single table from backup
+# (xtrabackup with --prepare --export)
+
+CREATE TABLE t1(i INT) ENGINE INNODB;
+INSERT INTO t1 VALUES(1);
+CREATE TABLE t2(i int) ENGINE INNODB;
+
+echo # xtrabackup backup;
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir;
+--enable_result_log
+list_files $targetdir/test *.ibd;
+
+echo # xtrabackup prepare;
+--disable_result_log
+exec $XTRABACKUP --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+ALTER TABLE t1 DISCARD TABLESPACE;
+let $MYSQLD_DATADIR= `select @@datadir`;
+copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
+copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP TABLE t2;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/partial_exclude.result b/mysql-test/suite/mariabackup/partial_exclude.result
new file mode 100644
index 00000000000..0da9b547caa
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partial_exclude.result
@@ -0,0 +1,12 @@
+CREATE TABLE t1(i INT) ENGINE INNODB;
+INSERT INTO t1 VALUES(1);
+CREATE TABLE t2(i int) ENGINE INNODB;
+CREATE DATABASE db2;
+USE db2;
+CREATE TABLE t1(i INT) ENGINE INNODB;
+USE test;
+# xtrabackup backup
+t1.ibd
+DROP TABLE t1;
+DROP TABLE t2;
+DROP DATABASE db2;
diff --git a/mysql-test/suite/mariabackup/partial_exclude.test b/mysql-test/suite/mariabackup/partial_exclude.test
new file mode 100644
index 00000000000..631f9d7ee71
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partial_exclude.test
@@ -0,0 +1,30 @@
+# Test --databases-exclude and --tables-exclude feature of xtrabackup 2.3.8
+
+CREATE TABLE t1(i INT) ENGINE INNODB;
+INSERT INTO t1 VALUES(1);
+CREATE TABLE t2(i int) ENGINE INNODB;
+
+CREATE DATABASE db2;
+USE db2;
+CREATE TABLE t1(i INT) ENGINE INNODB;
+
+USE test;
+
+echo # xtrabackup backup;
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables-exclude=test.*2" "--databases-exclude=db2" --target-dir=$targetdir;
+--enable_result_log
+
+# check that only t1 table is in backup (t2 is excluded)
+list_files $targetdir/test *.ibd;
+# check that db2 database is not in the backup (excluded)
+--error 1
+list_files $targetdir/db2 *.ibd;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP DATABASE db2;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/small_ibd.result b/mysql-test/suite/mariabackup/small_ibd.result
new file mode 100644
index 00000000000..1c840a7a1b6
--- /dev/null
+++ b/mysql-test/suite/mariabackup/small_ibd.result
@@ -0,0 +1 @@
+#backup
diff --git a/mysql-test/suite/mariabackup/small_ibd.test b/mysql-test/suite/mariabackup/small_ibd.test
new file mode 100644
index 00000000000..23d6b08c047
--- /dev/null
+++ b/mysql-test/suite/mariabackup/small_ibd.test
@@ -0,0 +1,18 @@
+# Check if ibd smaller than page size are skipped
+# It is possible, due to race conditions that new file
+# is created by server while xtrabackup is running
+# The first page in this file does not yet exist.
+# xtrabackup should skip such file.
+
+let $_datadir= `SELECT @@datadir`;
+write_file $_datadir/test/small.ibd;
+EOF
+echo #backup;
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+remove_file $_datadir/test/small.ibd;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/suite.opt b/mysql-test/suite/mariabackup/suite.opt
new file mode 100644
index 00000000000..ec00a407620
--- /dev/null
+++ b/mysql-test/suite/mariabackup/suite.opt
@@ -0,0 +1 @@
+--innodb --changed_page_bitmaps --innodb-file-format=Barracuda \ No newline at end of file
diff --git a/mysql-test/suite/mariabackup/suite.pm b/mysql-test/suite/mariabackup/suite.pm
new file mode 100644
index 00000000000..8eecd4e8018
--- /dev/null
+++ b/mysql-test/suite/mariabackup/suite.pm
@@ -0,0 +1,38 @@
+package My::Suite::MariaBackup;
+
+@ISA = qw(My::Suite);
+use My::Find;
+use File::Basename;
+use strict;
+
+return "Not run for embedded server" if $::opt_embedded_server;
+
+my $mariabackup_exe=
+::mtr_exe_maybe_exists(
+ "$::bindir/extra/mariabackup$::opt_vs_config/mariabackup",
+ "$::path_client_bindir/mariabackup");
+
+return "No mariabackup" if !$mariabackup_exe;
+
+
+$ENV{XTRABACKUP}= $mariabackup_exe;
+
+$ENV{XBSTREAM}= ::mtr_exe_maybe_exists(
+ "$::bindir/extra/mariabackup/$::opt_vs_config/mbstream",
+ "$::path_client_bindir/mbstream");
+
+my $tar_version = `tar --version 2>&1`;
+$ENV{HAVE_TAR} = $! ? 0: 1;
+my $mariabackup_help=`$mariabackup_exe --help 2>&1`;
+$ENV{HAVE_XTRABACKUP_TAR_SUPPORT} = (index($mariabackup_help,"'tar'") == -1) ? 0 : 1;
+
+$ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex";
+
+sub skip_combinations {
+ my %skip;
+ $skip{'include/have_file_key_management.inc'} = 'needs file_key_management plugin' unless $ENV{FILE_KEY_MANAGEMENT_SO};
+ %skip;
+}
+
+bless { };
+
diff --git a/mysql-test/suite/mariabackup/tar.result b/mysql-test/suite/mariabackup/tar.result
new file mode 100644
index 00000000000..bbb546d7add
--- /dev/null
+++ b/mysql-test/suite/mariabackup/tar.result
@@ -0,0 +1,12 @@
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+# xtrabackup backup
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * FROM t;
+i
+1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/tar.test b/mysql-test/suite/mariabackup/tar.test
new file mode 100644
index 00000000000..3938d597e05
--- /dev/null
+++ b/mysql-test/suite/mariabackup/tar.test
@@ -0,0 +1,30 @@
+if (`select $HAVE_TAR = 0`)
+{
+ --skip No tar
+}
+if (`select $HAVE_XTRABACKUP_TAR_SUPPORT = 0`)
+{
+ --skip Compiled without libarchive
+}
+
+
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.tar;
+mkdir $targetdir;
+
+
+exec $XTRABACKUP "--defaults-file=$MYSQLTEST_VARDIR/my.cnf" --backup --stream=tar > $streamfile 2>$targetdir/backup_stream.log;
+--disable_result_log
+exec tar -C $targetdir -x < $streamfile;
+echo # xtrabackup prepare;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+
+-- source include/restart_and_restore.inc
+--enable_result_log
+SELECT * FROM t;
+DROP TABLE t;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.opt b/mysql-test/suite/mariabackup/xb_aws_key_management.opt
new file mode 100644
index 00000000000..62d4f864073
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.opt
@@ -0,0 +1,3 @@
+--plugin-load-add=$AWS_KEY_MANAGEMENT_SO
+--loose-aws-key-management
+--loose-aws-key-management-master-key-id=$AWS_KEY_MANAGEMENT_MASTER_KEY_ID
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.result b/mysql-test/suite/mariabackup/xb_aws_key_management.result
new file mode 100644
index 00000000000..ccad423f631
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.result
@@ -0,0 +1,11 @@
+CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
+INSERT INTO t VALUES('foobar1');
+# xtrabackup backup
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * from t;
+c
+foobar1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.test b/mysql-test/suite/mariabackup/xb_aws_key_management.test
new file mode 100644
index 00000000000..ca01be607c7
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.test
@@ -0,0 +1,22 @@
+if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'aws_key_management' AND PLUGIN_STATUS='ACTIVE'`)
+{
+ --skip needs aws_key_management plugin plugin
+}
+
+if (`SELECT @@aws_key_management_master_key_id=''`)
+{
+ --skip Test requires AWS_KEY_MANAGEMEMENT_MASTER_KEY_ID env. variable
+}
+
+CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
+INSERT INTO t VALUES('foobar1');
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+SELECT * from t;
+DROP TABLE t;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt b/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt
new file mode 100644
index 00000000000..e6cbe00bb7c
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_compressed_encrypted.opt
@@ -0,0 +1,9 @@
+--innodb-encryption-rotate-key-age=2
+--innodb-encryption-threads=4
+--innodb-tablespaces-encryption
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--loose-file-key-management
+--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
+--innodb_strict_mode
+--innodb_file_per_table
+--innodb_file_format=Barracuda
diff --git a/mysql-test/suite/mariabackup/xb_compressed_encrypted.result b/mysql-test/suite/mariabackup/xb_compressed_encrypted.result
new file mode 100644
index 00000000000..c0eb0e70631
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_compressed_encrypted.result
@@ -0,0 +1,25 @@
+CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1)) ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;
+CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
+BEGIN
+DECLARE CURRENT_NUM INT;
+SET CURRENT_NUM = 0;
+WHILE CURRENT_NUM < REPEAT_COUNT DO
+INSERT INTO t1 VALUES(CURRENT_NUM, concat(uuid(), CURRENT_NUM, repeat('ab', floor(rand()*100) ), uuid()));
+SET CURRENT_NUM = CURRENT_NUM + 1;
+END WHILE;
+END//
+COMMIT;
+SET AUTOCOMMIT=0;
+CALL innodb_insert_proc(50000);
+COMMIT;
+# xtrabackup backup
+drop table t1;
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+select sum(c1) from t1;
+sum(c1)
+1249975000
+DROP TABLE t1;
+drop procedure innodb_insert_proc;
diff --git a/mysql-test/suite/mariabackup/xb_compressed_encrypted.test b/mysql-test/suite/mariabackup/xb_compressed_encrypted.test
new file mode 100644
index 00000000000..11f63eb0330
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_compressed_encrypted.test
@@ -0,0 +1,35 @@
+source include/have_file_key_management.inc;
+
+CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1)) ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;
+
+DELIMITER //;
+CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
+BEGIN
+ DECLARE CURRENT_NUM INT;
+ SET CURRENT_NUM = 0;
+ WHILE CURRENT_NUM < REPEAT_COUNT DO
+ INSERT INTO t1 VALUES(CURRENT_NUM, concat(uuid(), CURRENT_NUM, repeat('ab', floor(rand()*100) ), uuid()));
+ SET CURRENT_NUM = CURRENT_NUM + 1;
+ END WHILE;
+END//
+DELIMITER ;//
+COMMIT;
+
+SET AUTOCOMMIT=0;
+CALL innodb_insert_proc(50000);
+COMMIT;
+
+
+echo # xtrabackup backup;
+--disable_result_log
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --no-timestamp $targetdir;
+drop table t1;
+exec $INNOBACKUPEX --apply-log $targetdir;
+
+-- source include/restart_and_restore.inc
+--enable_result_log
+select sum(c1) from t1;
+DROP TABLE t1;
+drop procedure innodb_insert_proc;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.opt b/mysql-test/suite/mariabackup/xb_file_key_management.opt
new file mode 100644
index 00000000000..74a6450a1ef
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_file_key_management.opt
@@ -0,0 +1,6 @@
+--innodb-encrypt-log=ON
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--loose-file-key-management
+--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
+--loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc
+--loose-file-key-management-encryption-algorithm=aes_cbc
diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.result b/mysql-test/suite/mariabackup/xb_file_key_management.result
new file mode 100644
index 00000000000..30aa530698b
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_file_key_management.result
@@ -0,0 +1,17 @@
+CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
+INSERT INTO t VALUES('foobar1');
+# xtrabackup backup
+NOT FOUND /foobar1/ in xtrabackup_logfile
+# expect NOT FOUND
+INSERT INTO t VALUES('foobar2');
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+NOT FOUND /foobar1/ in xtrabackup_logfile
+# expect NOT FOUND
+SELECT * FROM t;
+c
+foobar1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.test b/mysql-test/suite/mariabackup/xb_file_key_management.test
new file mode 100644
index 00000000000..bc975a7cdc4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_file_key_management.test
@@ -0,0 +1,40 @@
+source include/have_file_key_management.inc;
+
+CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
+INSERT INTO t VALUES('foobar1');
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+
+--let SEARCH_RANGE = 10000000
+--let SEARCH_PATTERN=foobar1
+--let SEARCH_FILE=$targetdir/xtrabackup_logfile
+--source include/search_pattern_in_file.inc
+--echo # expect NOT FOUND
+
+INSERT INTO t VALUES('foobar2');
+echo # xtrabackup prepare;
+
+--disable_result_log
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$targetdir/backup-my.cnf --stats --datadir=$targetdir ;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+#
+# Recheck that plain text data (
+# in not in the log, after prepare
+# (MDEV-11538)
+
+--let SEARCH_RANGE = 10000000
+--let SEARCH_PATTERN=foobar1
+--let SEARCH_FILE=$targetdir/xtrabackup_logfile
+--source include/search_pattern_in_file.inc
+--echo # expect NOT FOUND
+
+SELECT * FROM t;
+DROP TABLE t;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.opt b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.opt
new file mode 100644
index 00000000000..b3ef366361a
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.opt
@@ -0,0 +1,8 @@
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--innodb_strict_mode
+--innodb_file_per_table
+--innodb-encryption-rotate-key-age=2
+--innodb-encryption-threads=4
+--innodb-tablespaces-encryption
+--loose-file-key-management
+--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt \ No newline at end of file
diff --git a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result
new file mode 100644
index 00000000000..01a99e59200
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.result
@@ -0,0 +1,14 @@
+CREATE TABLE film_text (
+film_id SMALLINT NOT NULL,
+title VARCHAR(255) NOT NULL,
+description TEXT,
+PRIMARY KEY (film_id),
+FULLTEXT KEY idx_title_description (title,description),
+FULLTEXT KEY (description),
+FULLTEXT KEY (title)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 ENCRYPTED=YES;
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+drop table film_text;
diff --git a/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test
new file mode 100644
index 00000000000..a98d7802d76
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_fulltext_encrypted.test
@@ -0,0 +1,23 @@
+source include/have_file_key_management.inc;
+
+CREATE TABLE film_text (
+film_id SMALLINT NOT NULL,
+title VARCHAR(255) NOT NULL,
+description TEXT,
+PRIMARY KEY (film_id),
+FULLTEXT KEY idx_title_description (title,description),
+FULLTEXT KEY (description),
+FULLTEXT KEY (title)
+)ENGINE=InnoDB DEFAULT CHARSET=utf8 ENCRYPTED=YES;
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+--disable_result_log
+
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --no-timestamp $targetdir;
+exec $INNOBACKUPEX --apply-log --rebuild-indexes --rebuild-threads=2 $targetdir;
+--source include/restart_and_restore.inc
+
+--enable_result_log
+
+drop table film_text;
diff --git a/mysql-test/suite/mariabackup/xb_history.result b/mysql-test/suite/mariabackup/xb_history.result
new file mode 100644
index 00000000000..b6a1ac21147
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_history.result
@@ -0,0 +1,5 @@
+SELECT COUNT(*) FROM PERCONA_SCHEMA.xtrabackup_history;
+COUNT(*)
+1
+DROP TABLE PERCONA_SCHEMA.xtrabackup_history;
+DROP DATABASE PERCONA_SCHEMA;
diff --git a/mysql-test/suite/mariabackup/xb_history.test b/mysql-test/suite/mariabackup/xb_history.test
new file mode 100644
index 00000000000..28de50127c6
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_history.test
@@ -0,0 +1,8 @@
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --history=foo --backup --target-dir=$targetdir;
+--enable_result_log
+SELECT COUNT(*) FROM PERCONA_SCHEMA.xtrabackup_history;
+DROP TABLE PERCONA_SCHEMA.xtrabackup_history;
+DROP DATABASE PERCONA_SCHEMA;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_page_compress.result b/mysql-test/suite/mariabackup/xb_page_compress.result
new file mode 100644
index 00000000000..7380856f394
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_page_compress.result
@@ -0,0 +1,28 @@
+CREATE TABLE t1(c1 INT, b CHAR(20)) ENGINE=INNODB PAGE_COMPRESSED=1;
+CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
+BEGIN
+DECLARE CURRENT_NUM INT;
+SET CURRENT_NUM = 0;
+WHILE CURRENT_NUM < REPEAT_COUNT DO
+INSERT INTO t1 VALUES(CURRENT_NUM,'TESTING..');
+SET CURRENT_NUM = CURRENT_NUM + 1;
+END WHILE;
+END//
+COMMIT;
+SET AUTOCOMMIT=0;
+CALL innodb_insert_proc(5000);
+COMMIT;
+SELECT (VARIABLE_VALUE >= 0) AS HAVE_COMPRESSED_PAGES
+FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+WHERE VARIABLE_NAME = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
+HAVE_COMPRESSED_PAGES
+1
+# xtrabackup backup
+# xtrabackup prepare
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5000
+DROP PROCEDURE innodb_insert_proc;
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/xb_page_compress.test b/mysql-test/suite/mariabackup/xb_page_compress.test
new file mode 100644
index 00000000000..876aa1a2791
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_page_compress.test
@@ -0,0 +1,44 @@
+CREATE TABLE t1(c1 INT, b CHAR(20)) ENGINE=INNODB PAGE_COMPRESSED=1;
+
+DELIMITER //;
+CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
+BEGIN
+ DECLARE CURRENT_NUM INT;
+ SET CURRENT_NUM = 0;
+ WHILE CURRENT_NUM < REPEAT_COUNT DO
+ INSERT INTO t1 VALUES(CURRENT_NUM,'TESTING..');
+ SET CURRENT_NUM = CURRENT_NUM + 1;
+ END WHILE;
+END//
+DELIMITER ;//
+COMMIT;
+
+SET AUTOCOMMIT=0;
+CALL innodb_insert_proc(5000);
+COMMIT;
+
+SELECT (VARIABLE_VALUE >= 0) AS HAVE_COMPRESSED_PAGES
+ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE VARIABLE_NAME = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
+
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir;
+echo # xtrabackup prepare;
+exec $XTRABACKUP --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+ALTER TABLE t1 DISCARD TABLESPACE;
+let $MYSQLD_DATADIR= `select @@datadir`;
+copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
+copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+SELECT COUNT(*) FROM t1;
+
+DROP PROCEDURE innodb_insert_proc;
+DROP TABLE t1;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/mariabackup/xb_partition.result b/mysql-test/suite/mariabackup/xb_partition.result
new file mode 100644
index 00000000000..f5b6ae0b24d
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_partition.result
@@ -0,0 +1,64 @@
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+CREATE TABLE t2(a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4), (5), (6);
+CREATE TABLE p (
+a int
+) ENGINE=InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (100),
+PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+INSERT INTO p VALUES (1), (101), (201), (301);
+CREATE TABLE isam_t1(a INT) ENGINE=MyISAM;
+INSERT INTO isam_t1 VALUES (1), (2), (3);
+CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
+INSERT INTO isam_t2 VALUES (4), (5), (6);
+CREATE TABLE isam_p (
+a int
+) ENGINE=MyISAM
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (100),
+PARTITION p1 VALUES LESS THAN (200),
+PARTITION p2 VALUES LESS THAN (300),
+PARTITION p3 VALUES LESS THAN (400));
+INSERT INTO isam_p VALUES (1), (101), (201), (301);
+DROP TABLE t1;
+DROP TABLE t2;
+CREATE TABLE t2(a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (40), (50), (60);
+ALTER TABLE p DROP PARTITION p0;
+ALTER TABLE p DROP PARTITION p1;
+ALTER TABLE p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+ALTER TABLE p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
+INSERT INTO p VALUES (401), (501);
+DROP TABLE isam_t1;
+DROP TABLE isam_t2;
+CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
+INSERT INTO isam_t2 VALUES (40), (50), (60);
+ALTER TABLE isam_p DROP PARTITION p0;
+ALTER TABLE isam_p DROP PARTITION p1;
+ALTER TABLE isam_p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+ALTER TABLE isam_p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
+INSERT INTO isam_p VALUES (401), (501);
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * from p;
+a
+201
+301
+401
+501
+SELECT * from isam_p;
+a
+201
+301
+401
+501
+DROP TABLE isam_p;
+DROP TABLE isam_t2;
+DROP TABLE p;
+DROP TABLE t2;
diff --git a/mysql-test/suite/mariabackup/xb_partition.test b/mysql-test/suite/mariabackup/xb_partition.test
new file mode 100644
index 00000000000..f051a52edbc
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xb_partition.test
@@ -0,0 +1,87 @@
+--source include/have_partition.inc
+
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2), (3);
+
+CREATE TABLE t2(a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4), (5), (6);
+
+CREATE TABLE p (
+ a int
+) ENGINE=InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (100),
+ PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+
+INSERT INTO p VALUES (1), (101), (201), (301);
+
+CREATE TABLE isam_t1(a INT) ENGINE=MyISAM;
+INSERT INTO isam_t1 VALUES (1), (2), (3);
+
+CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
+INSERT INTO isam_t2 VALUES (4), (5), (6);
+
+CREATE TABLE isam_p (
+ a int
+) ENGINE=MyISAM
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (100),
+ PARTITION p1 VALUES LESS THAN (200),
+ PARTITION p2 VALUES LESS THAN (300),
+ PARTITION p3 VALUES LESS THAN (400));
+
+INSERT INTO isam_p VALUES (1), (101), (201), (301);
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --no-timestamp --backup --target-dir=$targetdir/full;
+--enable_result_log
+
+DROP TABLE t1;
+DROP TABLE t2;
+CREATE TABLE t2(a INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (40), (50), (60);
+
+ALTER TABLE p DROP PARTITION p0;
+ALTER TABLE p DROP PARTITION p1;
+ALTER TABLE p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+ALTER TABLE p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
+
+INSERT INTO p VALUES (401), (501);
+
+
+DROP TABLE isam_t1;
+DROP TABLE isam_t2;
+CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
+
+INSERT INTO isam_t2 VALUES (40), (50), (60);
+
+ALTER TABLE isam_p DROP PARTITION p0;
+ALTER TABLE isam_p DROP PARTITION p1;
+ALTER TABLE isam_p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
+ALTER TABLE isam_p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
+
+INSERT INTO isam_p VALUES (401), (501);
+
+--disable_result_log
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --incremental --no-timestamp --incremental-basedir=$targetdir/full $targetdir/inc;
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log --redo-only $targetdir/full;
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log --redo-only --incremental-dir=$targetdir/inc $targetdir/full;
+exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log $targetdir/full;
+
+let $targetdir=$targetdir/full;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * from p;
+SELECT * from isam_p;
+
+DROP TABLE isam_p;
+DROP TABLE isam_t2;
+DROP TABLE p;
+DROP TABLE t2;
+rmdir $MYSQLTEST_VARDIR/tmp/full;
+rmdir $MYSQLTEST_VARDIR/tmp/inc;
diff --git a/mysql-test/suite/mariabackup/xbstream.result b/mysql-test/suite/mariabackup/xbstream.result
new file mode 100644
index 00000000000..f340fedb861
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xbstream.result
@@ -0,0 +1,13 @@
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+# xtrabackup backup to stream
+# xbstream extract
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT * FROM t;
+i
+1
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/xbstream.test b/mysql-test/suite/mariabackup/xbstream.test
new file mode 100644
index 00000000000..06e5685276c
--- /dev/null
+++ b/mysql-test/suite/mariabackup/xbstream.test
@@ -0,0 +1,22 @@
+CREATE TABLE t(i INT) ENGINE INNODB;
+INSERT INTO t VALUES(1);
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+mkdir $targetdir;
+let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
+
+echo # xtrabackup backup to stream;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
+echo # xbstream extract;
+--disable_result_log
+exec $XBSTREAM -x -C $targetdir --parallel=16 < $streamfile;
+
+echo # xtrabackup prepare;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+
+-- source include/restart_and_restore.inc
+--enable_result_log
+SELECT * FROM t;
+DROP TABLE t;
+rmdir $targetdir;
+
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 5c5581d37b0..1baec60da40 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -27,7 +27,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE AUTHENTICATION
PLUGIN_TYPE_VERSION 2.1
PLUGIN_LIBRARY auth_ed25519.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index 479b4b00698..6b4e30b3d81 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY cracklib_password_check.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Password validation via CrackLib
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
index 7ed26b8aef6..4471011b660 100644
--- a/mysql-test/suite/plugins/r/show_all_plugins.result
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -4,8 +4,8 @@ Variable_name Value
Opened_plugin_libraries 0
select * from information_schema.all_plugins where plugin_library='ha_example.so';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
-EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.12 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
-UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.12 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
+EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.13 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
+UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.13 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
show status like '%libraries%';
Variable_name Value
Opened_plugin_libraries 1
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index 11385bd6b01..672d0107492 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY simple_password_check.so
-PLUGIN_LIBRARY_VERSION 1.12
+PLUGIN_LIBRARY_VERSION 1.13
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Simple password strength checks
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index 2b9e9ad6baf..44bb824432b 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -1,33 +1,33 @@
---- suite/sys_vars/r/sysvars_innodb.result
-+++ suite/sys_vars/r/sysvars_innodb.result
+--- suite/sys_vars/r/sysvars_innodb.result 2017-05-10 10:25:27.196836832 +0200
++++ suite/sys_vars/r/sysvars_innodb.reject 2017-05-10 17:54:00.922046824 +0200
@@ -54,7 +54,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
+ VARIABLE_COMMENT It is an alias for innodb_adaptive_hash_index_parts; only exists to allow easier upgrade from earlier XtraDB versions.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
@@ -68,7 +68,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 150000
+ DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000000
+ VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 512
@@ -82,7 +82,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5
+ DEFAULT_VALUE 150000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Background commit interval in seconds
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1073741824
-@@ -152,7 +152,7 @@
+ VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000000
+@@ -96,7 +96,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 64
VARIABLE_SCOPE GLOBAL
@@ -36,7 +36,7 @@
VARIABLE_COMMENT Data file autoextend increment in megabytes
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -166,7 +166,7 @@
+@@ -110,7 +110,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -45,7 +45,7 @@
VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -250,10 +250,10 @@
+@@ -194,10 +194,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 134217728
VARIABLE_SCOPE GLOBAL
@@ -58,7 +58,7 @@
NUMERIC_BLOCK_SIZE 1048576
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -292,7 +292,7 @@
+@@ -236,7 +236,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
@@ -67,7 +67,7 @@
VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -334,7 +334,7 @@
+@@ -278,7 +278,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -76,7 +76,7 @@
VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -404,7 +404,7 @@
+@@ -362,7 +362,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -85,7 +85,68 @@
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -516,7 +516,7 @@
+@@ -474,10 +474,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -488,7 +488,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 100
+@@ -502,10 +502,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -530,10 +530,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -544,10 +544,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -572,7 +572,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -94,7 +155,7 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -558,7 +558,7 @@
+@@ -614,7 +614,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
@@ -103,7 +164,7 @@
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -586,7 +586,7 @@
+@@ -642,7 +642,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@@ -112,7 +173,7 @@
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 75
-@@ -600,10 +600,10 @@
+@@ -656,10 +656,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5000
VARIABLE_SCOPE GLOBAL
@@ -125,7 +186,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -852,7 +852,7 @@
+@@ -936,7 +936,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 120
VARIABLE_SCOPE GLOBAL
@@ -134,16 +195,7 @@
VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 127
-@@ -936,7 +936,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 2
-@@ -950,7 +950,7 @@
+@@ -1062,7 +1062,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
@@ -152,7 +204,7 @@
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -1020,7 +1020,7 @@
+@@ -1132,7 +1132,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@@ -161,7 +213,7 @@
VARIABLE_COMMENT Percentage of B-tree page filled during bulk insert
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 100
-@@ -1034,7 +1034,7 @@
+@@ -1146,7 +1146,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -170,7 +222,7 @@
VARIABLE_COMMENT Make the first page of the given tablespace dirty.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -1048,7 +1048,7 @@
+@@ -1160,7 +1160,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@@ -179,7 +231,7 @@
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -1076,7 +1076,7 @@
+@@ -1188,7 +1188,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -188,7 +240,7 @@
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
-@@ -1104,7 +1104,7 @@
+@@ -1216,7 +1216,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -197,7 +249,7 @@
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -1160,7 +1160,7 @@
+@@ -1272,7 +1272,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -206,7 +258,7 @@
VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
-@@ -1188,7 +1188,7 @@
+@@ -1314,7 +1314,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
@@ -215,7 +267,7 @@
VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
NUMERIC_MIN_VALUE 1600000
NUMERIC_MAX_VALUE 80000000
-@@ -1230,7 +1230,7 @@
+@@ -1356,7 +1356,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
@@ -224,7 +276,7 @@
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -1244,7 +1244,7 @@
+@@ -1370,7 +1370,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
@@ -233,7 +285,7 @@
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16
-@@ -1258,7 +1258,7 @@
+@@ -1384,7 +1384,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
@@ -242,7 +294,7 @@
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
NUMERIC_MIN_VALUE 1000
NUMERIC_MAX_VALUE 10000
-@@ -1272,7 +1272,7 @@
+@@ -1398,7 +1398,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
@@ -251,7 +303,7 @@
VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
NUMERIC_MIN_VALUE 1000000
NUMERIC_MAX_VALUE 4294967295
-@@ -1300,7 +1300,7 @@
+@@ -1426,7 +1426,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@@ -260,7 +312,7 @@
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 16
-@@ -1314,7 +1314,7 @@
+@@ -1440,7 +1440,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
@@ -269,7 +321,7 @@
VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
NUMERIC_MIN_VALUE 32000000
NUMERIC_MAX_VALUE 1600000000
-@@ -1342,7 +1342,7 @@
+@@ -1468,7 +1468,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@@ -278,7 +330,7 @@
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -1384,10 +1384,10 @@
+@@ -1510,10 +1510,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
@@ -291,7 +343,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1396,12 +1396,12 @@
+@@ -1522,12 +1522,12 @@
SESSION_VALUE NULL
GLOBAL_VALUE 2000
GLOBAL_VALUE_ORIGIN COMPILE-TIME
@@ -307,7 +359,16 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1468,7 +1468,7 @@
+@@ -1541,7 +1541,7 @@
+ VARIABLE_TYPE BIGINT
+ VARIABLE_COMMENT No effect for this build.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1622,7 +1622,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE SESSION
@@ -316,7 +377,29 @@
VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1073741824
-@@ -1482,10 +1482,10 @@
+@@ -1664,10 +1664,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1678,7 +1678,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 65536
+@@ -1692,10 +1692,10 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
@@ -329,16 +412,16 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1538,7 +1538,7 @@
+@@ -1762,7 +1762,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
- NUMERIC_MIN_VALUE 2
+ NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -1580,7 +1580,7 @@
+@@ -1804,7 +1804,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE GLOBAL
@@ -347,7 +430,7 @@
VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
NUMERIC_MIN_VALUE 512
NUMERIC_MAX_VALUE 16384
-@@ -1594,10 +1594,10 @@
+@@ -1818,10 +1818,10 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@@ -360,7 +443,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1650,10 +1650,10 @@
+@@ -1902,10 +1902,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -373,7 +456,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1664,7 +1664,7 @@
+@@ -1916,7 +1916,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -382,7 +465,16 @@
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 10000000
-@@ -1762,7 +1762,7 @@
+@@ -1958,7 +1958,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 10
+@@ -2028,7 +2028,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
@@ -391,7 +483,7 @@
VARIABLE_COMMENT Number of multi-threaded flush threads
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
-@@ -1818,10 +1818,10 @@
+@@ -2084,10 +2084,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -404,7 +496,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1846,7 +1846,7 @@
+@@ -2112,7 +2112,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@@ -413,7 +505,7 @@
VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
-@@ -1874,7 +1874,7 @@
+@@ -2140,7 +2140,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16
VARIABLE_SCOPE GLOBAL
@@ -422,7 +514,7 @@
VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -1888,7 +1888,7 @@
+@@ -2154,7 +2154,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
@@ -431,7 +523,7 @@
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 65536
-@@ -1930,7 +1930,7 @@
+@@ -2252,7 +2252,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 300
VARIABLE_SCOPE GLOBAL
@@ -440,7 +532,7 @@
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5000
-@@ -1944,7 +1944,7 @@
+@@ -2266,7 +2266,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@@ -449,7 +541,7 @@
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -1986,7 +1986,7 @@
+@@ -2308,7 +2308,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@@ -458,7 +550,7 @@
VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
-@@ -2014,7 +2014,7 @@
+@@ -2336,7 +2336,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
@@ -467,7 +559,7 @@
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -2028,7 +2028,7 @@
+@@ -2350,7 +2350,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
@@ -476,7 +568,7 @@
VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
-@@ -2056,10 +2056,10 @@
+@@ -2378,10 +2378,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -489,7 +581,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2084,7 +2084,7 @@
+@@ -2406,7 +2406,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@@ -498,7 +590,7 @@
VARIABLE_COMMENT Number of undo logs to use (deprecated).
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -2098,7 +2098,7 @@
+@@ -2420,7 +2420,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -507,7 +599,52 @@
VARIABLE_COMMENT An InnoDB page number.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2154,7 +2154,7 @@
+@@ -2434,7 +2434,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 39
+@@ -2448,7 +2448,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 39
+@@ -2462,7 +2462,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 39
+@@ -2504,7 +2504,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000
+@@ -2518,7 +2518,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1
+@@ -2546,7 +2546,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
@@ -516,7 +653,7 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
-@@ -2364,7 +2364,7 @@
+@@ -2770,7 +2770,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -525,7 +662,7 @@
VARIABLE_COMMENT Size of the mutex/lock wait array.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2392,10 +2392,10 @@
+@@ -2798,10 +2798,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@@ -538,7 +675,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2434,7 +2434,7 @@
+@@ -2840,7 +2840,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -547,7 +684,7 @@
VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000
-@@ -2448,7 +2448,7 @@
+@@ -2854,7 +2854,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10000
VARIABLE_SCOPE GLOBAL
@@ -556,7 +693,7 @@
VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1000000
-@@ -2518,7 +2518,7 @@
+@@ -2952,7 +2952,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@@ -565,7 +702,7 @@
VARIABLE_COMMENT Number of undo logs to use.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -2546,7 +2546,7 @@
+@@ -2980,7 +2980,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -574,7 +711,7 @@
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 127
-@@ -2630,7 +2630,7 @@
+@@ -3092,7 +3092,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 4822f43fbb2..042f35f04a8 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -48,6 +48,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT It is an alias for innodb_adaptive_hash_index_parts; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 512
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
SESSION_VALUE NULL
GLOBAL_VALUE 8
@@ -314,6 +328,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 8388608
@@ -426,6 +454,104 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST crc32,strict_crc32,innodb,strict_innodb,none,strict_none
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE DEPRECATED
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE DEPRECATED
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT,DEPRECATED
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -538,6 +664,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
+SESSION_VALUE NULL
+GLOBAL_VALUE deprecated
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE deprecated
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST assert,warn,salvage,deprecated
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DATA_FILE_PATH
SESSION_VALUE NULL
GLOBAL_VALUE ibdata1:12M:autoextend
@@ -804,6 +944,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE DEPRECATED
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE DEPRECATED
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST LEGACY,BACKOFF,DEPRECATED
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -874,6 +1028,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON,FORCE
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FAKE_CHANGES
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FAST_SHUTDOWN
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -1112,6 +1280,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
+SESSION_VALUE NULL
+GLOBAL_VALUE DEPRECATED
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE DEPRECATED
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF,DEPRECATED
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_AUX_TABLE
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -1350,6 +1532,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT No effect for this build.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -1378,6 +1574,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1420,6 +1630,62 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_ARCHIVE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_ARCH_DIR
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 65536
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1048576
@@ -1462,6 +1728,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE DEPRECATED
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE DEPRECATED
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Deprecated and translated to innodb_log_checksums (NONE to OFF, everything else to ON); only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE,DEPRECATED
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -1560,6 +1840,34 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
GLOBAL_VALUE 75.000000
@@ -1644,6 +1952,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MIRRORED_LOG_GROUPS
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 10
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_DISABLE
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -1868,6 +2190,62 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_CLEANER
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_IO
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_MASTER
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_PURGE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 300
@@ -2050,6 +2428,48 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SCRUB_LOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2078,6 +2498,34 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -2428,6 +2876,34 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2540,6 +3016,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2554,6 +3044,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_STACKTRACE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated and ignored; only exists to allow easier upgrade from earlier XtraDB versions.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_TRIM
SESSION_VALUE NULL
GLOBAL_VALUE ON
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index 802ee3b1c6d..68ab8bd27a0 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -367,7 +367,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_PATCH_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE wsrep_25.19
+GLOBAL_VALUE wsrep_MAJVER.MINVER
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
index 700b129fd62..c127115efe1 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
@@ -5,7 +5,7 @@
--replace_result $datadir DATADIR
--let $hostname_regex=/^$hostname\$/HOSTNAME/
---replace_regex $hostname_regex
+--replace_regex $hostname_regex /wsrep_[0-9]{2}\.[0-9]{1,2}/wsrep_MAJVER.MINVER/
--vertical_results
select * from information_schema.system_variables
where variable_name like 'wsrep%'
diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test
index 20f17966b29..12ce9210b0a 100644
--- a/mysql-test/t/events_2.test
+++ b/mysql-test/t/events_2.test
@@ -15,7 +15,7 @@ use events_test;
# mysql.event intact checking end
#
-create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
+create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
drop event e_26;
--error ER_WRONG_VALUE
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index b38e68fe5e7..05ec751e686 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1455,7 +1455,20 @@ SHOW CREATE VIEW v1;
SELECT ASTEXT(p) FROM v1;
DROP VIEW v1;
---echo End of 5.5 tests
+# --echo End of 5.5 tests
+
+--echo #
+--echo # Start of 10.0 tests
+--echo #
+
+--echo #
+--echo # MDEV-12495 Conditional jump depends on uninitialised value for: SELECT NULL UNION geom_expression
+--echo #
+SELECT AsText(g) FROM (SELECT NULL AS g UNION SELECT Point(1,1)) AS t1;
+
+--echo #
+--echo # End 10.0 tests
+--echo #
SHOW CREATE TABLE information_schema.geometry_columns;
SHOW CREATE TABLE information_schema.spatial_ref_sys;
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test
index 009e72c1c14..611f5ab8942 100644
--- a/mysql-test/t/join_cache.test
+++ b/mysql-test/t/join_cache.test
@@ -3900,6 +3900,18 @@ SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired =
set join_cache_level=default;
+#
+# MDEV-12580 Wrong query result in join when using an index (Version > "10.2.3")
+#
+create table t1 (c1 date not null, key (c1)) engine=innodb;
+insert t1 values ('2017-12-27');
+create table t2 (pk int, f1 int, f2 int);
+insert t2 values (4,1,1), (6,1,1);
+set join_buffer_size = 222222208;
+select f2 from t2,t1 where f2 = 0;
+drop table t1, t2;
+set join_buffer_size = default;
+
# The following command must be the last one the file
# this must be the last command in the file
set @@optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/t/limit_rows_examined.test b/mysql-test/t/limit_rows_examined.test
index 29b3b411602..815394aec5c 100644
--- a/mysql-test/t/limit_rows_examined.test
+++ b/mysql-test/t/limit_rows_examined.test
@@ -489,7 +489,6 @@ GROUP BY field1, field2, field3, field4, field5
LIMIT ROWS EXAMINED 120;
FLUSH STATUS;
---error 1028
SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5
FROM t1, t2 AS alias2, t2 AS alias3
WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 )
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 88c4a363a57..4e355e5c3a7 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -294,7 +294,7 @@ SELECT * FROM v2;
DELETE FROM t1;
--echo
---error ER_LOAD_DATA_INVALID_COLUMN
+--error ER_NONUPDATEABLE_COLUMN
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
FIELDS ESCAPED BY '\\'
TERMINATED BY ','
diff --git a/mysql-test/t/loadxml.test b/mysql-test/t/loadxml.test
index b26a2eacc00..0bd97a81649 100644
--- a/mysql-test/t/loadxml.test
+++ b/mysql-test/t/loadxml.test
@@ -137,9 +137,9 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TEXT);
CREATE VIEW v1 AS SELECT CONCAT(c1,'') AS c1, NULL AS c2 FROM t1;
---error ER_LOAD_DATA_INVALID_COLUMN
+--error ER_NONUPDATEABLE_COLUMN
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c1);
---error ER_LOAD_DATA_INVALID_COLUMN,
+--error ER_NONUPDATEABLE_COLUMN
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c2);
DROP VIEW v1;
DROP TABLE t1;
diff --git a/mysql-test/t/log_tables-big.test b/mysql-test/t/log_tables-big.test
index 8c956fa6f55..8936a163d73 100644
--- a/mysql-test/t/log_tables-big.test
+++ b/mysql-test/t/log_tables-big.test
@@ -7,6 +7,8 @@
# check that CSV engine was compiled in
--source include/have_csv.inc
+set @@global.log_output = 'TABLE';
+
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
@@ -18,18 +20,20 @@ set session long_query_time=10;
select get_lock('bug27638', 1);
connection con2;
set session long_query_time=1;
-truncate table mysql.slow_log;
select get_lock('bug27638', 2);
-select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
-truncate table mysql.slow_log;
+select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+ where sql_text = 'select get_lock(\'bug27638\', 2)';
select get_lock('bug27638', 60);
-select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
-truncate table mysql.slow_log;
+select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+ where sql_text = 'select get_lock(\'bug27638\', 60)';
select get_lock('bug27638', 101);
-select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
+select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
+ where sql_text = 'select get_lock(\'bug27638\', 101)';
connection con1;
select release_lock('bug27638');
connection default;
disconnect con1;
disconnect con2;
+
+set @@global.log_output=default;
diff --git a/mysql-test/t/mysql_plugin.test b/mysql-test/t/mysql_plugin.test
deleted file mode 100644
index 10bc03e0f06..00000000000
--- a/mysql-test/t/mysql_plugin.test
+++ /dev/null
@@ -1,368 +0,0 @@
-#
-# Test mysql_plugin tool
-#
-# This test contains test cases for testing the mysql_plugin client with
-# the daemon_example plugin. Test cases include tests for:
-#
-# - successful enable/disable
-# - incorrect paths
-# - missing paths/options
-#
-# Implementation Notes
-#
-# The mysql_plugin tool now accepts --mysqld the path to mysqld server. The
-# mysqld path is extracted from MYSQLD_BOOTSTRAP_CMD line. We also extract
-# the path of MYSQLD_BASEDIR (where mysql exists) and use it for the errmsg
-# file. The directories differ between Windows and Unix but the Perl script
-# included below will pick as per platform.
-#
-# The test is also designed to issue the --skip directive if the location of
-# the mysqld, my_print_defaults, or daemon_example.ini files cannot be found.
-#
-
---source include/not_embedded.inc
-
-# Add the datadir, basedir, plugin_dir to the bootstrap command
-let $MYSQLD_DATADIR= `select @@datadir`;
-let $MYSQL_BASEDIR= `select @@basedir`;
-let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
-let $PLUGIN_DIR=`select @@plugin_dir`;
-
---disable_abort_on_error
-
-# Perl script to extract the location of the basedir from environment
-# variables. This is needed to ensure the test will run on the PB machines
-# designed to test release as well as debug builds. It also checks for the
-# location of the my_print_defaults and daemon_example.ini files.
-
-perl;
-use File::Basename;
- my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
- my $mysqld_basedir=dirname($mysqld);
- my $my_print_defaults= $ENV{MYSQL_MY_PRINT_DEFAULTS};
- my $my_print_defaults_basedir=dirname($my_print_defaults);
- my $daemonexample_ini= "$ENV{DAEMONEXAMPLE_DIR}/daemon_example.ini";
- my $plugindir_ini= "$ENV{PLUGIN_DIR}/daemon_example.ini";
- my $notfound= "";
- open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
- print FILE "let \$MYSQLD_BASEDIR= $mysqld_basedir;\n";
- print FILE "let \$MYSQL_MY_PRINT_DEFAULTS_BASEDIR= $my_print_defaults_basedir;\n";
- if ((!-e $daemonexample_ini) || (!-r $daemonexample_ini))
- {
- print FILE "let \$DAEMONEXAMPLE_DIR= $not_found;\n";
- }
- if ((!-e $plugindir_ini) || (!-r $plugindir_ini))
- {
- print FILE "let \$PLUGIN_DIR= $not_found;\n";
- }
- close FILE;
-EOF
-
-
-source $MYSQL_TMP_DIR/mysqld.inc;
-remove_file $MYSQL_TMP_DIR/mysqld.inc;
-
-# The mysql_plugin tool expects a directory structure like in the installed
-# mysql version, so errmsg.sys will be copied to "basedir/share", we create
-# and remove this structure.
-
---mkdir $MYSQLD_BASEDIR/share
---mkdir $MYSQLD_BASEDIR/share/mysql
---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/mysql/errmsg.sys
-
-# The mysql_plugin tool now accepts --my-print-defaults which points to the
-# executable my_print_defaults.exe we can get this path from the variable
-# $MYSQL_MY_PRINT_DEFAULTS.
-
-# Check for my_print_defaults location. Skip if not found.
-if ($MYSQL_MY_PRINT_DEFAULTS_BASEDIR == '')
-{
- --skip Test requires known location of my_print_defaults executable.
-}
-
-# Check for mysqld location. Skip if not found.
-if ($MYSQLD == '')
-{
- --skip Test requires known location of mysqld executable.
-}
-
-# Check for daemon_example.ini location. Skip if not found in either
-# the plugin_dir path or the daemon_example_dir path.
-if ($PLUGIN_DIR == '')
-{
- if ($DAEMONEXAMPLE_DIR == '')
- {
- --skip Test requires known location of daemon_example.ini file.
- }
- let $PLUGIN_DIR = $DAEMONEXAMPLE_DIR;
-}
-
-# Build client command for reuse.
-
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
-
---echo #
---echo # Ensure the plugin isn't loaded.
---echo #
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
-
---echo #
---echo # Enable the plugin...
---echo #
-
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
-#
-# Enable the plugin
-#
---exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
-
-#
-# Ensure enabling an enabled plugin doesn't fail
---exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
-
-#
-# Restart the server
-#
-
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---echo #
---echo # Simulate loading a plugin libary with multiple entry points.
---echo # This will test the DISABLE to ensure all rows are removed.
---echo #
---replace_regex /\.dll/.so/
-eval INSERT INTO mysql.plugin VALUES ('wicky', '$DAEMONEXAMPLE');
---replace_regex /\.dll/.so/
-eval INSERT INTO mysql.plugin VALUES ('wacky', '$DAEMONEXAMPLE');
---replace_regex /\.dll/.so/
-eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
-
---echo #
---echo # Ensure the plugin is now loaded.
---echo #
---replace_regex /\.dll/.so/
-SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
-
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
-#
-# Disable the plugin - to remove winky, wonky entries
-#
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
-
-#
-# Enable the plugin again
-#
---exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
-
-#
-# Restart the server
-#
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---echo #
---echo # Ensure the plugin is loaded.
---echo #
---replace_regex /\.dll/.so/
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
-# To test the case where the same plugin is reloaded with a different soname,
-# we must copy the example daemon to a new location renaming it.
-
-let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
---copy_file $PLUGIN_DIR/$DAEMONEXAMPLE $PLUGIN_DIR/$DAEMON_RELOAD
---copy_file include/libdaemon_example.ini $PLUGIN_DIR/libdaemon_example.ini
-
-# Now reload it and see that it is a different name.
---exec $MYSQL_PLUGIN_CMD ENABLE libdaemon_example
-
-#
-# Restart the server
-#
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---echo #
---echo # Ensure the plugin is replaced.
---echo #
---replace_regex /\.dll/.so/
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-
---echo #
---echo # Disable the plugin...
---echo #
-
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
-#
-# Disable the plugin
-#
---exec $MYSQL_PLUGIN_CMD DISABLE libdaemon_example
-
-# Remove files for last test case.
-
---remove_file $PLUGIN_DIR/$DAEMON_RELOAD
---remove_file $DAEMONEXAMPLE_DIR/libdaemon_example.ini
-
-#
-# Restart the server
-#
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---echo #
---echo # Ensure the plugin isn't loaded.
---echo #
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-
-#
-# Stop the server for error conditions
-#
-
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
---echo #
---echo # Attempt to load non-existant plugin
---echo #
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE NOT_THERE_AT_ALL 2>&1
-
---echo #
---echo # Attempt to use non-existant plugin.ini file
---echo #
---error 1,2,7,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example --plugin-ini=/NOT/THERE/pi.ini 2>&1
-
---echo #
---echo # Attempt to omit the plugin
---echo #
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE 2>&1
-
---echo #
---echo # Attempt to omit DISABLE|ENABLE
---echo #
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD daemon_example 2>&1
-
---echo #
---echo # Attempt to use bad paths - datadir
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Attempt to use bad paths - basedir
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
-replace_result "/basedir_not_there//" "/basedir_not_there/";
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Attempt to use bad paths - plugin_dir
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Attempt to use bad paths - mysqld
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=/mysqld_not_there/ --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Attempt to use bad paths - my_print_defaults
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=/my_print_defaults_not_there/;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
-
---echo #
---echo # Missing library
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Bad format for config file
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Missing base_dir option
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,139,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Missing data_dir option
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,139,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Missing plugin_dir option
---echo #
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
---error 1,2,139,256
---exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
-
---echo #
---echo # Show the help.
---echo #
-replace_result $MYSQL_PLUGIN mysql_plugin;
---replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
---exec $MYSQL_PLUGIN --help
-
-replace_result $MYSQL_PLUGIN mysql_plugin;
---replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
---exec $MYSQL_PLUGIN --version
-
-#
-# Restart the server
-#
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
-#
-# Cleanup
-
---remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
-# Cleanup the share folder in the binary path.
---remove_file $MYSQLD_BASEDIR/share/errmsg.sys
---rmdir $MYSQLD_BASEDIR/share/mysql
---rmdir $MYSQLD_BASEDIR/share
-
---enable_abort_on_error
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 6d4e0e3f2b9..9f74f4ad9c0 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2490,6 +2490,58 @@ DROP TABLE t2;
DROP DATABASE db_20772273;
USE test;
+--echo #
+--echo # Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
+--echo #
+
+
+CREATE DATABASE bug25717383;
+use bug25717383;
+
+CREATE TABLE `tab
+one` (a int);
+CREATE VIEW `view
+one` as SELECT * FROM `tab
+one`;
+
+CREATE PROCEDURE `proc
+one`() SELECT * from `tab
+one`;
+
+CREATE TEMPORARY TABLE `temp
+one` (id INT);
+
+CREATE TRIGGER `trig
+one` BEFORE INSERT ON `tab
+one` FOR EACH ROW SET NEW.a = 1;
+
+CREATE EVENT `event
+one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
+
+SHOW TABLES FROM bug25717383;
+--replace_column 6 #
+SHOW TRIGGERS FROM bug25717383;
+--replace_column 6 #
+SHOW EVENTS FROM bug25717383;
+
+SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
+ WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
+ ORDER BY ROUTINE_NAME;
+
+--exec $MYSQL_DUMP --triggers --events --routines --add-drop-database --databases bug25717383 > $MYSQLTEST_VARDIR/tmp/bug25717383.sql
+
+SHOW TABLES FROM bug25717383;
+--replace_column 6 #
+SHOW TRIGGERS FROM bug25717383;
+--replace_column 6 #
+SHOW EVENTS FROM bug25717383;
+
+SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
+ WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
+ ORDER BY ROUTINE_NAME;
+
+DROP DATABASE bug25717383;
+
#
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
#
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index b2706a8459f..2f1296560d0 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -406,7 +406,7 @@ select 3 from t1 ;
--disable_abort_on_error ONCE
garbage;
--disable_abort_on_error ONCE
---remove_file DoesNotExist
+--remove_file $MYSQLTEST_VARDIR/DoesNotExist
--disable_result_log
select 2;
@@ -1939,8 +1939,6 @@ remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.reject;
--error 0,1
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.log;
---error 0,1
-remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;
--enable_warnings
#
@@ -2083,9 +2081,11 @@ drop table t1;
--let $patt= /a /b / /less/more/
--replace_regex $patt
select "a is a and less is more" as txt;
+--replace_regex $patt /and /or /
+select "a is a and less is more" as txt2;
--let $patt=
--replace_regex $patt
-select "a is a and less is more" as txt;
+select "a is a and less is more" as txt3;
--enable_query_log
#
@@ -2193,7 +2193,7 @@ drop table t1;
--exec echo "remove_file ;" | $MYSQL_TEST 2>&1
--error 1
-remove_file non_existing_file;
+remove_file $MYSQLTEST_VARDIR/non_existing_file;
--enable_warnings
# ----------------------------------------------------------------------------
@@ -2204,10 +2204,10 @@ remove_file non_existing_file;
--exec echo "remove_files_wildcard ;" | $MYSQL_TEST 2>&1
--error 1
-remove_files_wildcard non_existing_dir;
+remove_files_wildcard $MYSQLTEST_VARDIR/non_existing_dir;
--error 1
-remove_files_wildcard non_existing_dir non_existing_file;
+remove_files_wildcard $MYSQLTEST_VARDIR/non_existing_dir non_existing_file;
# ----------------------------------------------------------------------------
# test for write_file
@@ -2216,7 +2216,7 @@ remove_files_wildcard non_existing_dir non_existing_file;
--exec echo "write_file ;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
+--exec echo "write_file $MYSQLTEST_VARDIR/filename ;" | $MYSQL_TEST 2>&1
# Comment out this test as it confuses cmd.exe with unmatched "
#--error 1
@@ -2462,19 +2462,19 @@ remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
--exec echo "chmod ;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "chmod 0 from_file;" | $MYSQL_TEST 2>&1
+--exec echo "chmod 0 $MYSQLTEST_VARDIR/from_file;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "chmod 08 from_file;" | $MYSQL_TEST 2>&1
+--exec echo "chmod 08 $MYSQLTEST_VARDIR/from_file;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "chmod from_file;" | $MYSQL_TEST 2>&1
+--exec echo "chmod $MYSQLTEST_VARDIR/from_file;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "chmod ABZD from_file;" | $MYSQL_TEST 2>&1
+--exec echo "chmod ABZD $MYSQLTEST_VARDIR/from_file;" | $MYSQL_TEST 2>&1
--error 1
---exec echo "chmod 06789 from_file;" | $MYSQL_TEST 2>&1
+--exec echo "chmod 06789 $MYSQLTEST_VARDIR/from_file;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
@@ -2875,8 +2875,6 @@ list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
diff_files $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
---error 1
-rmdir $MYSQLTEST_VARDIR/tmp/testdir;
cat_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index 8e2d9133359..35bb7aca085 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -225,7 +225,7 @@ DROP TABLE t1;
# Common ciphers to openssl and yassl
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES256-SHA
---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=DES-CBC3-SHA
+--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES128-SHA
--disable_query_log
--disable_result_log
diff --git a/mysql-test/t/openssl_6975.test b/mysql-test/t/openssl_6975.test
index 6e8e03a0a89..6a82d013fb6 100644
--- a/mysql-test/t/openssl_6975.test
+++ b/mysql-test/t/openssl_6975.test
@@ -4,11 +4,13 @@
# test SSLv3 and TLSv1.2 ciphers when OpenSSL is restricted to SSLv3 or TLSv1.2
#
source include/have_ssl_communication.inc;
+source include/require_openssl_client.inc;
# this is OpenSSL test.
create user ssl_sslv3@localhost;
-grant select on test.* to ssl_sslv3@localhost require cipher "RC4-SHA";
+# grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
+grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
create user ssl_tls12@localhost;
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
@@ -17,9 +19,9 @@ let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$
disable_abort_on_error;
echo TLS1.2 ciphers: user is ok with any cipher;
exec $mysql --ssl-cipher=AES128-SHA256;
---replace_result DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-GCM-SHA384
+--replace_result DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384
exec $mysql --ssl-cipher=TLSv1.2;
-echo TLS1.2 ciphers: user requires SSLv3 cipher RC4-SHA;
+echo TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA;
exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256;
exec $mysql --user ssl_sslv3 --ssl-cipher=TLSv1.2;
echo TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
@@ -27,13 +29,13 @@ exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA256;
exec $mysql --user ssl_tls12 --ssl-cipher=TLSv1.2;
echo SSLv3 ciphers: user is ok with any cipher;
-exec $mysql --ssl-cipher=RC4-SHA;
+exec $mysql --ssl-cipher=AES256-SHA;
exec $mysql --ssl-cipher=SSLv3;
-echo SSLv3 ciphers: user requires SSLv3 cipher RC4-SHA;
-exec $mysql --user ssl_sslv3 --ssl-cipher=RC4-SHA;
+echo SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA;
+exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA;
exec $mysql --user ssl_sslv3 --ssl-cipher=SSLv3;
echo SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
-exec $mysql --user ssl_tls12 --ssl-cipher=RC4-SHA;
+exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA;
exec $mysql --user ssl_tls12 --ssl-cipher=SSLv3;
drop user ssl_sslv3@localhost;
diff --git a/mysql-test/t/query_cache_innodb.test b/mysql-test/t/query_cache_innodb.test
new file mode 100644
index 00000000000..ba62ec36c16
--- /dev/null
+++ b/mysql-test/t/query_cache_innodb.test
@@ -0,0 +1,85 @@
+--source include/have_innodb.inc
+--source include/have_query_cache.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-12485: foreign key on delete cascade stale entries with
+--echo # query cache enabled
+--echo #
+
+SET NAMES utf8;
+set global query_cache_type=1;
+set global query_cache_size=1024*1024;
+set query_cache_type=1;
+
+create table t1 ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+
+create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references t1(`id`) on delete cascade ) engine=innodb;
+
+insert into t1 values (1);
+insert into t2 values (1,1);
+select * from t2;
+show status like "Qcache_queries_in_cache";
+
+delete from t1;
+show status like "Qcache_queries_in_cache";
+select * from t2;
+
+optimize table t2;
+select * from t2;
+drop table t2;
+drop table t1;
+
+create database `testdatabase$Ñ—`;
+use `testdatabase$Ñ—`;
+create table `t1$Ñ—` ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+
+create table `t2$Ñ—` ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references `t1$Ñ—`(`id`) on delete cascade ) engine=innodb;
+
+insert into `t1$Ñ—` values (1);
+insert into `t2$Ñ—`values (1,1);
+select * from `t2$Ñ—`;
+show status like "Qcache_queries_in_cache";
+
+delete from `t1$Ñ—`;
+show status like "Qcache_queries_in_cache";
+select * from `t2$Ñ—`;
+
+optimize table `t2$Ñ—`;
+select * from `t2$Ñ—`;
+
+use test;
+drop database `testdatabase$Ñ—`;
+SET NAMES default;
+
+create database `#mysql50#-`;
+use `#mysql50#-`;
+create table `#mysql50#t-1` ( id int unsigned auto_increment, primary key(id) ) engine=innodb;
+
+create table `#mysql50#t-2` ( t2id int unsigned, id int unsigned, primary key(t2id, id), foreign key (`id`) references `#mysql50#t-1`(`id`) on delete cascade ) engine=innodb;
+
+insert into `#mysql50#t-1` values (1);
+insert into `#mysql50#t-2`values (1,1);
+select * from `#mysql50#t-2`;
+show status like "Qcache_queries_in_cache";
+
+delete from `#mysql50#t-1`;
+show status like "Qcache_queries_in_cache";
+select * from `#mysql50#t-2`;
+
+optimize table `#mysql50#t-2`;
+select * from `#mysql50#t-2`;
+
+use test;
+drop database `#mysql50#-`;
+SET NAMES default;
+--disable_query_log
+call mtr.add_suppression("\\[ERROR\\] Invalid \\(old\\?\\) table or database name 't?-[12]?\\'");
+--enable_query_log
+--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN=\\[ERROR\\] Invalid \\(old\\?\\) table or database name
+--source include/search_pattern_in_file.inc
+
+set global query_cache_type=DEFAULT;
+set global query_cache_size=DEFAULT;
+--echo End of 10.2 tests
diff --git a/mysql-test/t/ssl_7937.combinations b/mysql-test/t/ssl_7937.combinations
index 46a45686a9b..71b134e229a 100644
--- a/mysql-test/t/ssl_7937.combinations
+++ b/mysql-test/t/ssl_7937.combinations
@@ -1,3 +1,8 @@
+[x509v3]
+--loose-enable-ssl
+--loose-ssl-cert=$MYSQL_TEST_DIR/std_data/serversan-cert.pem
+--loose-ssl-key=$MYSQL_TEST_DIR/std_data/serversan-key.pem
+
[ssl]
--loose-enable-ssl
diff --git a/mysql-test/t/ssl_7937.test b/mysql-test/t/ssl_7937.test
index 8e9d1901907..aa8cd225d7b 100644
--- a/mysql-test/t/ssl_7937.test
+++ b/mysql-test/t/ssl_7937.test
@@ -26,7 +26,7 @@ create procedure have_ssl()
# we fake the test result for yassl
let yassl=`select variable_value='Unknown' from information_schema.session_status where variable_name='Ssl_session_cache_mode'`;
if (!$yassl) {
- --replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate"
+ --replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate" "Error in the certificate." "Failed to verify the server certificate"
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
}
if ($yassl) {
diff --git a/mysql-test/t/ssl_8k_key.test b/mysql-test/t/ssl_8k_key.test
index 23267a3c611..edfead46658 100644
--- a/mysql-test/t/ssl_8k_key.test
+++ b/mysql-test/t/ssl_8k_key.test
@@ -1,5 +1,5 @@
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
+# schannel does not support keys longer than 4k
+-- source include/not_windows.inc
-- source include/have_ssl_communication.inc
#
diff --git a/mysql-test/t/stat_tables_par.test b/mysql-test/t/stat_tables_par.test
index 1866eb71d3b..9d4038911ff 100644
--- a/mysql-test/t/stat_tables_par.test
+++ b/mysql-test/t/stat_tables_par.test
@@ -209,7 +209,7 @@ connect (con2, localhost, root,,);
connection con1;
set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1';
-set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2';
+set debug_sync='thr_multi_lock_before_thr_lock SIGNAL go2 EXECUTE 3';
use dbt3_s001;
--send analyze table lineitem persistent for all
diff --git a/mysql-test/t/subselect_exists2in.test b/mysql-test/t/subselect_exists2in.test
index 9450ef71494..a4fdbe5c50b 100644
--- a/mysql-test/t/subselect_exists2in.test
+++ b/mysql-test/t/subselect_exists2in.test
@@ -758,6 +758,34 @@ deallocate prepare stmt;
drop view v1;
drop table t1,t2;
+--echo #
+--echo #MDEV-10053: EXIST to IN transformation turned down
+--echo #
+
+CREATE TABLE t1 (
+ pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk))
+ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7);
+
+let $q=
+SELECT STRAIGHT_JOIN sq1.f2
+ FROM ( SELECT * FROM t1 ) AS sq1
+ WHERE EXISTS ( SELECT * FROM t1 AS sq2
+ WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+
+set @optimizer_switch_save=@@optimizer_switch;
+
+set optimizer_switch='exists_to_in=off';
+eval explain extended $q;
+eval $q;
+set optimizer_switch='exists_to_in=on';
+eval explain extended $q;
+eval $q;
+
+set optimizer_switch= @optimizer_switch_save;
+
+DROP TABLE t1;
+
--echo # End of 10.0 tests
#restore defaults
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test
index b26c5036f3f..2451bc60fee 100644
--- a/mysql-test/t/subselect_innodb.test
+++ b/mysql-test/t/subselect_innodb.test
@@ -503,6 +503,27 @@ drop view v1;
drop table t1,t2;
--echo #
+--echo # MDEV-10693: cost-based choice between materialization and in-to-exists
+--echo # for a subquery from the expression used in ref access
+--echo #
+
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (i1 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE TABLE t2 (i2 INT) ENGINE=InnoDB;
+
+CREATE TABLE t3 (i3 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+
+SELECT * FROM t1
+ WHERE NULL IN ( SELECT i2 FROM t2
+ WHERE i1 IN ( i2 IN ( SELECT i3 FROM t3 ) ) AND i2 = 2 );
+
+DROP TABLE t1,t2,t3;
+
+--echo #
--echo # MDEV-6041: ORDER BY+subqueries: subquery_table.key=outer_table.col is not recongized as binding
--echo #
create table t1(a int) engine=innodb;
diff --git a/mysql-test/t/subselect_mat_cost_bugs.test b/mysql-test/t/subselect_mat_cost_bugs.test
index 8205e94b203..316ac707bef 100644
--- a/mysql-test/t/subselect_mat_cost_bugs.test
+++ b/mysql-test/t/subselect_mat_cost_bugs.test
@@ -424,3 +424,42 @@ explain select * from t1 where c1 = 'a2' and (c1, c2) not in (select * from t2);
select * from t1 where c1 = 'a2' and (c1, c2) not in (select * from t2);
drop table t1, t2;
+
+--echo #
+--echo # MDEV-12673: cost-based choice between materialization and in-to-exists
+--echo #
+
+CREATE TABLE t1 (
+ pk1 int, a1 varchar(3), b1 varchar(3), PRIMARY KEY (pk1), KEY(a1), KEY(b1)
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'foo','bar'),(2,'bar','foo');
+
+CREATE TABLE t2 (pk2 INT PRIMARY KEY, a2 VARCHAR(3), KEY(a2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'abc'),(2,'xyz'),(3,'foo');
+
+SELECT 'qux' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+EXPLAIN
+SELECT 'bar' IN ( SELECT a1 FROM t1 INNER JOIN t2 WHERE a2 = b1 AND pk2 = 3 );
+
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (i1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1);
+
+CREATE TABLE t2 (i2 int, c2 varchar(3), KEY(i2,c2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'abc'),(2,'foo');
+
+CREATE TABLE t3 (pk3 int PRIMARY KEY, c3 varchar(3)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (1,'foo'),(2,'bar');
+
+SELECT * FROM t1 WHERE i1 NOT IN (
+ SELECT i2 FROM t2 RIGHT JOIN t3 ON (c3 = c2) WHERE pk3 = i1
+);
+
+EXPLAIN
+SELECT * FROM t1 WHERE i1 NOT IN (
+ SELECT i2 FROM t2 RIGHT JOIN t3 ON (c3 = c2) WHERE pk3 = i1
+);
+
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test
index e20291cfa67..b3c603728ee 100644
--- a/mysql-test/t/subselect_sj_mat.test
+++ b/mysql-test/t/subselect_sj_mat.test
@@ -1857,6 +1857,99 @@ execute stmt;
drop table t1;
+--echo #
+--echo # MDEV-12429: IN subquery used in WHERE of EXISTS subquery
+--echo #
+
+CREATE TABLE t1 (
+ pk INT, f1 INT NOT NULL, f2 VARCHAR(3), f3 INT NULL, PRIMARY KEY(pk)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1,'foo',8), (2,5,'bar',7);
+
+SELECT sq1.f2 FROM t1 AS sq1
+ WHERE EXISTS ( SELECT * FROM t1 AS sq2
+ WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+
+set @save_optimizer_switch= @@optimizer_switch;
+
+set optimizer_switch='exists_to_in=off';
+EXPLAIN
+SELECT sq1.f2 FROM t1 AS sq1
+ WHERE EXISTS ( SELECT * FROM t1 AS sq2
+ WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+
+--echo # this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT sq1.f2 FROM t1 AS sq1
+ WHERE EXISTS ( SELECT * FROM t1 AS sq2
+ WHERE sq1.`pk` IN ( SELECT f1 FROM t1 ) AND sq2.f1 = sq1.f1 );
+
+set optimizer_switch= @save_optimizer_switch;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-12145: IN subquery used in WHERE of EXISTS subquery
+--echo #
+
+CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(6);
+
+CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8),(7),(1);
+
+CREATE TABLE t3 (f3 INT, i3 INT, KEY(i3)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (8,0),(6,3),(2,8),(3,8),(1,6),(0,0),(1,0),(1,5);
+
+set @save_optimizer_switch= @@optimizer_switch;
+
+set optimizer_switch='exists_to_in=off';
+SELECT * FROM t1
+ WHERE EXISTS ( SELECT * FROM t2, t3
+ WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+EXPLAIN EXTENDED
+SELECT * FROM t1
+ WHERE EXISTS ( SELECT * FROM t2, t3
+ WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+
+--echo # this checks the result set above
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT * FROM t1
+ WHERE EXISTS ( SELECT * FROM t2, t3
+ WHERE i3 = i2 AND f1 IN ( SELECT f3 FROM t3 ) );
+
+set optimizer_switch= @save_optimizer_switch;
+
+DROP TABLE t1,t2,t3;
+
+--echo #
+--echo # MDEV-9686: IN subquery used in WHERE of a subquery from select list
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT);
+INSERT INTO t1 VALUES (1, 4),(2, 3),(3, 3),(4, 6),(5, 3);
+
+CREATE TABLE t2 (f2 INT);
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+--echo # t1.pk is always IN ( SELECT f2 FROM t2 ),
+--echo # so the IN condition should be true for every row,
+--echo # and thus COUNT(*) should always return 5
+
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+ WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+EXPLAIN EXTENDED
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+ WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+
+--echo # this checks the result set above
+set @save_optimizer_switch= @@optimizer_switch;
+set optimizer_switch= 'materialization=off,semijoin=off';
+SELECT pk, f1, ( SELECT COUNT(*) FROM t2
+ WHERE t1.pk IN ( SELECT f2 FROM t2 ) ) AS sq FROM t1;
+set optimizer_switch= @save_optimizer_switch;
+
+DROP TABLE t1,t2;
+
--echo # End of 5.5 tests
--echo #
--echo # MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 065be302237..e17ea07ca3c 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -300,3 +300,19 @@ select create_options from information_schema.tables where table_name='t1';
create table t2 like t1;
show create table t2;
drop tables t1, t2;
+
+--echo #
+--echo # Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
+--echo # WITH DATA DIRECTORY
+--echo #
+
+--echo # Make sure we have no current database
+CREATE DATABASE x;
+USE x;
+DROP DATABASE x;
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
+DATA DIRECTORY "$MYSQLTEST_VARDIR/tmp";
+
+DROP TABLE test.t1;
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
index 4812456839d..c5c244bf533 100644
--- a/mysql-test/unstable-tests
+++ b/mysql-test/unstable-tests
@@ -23,404 +23,360 @@
#
##############################################################################
-main.alter_table : Modified in 10.1.22
-main.alter_table_trans : MDEV-11805 - timeout
-main.analyze_format_json : MDEV-11866 - Wrong result; also uses analyze-format.inc modified in 10.1.22
-main.analyze_stmt_orderby : MDEV-11866 - Wrong result; also uses analyze-format.inc modified in 10.1.22
-main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result; also modified in 10.1.21
-main.cast : Modified in 10.1.21
-main.create : Modified in 10.1.21
-main.create_delayed : MDEV-10605 - failed with timeout
-main.ctype_ucs : Modified in 10.1.21
-main.ctype_ucs2_def : Modified in 10.1.21
-main.ctype_ucs2_query_cache : Modified in 10.1.21
-main.ctype_utf16 : Modified in 10.1.21
-main.ctype_utf16_def : Modified in 10.1.21
-main.ctype_utf16le : MDEV-10675: timeout or extra warnings
-main.ctype_utf32 : Modified in 10.1.21
-main.derived : Modified in 10.1.22
-main.drop_bad_db_type : Modified in 10.1.22
-main.events_restart : MDEV-12236 - Server shutdown problem
-main.events_slowlog : Added in 10.1.21
-main.explain_json : Uses analyze-format.inc modified in 10.1.22
-main.explain_json_format_partitions : Uses analyze-format.inc modified in 10.1.22
-main.func_time : Modified in 10.1.21
-main.gis : Modified in 10.1.22
-main.grant : Modified in 10.1.22
-main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
-main.index_intersect_innodb : MDEV-10643 - failed with timeout
-main.index_merge_innodb : MDEV-7142 - Wrong execution plan, also modified in 10.1.21
-main.information_schema_part : Modified in 10.1.21
-main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure
-main.join_cache : Modified in 10.1.21
-main.join_nested : MOdified in 10.1.22
-main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist
-main.loaddata : Modified in 10.1.21
-main.log_slow : Modified in 10.1.21
-main.mdev-504 : MDEV-10607 - sporadic "can't connect"
-main.mdev375 : MDEV-10607 - sporadic "can't connect"
-main.merge : MDEV-10607 - sporadic "can't connect"
-main.mysqldump : Modified in 10.1.22
-main.mysqlslap : MDEV-11801 - timeout
-main.mysqltest : MDEV-9269 - fails on Alpha
-main.mysql_upgrade_noengine : MDEV-12233 - Wrong result; added in 10.1.22
-main.order_by : Modified in 10.1.21
-main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan
-main.partition_column : Modified in 10.1.22
-main.partition_innodb : Modified in 10.1.22
-main.partition_myisam : Modified in 10.1.22
-main.pool_of_threads : Modified in 10.1.21
-main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; also modified in 10.1.22
-main.range_vs_index_merge : Modified in 10.1.22
-main.repair_symlink-5543 : MDEV-12215 - Wrong error codes; also modified in 10.1.22
-main.show_explain : MDEV-10674 - sporadic failure
-main.signal_demo3 : MDEV-11720 - Thread stack overrun on labrador
-main.sp : Modified in 10.1.22
-main.sp-prelocking : Modified in 10.1.21
-main.sp-security : MDEV-10607 - sporadic "can't connect"
-main.stat_tables_par : Modified in 10.1.22
-main.status : MDEV-8510 - sporadic wrong result
-main.subselect : Modified in 10.1.21
-main.subselect2 : Modified in 10.1.21
-main.subselect4 : Modified in 10.1.22
-main.subselect_cache : Modified in 10.1.22
-main.subselect_innodb : MDEV-10614 - sporadic wrong results; also modified in 10.1.22
-main.subselect_no_exists_to_in : Uses subselect.test modified in 10.1.21
-main.subselect_no_mat : Uses subselect.test modified in 10.1.21
-main.subselect_no_opts : Uses subselect.test modified in 10.1.21
-main.subselect_no_scache : Uses subselect.test modified in 10.1.21
-main.subselect_no_semijoin : Uses subselect.test modified in 10.1.21
-main.symlink-aria-11902 : MDEV-12215 - Unexpected errors; also added in 10.1.22
-main.symlink-myisam-11902 : MDEV-12215 - Unexpected errors; also added in 10.1.22
-main.table_elim : Modified in 10.1.22
-main.trigger_null-8605 : Modified in 10.1.21
-main.trigger_no_defaults-11698 : Modified in 10.1.22
-main.type_datetime_hires : MDEV-10687 - timeout
-main.type_newdecimal : Modified in 10.1.22
-main.union : Modified in 10.1.21
-main.update_innodb : Modified in 10.1.22
-main.view : Modified in 10.1.22
+
+main.analyze_format_json : MDEV-11866 - Mismatch
+main.analyze_stmt_orderby : MDEV-11866 - Mismatch
+main.check_constraint : Modified in 10.2.6
+main.cte_nonrecursive : Modified in 10.2.6
+main.cte_recursive : Modified in 10.2.6
+main.default : MDEV-12738 - Valgrind; modified in 10.2.6
+main.derived_cond_pushdown : Modified in 10.2.6
+main.drop-no_root : MDEV-12633 - Valgrind
+main.events_2 : Modified in 10.2.6
+main.func_json : MDEV-11648 - Valgrind; modified in 10.2.6
+main.gis : Modified in 10.2.6
+main.index_merge_innodb : MDEV-7142 - Plan mismatch
+main.join_cache : Modified in 10.2.6
+main.keyread : Added in 10.2.6
+main.limit_rows_examined : Modified in 10.2.6
+main.loaddata : Modified in 10.2.6
+main.loadxml : Modified in 10.2.6
+main.log_tables-big : MDEV-12764 - Mismatch; modified in 10.2.6
+main.mix2_myisam : MDEV-11646 - Valgrind
+main.mrr_icp_extra : MDEV-11646 - Valgrind
+main.myisam : MDEV-11646 - Valgrind
+main.myisampack : MDEV-11646 - Valgrind
+main.mysql_client_test : MDEV-12633 - Valgrind
+main.mysql_client_test_comp : MDEV-12633 - Valgrind
+main.mysql_client_test_nonblock : MDEV-12633 - Valgrind, CONC-208 - Error on Power
+main.mysqlcheck : MDEV-12633 - Valgrind
+main.mysqld_option_err : MDEV-12747 - Timeout
+main.mysqldump : Modified in 10.2.6
+main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug
+main.mysqltest : Modified in 10.2.6
+main.openssl_1 : Modified in 10.2.6
+main.openssl_6975 : Modified in 10.2.6
+main.partition_default : Modified in 10.2.6
+main.plugin_loaderr : Modified in 10.2.6
+main.query_cache_innodb : Added in 10.2.6
+main.shm : MDEV-12727 - Mismatch, ERROR 2013
+main.show_check : MDEV-12633 - Valgrind
+main.sp : MDEV-7866 - Mismatch
+main.ssl_7937 : MDEV-11546 - Timeout on Windows; combinations added in 10.2.6
+main.ssl_8k_key : Modified in 10.2.6
+main.ssl_ca : MDEV-10895 - SSL connection error on Power
+main.ssl_timeout : MDEV-11244 - Crash
+main.stat_tables_par : MDEV-10804 - Locking, mismatch
+main.subselect : Modified in 10.2.6
+main.subselect_exists2in : Modified in 10.2.6
+main.subselect_innodb : Modified in 10.2.6
+main.subselect_mat_cost_bugs : Modified in 10.2.6
+main.subselect_sj_mat : Modified in 10.2.6
+main.symlink : Modified in 10.2.6
+main.view : Modified in 10.2.6
+main.win : Modified in 10.2.6
#----------------------------------------------------------------
-archive.archive-big : MDEV-10615 - table is marked as crashed
-archive.discover : MDEV-10510 - table is marked as crashed; modified in 10.1.21
+archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug
#----------------------------------------------------------------
-binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed
-binlog.binlog_max_binlog_stmt_cache_size : Added in 10.1.22
-binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
+binlog.binlog_commit_wait : MDEV-10150 - Mismatch
+binlog.binlog_unsafe : MDEV-12436 - Data too long for column
#----------------------------------------------------------------
-binlog_encryption.* : Added in 10.1.20, still unstable (valgrind errors and such)
-
-binlog_encryption.rpl_parallel : MDEV-10653 - Timeout
-binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result
-binlog_encryption.rpl_ssl : MDEV-11542 - Server crash
+binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash
+binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include
+binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind
+binlog.flashback : Modified in 10.2.6
#----------------------------------------------------------------
-connect.jdbc : Modified in 10.1.21
-connect.jdbc_new : Modified in 10.1.21
-connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results
-connect.xml_zip : Added in 10.1.22
-connect.zip : Added in 10.1.22
+connect.secure_file_priv : Modified in 10.2.6
+connect.tbl : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash
+connect.vcol : MDEV-12374 - Fails on Windows
+connect.zip : MDEV-12631 - Valgrind
#----------------------------------------------------------------
-encryption.create_or_replace : MDEV-9359 - Assertion failure
-encryption.encrypt_and_grep : MDEV-11222 - InnoDB error
-encryption.innodb-bad-key-change : Modified in 10.1.22
-encryption.innodb-bad-key-change2 : Modified in 10.1.22
-encryption.innodb-bad-key-change3 : Modified in 10.1.21
-encryption.innodb-bad-key-change4 : Modified in 10.1.22
-encryption.innodb-bad-key-change5 : Modified in 10.1.22
-encryption.innodb-bad-key-shutdown : MDEV-9105 - valgrind warnings, assertion failures; also modified in 10.1.22
-encryption.innodb-discard-import : Modified in 10.1.21
-encryption.innodb-discard-import-change : Modified in 10.1.21
-encryption.innodb-encryption-disable : Modified in 10.1.22
-encryption.innodb_encryption_discard_import : MDEV-11218 - wrong result, also modified in 10.1.21
-encryption.innodb_encryption_filekeys : MDEV-9962 - timeouts
-encryption.innodb_encryption-page-compression : MDEV-11420 - Trying to access missing tablespace
-encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure
-encryption.innodb_first_page : MDEV-10689 - crashes
-encryption.innodb-log-encrypt : Modified in 10.1.21
-encryption.innodb_lotoftables : MDEV-11531 - InnoDB error, also modified in 10.1.21
-encryption.innodb-missing-key : MDEV-9359 - assertion failure; also modified in 10.1.22
-encryption.innodb_onlinealter_encryption : MDEV-10099 - wrong results
-encryption.innodb-page_encryption : MDEV-10641 - mutex problem
-encryption.innodb-read-only : Added in 10.1.22
-encryption.innodb_scrub : MDEV-8139, also was modified in 10.1.21
-encryption.innodb_scrub_background : MDEV_8139, also was modified in 10.1.21
-encryption.innodb_scrub_compressed : MDEV-8139; also was modified and re-enabled in 10.1.21
+encryption.create_or_replace : MDEV-9359 - Assertion failure, MDEV-12694 - Timeout
+encryption.encrypt_and_grep : Modified in 10.2.6
+encryption.filekeys_emptyfile : Uses include modified in 10.2.6
+encryption.filekeys_encfile : Uses include modified in 10.2.6
+encryption.filekeys_encfile_bad : Uses include modified in 10.2.6
+encryption.filekeys_encfile_badfile : Uses include modified in 10.2.6
+encryption.filekeys_encfile_no : Uses include modified in 10.2.6
+encryption.filekeys_nofile : Uses include modified in 10.2.6
+encryption.filekeys_syntax : Uses include modified in 10.2.6
+encryption.filekeys_unencfile : Uses include modified in 10.2.6
+encryption.innodb-bad-key-change : Modified in 10.2.6
+encryption.innodb-bad-key-change2 : Modified in 10.2.6
+encryption.innodb-bad-key-change3 : Modified in 10.2.6
+encryption.innodb-bad-key-change4 : Modified in 10.2.6
+encryption.innodb-bad-key-change5 : Modified in 10.2.6
+encryption.innodb-bad-key-shutdown : Modified in 10.2.6
+encryption.innodb-compressed-blob : Added in 10.2.6
+encryption.innodb-discard-import : Modified in 10.2.6
+encryption.innodb-discard-import-change : MDEV-12632 - Valgrind; modified in 10.2.6
+encryption.innodb-encryption-alter : Modified in 10.2.6
+encryption.innodb-encryption-disable : Modified in 10.2.6
+encryption.innodb_encryption_discard_import : MDEV-11218 - Mismatch; modified in 10.2.6
+encryption.innodb_encryption_filekeys : MDEV-9962 - Timeout; modified in 10.2.6
+encryption.innodb_encryption_is : Modified in 10.2.6
+encryption.innodb_encryption-page-compression : Modified in 10.2.6
+encryption.innodb_encryption_row_compressed : Modified in 10.2.6
+encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure; modified in 10.2.6
+encryption.innodb_first_page : Modified in 10.2.6
+encryption.innodb-force-corrupt : Added in 10.2.6
+encryption.innodb-log-encrypt : Added in 10.2.6
+encryption.innodb-log-encrypt-crash : Added in 10.2.6
+encryption.innodb_lotoftables : Modified in 10.2.6
+encryption.innodb-missing-key : Modified in 10.2.6
+encryption.innodb_onlinealter_encryption : MDEV-10099 - Mismatch; modified in 10.2.6
+encryption.innodb-page_encryption : Modified in 10.2.6
+encryption.innodb-page_encryption-32k : Modified in 10.2.6
+encryption.innodb-page_encryption_compression : Modified in 10.2.6
+encryption.innodb_page_encryption_key_change : Modified in 10.2.6
+encryption.innodb-page_encryption_log_encryption : Modified in 10.2.6
+encryption.innodb-redo-badkey : MDEV-12750 - InnoDB error, crash; added in 10.2.6
+encryption.innodb-redo-nokeys : Added in 10.2.6
+encryption.innodb_scrub : Modified in 10.2.6
+encryption.innodb_scrub_background : Uses opt file modified in 10.2.6
+encryption.tempfiles : Modified in 10.2.6
#----------------------------------------------------------------
-engines/iuds.* : Not maintained in timely manner
-engines/funcs.* : Not maintained in timely manner
+engines/rr_trx.* : MDEV-10998 - Not maintained
#----------------------------------------------------------------
-federated.federated_bug_35333 : Modified in 10.1.22
-federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
-federated.federated_partition : MDEV-10417 - Fails on Mips
-federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
-federated.federatedx : MDEV-10617 - Wrong checksum, timeouts
+federated.federated_innodb : MDEV-10617 - Wrong checksum
+federated.federated_transactions : MDEV-10617 - Wrong checksum
+federated.federatedx : MDEV-10617 - Wrong checksum
#----------------------------------------------------------------
-funcs_1.is_columns_mysql : Modified in 10.1.22
-funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result
-
-funcs_2.innodb_charset : Modified in 10.1.21
-funcs_2.memory_charset : MDEV-10290 - Timeout
-funcs_2.myisam_charset : MDEV-11535 - Timeout
+funcs_2/charset.* : MDEV-10999 - Not maintained
#----------------------------------------------------------------
-galera.* : suite.pm modified in 10.1.22
+galera.ev51914 : Added in 10.2.6
+galera.GAL-401 : Added in 10.2.6
+galera.GAL-419 : Added in 10.2.6
+galera.GAL-480 : Added in 10.2.6
+galera.galera_account_management : Modified in 10.2.6
+galera.galera_admin : Added in 10.2.6
+galera.galera_bf_abort : Modified in 10.2.6
+galera.galera_desync_overlapped : Added in 10.2.6
+galera.galera_gcache_recover : Added in 10.2.6
+galera.galera_gcache_recover_full_gcache : Added in 10.2.6
+galera.galera_gcache_recover_manytrx : Added in 10.2.6
+galera.galera_kill_applier : Modified in 10.2.6
+galera.galera_many_tables_pk : Modified in 10.2.6
+galera.galera_pc_ignore_sb : Modified in 10.2.6
+galera.galera_restart_on_unknown_option : Added in 10.2.6
+galera.galera_roles : Modified in 10.2.6
+galera.galera_toi_ddl_fk_update : Added in 10.2.6
+galera.galera_toi_drop_database : Added in 10.2.6
+galera.galera_toi_truncate : Added in 10.2.6
+galera.galera_var_cluster_address : Modified in 10.2.6
+galera.galera_var_retry_autocommit : Added in 10.2.6
+galera.galera_var_slave_threads : Modified in 10.2.6
+galera.galera_wsrep_log_conficts : Added in 10.2.6
+galera.galera_wsrep_provider_options_syntax : Added in 10.2.6
+galera.galera#414 : Modified in 10.2.6
+galera.lp1376747 : Added in 10.2.6
+galera.lp1376747-2 : Added in 10.2.6
+galera.lp1376747-3 : Added in 10.2.6
+galera.lp1376747-4 : Added in 10.2.6
+galera.MW-258 : Modified in 10.2.6
+galera.MW-313 : Added in 10.2.6
+galera.MW-328A : Added in 10.2.6
+galera.MW-328B : Added in 10.2.6
+galera.MW-328C : Added in 10.2.6
+galera.MW-328D : Added in 10.2.6
+galera.MW-328E : Added in 10.2.6
+galera.MW-329 : Added in 10.2.6
+galera.pxc-421 : Added in 10.2.6
+
+galera_3nodes.* : MDEV-11490 - Warnings not suppressed
+
+galera_3nodes.galera_safe_to_bootstrap : Added in 10.2.6
-galera.galera_mdev_10812 : Added in 10.1.22
-galera.galera_var_cluster_address : Modified in 10.1.21
-galera.galera_var_dirty_reads : Modified in 10.1.21
-galera.MW-284 : Modified in 10.1.21
-galera.galera_split_brain : Modified in 10.1.21
-galera.galera_var_certify_nonPK_off : Modified in 10.1.22
-galera.galera_var_max_ws_rows : Modified in 10.1.22
+#----------------------------------------------------------------
-galera_3nodes.* : MDEV-11490 - Warnings not suppressed
+gcol.gcol_column_def_options_innodb : Uses include modified in 10.2.6
+gcol.gcol_column_def_options_myisam : MDEV-11647 - Valgrind; uses include modified in 10.2.6
+gcol.innodb_virtual_basic : MDEV-11639 - Crash
+gcol.innodb_virtual_debug : Modified in 10.2.6
+gcol.innodb_virtual_fk : Modified in 10.2.6
#----------------------------------------------------------------
-innodb.101_compatibility : Modified in 10.1.22
-innodb.alter_key_block_size-11757 : Added in 10.1.22
-innodb.binlog_consistent : MDEV-10618 - Server fails to start
-innodb.doublewrite : Modified in 10.1.22
-innodb.group_commit_crash : Modified in 10.1.21
-innodb.group_commit_crash_no_optimize_thread : Modified in 10.1.21
-innodb.innodb-32k-crash : Modified in 10.1.22
-innodb.innodb-64k-crash : Modified in 10.1.22
-innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
-innodb.innodb-blob : MDEV-12053 - Client crash; also modified in 10.1.22
-innodb.innodb_blob_unrecoverable_crash : Modified in 10.1.22
-innodb.innodb-bug-14068765 : MDEV-9105 - valgrind warnings, assertion failures
-innodb.innodb-bug-14084530 : MDEV-9105 - valgrind warnings, assertion failures
-innodb.innodb_bug11754376 : Modified in 10.1.22
-innodb.innodb_bug14147491 : MDEV-11808, also modified in 10.1.22
-innodb.innodb_bug14676111 : MDEV-11802 - wrong result; also modified in 10.1.22
-innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan
-innodb.innodb_bug53756 : Modified in 10.1.22
-innodb.innodb_bug56947 : Modified in 10.1.22
-innodb.innodb_bug59641 : Modified in 10.1.22
-innodb.innodb-change-buffer-recovery : Modified in 10.1.21
-innodb.innodb-get-fk : Modified in 10.1.22
-innodb.innodb-page_compression_default : Added in 10.1.22
-innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem
-innodb.innodb_stats : MDEV-10682 - wrong result
-innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result
-innodb.innodb-wl5522 : MDEV-9105 - valgrind warnings, assertion failures
-innodb.innodb-wl5522-1 : MDEV-9105 - valgrind warnings, assertion failures
-innodb.innodb-wl5522-debug : Modified in 10.1.22
-innodb.innodb-wl5522-debug-zip : Modified in 10.1.22
-innodb.log_data_file_size : Added in 10.1.21
-innodb.log_file_size : Added in 10.1.22
-innodb.read_only_recovery : Added in 10.1.22
-innodb.xa_recovery : Modified in 10.1.22
-
-innodb_fts.crash_recovery : Added in 10.1.22
-innodb_fts.innodb_fts_result_cache_limit : Modified in 10.1.22
-innodb_fts.misc_debug : Added in 10.1.22
+innodb.alter_table : Modified in 10.2.6
+innodb.autoinc_debug : Modified in 10.2.6
+innodb.autoinc_persist : Modified in 10.2.6
+innodb.deadlock_detect : Modified in 10.2.6
+innodb.defrag_mdl-9155 : MDEV-11336 - Timeout
+innodb.foreign_key : Added in 10.2.6
+innodb.ibuf_not_empty : MDEV-12741 - Tablespace error; added in 10.2.6
+innodb.innodb-32k-crash : Modified in 10.2.6
+innodb.innodb-64k-crash : Modified in 10.2.6
+innodb.innodb-alter-debug : Added in 10.2.6
+innodb.innodb-alter-nullable : Added in 10.2.6
+innodb.innodb-alter-timestamp : Modified in 10.2.6
+innodb.innodb-blob : Modified in 10.2.6
+innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt; modified in 10.2.6
+innodb.innodb_defragment : MDEV-11336 - Mismatch; modified in 10.2.6
+innodb.innodb_defragment_small : MDEV-11336 - Mismatch; modified in 10.2.6
+innodb.innodb_defrag_binlog : MDEV-11336 - Mismatch
+innodb.innodb_defrag_concurrent : MDEV-11336 - Assertion failure, mismatch
+innodb.innodb_defrag_stats : MDEV-11336 - Mismatch
+innodb.innodb_force_recovery : Added in 10.2.6
+innodb.innodb_gis : Modified in 10.2.6
+innodb.innodb-index-online-norebuild : Added in 10.2.6
+innodb.innodb-isolation : Added in 10.2.6
+innodb.innodb_stats_del_mark : Added in 10.2.6
+innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait
+innodb.innodb-virtual-columns2 : Added in 10.2.6
+innodb.innodb-wl5522-debug : Modified in 10.2.6
+innodb.innodb_xtradb_compat : Added in 10.2.6
+innodb.insert_debug : Modified in 10.2.6
+innodb.log_file_name : Modified in 10.2.6
+innodb.readahead : Added in 10.2.6
+innodb.redo_log_during_checkpoint : Added in 10.2.6
+innodb.truncate_debug : MDEV-12753 - Sync point timeout, MDEV-12754 - Semaphore wait; added in 10.2.6
+innodb.truncate_purge_debug : MDEV-12708 - Extra warning; added in 10.2.6
+
+innodb_fts.innodb_fts_plugin : MDEV-11649 - Valgrind
+
+innodb_gis.rtree : Modified in 10.2.6
+
+innodb_undo.truncate : Added in 10.2.6
+innodb_undo.truncate_multi_client : Added in 10.2.6
+innodb_undo.truncate_recover : Added in 10.2.6
+
+innodb_zip.recover : MDEV-12794 - Table crashed; added in 10.2.6
+innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket, MDEV-12748 - Unknown engine InnoDB
+innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2
#----------------------------------------------------------------
-mroonga/storage.column_datetime_32bit_2038 : Wrong result on Alpha
-mroonga/storage.column_datetime_32bit_before_unix_epoch : Wrong result on Alpha
-mroonga/storage.column_datetime_32bit_max : Wrong result on Alpha
-mroonga/storage.column_datetime_32bit_out_of_range : Wrong result on Alpha
-mroonga/storage.index_multiple_column_unique_date_32bit_equal : Wrong result on Alpha
-mroonga/storage.index_multiple_column_unique_date_order_32bit_desc : Wrong result on Alpha
-mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - valgrind warnings
-mroonga/storage.repair_table_no_index_file : MDEV-9364 - wrong result
+json.json_no_table : MDEV-12732 - Valgrind
#----------------------------------------------------------------
-multi_source.gtid : MDEV-10417 - Fails on Mips
-multi_source.info_logs : MDEV-10042 - wrong result
-multi_source.multisource : MDEV-10417 - Fails on Mips
-multi_source.reset_slave : MDEV-10690 - wrong result
-multi_source.simple : MDEV-4633 - Wrong slave status output
-multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats
+large_tests.rpl_slave_net_timeout : MDEV-11002 - Mismatch
#----------------------------------------------------------------
-oqgraph.regression_mdev6282 : Modified in 10.1.22
-oqgraph.regression_mdev6345 : Modified in 10.1.22
+maria.insert_select : MDEV-12757 - Timeout
+maria.maria : MDEV-11646 - Valgrind
#----------------------------------------------------------------
-parts.partition_bigint_innodb : Added in 10.1.22
-parts.partition_bigint_myisam : Added in 10.1.22
-parts.partition_double_innodb : Added in 10.1.22
-parts.partition_double_myisam : Added in 10.1.22
-parts.partition_float_innodb : Modified in 10.1.22
-parts.partition_float_myisam : Modified in 10.1.22
-parts.partition_int_innodb : Modified in 10.1.22
-parts.partition_int_myisam : Modified in 10.1.22
-parts.partition_mediumint_innodb : Added in 10.1.22
-parts.partition_mediumint_myisam : Added in 10.1.22
-parts.partition_smallint_innodb : Added in 10.1.22
-parts.partition_smallint_myisam : Added in 10.1.22
-parts.partition_tinyint_innodb : Added in 10.1.22
-parts.partition_tinyint_myisam : Added in 10.1.22
+mariabackup.* : MariaDB backup is not yet supported for 10.2
#----------------------------------------------------------------
-perfschema.csv_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.func_file_io : MDEV-5708 - fails for s390x
-perfschema.func_mutex : MDEV-5708 - fails for s390x
-perfschema.indexed_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.innodb_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.memory_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.merge_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.multi_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.myisam_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.part_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.privilege_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.rollback_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.setup_actors : MDEV-10679 - rare crash
-perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match
-perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders
-perfschema.table_name : Modified in 10.1.22
-perfschema.temp_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.threads_mysql : MDEV-10677 - sporadic wrong result; also modified in 10.1.22
-perfschema.trigger_table_io : Uses table_io_result_helper.inc modified in 10.1.22
-perfschema.view_table_io : Uses table_io_result_helper.inc modified in 10.1.22
+mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - Valgrind
#----------------------------------------------------------------
-plugins.auth_ed25519 : Added in 10.1.22
-plugins.cracklib_password_check : MDEV-11650 - valgrind warnings
-plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url
-plugins.server_audit : MDEV-9562 - crashes on sol10-sparc
-plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc
-plugins.two_password_validations : MDEV-11650 - valgrind warnings
+multi_source.info_logs : MDEV-12629 - Valgrind
#----------------------------------------------------------------
-rpl.last_insert_id : MDEV-10625 - warnings in error log
-rpl.rpl_alter_extra_persistent : Added in 10.1.21
-rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips
-rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips
-rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log
-rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master
-rpl.rpl_checksum_cache : MDEV-12173 - Unexpected error
-rpl.rpl_ddl : MDEV-10417 - Fails on Mips
-rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result
-rpl.rpl_gtid_basic : MDEV-10681 - server startup problem
-rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master
-rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings
-rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown
-rpl.rpl_gtid_until : MDEV-10625 - warnings in error log
-rpl.rpl_heartbeat_basic : Modified in 10.1.22
-rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips
-rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x
-rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x
-rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips
-rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog
-rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips
-rpl.rpl_mdev6386 : Modified in 10.1.22
-rpl.rpl_parallel : MDEV-10653 - Timeouts
-rpl.rpl_parallel_optimistic : MDEV-10511 - timeout
-rpl.rpl_parallel_retry : MDEV-11119 - Server crash
-rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables
-rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
-rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings
-rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result
-rpl.rpl_row_mysqlbinlog : Modified in 10.1.21
-rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x
-rpl.rpl_semi_sync : MDEV-11220 - Wrong result
-rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings
-rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status
-rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition
-rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem
-rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha
-rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock
-rpl.rpl_special_charset : Modified in 10.1.21
-rpl.rpl_sync : MDEV-10633 - Database page corruption
-rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
-rpl.sec_behind_master-5114 : Modified in 10.1.21
+parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket
#----------------------------------------------------------------
-spider.* : MDEV-9329 - tests are too memory-consuming
+percona.* : MDEV-10997 - Not maintained
-spider/bg.direct_aggregate : MDEV-7098 - Trying to unlock mutex that wasn't locked
-spider/bg.direct_aggregate_part : MDEV-7098 - Trying to unlock mutex that wasn't locked
-spider/bg.ha : MDEV-7914, MDEV-9329 - Crash, failures on s390x
-spider/bg.ha_part : MDEV-9329 - Fails on Ubuntu/s390x
-spider/bg.spider_fixes : MDEV-7098, MDEV-9329 - Mutex problem, failures on s390x
-spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x
+#----------------------------------------------------------------
-spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained
+perfschema.bad_option_3 : MDEV-12728 - Timeout on Power
+perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash
+perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash
+perfschema.stage_mdl_procedure : MDEV-11545 - Missing row
#----------------------------------------------------------------
-sphinx.* : MDEV-10986 - Tests have not been maintained
+perfschema_stress.* : MDEV-10996 - Not maintained
#----------------------------------------------------------------
-storage_engine* : Tests are not always timely maintained
+plugins.cracklib_password_check : MDEV-11650 - Valgrind
+plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such
+plugins.pam : MDEV-10940 - Valgrind
+plugins.two_password_validations : MDEV-11650 - Valgrind
#----------------------------------------------------------------
-stress.ddl_innodb : MDEV-10635 - Testcase timeout
+rocksdb.* : MyRocks is alpha-quality and tests are unstable
#----------------------------------------------------------------
-sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x
-sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout
-sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists
-sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-10513 - crashes
-sys_vars.innodb_stats_include_delete_marked_basic : Added in 10.1.22
-sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash
-sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results
-sys_vars.secure_file_priv : Modified in 10.1.22
-sys_vars.sysvars_innodb : MDEV-6958 - error-prone rdiffs
-sys_vars.sysvars_server_embedded : MDEV-6958 - error-prone rdiffs
+rpl.rpl_binlog_errors : MDEV-12742 - Crash
+rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master
+rpl.rpl_domain_id_filter : MDEV-12250 - Failed to preallocate data
+rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file
+rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master
+rpl.rpl_gtid_stop_start : MDEV-11621 - Table marked as crashed, MDEV-12731 - Valgrind
+rpl.rpl_killed_ddl : MDEV-12756 - Can't find record
+rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog
+rpl.rpl_parallel : MDEV-12730 - Assertion failure
+rpl.rpl_parallel_optimistic_nobinlog : MDEV-12746 - Timeouts, mismatch
+rpl.rpl_parallel_retry : MDEV-11119 - Crash
+rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master
+rpl.rpl_semi_sync_uninstall_plugin : MDEV-10892 - Assertion failure
+rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock
+rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master
+rpl.rpl_upgrade_master_info : MDEV-11620 - Table marked as crashed
+
+rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained
#----------------------------------------------------------------
-tokudb.cluster_filter : MDEV-10678 - Wrong execution plan
-tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan
-tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan
-tokudb.dir_per_db : MDEV-11537 - Wrong result
-tokudb.dir_per_db_rename_to_nonexisting_schema : Added in 10.1.22
-tokudb.gap_lock_error : Added in 10.1.22
-tokudb.locks-select-update-3 : Modified in 10.1.22
-tokudb.percona_kill_idle_trx_tokudb : Modified in 10.1.22
+spider.basic_sql : MDEV-11186 - Internal check fails
-tokudb_backup.* : suite.opt modified in 10.1.22
+spider/handler.* : MDEV-10990 - Not maintained
-tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output
-tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output
-tokudb_bugs.xa : MDEV-11804 - Lock wait timeout
+#----------------------------------------------------------------
+
+sphinx.sphinx : MDEV-10986 - Sporadic failures
+sphinx.union-5539 : MDEV-10986 - Sporadic failures
#----------------------------------------------------------------
-unit.ma_test_loghandler : MDEV-10638 - record read not ok
+sys_vars.innodb_deadlock_detect_basic : Added in 10.2.6
+sys_vars.innodb_max_undo_log_size_basic : Modified in 10.2.6
+sys_vars.innodb_support_xa_basic : Modified in 10.2.6
+sys_vars.innodb_support_xa_func : Modified in 10.2.6
+sys_vars.log_error_func : Modified in 10.2.6
+sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion
+sys_vars.sysvars_wsrep : Modified in 10.2.6
#----------------------------------------------------------------
-vcol.not_supported : MDEV-10639 - Testcase timeout
-vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout
-vcol.vcol_select_myisam : Modified in 10.1.22
+tokudb_mariadb.mdev6657 : MDEV-12737 - Mismatch or valgrind
+
+tokudb_backup.* : MDEV-11001 - Missing include file
+tokudb_sys_vars.* : MDEV-11001 - Missing include file
+tokudb_rpl.* : MDEV-11001 - Missing include file
#----------------------------------------------------------------
-wsrep.binlog_format : MDEV-11532 - WSREP has not yet prepared node
-wsrep.pool_of_threads : MDEV-12234 - Library problem on Power
+unit.conc_connection : CONC-252 - Connector tests fail
+unit.conc_features-10_2 : CONC-252 - Connector tests fail
+unit.conc_misc : CONC-252 - Connector tests fail
+unit.conc_thread : CONC-252 - Connector tests fail
+
+#----------------------------------------------------------------
-wsrep_info.* : suite.pm changed in 10.1.22
-wsrep_info.plugin : MDEV-12232 - Crash on Power
+wsrep.binlog_format : Modified in 10.2.6
+wsrep_info.plugin : MDEV-12232 - Crash on Power
+wsrep.pool_of_threads : MDEV-12234 - GLIBCXX_3.4.20 not found, MDEV-12758 - node not prepared
+wsrep.wsrep_rpl : Modified in 10.2.6
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index 9dd22a6e454..74c755aa669 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1,5 +1,5 @@
# Copyright (c) 2005, 2015, Oracle and/or its affiliates.
-# Copyright (c) 2008, 2016, MariaDB
+# Copyright (c) 2008, 2017, MariaDB
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public