summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/binlog_encryption
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/binlog_encryption')
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_index-master.opt1
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_ioerr.result2
-rw-r--r--mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result6
-rw-r--r--mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test10
-rw-r--r--mysql-test/suite/binlog_encryption/multisource.result4
-rw-r--r--mysql-test/suite/binlog_encryption/my.cnf3
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_skip_replication.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_ssl.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_sync-master.opt1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_sync-slave.opt2
10 files changed, 22 insertions, 11 deletions
diff --git a/mysql-test/suite/binlog_encryption/binlog_index-master.opt b/mysql-test/suite/binlog_encryption/binlog_index-master.opt
new file mode 100644
index 00000000..f2673d08
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/binlog_index-master.opt
@@ -0,0 +1 @@
+--slave_connections_needed_for_purge=0
diff --git a/mysql-test/suite/binlog_encryption/binlog_ioerr.result b/mysql-test/suite/binlog_encryption/binlog_ioerr.result
index 2823b705..146bc50c 100644
--- a/mysql-test/suite/binlog_encryption/binlog_ioerr.result
+++ b/mysql-test/suite/binlog_encryption/binlog_ioerr.result
@@ -4,11 +4,13 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
INSERT INTO t1 VALUES(0);
SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug='+d,fail_binlog_write_1';
+SET GLOBAL binlog_legacy_event_pos= 1;
INSERT INTO t1 VALUES(1);
ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device")
INSERT INTO t1 VALUES(2);
ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device")
SET SESSION debug_dbug=@saved_dbug;
+SET GLOBAL binlog_legacy_event_pos= 0;
INSERT INTO t1 VALUES(3);
SELECT * FROM t1;
a
diff --git a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result
index c6835ff9..d05e3abd 100644
--- a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result
+++ b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result
@@ -6,6 +6,7 @@ connection server_2;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
call mtr.add_suppression(" Got fatal error 1236 from master when reading data from binary log: 'Could not set up decryption for binlog.'");
+call mtr.add_suppression(" Got fatal error 1236 from master when reading data from binary log: 'Could not decrypt binlog: encryption key error");
#####################################################
# Part 1: unencrypted master
#####################################################
@@ -58,10 +59,11 @@ INSERT INTO table3_no_encryption SELECT NULL,NOW(),b FROM table3_no_encryption;
connection server_2;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
-# Ensuring slave was unable to replicate any transactions..
+# Ensuring slave was unable to replicate any encrypted transactions..
# ..success
SHOW TABLES;
Tables_in_test
+table1_no_encryption
include/stop_slave_sql.inc
reset slave;
##########
@@ -80,5 +82,7 @@ COUNT(*)
4
DROP TABLE table1_no_encryption, table2_to_encrypt, table3_no_encryption;
connection server_2;
+RESET MASTER;
+SET GLOBAL gtid_slave_pos= '';
include/start_slave.inc
include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test
index 9991fb9b..7f717190 100644
--- a/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test
+++ b/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test
@@ -36,6 +36,7 @@
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
--enable_connect_log
call mtr.add_suppression(" Got fatal error 1236 from master when reading data from binary log: 'Could not set up decryption for binlog.'");
+call mtr.add_suppression(" Got fatal error 1236 from master when reading data from binary log: 'Could not decrypt binlog: encryption key error");
--echo #####################################################
--echo # Part 1: unencrypted master
@@ -55,6 +56,7 @@ FLUSH BINARY LOGS;
SET binlog_format=ROW;
INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
INSERT INTO table1_no_encryption SELECT NULL,NOW(),b FROM table1_no_encryption;
+--let $last_unencrypted_gtid= `SELECT @@gtid_binlog_pos`
# Make sure that binary logs are not encrypted
@@ -120,11 +122,11 @@ start slave;
--let $slave_io_errno= 1236
--source include/wait_for_slave_io_error.inc
---echo # Ensuring slave was unable to replicate any transactions..
+--echo # Ensuring slave was unable to replicate any encrypted transactions..
--let $gsp= `SELECT @@global.gtid_slave_pos`
-if (`SELECT strcmp("$gsp","")`)
+if (`SELECT strcmp("$gsp","$last_unencrypted_gtid")`)
{
- die Slave without encryption configured should fail to read encrypted binlog;
+ die Slave without encryption configured should fail to read encrypted binlog (expected $last_unencrypted_gtid but got $gsp);
}
--echo # ..success
@@ -151,5 +153,7 @@ DROP TABLE table1_no_encryption, table2_to_encrypt, table3_no_encryption;
--connection server_2
--disable_connect_log
+RESET MASTER;
+SET GLOBAL gtid_slave_pos= '';
--source include/start_slave.inc
--source include/rpl_end.inc
diff --git a/mysql-test/suite/binlog_encryption/multisource.result b/mysql-test/suite/binlog_encryption/multisource.result
index 4b53b465..ca420f9a 100644
--- a/mysql-test/suite/binlog_encryption/multisource.result
+++ b/mysql-test/suite/binlog_encryption/multisource.result
@@ -6,7 +6,8 @@ ERROR HY000: Incorrect arguments to MASTER_HOST
change master 'master1' to
master_port=MYPORT_1,
master_host='127.0.0.1',
-master_user='root';
+master_user='root',
+master_ssl_verify_server_cert=0;
start slave 'master1';
set default_master_connection = 'master1';
include/wait_for_slave_to_start.inc
@@ -100,6 +101,7 @@ change master to
master_port=MYPORT_2,
master_host='127.0.0.1',
master_user='root',
+master_ssl_verify_server_cert=0,
master_use_gtid=no;
start slave;
include/wait_for_slave_to_start.inc
diff --git a/mysql-test/suite/binlog_encryption/my.cnf b/mysql-test/suite/binlog_encryption/my.cnf
index d787ebe1..f0fbca7b 100644
--- a/mysql-test/suite/binlog_encryption/my.cnf
+++ b/mysql-test/suite/binlog_encryption/my.cnf
@@ -1,5 +1,4 @@
-!include include/default_mysqld.cnf
-!include include/default_client.cnf
+!include include/default_my.cnf
[mysqld.1]
innodb
diff --git a/mysql-test/suite/binlog_encryption/rpl_skip_replication.result b/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
index 96e0a303..c17ffbb5 100644
--- a/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
+++ b/mysql-test/suite/binlog_encryption/rpl_skip_replication.result
@@ -12,7 +12,7 @@ SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
connect nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,;
connection nonpriv;
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
-ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
+ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE ADMIN privilege(s) for this operation
disconnect nonpriv;
connection slave;
DROP USER'nonsuperuser'@'127.0.0.1';
diff --git a/mysql-test/suite/binlog_encryption/rpl_ssl.result b/mysql-test/suite/binlog_encryption/rpl_ssl.result
index ce9e4d48..8c696f25 100644
--- a/mysql-test/suite/binlog_encryption/rpl_ssl.result
+++ b/mysql-test/suite/binlog_encryption/rpl_ssl.result
@@ -51,7 +51,7 @@ connection slave;
include/stop_slave.inc
CHANGE MASTER TO
master_user = 'root',
-master_ssl = 0,
+master_ssl = 1,
master_ssl_ca = '',
master_ssl_cert = '',
master_ssl_key = '';
diff --git a/mysql-test/suite/binlog_encryption/rpl_sync-master.opt b/mysql-test/suite/binlog_encryption/rpl_sync-master.opt
index 04b06bfa..96f0ce3f 100644
--- a/mysql-test/suite/binlog_encryption/rpl_sync-master.opt
+++ b/mysql-test/suite/binlog_encryption/rpl_sync-master.opt
@@ -1,2 +1 @@
--default-storage-engine=MyISAM
---loose-innodb-file-per-table=0
diff --git a/mysql-test/suite/binlog_encryption/rpl_sync-slave.opt b/mysql-test/suite/binlog_encryption/rpl_sync-slave.opt
index 79533053..d1a481cd 100644
--- a/mysql-test/suite/binlog_encryption/rpl_sync-slave.opt
+++ b/mysql-test/suite/binlog_encryption/rpl_sync-slave.opt
@@ -1,2 +1,2 @@
---sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
+--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM
--skip-core-file --skip-slave-start