Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/r/rpl_key_rotation.result |
include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] call mtr.add_suppression("\\[Error\\] Function 'keyring_file' already exists"); call mtr.add_suppression("\\[Error\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.so'."); call mtr.add_suppression("\\[Error\\] InnoDB: Can't generate new master key, please check the keyring plugin is loaded."); call mtr.add_suppression("\\[Error\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded."); call mtr.add_suppression("Error 'Can't find master key from keyring, please check in the server log if a keyring plugin is loaded and initialized successfully."); call mtr.add_suppression("\\[Warning\\] Slave: Can't find master key from keyring, please check in the server log if a keyring plugin is loaded and initialized successfully."); call mtr.add_suppression("\\[Error\\] InnoDB: Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded."); call mtr.add_suppression("The slave coordinator and worker threads are stopped"); [On Master] ALTER INSTANCE ROTATE INNODB MASTER KEY; CREATE TABLE t1(c1 INT PRIMARY KEY, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB; INSERT INTO t1 VALUES(0, "aaaaa"); INSERT INTO t1 VALUES(1, "bbbbb"); INSERT INTO t1 VALUES(2, "ccccc"); SELECT * FROM t1; c1 c2 0 aaaaa 1 bbbbb 2 ccccc ALTER INSTANCE ROTATE INNODB MASTER KEY; CREATE TABLE t2(c1 INT PRIMARY KEY, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB; INSERT INTO t2 SELECT * FROM t1; SELECT COUNT(*) FROM t2; COUNT(*) 3 # Check for keyring file on master. keyring_master ALTER INSTANCE ROTATE INNODB MASTER KEY; # Check for keyring file on master. keyring_master SELECT * FROM t1; c1 c2 0 aaaaa 1 bbbbb 2 ccccc include/sync_slave_sql_with_master.inc [On Slave] # Check for keyring file on slave. keyring_slave SELECT COUNT(*) FROM t2; COUNT(*) 3 SELECT * FROM t1; c1 c2 0 aaaaa 1 bbbbb 2 ccccc # Check for keyring file on slave. keyring_slave [On Master] # CREATE TABLE t3(c1 INT PRIMARY KEY, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB; INSERT INTO t3 VALUES(0, "aaaaa"); include/sync_slave_sql_with_master.inc [On Slave] SELECT * FROM t3; c1 c2 0 aaaaa SELECT COUNT(*) FROM t2; COUNT(*) 3 SELECT * FROM t1; c1 c2 0 aaaaa 1 bbbbb 2 ccccc # Check for keyring file on slave. keyring_slave ALTER INSTANCE ROTATE INNODB MASTER KEY; # Check for keyring file on slave. keyring_slave UNINSTALL PLUGIN keyring_file; # Checking keyring plugin after uninstall. SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file'; include/stop_slave_sql.inc [On Master] CREATE TABLE t4(c1 INT PRIMARY KEY, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB; INSERT INTO t4 VALUES(1, "rpltest"); [On Slave] START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=3185] INSTALL PLUGIN keyring_file SONAME 'keyring_file.so'; SET @@global.keyring_file_data='MYSQL_TMP_DIR/keyring_slave/keyring_slave'; SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file'; PLUGIN_NAME keyring_file PLUGIN_VERSION 1.0 PLUGIN_STATUS ACTIVE include/start_slave_sql.inc include/sync_slave_sql_with_master.inc SELECT * FROM t4; c1 c2 1 rpltest [On Master] # Uninstalling keyring_file plugin on master. UNINSTALL PLUGIN keyring_file; # Checking keyring plugin after uninstall. SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name='keyring_file'; SELECT * FROM t1; c1 c2 0 aaaaa 1 bbbbb 2 ccccc ALTER INSTANCE ROTATE INNODB MASTER KEY; ERROR HY000: Can't find master key from keyring, please check in the server log if a keyring plugin is loaded and initialized successfully. # Installing keyring_file plugin on master. INSTALL PLUGIN keyring_file SONAME 'keyring_file.so'; # Cleanup DROP TABLE t1,t2,t3,t4; include/sync_slave_sql_with_master.inc include/rpl_end.inc