CREATE TABLE `t1` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB;

INSERT INTO `t1` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t2` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;

INSERT INTO `t2` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t3` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB ENCRYPTED=YES;

INSERT INTO `t3` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t4` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;

INSERT INTO `t4` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;


SET GLOBAL innodb_compression_algorithm = zlib;

CREATE TABLE `t5` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t5` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t6` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t6` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

SET GLOBAL innodb_compression_algorithm = lz4;

CREATE TABLE `t7` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t7` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t8` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t8` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

SET GLOBAL innodb_compression_algorithm = lzo;

CREATE TABLE `t9` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t9` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t10` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t10` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

SET GLOBAL innodb_compression_algorithm = lzma;

CREATE TABLE `t11` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t11` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t12` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t12` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

SET GLOBAL innodb_compression_algorithm = bzip2;

CREATE TABLE `t13` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t13` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t14` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t14` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

SET GLOBAL innodb_compression_algorithm = snappy;

CREATE TABLE `t15` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1;

INSERT INTO `t15` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

CREATE TABLE `t16` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT 0,
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k` (`k`)
) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;

INSERT INTO `t16` SELECT NULL, seq%1000, CONCAT('c',seq), CONCAT('pad',seq%100) FROM seq_1_to_100000;

select sleep(20);

show status like '%compress%';
show status like '%encrypt%';
select * from information_schema.INNODB_TABLESPACES_ENCRYPTION;






