config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/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
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/innodb/r/import_compress_encrypt.result

#
# Bug#31313533 : IMPORT FAILS FOR ENCRYPT AND COMPRESSION ENABLED TDE TABLES
#
# SETUP
# RESTART WITH KEYRING PLUGIN
# restart: --early-plugin-load=keyring_file=keyring_file.so --loose-keyring_file_data=MYSQL_TMP_DIR/mysecret_keyring KEYRING_PLUGIN_OPT

# Test 1 : Check that EXPORT and IMPORT is working fine on same FS

CREATE TABLE t1(c1 int NOT NULL AUTO_INCREMENT,
c2 varchar(65000) DEFAULT NULL,
c3 varchar(255) GENERATED ALWAYS AS (substr(c2,2,100)) STORED,
c4 varchar(255) GENERATED ALWAYS AS (substr(c2,10,200)) VIRTUAL,
b bit(64) DEFAULT NULL,
p_c1 bigint DEFAULT NULL,
PRIMARY KEY (c1)) ENGINE=Innodb AUTO_INCREMENT=50001 DEFAULT CHARSET=latin1 COMPRESSION='zlib' ENCRYPTION='Y';
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50001	l>!uw	l>!uw	w[s	

50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

# Flush tables for export
FLUSH TABLES t1 FOR EXPORT;
# Copy .cfp .cfg .ibd file to temp
UNLOCK TABLES;
DROP TABLE t1;
CREATE TABLE t1(c1 int NOT NULL AUTO_INCREMENT,
c2 varchar(65000) DEFAULT NULL,
c3 varchar(255) GENERATED ALWAYS AS (substr(c2,2,100)) STORED,
c4 varchar(255) GENERATED ALWAYS AS (substr(c2,10,200)) VIRTUAL,
b bit(64) DEFAULT NULL,
p_c1 bigint DEFAULT NULL,
PRIMARY KEY (c1)) ENGINE=Innodb AUTO_INCREMENT=50001 DEFAULT CHARSET=latin1 COMPRESSION='zlib' ENCRYPTION='Y';
ALTER TABLE t1 DISCARD TABLESPACE;
# Copy .cfp/.cfg and .ibd files from temp to datadir
# Start import
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50001	l>!uw	l>!uw	w[s	

50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

# Cleanup
DROP TABLE t1;

# Test 2 : Check that EXPORT and IMPORT is working fine on different FS

# Copy and unzip the dir having cfg/cfg/ibd file from a different FS Block Size
CREATE TABLE t1(c1 int NOT NULL AUTO_INCREMENT,
c2 varchar(65000) DEFAULT NULL,
c3 varchar(255) GENERATED ALWAYS AS (substr(c2,2,100)) STORED,
c4 varchar(255) GENERATED ALWAYS AS (substr(c2,10,200)) VIRTUAL,
b bit(64) DEFAULT NULL,
p_c1 bigint DEFAULT NULL,
PRIMARY KEY (c1)) ENGINE=Innodb AUTO_INCREMENT=50001 DEFAULT CHARSET=latin1 COMPRESSION='zlib' ENCRYPTION='Y';
ALTER TABLE t1 DISCARD TABLESPACE;
# Copy .cfp/.cfg and .ibd files from temp to datadir
# Start import
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50001	l>!uw	l>!uw	w[s	

50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

# Cleanup
DROP TABLE t1;
# Remove copied files

# Test 3 : Check that IMPORT works fine from previous version on same FS

# Copy and unzip the dir having cfg/cfg/ibd file from previous version.
CREATE TABLE t1(c1 int NOT NULL AUTO_INCREMENT,
c2 varchar(65000) DEFAULT NULL,
c3 varchar(255) GENERATED ALWAYS AS (substr(c2,2,100)) STORED,
c4 varchar(255) GENERATED ALWAYS AS (substr(c2,10,200)) VIRTUAL,
b bit(64) DEFAULT NULL,
p_c1 bigint DEFAULT NULL,
PRIMARY KEY (c1)) ENGINE=Innodb AUTO_INCREMENT=50001 DEFAULT CHARSET=latin1 COMPRESSION='zlib' ENCRYPTION='Y';
ALTER TABLE t1 DISCARD TABLESPACE;
# Copy .cfp/.cfg and .ibd files from temp to datadir
# Start import
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50001	l>!uw	l>!uw	w[s	

50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

# Cleanup
DROP TABLE t1;
# Remove copied files

# Test 4 : check table from old version are read correctly after upgrade

# Stop the running the server
# Copy and unzip the datadir.
# Restart the server against the unzipped datadir
# restart: --datadir=DATADIR --innodb-page-size=16k --early-plugin-load=keyring_file=keyring_file.so --loose-keyring_file_data=DATADIR/keyring KEYRING_PLUGIN_OPT
# Verify tables after upgrade
USE test;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `c1` int(11) NOT NULL AUTO_INCREMENT,
  `c2` varchar(65000) DEFAULT NULL,
  `c3` varchar(255) GENERATED ALWAYS AS (substr(`c2`,2,100)) STORED,
  `c4` varchar(255) GENERATED ALWAYS AS (substr(`c2`,10,200)) VIRTUAL,
  `b` bit(64) DEFAULT NULL,
  `p_c1` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=56000 DEFAULT CHARSET=latin1 COMPRESSION='zlib' ENCRYPTION='Y'
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50001	l>!uw	l>!uw	w[s	

50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

# Run some DML statements
INSERT INTO t1(c2,b,p_c1) VALUES(AES_ENCRYPT("5dd0786a3c7adf503202b8e234a95cbe643bc752028e1792ca8e6ef86c69582eb1cc478670c8e5d6c0133d1b4e5c98017aeb893f9db5f1bff397bc9e0f5fde48","abc"),10,100);
DELETE FROM t1 WHERE c1=50001;
# Verify results
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
c1	SUBSTRING(c2, 10, 10)	SUBSTRING(c3, 10, 10)	SUBSTRING(c4, 10, 10)	b
50002	l>!uw	l>!uw	w[s	

50003	l>!uw	l>!uw	w[s	

50004	l>!uw	l>!uw	w[s	

50005	l>!uw	l>!uw	w[s	

50006	l>!uw	l>!uw	w[s	

50007	l>!uw	l>!uw	w[s	

50008	l>!uw	l>!uw	w[s	

50009	l>!uw	l>!uw	w[s	

50010	l>!uw	l>!uw	w[s	

50011	l>!uw	l>!uw	w[s	

# Cleanup
DROP TABLE t1;
# Shutdown server
# Remove copied files
# Restarting server without keyring to restore server state
# restart

Man Man