summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb_zip/r
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-08-12 11:17:45 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-09-02 13:22:28 +0300
commit2e814d4702d71a04388386a9f591d14a35980bfe (patch)
treef3f9b48d116a3738c5e71f3a360ca61f16cfb632 /mysql-test/suite/innodb_zip/r
parent848d211c5c4df00b819cd84d7530cf7d29bb0524 (diff)
downloadmariadb-git-2e814d4702d71a04388386a9f591d14a35980bfe.tar.gz
Merge InnoDB 5.7 from mysql-5.7.9.
Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
Diffstat (limited to 'mysql-test/suite/innodb_zip/r')
-rw-r--r--mysql-test/suite/innodb_zip/r/16k.result745
-rw-r--r--mysql-test/suite/innodb_zip/r/4k.result442
-rw-r--r--mysql-test/suite/innodb_zip/r/8k.result473
-rw-r--r--mysql-test/suite/innodb_zip/r/bug36169.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/bug36172.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/bug52745.result129
-rw-r--r--mysql-test/suite/innodb_zip/r/bug53591.result13
-rw-r--r--mysql-test/suite/innodb_zip/r/bug56680.result120
-rw-r--r--mysql-test/suite/innodb_zip/r/cmp_drop_table.result13
-rw-r--r--mysql-test/suite/innodb_zip/r/cmp_per_index.result94
-rw-r--r--mysql-test/suite/innodb_zip/r/create_options.result839
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix.result534
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result404
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result442
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum.result82
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_2.result140
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result184
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-create-options.result67
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result53
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug36169.result3
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug52745.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug53591.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug56680.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result43
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result1396
-rw-r--r--mysql-test/suite/innodb_zip/r/large_blob.result83
-rw-r--r--mysql-test/suite/innodb_zip/r/restart.result1236
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6344_compress_level.result135
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result8084
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6470_1.result598
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6470_2.result667
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_1.result1150
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_3.result489
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_4.result553
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_5.result489
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_scale_1.result354
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6560.result418
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6915_1.result2060
39 files changed, 21112 insertions, 1444 deletions
diff --git a/mysql-test/suite/innodb_zip/r/16k.result b/mysql-test/suite/innodb_zip/r/16k.result
new file mode 100644
index 00000000000..3d9f39529e2
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/16k.result
@@ -0,0 +1,745 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+16384
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 41 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 8123, Compact: 8126.
+# Compressed: 8126, Dynamic: 8126.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> 8123). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=compact;
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160)
+) ROW_FORMAT=compressed;
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=dynamic;
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(4) character set utf8,
+PRIMARY KEY (a,b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(5) character set utf8,
+PRIMARY KEY (a,b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(255) character set utf8,
+f varchar(4) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e,f))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(255) character set utf8,
+f varchar(5) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e,f))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=16, 8, 4, 2 & 1
+# are all accepted.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) This series of tests were moved from innodb-index to here
+# because the second alter table t1 assumes a 16k page size.
+# Moving the test allows the rest of innodb-index to be run on all
+# page sizes. The previously disabled portions of this test were
+# moved as well.
+CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8;
+CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb;
+INSERT INTO t3 VALUES (22),(44),(33),(55),(66);
+INSERT INTO t2 VALUES ('jejdkrun87'),('adfd72nh9k'),
+('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik');
+CREATE TABLE t1(a int, b blob, c text, d text NOT NULL)
+ENGINE=innodb DEFAULT CHARSET=utf8 STATS_PERSISTENT=0;
+INSERT INTO t1
+SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d;
+DROP TABLE t2, t3;
+SELECT COUNT(*) FROM t1 WHERE a=44;
+COUNT(*)
+5
+SELECT a,
+LENGTH(b),b=LEFT(REPEAT(d,100*a),65535),LENGTH(c),c=REPEAT(d,20*a),d FROM t1
+ORDER BY 1, 2, 3, 4, 5, 6;
+a LENGTH(b) b=LEFT(REPEAT(d,100*a),65535) LENGTH(c) c=REPEAT(d,20*a) d
+22 22000 1 4400 1 adfd72nh9k
+22 22000 1 4400 1 jejdkrun87
+22 26400 1 5280 1 adfdpplkeock
+22 28600 1 5720 1 adfdijnmnb78k
+22 35200 1 7040 1 adfdijn0loKNHJik
+33 33000 1 6600 1 adfd72nh9k
+33 33000 1 6600 1 jejdkrun87
+33 39600 1 7920 1 adfdpplkeock
+33 42900 1 8580 1 adfdijnmnb78k
+33 52800 1 10560 1 adfdijn0loKNHJik
+44 44000 1 8800 1 adfd72nh9k
+44 44000 1 8800 1 jejdkrun87
+44 52800 1 10560 1 adfdpplkeock
+44 57200 1 11440 1 adfdijnmnb78k
+44 65535 1 14080 1 adfdijn0loKNHJik
+55 55000 1 11000 1 adfd72nh9k
+55 55000 1 11000 1 jejdkrun87
+55 65535 1 13200 1 adfdpplkeock
+55 65535 1 14300 1 adfdijnmnb78k
+55 65535 1 17600 1 adfdijn0loKNHJik
+66 65535 1 13200 1 adfd72nh9k
+66 65535 1 13200 1 jejdkrun87
+66 65535 1 15840 1 adfdpplkeock
+66 65535 1 17160 1 adfdijnmnb78k
+66 65535 1 21120 1 adfdijn0loKNHJik
+ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
+ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
+DELETE FROM t1 WHERE d='null';
+ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
+ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
+DELETE FROM t1 WHERE a%2;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+ALTER TABLE t1 ADD PRIMARY KEY (a,b(255),c(255)), ADD KEY (b(767));
+SELECT COUNT(*) FROM t1 WHERE a=44;
+COUNT(*)
+5
+SELECT a,
+LENGTH(b), b=LEFT(REPEAT(d,100*a), 65535),LENGTH(c), c=REPEAT(d,20*a), d FROM t1;
+a LENGTH(b) b=LEFT(REPEAT(d,100*a), 65535) LENGTH(c) c=REPEAT(d,20*a) d
+22 22000 1 4400 1 adfd72nh9k
+22 35200 1 7040 1 adfdijn0loKNHJik
+22 28600 1 5720 1 adfdijnmnb78k
+22 26400 1 5280 1 adfdpplkeock
+22 22000 1 4400 1 jejdkrun87
+44 44000 1 8800 1 adfd72nh9k
+44 65535 1 14080 1 adfdijn0loKNHJik
+44 57200 1 11440 1 adfdijnmnb78k
+44 52800 1 10560 1 adfdpplkeock
+44 44000 1 8800 1 jejdkrun87
+66 65535 1 13200 1 adfd72nh9k
+66 65535 1 21120 1 adfdijn0loKNHJik
+66 65535 1 17160 1 adfdijnmnb78k
+66 65535 1 15840 1 adfdpplkeock
+66 65535 1 13200 1 jejdkrun87
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` blob NOT NULL,
+ `c` text NOT NULL,
+ `d` text NOT NULL,
+ PRIMARY KEY (`a`,`b`(255),`c`(255)),
+ KEY `b` (`b`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL range b b 769 NULL 12 100.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where (`test`.`t1`.`b` like 'adfd%')
+DROP TABLE t1;
+# Test 8) Test creating a table that could lead to undo log overflow.
+CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
+h blob,i blob,j blob,k blob,l blob,m blob,n blob,
+o blob,p blob,q blob,r blob,s blob,t blob,u blob)
+ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+CREATE INDEX t1a ON t1 (a(767));
+CREATE INDEX t1b ON t1 (b(767));
+CREATE INDEX t1c ON t1 (c(767));
+CREATE INDEX t1d ON t1 (d(767));
+CREATE INDEX t1e ON t1 (e(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1f ON t1 (f(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+CREATE INDEX t1j ON t1 (j(767));
+UPDATE t1 SET j=@e;
+CREATE INDEX t1k ON t1 (k(767));
+UPDATE t1 SET k=@e;
+CREATE INDEX t1l ON t1 (l(767));
+UPDATE t1 SET l=@e;
+CREATE INDEX t1m ON t1 (m(767));
+UPDATE t1 SET m=@e;
+CREATE INDEX t1n ON t1 (n(767));
+UPDATE t1 SET n=@e;
+CREATE INDEX t1o ON t1 (o(767));
+UPDATE t1 SET o=@e;
+CREATE INDEX t1p ON t1 (p(767));
+UPDATE t1 SET p=@e;
+CREATE INDEX t1q ON t1 (q(767));
+UPDATE t1 SET q=@e;
+CREATE INDEX t1r ON t1 (r(767));
+UPDATE t1 SET r=@e;
+CREATE INDEX t1s ON t1 (s(767));
+UPDATE t1 SET s=@e;
+CREATE INDEX t1t ON t1 (t(767));
+UPDATE t1 SET t=@e;
+ERROR HY000: Undo log record is too big.
+CREATE INDEX t1u ON t1 (u(767));
+CREATE INDEX t1ut ON t1 (u(767), t(767));
+CREATE INDEX t1st ON t1 (s(767), t(767));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob,
+ `b` blob,
+ `c` blob,
+ `d` blob,
+ `e` blob,
+ `f` blob,
+ `g` blob,
+ `h` blob,
+ `i` blob,
+ `j` blob,
+ `k` blob,
+ `l` blob,
+ `m` blob,
+ `n` blob,
+ `o` blob,
+ `p` blob,
+ `q` blob,
+ `r` blob,
+ `s` blob,
+ `t` blob,
+ `u` blob,
+ KEY `t1a` (`a`(767)),
+ KEY `t1b` (`b`(767)),
+ KEY `t1c` (`c`(767)),
+ KEY `t1d` (`d`(767)),
+ KEY `t1e` (`e`(767)),
+ KEY `t1f` (`f`(767)),
+ KEY `t1g` (`g`(767)),
+ KEY `t1h` (`h`(767)),
+ KEY `t1i` (`i`(767)),
+ KEY `t1j` (`j`(767)),
+ KEY `t1k` (`k`(767)),
+ KEY `t1l` (`l`(767)),
+ KEY `t1m` (`m`(767)),
+ KEY `t1n` (`n`(767)),
+ KEY `t1o` (`o`(767)),
+ KEY `t1p` (`p`(767)),
+ KEY `t1q` (`q`(767)),
+ KEY `t1r` (`r`(767)),
+ KEY `t1s` (`s`(767)),
+ KEY `t1t` (`t`(767)),
+ KEY `t1u` (`u`(767)),
+ KEY `t1ut` (`u`(767),`t`(767)),
+ KEY `t1st` (`s`(767),`t`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+# Bug #12429576 - Test an assertion failure on purge.
+CREATE TABLE t1_purge (
+A int,
+B blob, C blob, D blob, E blob,
+F blob, G blob, H blob,
+PRIMARY KEY (B(767), C(767), D(767), E(767), A),
+INDEX (A)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1_purge VALUES (1,
+REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
+REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
+CREATE TABLE t2_purge (
+A int PRIMARY KEY,
+B blob, C blob, D blob, E blob,
+F blob, G blob, H blob, I blob,
+J blob, K blob, L blob,
+INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t2_purge VALUES (1,
+REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
+REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
+REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
+CREATE TABLE t3_purge (
+A int,
+B varchar(800), C varchar(800), D varchar(800), E varchar(800),
+F varchar(800), G varchar(800), H varchar(800),
+PRIMARY KEY (B(767), C(767), D(767), E(767), A),
+INDEX (A)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t3_purge SELECT * FROM t1_purge;
+CREATE TABLE t4_purge (
+A int PRIMARY KEY,
+B varchar(800), C varchar(800), D varchar(800), E varchar(800),
+F varchar(800), G varchar(800), H varchar(800), I varchar(800),
+J varchar(800), K varchar(800), L varchar(800),
+INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t4_purge SELECT * FROM t2_purge;
+DELETE FROM t1_purge;
+DELETE FROM t2_purge;
+DELETE FROM t3_purge;
+DELETE FROM t4_purge;
+SET @r=REPEAT('a',500);
+CREATE TABLE t12637786(a int,
+v1 varchar(500), v2 varchar(500), v3 varchar(500),
+v4 varchar(500), v5 varchar(500), v6 varchar(500),
+v7 varchar(500), v8 varchar(500), v9 varchar(500),
+v10 varchar(500), v11 varchar(500), v12 varchar(500),
+v13 varchar(500), v14 varchar(500), v15 varchar(500),
+v16 varchar(500), v17 varchar(500), v18 varchar(500)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+CREATE INDEX idx1 ON t12637786(a,v1);
+INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+UPDATE t12637786 SET a=1000;
+DELETE FROM t12637786;
+# Bug#12963823 - Test that the purge thread does not crash when
+CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
+i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
+ENGINE=innodb ROW_FORMAT=dynamic;
+SET @r = REPEAT('a', 767);
+INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
+CREATE INDEX ndx_a ON t12963823 (a(500));
+CREATE INDEX ndx_b ON t12963823 (b(500));
+CREATE INDEX ndx_c ON t12963823 (c(500));
+CREATE INDEX ndx_d ON t12963823 (d(500));
+CREATE INDEX ndx_e ON t12963823 (e(500));
+CREATE INDEX ndx_f ON t12963823 (f(500));
+CREATE INDEX ndx_k ON t12963823 (k(500));
+CREATE INDEX ndx_l ON t12963823 (l(500));
+SET @r = REPEAT('b', 500);
+UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r;
+UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r;
+UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r;
+UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r;
+ALTER TABLE t12963823 DROP INDEX ndx_a;
+ALTER TABLE t12963823 DROP INDEX ndx_b;
+CREATE INDEX ndx_g ON t12963823 (g(500));
+CREATE INDEX ndx_h ON t12963823 (h(500));
+CREATE INDEX ndx_i ON t12963823 (i(500));
+CREATE INDEX ndx_j ON t12963823 (j(500));
+CREATE INDEX ndx_m ON t12963823 (m(500));
+CREATE INDEX ndx_n ON t12963823 (n(500));
+CREATE INDEX ndx_o ON t12963823 (o(500));
+CREATE INDEX ndx_p ON t12963823 (p(500));
+SHOW CREATE TABLE t12963823;
+Table Create Table
+t12963823 CREATE TABLE `t12963823` (
+ `a` blob,
+ `b` blob,
+ `c` blob,
+ `d` blob,
+ `e` blob,
+ `f` blob,
+ `g` blob,
+ `h` blob,
+ `i` blob,
+ `j` blob,
+ `k` blob,
+ `l` blob,
+ `m` blob,
+ `n` blob,
+ `o` blob,
+ `p` blob,
+ KEY `ndx_c` (`c`(500)),
+ KEY `ndx_d` (`d`(500)),
+ KEY `ndx_e` (`e`(500)),
+ KEY `ndx_f` (`f`(500)),
+ KEY `ndx_k` (`k`(500)),
+ KEY `ndx_l` (`l`(500)),
+ KEY `ndx_g` (`g`(500)),
+ KEY `ndx_h` (`h`(500)),
+ KEY `ndx_i` (`i`(500)),
+ KEY `ndx_j` (`j`(500)),
+ KEY `ndx_m` (`m`(500)),
+ KEY `ndx_n` (`n`(500)),
+ KEY `ndx_o` (`o`(500)),
+ KEY `ndx_p` (`p`(500))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE bug12547647(
+a int NOT NULL, b blob NOT NULL, c text,
+PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751));
+COMMIT;
+UPDATE bug12547647 SET c = REPEAT('b',16928);
+ERROR HY000: Undo log record is too big.
+SHOW WARNINGS;
+Level Code Message
+Error 1713 Undo log record is too big.
+DROP TABLE bug12547647;
+SET SESSION innodb_strict_mode = off;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
+DROP TABLE t1;
+#
+# Bug#56862 Execution of a query that uses index merge returns a wrong result
+#
+CREATE TABLE t1 (
+pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
+a int,
+b int,
+INDEX idx(a))
+ENGINE=INNODB;
+INSERT INTO t1(a,b) VALUES
+(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
+(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
+(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
+(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
+INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
+INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
+INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1(a,b) SELECT a,b FROM t1;
+INSERT INTO t1 VALUES (1000000, 0, 0);
+set @optimizer_switch_saved=@@optimizer_switch;
+SET SESSION optimizer_switch='derived_merge=off';
+SET SESSION sort_buffer_size = 1024*36;
+EXPLAIN
+SELECT COUNT(*) FROM
+(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
+WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 1537 100.00 NULL
+2 DERIVED t1 NULL index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1537 100.00 Using sort_union(idx,PRIMARY); Using where
+Warnings:
+Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from (/* select#2 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` FORCE INDEX (PRIMARY) FORCE INDEX (`idx`) where ((`test`.`t1`.`a` between 2 and 7) or (`test`.`t1`.`pk` = 1000000))) `t`
+SELECT COUNT(*) FROM
+(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
+WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
+COUNT(*)
+1537
+set @@optimizer_switch=@optimizer_switch_saved;
+SET SESSION sort_buffer_size = DEFAULT;
+DROP TABLE t1;
+DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
+DROP TABLE t12637786;
+DROP TABLE t12963823;
diff --git a/mysql-test/suite/innodb_zip/r/4k.result b/mysql-test/suite/innodb_zip/r/4k.result
new file mode 100644
index 00000000000..721943e7f5a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/4k.result
@@ -0,0 +1,442 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+4096
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 37 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 1979, Compact: 1982.
+# Compressed: 1982, Dynamic: 1982.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=compact;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
+) ROW_FORMAT=compressed;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=dynamic;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(65) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+e varchar(64) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+e varchar(65) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all
+# accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected
+# in strict mode and converted to 4 in non-strict mode.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are both rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) Not included here; 16k only
+# Test 8) Test creating a table that could lead to undo log overflow.
+CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
+h blob,i blob,j blob,k blob,l blob,m blob,n blob,
+o blob,p blob,q blob,r blob,s blob,t blob,u blob)
+ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+CREATE INDEX t1a ON t1 (a(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1b ON t1 (b(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1c ON t1 (c(767));
+UPDATE t1 SET c=@e;
+CREATE INDEX t1d ON t1 (d(767));
+UPDATE t1 SET d=@e;
+ERROR HY000: Undo log record is too big.
+CREATE INDEX t1e ON t1 (e(767));
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob,
+ `b` blob,
+ `c` blob,
+ `d` blob,
+ `e` blob,
+ `f` blob,
+ `g` blob,
+ `h` blob,
+ `i` blob,
+ `j` blob,
+ `k` blob,
+ `l` blob,
+ `m` blob,
+ `n` blob,
+ `o` blob,
+ `p` blob,
+ `q` blob,
+ `r` blob,
+ `s` blob,
+ `t` blob,
+ `u` blob,
+ KEY `t1a` (`a`(767)),
+ KEY `t1b` (`b`(767)),
+ KEY `t1c` (`c`(767)),
+ KEY `t1d` (`d`(767)),
+ KEY `t1e` (`e`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+CREATE TABLE t1(
+pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = off;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/8k.result b/mysql-test/suite/innodb_zip/r/8k.result
new file mode 100644
index 00000000000..dc2b5ca1363
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/8k.result
@@ -0,0 +1,473 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+8192
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 39 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 4027, Compact: 4030.
+# Compressed: 4030, Dynamic: 4030.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=compact;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106)
+) ROW_FORMAT=compressed;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=dynamic;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(129) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+e varchar(128) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+e varchar(129) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all
+# accepted and that KEY_BLOCK_SIZE=16 is rejected in
+# strict mode and converted to 8 in non-strict mode.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT table_name, row_format, create_options
+FROM information_schema.tables WHERE table_name = 't1';
+table_name row_format create_options
+t1 Compressed row_format=COMPRESSED
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) Not included here; 16k only
+# Test 8) Test creating a table that could lead to undo log overflow.
+CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
+h blob,i blob,j blob,k blob,l blob,m blob,n blob,
+o blob,p blob,q blob,r blob,s blob,t blob,u blob)
+ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+CREATE INDEX t1a ON t1 (a(767));
+CREATE INDEX t1b ON t1 (b(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1c ON t1 (c(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1d ON t1 (d(767));
+UPDATE t1 SET d=@e;
+CREATE INDEX t1e ON t1 (e(767));
+UPDATE t1 SET e=@e;
+CREATE INDEX t1f ON t1 (f(767));
+UPDATE t1 SET f=@e;
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+CREATE INDEX t1k ON t1 (j(767));
+CREATE INDEX t1j ON t1 (j(500));
+UPDATE t1 SET j=@e;
+ERROR HY000: Undo log record is too big.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` blob,
+ `b` blob,
+ `c` blob,
+ `d` blob,
+ `e` blob,
+ `f` blob,
+ `g` blob,
+ `h` blob,
+ `i` blob,
+ `j` blob,
+ `k` blob,
+ `l` blob,
+ `m` blob,
+ `n` blob,
+ `o` blob,
+ `p` blob,
+ `q` blob,
+ `r` blob,
+ `s` blob,
+ `t` blob,
+ `u` blob,
+ KEY `t1a` (`a`(767)),
+ KEY `t1b` (`b`(767)),
+ KEY `t1c` (`c`(767)),
+ KEY `t1d` (`d`(767)),
+ KEY `t1e` (`e`(767)),
+ KEY `t1f` (`f`(767)),
+ KEY `t1g` (`g`(767)),
+ KEY `t1h` (`h`(767)),
+ KEY `t1i` (`i`(767)),
+ KEY `t1k` (`j`(767)),
+ KEY `t1j` (`j`(500))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+CREATE TABLE t1(
+pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = off;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767),d(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/bug36169.result b/mysql-test/suite/innodb_zip/r/bug36169.result
new file mode 100644
index 00000000000..7e165e0f7d4
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug36169.result
@@ -0,0 +1 @@
+SET GLOBAL innodb_file_per_table=ON;
diff --git a/mysql-test/suite/innodb_zip/r/bug36172.result b/mysql-test/suite/innodb_zip/r/bug36172.result
new file mode 100644
index 00000000000..23c5b0cc2f7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug36172.result
@@ -0,0 +1 @@
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb_zip/r/bug52745.result b/mysql-test/suite/innodb_zip/r/bug52745.result
new file mode 100644
index 00000000000..20605eb274d
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug52745.result
@@ -0,0 +1,129 @@
+SET GLOBAL innodb_file_per_table=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+CREATE TABLE bug52745 (
+a2 int(10) unsigned DEFAULT NULL,
+col37 time DEFAULT NULL,
+col38 char(229) CHARACTER SET utf8 DEFAULT NULL,
+col39 text,
+col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+col41 int(10) unsigned DEFAULT NULL,
+col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL,
+col43 smallint(5) unsigned zerofill DEFAULT NULL,
+col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL,
+col45 float unsigned zerofill DEFAULT NULL,
+col46 binary(1) DEFAULT NULL,
+col47 tinyint(4) DEFAULT NULL,
+col48 tinyint(1) DEFAULT NULL,
+col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col50 binary(1) DEFAULT NULL,
+col51 double unsigned zerofill DEFAULT NULL,
+col52 int(10) unsigned DEFAULT NULL,
+col53 time DEFAULT NULL,
+col54 double unsigned DEFAULT NULL,
+col55 time DEFAULT NULL,
+col56 mediumtext CHARACTER SET latin2,
+col57 blob,
+col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000',
+col59 binary(1) DEFAULT NULL,
+col60 longblob,
+col61 time DEFAULT NULL,
+col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci,
+col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col64 int(10) unsigned DEFAULT NULL,
+col65 date DEFAULT NULL,
+col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col67 binary(1) DEFAULT NULL,
+col68 tinyblob,
+col69 date DEFAULT NULL,
+col70 tinyint(3) unsigned zerofill DEFAULT NULL,
+col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
+col72 datetime DEFAULT NULL,
+col73 smallint(5) unsigned zerofill DEFAULT NULL,
+col74 longblob,
+col75 bit(34) DEFAULT NULL,
+col76 float unsigned zerofill DEFAULT NULL,
+col77 year(4) DEFAULT NULL,
+col78 tinyint(3) unsigned DEFAULT NULL,
+col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
+col80 datetime DEFAULT NULL,
+col81 smallint(6) DEFAULT NULL,
+col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
+col83 bigint(20) unsigned zerofill DEFAULT NULL,
+col84 float unsigned zerofill DEFAULT NULL,
+col85 double DEFAULT NULL,
+col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
+col87 varbinary(221) DEFAULT NULL,
+col88 double unsigned DEFAULT NULL,
+col89 float unsigned zerofill DEFAULT NULL,
+col90 tinyblob
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+Warnings:
+Note 1291 Column 'col82' has duplicated value '' in ENUM
+Note 1291 Column 'col82' has duplicated value '' in ENUM
+SET sql_mode = default;
+INSERT IGNORE INTO bug52745 SET
+col40='0000-00-00 00:00:00',
+col51=16547,
+col53='7711484',
+col54=-28604,
+col55='7112612',
+col56='wakefulness\'',
+col57=repeat('absorbefacient\'',106),
+col58=11027,
+col59='AM09gW7',
+col60=repeat('Noelani\'',16),
+col61='2520576',
+col62='substitutiv',
+col63='19950106155112',
+col64=-12038,
+col65='86238806',
+col66='19600719080256',
+col68=repeat('Sagittarius\'',54),
+col69='38943902',
+col70=1232,
+col71='Elora\'',
+col74=repeat('zipp',11),
+col75='0',
+col76=23254,
+col78=13247,
+col79='56219',
+col80='20500609035724',
+col81=11632,
+col82=7,
+col84=-23863,
+col85=6341,
+col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
+col88=16894,
+col89=6161,
+col90=repeat('gale',48);
+Warnings:
+Warning 1265 Data truncated for column 'col53' at row 1
+Warning 1264 Out of range value for column 'col54' at row 1
+Warning 1265 Data truncated for column 'col59' at row 1
+Warning 1265 Data truncated for column 'col61' at row 1
+Warning 1264 Out of range value for column 'col64' at row 1
+Warning 1265 Data truncated for column 'col65' at row 1
+Warning 1264 Out of range value for column 'col66' at row 1
+Warning 1265 Data truncated for column 'col68' at row 1
+Warning 1265 Data truncated for column 'col69' at row 1
+Warning 1264 Out of range value for column 'col70' at row 1
+Warning 1264 Out of range value for column 'col78' at row 1
+Warning 1265 Data truncated for column 'col79' at row 1
+Warning 1264 Out of range value for column 'col84' at row 1
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'col53' at row 1
+Warning 1264 Out of range value for column 'col54' at row 1
+Warning 1265 Data truncated for column 'col59' at row 1
+Warning 1265 Data truncated for column 'col61' at row 1
+Warning 1264 Out of range value for column 'col64' at row 1
+Warning 1265 Data truncated for column 'col65' at row 1
+Warning 1264 Out of range value for column 'col66' at row 1
+Warning 1265 Data truncated for column 'col68' at row 1
+Warning 1265 Data truncated for column 'col69' at row 1
+Warning 1264 Out of range value for column 'col70' at row 1
+Warning 1264 Out of range value for column 'col78' at row 1
+Warning 1265 Data truncated for column 'col79' at row 1
+Warning 1264 Out of range value for column 'col84' at row 1
+DROP TABLE bug52745;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/bug53591.result b/mysql-test/suite/innodb_zip/r/bug53591.result
new file mode 100644
index 00000000000..e14a1942750
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug53591.result
@@ -0,0 +1,13 @@
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_strict_mode=on;
+set old_alter_table=0;
+CREATE TABLE bug53591(a text charset utf8 not null)
+ENGINE=InnoDB KEY_BLOCK_SIZE=1;
+ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+SHOW WARNINGS;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+DROP TABLE bug53591;
+SET GLOBAL innodb_file_per_table=1;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/r/bug56680.result b/mysql-test/suite/innodb_zip/r/bug56680.result
new file mode 100644
index 00000000000..40660f435fb
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug56680.result
@@ -0,0 +1,120 @@
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+SET GLOBAL innodb_file_per_table=on;
+CREATE TABLE bug56680(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(1),
+c INT,
+INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+b
+x
+connect con1,localhost,root,,;
+connection con1;
+BEGIN;
+UPDATE bug56680 SET b='X';
+connection default;
+SELECT b FROM bug56680;
+b
+x
+SELECT * FROM bug56680;
+a b c
+1 x 1
+connection con1;
+ROLLBACK;
+disconnect con1;
+connection default;
+SELECT b FROM bug56680;
+b
+x
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+connect con1,localhost,root,,;
+connection con1;
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+INSERT INTO bug56680 VALUES(1,'X',1);
+SELECT b FROM bug56680 LIMIT 3;
+b
+X
+x
+x
+connection default;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table Op Msg_type Msg_text
+test.bug56680 check status OK
+connection con1;
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table Op Msg_type Msg_text
+test.bug56680 check status OK
+connection default;
+disconnect con1;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CREATE TABLE bug56680_2(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+c INT,
+INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+DF
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+5353
+DF
+DF
+CHECK TABLE bug56680_2;
+Table Op Msg_type Msg_text
+test.bug56680_2 check status OK
+ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+5353
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+DF
+DF
+DF
+CHECK TABLE bug56680_2;
+Table Op Msg_type Msg_text
+test.bug56680_2 check status OK
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;
diff --git a/mysql-test/suite/innodb_zip/r/cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/cmp_drop_table.result
new file mode 100644
index 00000000000..c1743cac2e1
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/cmp_drop_table.result
@@ -0,0 +1,13 @@
+set global innodb_file_per_table=on;
+create table t1(a text) engine=innodb key_block_size=8;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+8192
+drop table t1;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+8192
+create table t2(a text) engine=innodb;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+drop table t2;
diff --git a/mysql-test/suite/innodb_zip/r/cmp_per_index.result b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
new file mode 100644
index 00000000000..5b899e9ff71
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
@@ -0,0 +1,94 @@
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+CREATE TABLE t (
+a INT,
+b VARCHAR(512),
+c VARCHAR(16),
+PRIMARY KEY (a),
+INDEX (b(512)),
+INDEX (c(16))
+) ENGINE=INNODB KEY_BLOCK_SIZE=2;
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name b
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+database_name test
+table_name t
+index_name c
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+BEGIN;
+COMMIT;
+ALTER TABLE t DROP INDEX c;
+GRANT USAGE ON *.* TO 'tuser01'@'localhost' IDENTIFIED BY 'cDJvI9s_Uq';
+Warnings:
+Level Warning
+Code 1287
+Message Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
+FLUSH PRIVILEGES;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
+DROP USER 'tuser01'@'localhost';
+SELECT
+database_name,
+table_name,
+index_name,
+CASE WHEN compress_ops=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops END as compress_ops,
+CASE WHEN compress_ops_ok=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops_ok END as compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name b
+compress_ops 43
+compress_ops_ok 43
+uncompress_ops 0
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 65
+compress_ops_ok 65
+uncompress_ops 0
+# restart
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT COUNT(*) FROM t;
+COUNT(*) 128
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9
+ELSE uncompress_ops END as uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 0
+compress_ops_ok 0
+uncompress_ops 9
+DROP TABLE t;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
diff --git a/mysql-test/suite/innodb_zip/r/create_options.result b/mysql-test/suite/innodb_zip/r/create_options.result
new file mode 100644
index 00000000000..2d80894c8cd
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/create_options.result
@@ -0,0 +1,839 @@
+SET default_storage_engine=InnoDB;
+SET GLOBAL innodb_file_per_table=ON;
+SET SESSION innodb_strict_mode = ON;
+# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+# 'FIXED' is sent to InnoDB since it is used by MyISAM.
+# But it is an invalid mode in InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
+# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
+# ALTER with each ROW_FORMAT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
+# and that they can be set to default values during strict mode.
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+# and a valid non-zero KEY_BLOCK_SIZE are rejected with
+# innodb_file_per_table=OFF and that they can be set to default
+# values during strict mode.
+SET GLOBAL innodb_file_per_table=OFF;
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+SET GLOBAL innodb_file_per_table=ON;
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SET GLOBAL innodb_file_per_table=ON;
+##################################################
+SET SESSION innodb_strict_mode = OFF;
+# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+# 'FIXED' is sent to InnoDB since it is used by MyISAM.
+# It is an invalid mode in InnoDB, use COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
+Warnings:
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=FIXED
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+Warnings:
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=FIXED
+# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT key_block_size=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC key_block_size=4
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=FIXED key_block_size=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC key_block_size=4
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT key_block_size=2
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT key_block_size=2
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC key_block_size=2
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=4
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed key_block_size=2
+# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
+# ALTER with each ROW_FORMAT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Redundant row_format=REDUNDANT key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compact row_format=COMPACT
+# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
+# it defaults to half of the page size.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic key_block_size=15
+# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
+is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=COMPRESSED key_block_size=1
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
+and then used again when innodb_file_per_table=ON.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Compressed row_format=COMPRESSED key_block_size=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
new file mode 100644
index 00000000000..7285f4dfad7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
@@ -0,0 +1,534 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### Test 1 ###
+create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+insert into worklog5743 values(repeat("a", 20000));
+update worklog5743 set a = (repeat("b", 16000));
+create index idx on worklog5743(a(2000));
+show warnings;
+Level Code Message
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+connect con1,localhost,root,,;
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+connect con2,localhost,root,,;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+connection default;
+rollback;
+drop table worklog5743;
+### Test 2 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+create index idx on worklog5743(a1, a2(2000));
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1000;
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743 ref idx idx 5 const 1
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+connection default;
+rollback;
+drop table worklog5743;
+### Test 3 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+create index idx on worklog5743(a1, a2(50));
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1000;
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743 ref idx idx 5 const 1
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+connection default;
+rollback;
+drop table worklog5743;
+### Test 4 ###
+create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
+create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
+create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
+create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
+create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+Got one of the listed errors
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_1(a2(4000));
+Got one of the listed errors
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_1(a2(436));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_1(a2(434));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_1(a1, a2(430));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_1(a1, a2(428));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+create index idx1 on worklog5743_2(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_2(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_2(a2(948));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_2(a2(946));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_2(a1, a2(942));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_2(a1, a2(940));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_4(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_4(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_4(a2(1972));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_4(a2(1970));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_4(a1, a2(1966));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_4(a1, a2(1964));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_8(a2(1000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_8(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743_8(a2(3072));
+Warnings:
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_8'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_8'. This is deprecated and will be disallowed in a future release.
+create index idx4 on worklog5743_8(a1, a2(3069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743_8(a1, a2(3068));
+show warnings;
+Level Code Message
+create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_16(a2(1000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_16(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743_16(a2(3072));
+Warnings:
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_16'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_16'. This is deprecated and will be disallowed in a future release.
+create index idx4 on worklog5743_16(a1, a2(3069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743_16(a1, a2(3068));
+show warnings;
+Level Code Message
+create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
+show warnings;
+Level Code Message
+set sql_mode= default;
+insert into worklog5743_1 values(9, repeat("a", 10000));
+insert into worklog5743_2 values(9, repeat("a", 10000));
+insert into worklog5743_4 values(9, repeat("a", 10000));
+insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
+insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+insert into worklog5743_1 values(2, repeat("b", 10000));
+insert into worklog5743_2 values(2, repeat("b", 10000));
+insert into worklog5743_4 values(2, repeat("b", 10000));
+insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
+insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_16;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+begin;
+update worklog5743_1 set a1 = 1000;
+update worklog5743_2 set a1 = 1000;
+update worklog5743_4 set a1 = 1000;
+update worklog5743_8 set a1 = 1000;
+update worklog5743_16 set a1 = 1000;
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_16;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1
+explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+a1 left(a2, 20)
+connection default;
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+drop table worklog5743_8;
+drop table worklog5743_16;
+### Test 5 ###
+create table worklog5743(a1 int,
+a2 varchar(20000),
+a3 varchar(3073),
+a4 varchar(3072),
+a5 varchar(3069),
+a6 varchar(3068))
+ROW_FORMAT=DYNAMIC;
+SET sql_mode='';
+create index idx1 on worklog5743(a2);
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx2 on worklog5743(a3);
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743(a4);
+show warnings;
+Level Code Message
+SET sql_mode= default;
+create index idx4 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743(a1, a5);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx6 on worklog5743(a1, a6);
+show warnings;
+Level Code Message
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` varchar(20000) DEFAULT NULL,
+ `a3` varchar(3073) DEFAULT NULL,
+ `a4` varchar(3072) DEFAULT NULL,
+ `a5` varchar(3069) DEFAULT NULL,
+ `a6` varchar(3068) DEFAULT NULL,
+ KEY `idx1` (`a2`(3072)),
+ KEY `idx2` (`a3`(3072)),
+ KEY `idx3` (`a4`),
+ KEY `idx6` (`a1`,`a6`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+insert into worklog5743 values(9,
+repeat("a", 20000), repeat("a", 3073),
+repeat("a", 3072), repeat("a", 3069),
+repeat("a", 3068));
+begin;
+update worklog5743 set a1 = 1000;
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1 from worklog5743 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index
+select a1 from worklog5743 where a1 = 9;
+a1
+9
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+connection default;
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)))
+row_format=compact;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create table worklog5743(a TEXT)
+row_format=compact;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+connection con1;
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+disconnect con1;
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+disconnect con2;
+connection default;
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode='';
+create index idx1 on worklog5743(a(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx2 on worklog5743(a(3072));
+Warnings:
+Note 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(3072)),
+ KEY `idx2` (`a`(3072))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+drop table worklog5743;
+SET sql_mode= default;
+create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result b/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result
new file mode 100644
index 00000000000..f010c522614
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result
@@ -0,0 +1,404 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### Test 1 ###
+create table worklog5743(a TEXT not null, primary key (a(768))) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+insert into worklog5743 values(repeat("a", 20000));
+update worklog5743 set a = (repeat("b", 16000));
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx on worklog5743(a(900));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+SET sql_mode= default;
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+rollback;
+drop table worklog5743;
+### Test 2 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+create index idx on worklog5743(a1, a2(750));
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1111;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### Test 3 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+create index idx on worklog5743(a1, a2(50));
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 2222;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### Test 4 ###
+create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
+create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
+create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 767 bytes
+create index idx3 on worklog5743_1(a2(436));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_1(a2(434));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_1(a1, a2(430));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_1(a1, a2(428));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743_2(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show create table worklog5743_2;
+Table Create Table
+worklog5743_2 CREATE TABLE `worklog5743_2` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` text NOT NULL,
+ KEY `idx1` (`a2`(768))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
+create index idx3 on worklog5743_2(a2(769));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+create index idx4 on worklog5743_2(a2(768));
+Warnings:
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release.
+create index idx5 on worklog5743_2(a1, a2(765));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+create index idx6 on worklog5743_2(a1, a2(764));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_4(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show create table worklog5743_4;
+Table Create Table
+worklog5743_4 CREATE TABLE `worklog5743_4` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` text NOT NULL,
+ KEY `idx1` (`a2`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+create index idx3 on worklog5743_4(a2(769));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+create index idx4 on worklog5743_4(a2(768));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+create index idx5 on worklog5743_4(a1, a2(765));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+create index idx6 on worklog5743_4(a1, a2(764));
+show warnings;
+Level Code Message
+SET sql_mode= default;
+insert into worklog5743_1 values(9, repeat("a", 10000));
+insert into worklog5743_2 values(9, repeat("a", 10000));
+insert into worklog5743_4 values(9, repeat("a", 10000));
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+insert into worklog5743_1 values(2, repeat("b", 10000));
+insert into worklog5743_2 values(2, repeat("b", 10000));
+insert into worklog5743_4 values(2, repeat("b", 10000));
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+begin;
+update worklog5743_1 set a1 = 1000;
+update worklog5743_2 set a1 = 1000;
+update worklog5743_4 set a1 = 1000;
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+### Test 5 ###
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(3072)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(769)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(768)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 768));
+update worklog5743 set a1 = 3333;
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(765)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(764)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 764));
+begin;
+update worklog5743 set a1 = 4444;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1 from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1 from worklog5743 where a1 = 9;
+a1
+9
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+create table worklog5743(a TEXT) ROW_FORMAT=COMPACT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743(a(769));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+SET sql_mode= default;
+create index idx2 on worklog5743(a(768));
+Warnings:
+Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(768)),
+ KEY `idx2` (`a`(768))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+insert into worklog5743 values(repeat("a", 768));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result b/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result
new file mode 100644
index 00000000000..3176ffe2204
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result
@@ -0,0 +1,442 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### Test 1 ###
+create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+insert into worklog5743 values(repeat("a", 20000));
+update worklog5743 set a = (repeat("b", 16000));
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx on worklog5743(a(2000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+SET sql_mode= default;
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+rollback;
+drop table worklog5743;
+### Test 2 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+create index idx on worklog5743(a1, a2(1250));
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### Test 3 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+create index idx on worklog5743(a1, a2(50));
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### Test 4 ###
+create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
+create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
+create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
+create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+create index idx3 on worklog5743_1(a2(436));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_1(a2(434));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_1(a1, a2(430));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_1(a1, a2(428));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743_2(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_2(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_2(a2(948));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_2(a2(946));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_2(a1, a2(942));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_2(a1, a2(940));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_4(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx3 on worklog5743_4(a2(1537));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx4 on worklog5743_4(a2(1536));
+Warnings:
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release.
+create index idx5 on worklog5743_4(a1, a2(1533));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+create index idx6 on worklog5743_4(a1, a2(1532));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_8(a2(1000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_8(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx3 on worklog5743_8(a2(3072));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx4 on worklog5743_8(a1, a2(1533));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+create index idx5 on worklog5743_8(a1, a2(1532));
+show warnings;
+Level Code Message
+SET sql_mode= default;
+insert into worklog5743_1 values(9, repeat("a", 10000));
+insert into worklog5743_2 values(9, repeat("a", 10000));
+insert into worklog5743_4 values(9, repeat("a", 10000));
+insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+insert into worklog5743_1 values(2, repeat("b", 10000));
+insert into worklog5743_2 values(2, repeat("b", 10000));
+insert into worklog5743_4 values(2, repeat("b", 10000));
+insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+begin;
+update worklog5743_1 set a1 = 1000;
+update worklog5743_2 set a1 = 1000;
+update worklog5743_4 set a1 = 1000;
+update worklog5743_8 set a1 = 1000;
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_8 NULL ref idx5 idx5 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_8`.`a1` AS `a1`,left(`test`.`worklog5743_8`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_8` where (`test`.`worklog5743_8`.`a1` = 9)
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+drop table worklog5743_8;
+### Test 5 ###
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1537)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1536)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 1536));
+update worklog5743 set a1 = 1000;
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1533)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1532)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 1532));
+update worklog5743 set a1 = 1000;
+begin;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1 from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1 from worklog5743 where a1 = 9;
+a1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)))
+row_format=compact;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create table worklog5743(a TEXT) row_format=compact;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743(a(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx2 on worklog5743(a(3072));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+SET sql_mode= default;
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(1536)),
+ KEY `idx2` (`a`(1536))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result
new file mode 100644
index 00000000000..694de4d9c83
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum.result
@@ -0,0 +1,82 @@
+# Set the environmental variables
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
+SET GLOBAL innodb_file_per_table=on;
+CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
+CREATE INDEX idx1 ON tab1(c2(10));
+INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+insert into t1 values(1,"i");
+insert into t1 values(2,"am");
+insert into t1 values(3,"compressed table");
+# Shutdown the Server
+# Server Default checksum = innodb
+[1a]: check the innochecksum when file doesn't exists
+[1b]: check the innochecksum without --strict-check
+[2]: check the innochecksum with full form --strict-check=crc32
+[3]: check the innochecksum with short form -C crc32
+[4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
+[5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
+[6]: check the innochecksum with full form strict-check & no-check , an error is expected
+[7]: check the innochecksum with short form strict-check & no-check , an error is expected
+[8]: check the innochecksum with short & full form combination
+# strict-check & no-check, an error is expected
+[9]: check the innochecksum with full form --strict-check=innodb
+[10]: check the innochecksum with full form --strict-check=none
+# when server Default checksum=crc32
+[11]: check the innochecksum with short form -C innodb
+# when server Default checksum=crc32
+[12]: check the innochecksum with short form -C none
+# when server Default checksum=crc32
+[13]: check strict-check with invalid values
+[14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
+# Also check the long form of write option.
+[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
+# Also check the long form of write option.
+# start the server with innodb_checksum_algorithm=InnoDB
+# restart
+INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+# Stop the server
+[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
+# Also check the short form of write option.
+# Start the server with checksum algorithm=none
+# restart
+INSERT INTO tab1 VALUES(3, 'Innochecksum None');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+3 Innochecksum None
+DROP TABLE t1;
+# Stop the server
+[16]: rewrite into new checksum=crc32 with innochecksum
+# Restart the DB server with innodb_checksum_algorithm=crc32
+# restart
+SELECT * FROM tab1;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+3 Innochecksum None
+DELETE FROM tab1 where c1=3;
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+# Stop server
+[17]: rewrite into new checksum=InnoDB
+# Restart the DB server with innodb_checksum_algorithm=InnoDB
+# restart
+DELETE FROM tab1 where c1=2;
+SELECT * FROM tab1;
+c1 c2
+1 Innochecksum InnoDB1
+# Stop server
+[18]:check Innochecksum with invalid write options
+# Restart the server
+# restart
+DROP TABLE tab1;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_2.result b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
new file mode 100644
index 00000000000..0b6adaa33a2
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
@@ -0,0 +1,140 @@
+SET GLOBAL innodb_compression_level=0;
+SELECT @@innodb_compression_level;
+@@innodb_compression_level
+0
+CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+# stop the server
+[1]:# check the both short and long options for "help"
+[2]:# Run the innochecksum when file isn't provided.
+# It will print the innochecksum usage similar to --help option.
+innochecksum Ver #.#.#
+Copyright (c) YEAR, YEAR , Oracle and/or its affiliates. All rights reserved.
+
+Oracle is a registered trademark of Oracle Corporation and/or its
+affiliates. Other names may be trademarks of their respective
+owners.
+
+InnoDB offline file checksum utility.
+Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] <filename or [-]>
+ -?, --help Displays this help and exits.
+ -I, --info Synonym for --help.
+ -V, --version Displays version information and exits.
+ -v, --verbose Verbose (prints progress every 5 seconds).
+ -c, --count Print the count of pages in the file and exits.
+ -s, --start-page=# Start on this page number (0 based).
+ -e, --end-page=# End at this page number (0 based).
+ -p, --page=# Check only this page (0 based).
+ -C, --strict-check=name
+ Specify the strict checksum algorithm by the user.
+ -n, --no-check Ignore the checksum verification.
+ -a, --allow-mismatches=#
+ Maximum checksum mismatch allowed.
+ -w, --write=name Rewrite the checksum algorithm by the user.
+ -S, --page-type-summary
+ Display a count of each page type in a tablespace.
+ -D, --page-type-dump=name
+ Dump the page type info for each page in a tablespace.
+ -l, --log=name log output.
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE} Value (after reading options)
+--------------------------------- ----------------------------------------
+verbose FALSE
+count FALSE
+start-page 0
+end-page 0
+page 0
+strict-check crc32
+no-check FALSE
+allow-mismatches 0
+write crc32
+page-type-summary FALSE
+page-type-dump (No default value)
+log (No default value)
+[3]:# check the both short and long options for "count" and exit
+Number of pages:#
+Number of pages:#
+[4]:# Print the version of innochecksum and exit
+innochecksum Ver #.#.## Restart the DB server
+# restart
+DROP TABLE t1;
+[5]:# Check the innochecksum for compressed table t1 with different key_block_size
+# Test for KEY_BLOCK_SIZE=1
+===> Testing size=1
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test for KEY_BLOCK_SIZE=2
+===> Testing size=2
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test for for KEY_BLOCK_SIZE=4
+===> Testing size=4
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+set innodb_strict_mode=off;
+# Test for for KEY_BLOCK_SIZE=8
+===> Testing size=8
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+set innodb_strict_mode=off;
+# Test for KEY_BLOCK_SIZE=16
+===> Testing size=16
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test[5] completed
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
new file mode 100644
index 00000000000..85058c41e04
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -0,0 +1,184 @@
+# Set the environmental variables
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+SET GLOBAL innodb_file_per_table=on;
+[1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
+CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
+linestring_key GEOMETRY NOT NULL,
+linestring_nokey GEOMETRY NOT NULL)
+ENGINE=InnoDB ;
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
+CREATE INDEX linestring_index ON tab1(linestring_nokey(5));
+ALTER TABLE tab1 ADD KEY (linestring_key(5));
+# create a compressed table
+CREATE TABLE tab2(col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 int )
+engine = innodb row_format=compressed key_block_size=4;
+CREATE INDEX idx1 ON tab2(col_3(10));
+CREATE INDEX idx2 ON tab2(col_4(10));
+CREATE INDEX idx3 ON tab2(col_5(10));
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,5);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,4);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,3);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,2);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,1);
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
+: start the server with innodb_checksum_algorithm=strict_innodb
+# restart
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,6);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
+# start the server with innodb_checksum_algorithm=strict_crc32
+# restart
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
+ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
+SET @col_1 = repeat('g', 5);
+SET @col_2 = repeat('h', 20);
+SET @col_3 = repeat('i', 100);
+SET @col_4 = repeat('j', 100);
+SET @col_5 = repeat('k', 100);
+SET @col_6 = repeat('l', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,7);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
+# restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
+SET @col_1 = repeat('m', 5);
+SET @col_2 = repeat('n', 20);
+SET @col_3 = repeat('o', 100);
+SET @col_4 = repeat('p', 100);
+SET @col_5 = repeat('q', 100);
+SET @col_6 = repeat('r', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,8);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[2]: Check the page type summary with shortform for tab1.ibd
+
+File::tab#.ibd
+================PAGE TYPE SUMMARY==============
+#PAGE_COUNT PAGE_TYPE
+===============================================
+ # Index page
+ # Undo log page
+ # Inode page
+ # Insert buffer free list page
+ # Freshly allocated page
+ # Insert buffer bitmap
+ # System page
+ # Transaction system page
+ # File Space Header
+ # Extent descriptor page
+ # BLOB page
+ # Compressed BLOB page
+ # Other type of page
+===============================================
+Additional information:
+Undo page type: # insert, # update, # other
+Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+[3]: Check the page type summary with longform for tab1.ibd
+
+File::tab#.ibd
+================PAGE TYPE SUMMARY==============
+#PAGE_COUNT PAGE_TYPE
+===============================================
+ # Index page
+ # Undo log page
+ # Inode page
+ # Insert buffer free list page
+ # Freshly allocated page
+ # Insert buffer bitmap
+ # System page
+ # Transaction system page
+ # File Space Header
+ # Extent descriptor page
+ # BLOB page
+ # Compressed BLOB page
+ # Other type of page
+===============================================
+Additional information:
+Undo page type: # insert, # update, # other
+Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+[4]: Page type dump for with longform for tab1.ibd
+# Print the contents stored in dump.txt
+
+
+Filename::tab#.ibd
+==============================================================================
+ PAGE_NO | PAGE_TYPE | EXTRA INFO
+==============================================================================
+#:: # | File Space Header | -
+#:: # | Insert Buffer Bitmap | -
+#:: # | Inode page | -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Freshly allocated page | -
+[5]: Page type dump for with shortform for tab1.ibd
+
+
+Filename::tab#.ibd
+==============================================================================
+ PAGE_NO | PAGE_TYPE | EXTRA INFO
+==============================================================================
+#:: # | File Space Header | -
+#:: # | Insert Buffer Bitmap | -
+#:: # | Inode page | -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Freshly allocated page | -
+[6]: check the valid lower bound values for option
+# allow-mismatches,page,start-page,end-page
+[7]: check the negative values for option
+# allow-mismatches,page,start-page,end-page.
+# They will reset to zero for negative values.
+# check the invalid lower bound values
+[8]: check the valid upper bound values for
+# both short and long options "allow-mismatches" and "end-page"
+[9]: check the both short and long options "page" and "start-page" when
+# seek value is larger than file size.
+[34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
+# innochecksum will fail with error code: 1
+# Restart the server
+# restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB
+DROP TABLE tab1;
+DROP TABLE tab2;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
index fe3d799229d..1b92eb71fba 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-create-options.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
@@ -1,5 +1,7 @@
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
SET SESSION innodb_strict_mode = ON;
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
@@ -45,7 +47,7 @@ SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SHOW WARNINGS;
@@ -54,7 +56,7 @@ Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1;
@@ -244,7 +246,7 @@ SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
@@ -264,6 +266,8 @@ Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
# and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
@@ -324,15 +328,19 @@ Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -348,6 +356,8 @@ ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
# innodb_file_per_table=OFF and that they can be set to default
@@ -427,7 +437,7 @@ SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
SET GLOBAL innodb_file_per_table=ON;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
@@ -451,13 +461,13 @@ SET SESSION innodb_strict_mode = OFF;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=FIXED
+t1 Dynamic row_format=FIXED
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -488,16 +498,16 @@ SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=FIXED
+t1 Dynamic row_format=FIXED
# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1;
@@ -562,14 +572,14 @@ CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=FIXED key_block_size=1
+t1 Dynamic row_format=FIXED key_block_size=1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
@@ -728,7 +738,7 @@ SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
@@ -746,7 +756,7 @@ Level Code Message
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact key_block_size=15
+t1 Dynamic key_block_size=15
# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
@@ -758,22 +768,26 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPRESSED key_block_size=1
+t1 Dynamic row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
@@ -788,18 +802,17 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Antelope;
-ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=DYNAMIC
+t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
@@ -853,3 +866,5 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
# Cleanup
DROP TABLE IF EXISTS t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index 318f65d49c3..47215a1e077 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
@@ -9,11 +9,13 @@ SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
Warnings:
@@ -21,11 +23,8 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t1(a int primary key) engine=innodb row_format=dynamic;
-Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t2(a int primary key) engine=innodb row_format=redundant;
create table t3(a int primary key) engine=innodb row_format=compact;
create table t4(a int primary key) engine=innodb key_block_size=9;
@@ -46,6 +45,8 @@ Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_format=`1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
@@ -54,7 +55,7 @@ create table t8(a int primary key) engine=innodb
key_block_size=1 row_format=fixed;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
Warnings:
@@ -74,21 +75,21 @@ Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t0 Compact {valid} 0
-mysqltest_innodb_zip t00 Compact {valid} 0
-mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t0 Dynamic {valid} 0
+mysqltest_innodb_zip t00 Dynamic {valid} 0
+mysqltest_innodb_zip t1 Dynamic {valid} 0
mysqltest_innodb_zip t10 Dynamic {valid} 0
mysqltest_innodb_zip t11 Compressed 1024 0
mysqltest_innodb_zip t12 Compressed 1024 0
mysqltest_innodb_zip t13 Compressed {valid} 0
-mysqltest_innodb_zip t14 Compact {valid} 0
+mysqltest_innodb_zip t14 Dynamic {valid} 0
mysqltest_innodb_zip t2 Redundant {valid} 0
mysqltest_innodb_zip t3 Compact {valid} 0
-mysqltest_innodb_zip t4 Compact {valid} 0
+mysqltest_innodb_zip t4 Dynamic {valid} 0
mysqltest_innodb_zip t5 Redundant {valid} 0
mysqltest_innodb_zip t6 Redundant {valid} 0
mysqltest_innodb_zip t7 Redundant {valid} 0
-mysqltest_innodb_zip t8 Compact {valid} 0
+mysqltest_innodb_zip t8 Dynamic {valid} 0
mysqltest_innodb_zip t9 Compact {valid} 0
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
@@ -138,7 +139,7 @@ mysqltest_innodb_zip.t2 analyze status OK
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
mysqltest_innodb_zip t1 Compressed 2048 1024
-mysqltest_innodb_zip t2 Compact {valid} 0
+mysqltest_innodb_zip t2 Dynamic {valid} 0
drop table t1,t2;
create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
primary key(c1, c2(22), c3(22)))
@@ -160,10 +161,14 @@ count(*)
update t1 set c3 = repeat('E', 20000) where c1 = 1;
drop table t1;
set global innodb_file_format=`0`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=`1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -172,7 +177,11 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
set global innodb_file_format=`-1`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
set global innodb_file_format=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Cheetah`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
set global innodb_file_format=`abc`;
@@ -183,6 +192,8 @@ set global innodb_file_format=``;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
drop table t1;
@@ -204,7 +215,7 @@ create table t10(id int primary key) engine = innodb row_format = compact;
create table t11(id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t1 Dynamic {valid} 0
mysqltest_innodb_zip t10 Compact {valid} 0
mysqltest_innodb_zip t11 Redundant {valid} 0
mysqltest_innodb_zip t3 Compressed 1024 0
@@ -320,6 +331,8 @@ mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
show warnings;
@@ -363,16 +376,22 @@ mysqltest_innodb_zip t8 Compact {valid} 0
mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table=1;
-set global innodb_file_format=Antelope;
+set global innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table normal_table (
c1 int
) engine = innodb;
select @@innodb_file_format_max;
@@innodb_file_format_max
-Antelope
+Barracuda
create table zip_table (
c1 int
) engine = innodb key_block_size = 4;
@@ -380,6 +399,8 @@ select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
index aa80e4d7aa4..161cef10ad5 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
@@ -1,2 +1,5 @@
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
index f4393e8fae0..5ba26753ea6 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
@@ -126,5 +128,7 @@ Warning 1264 Out of range value for column 'col78' at row 1
Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745;
-SET GLOBAL innodb_file_format=Antelope;
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
index dbebb9d2d33..3b10942c2de 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
@@ -1,5 +1,8 @@
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
@@ -9,5 +12,8 @@ SHOW WARNINGS;
Level Code Message
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
DROP TABLE bug53591;
-SET GLOBAL innodb_file_format=Antelope;
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
index 40c39d21243..92b589c6b7e 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
@@ -1,5 +1,7 @@
SET GLOBAL tx_isolation='REPEATABLE-READ';
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug56680(
a INT AUTO_INCREMENT PRIMARY KEY,
@@ -119,3 +121,5 @@ Table Op Msg_type Msg_text
test.bug56680_2 check status OK
DROP TABLE bug56680_2;
DROP TABLE bug56680;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
index 1f6d6948756..11e90b9e7d6 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
@@ -1,5 +1,7 @@
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1(a text) engine=innodb key_block_size=8;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
@@ -12,3 +14,5 @@ create table t2(a text) engine=innodb;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
drop table t2;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
index f11988034ad..f69fa5c7659 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
@@ -1,7 +1,13 @@
SET default_storage_engine=InnoDB;
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
set global innodb_file_format="Barracuda";
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_strict_mode=1;
### Test 1 ###
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
show warnings;
@@ -97,6 +103,8 @@ create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
@@ -104,6 +112,8 @@ Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_1(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
@@ -127,6 +137,8 @@ create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -134,6 +146,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
@@ -157,6 +171,8 @@ create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -164,6 +180,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
@@ -187,6 +205,8 @@ create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -194,6 +214,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
@@ -223,6 +245,8 @@ create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -230,6 +254,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
@@ -264,12 +290,16 @@ insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
@@ -444,9 +474,9 @@ connection default;
rollback;
drop table worklog5743;
### Test 6 ###
-create table worklog5743(a TEXT not null, primary key (a(1000)));
+create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-create table worklog5743(a TEXT);
+create table worklog5743(a TEXT) row_format=COMPACT;
create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
create index idx on worklog5743(a(767));
@@ -499,9 +529,14 @@ create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
create index idx2 on worklog5743(a(767));
drop table worklog5743;
-SET GLOBAL innodb_file_format=Antelope;
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
-SET GLOBAL innodb_large_prefix=0;
+SET GLOBAL innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET GLOBAL innodb_strict_mode = DEFAULT;
connection con1;
disconnect con1;
connection con2;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
deleted file mode 100644
index 7d52ab135b3..00000000000
--- a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
+++ /dev/null
@@ -1,1396 +0,0 @@
-set global innodb_file_format="Barracuda";
-set global innodb_file_per_table=1;
-set global innodb_large_prefix=1;
-DROP TABLE IF EXISTS worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_varchar PRIMARY 3072 BTREE
-col_1_varchar prefix_idx 3072 BTREE
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
-ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-ALTER TABLE worklog5743 ROW_FORMAT=COMPACT;
-ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-ALTER TABLE worklog5743 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_text PRIMARY 3072 BTREE
-col_1_text prefix_idx 3072 BTREE
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT ,
-PRIMARY KEY (col_1_mediumtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_mediumtext = REPEAT("a", 4000) col_2_mediumtext = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000)
-WHERE col_1_mediumtext = REPEAT("a", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumtext = REPEAT("c", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-col_1_mediumtext = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743;
-col_1_mediumtext = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_longtext LONGTEXT , col_2_longtext LONGTEXT ,
-PRIMARY KEY (col_1_longtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_longtext = REPEAT("a", 4000) col_2_longtext = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000)
-WHERE col_1_longtext = REPEAT("a", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longtext = REPEAT("c", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-col_1_longtext = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743;
-col_1_longtext = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_blob PRIMARY 3072 BTREE
-col_1_blob prefix_idx 3072 BTREE
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB ,
-PRIMARY KEY (col_1_mediumblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_mediumblob = REPEAT("a", 4000) col_2_mediumblob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000)
-WHERE col_1_mediumblob = REPEAT("a", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumblob = REPEAT("c", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-col_1_mediumblob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743;
-col_1_mediumblob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_longblob LONGBLOB , col_2_longblob LONGBLOB ,
-PRIMARY KEY (col_1_longblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_longblob = REPEAT("a", 4000) col_2_longblob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000)
-WHERE col_1_longblob = REPEAT("a", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longblob = REPEAT("c", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-col_1_longblob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743;
-col_1_longblob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255),
-col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255),
-col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255),
-col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255),
-col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250),
-col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250),
-col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250),
-col_11_char(250),col_12_char(250),col_13_char(72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743;
-col_1_char = REPEAT("a", 255) col_2_char = REPEAT("o", 255)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_char = REPEAT("c", 255)
-WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255);
-col_1_char = REPEAT("c", 255)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743;
-col_1_char = REPEAT("c", 255)
-1
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255),
-col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255),
-col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255),
-col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255),
-col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250),
-col_3_binary (250),col_4_binary (250),col_5_binary (250),
-col_6_binary (250),col_7_binary (250),col_8_binary (250),
-col_9_binary (250),col_10_binary (250),col_11_binary (250),
-col_12_binary (250),col_13_binary (72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743;
-col_1_binary = REPEAT("a", 255) col_2_binary = REPEAT("o", 255)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255)
-WHERE col_1_binary = REPEAT("a", 255)
-AND col_2_binary = REPEAT("o", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_binary = REPEAT("c", 255)
-AND col_2_binary = REPEAT("o", 255);
-col_1_binary = REPEAT("c", 255)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743;
-col_1_binary = REPEAT("c", 255)
-1
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743_key2 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2
-WHERE col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key8;
-CREATE TABLE worklog5743_key2 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key8;
-CREATE TABLE worklog5743_key2 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key8;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
-col_3_text TEXT (4000), col_4_blob BLOB (4000), col_5_text TEXT (4000),
-col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
-CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("c", 4000)
-1
-0
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
-CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
-CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-ERROR HY000: Undo log record is too big.
-SHOW WARNINGS;
-Level Code Message
-Error 1713 Undo log record is too big.
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
-col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000),
-col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
-CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
-CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
-CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
-CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-ROLLBACK;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-ROLLBACK;
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-ERROR HY000: Undo log record is too big.
-SHOW WARNINGS;
-Level Code Message
-Error 1713 Undo log record is too big.
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("c", 4000)
-0
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) CHARACTER SET 'utf8',
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8',
-col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' ,
-PRIMARY KEY (col_1_varchar(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) ,
-col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8',
-col_3_text TEXT (4000) CHARACTER SET 'utf8',
-col_4_blob BLOB (4000),col_5_text TEXT (4000),
-col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500));
-CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500));
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-ROLLBACK;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-ROLLBACK;
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
-REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
-REPEAT("a", 4000) , REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("c", 4000)
-0
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("स", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000)
-WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("क", 4000)
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743;
-col_1_text = REPEAT("क", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connect con1,localhost,root,,;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-connect con2,localhost,root,,;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-0 1
-connection con1;
-select @@session.tx_isolation;
-@@session.tx_isolation
-REPEATABLE-READ
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-@@session.tx_isolation
-READ-UNCOMMITTED
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-1 1
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-START TRANSACTION;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-connection con2;
-COMMIT;
-connection con1;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connection con1;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-START TRANSACTION;
-connection con2;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-0 1
-COMMIT;
-connection con1;
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-@@session.tx_isolation
-READ-UNCOMMITTED
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-1 1
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connection con1;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-START TRANSACTION;
-connection con2;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-0 1
-ROLLBACK;
-connection con1;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-disconnect con1;
-connection con2;
-disconnect con2;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varchar = REPEAT("c", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT tbl1.col_1_varchar = tbl2.col_1_varchar
-FROM worklog5743 tbl1 , worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ;
-tbl1.col_1_varchar = tbl2.col_1_varchar
-1
-1
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE
-col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2)
-AND col_1_varchar = REPEAT("c", 4000);
-tbl1.col_1_varchar = REPEAT("c", 4000)
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar != tbl2.col_1_varchar
-) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar
-) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT
-REVERSE(col_1_varchar) = REPEAT("c", 4000) ,
-REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-REVERSE(col_1_varchar) = REPEAT("c", 4000) REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000)
-0 0
-0 0
-1 1
-SELECT
-UPPER(col_1_varchar) = REPEAT("c", 4000) ,
-UPPER(col_1_varchar) = REPEAT("C", 4000) ,
-LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-UPPER(col_1_varchar) = REPEAT("c", 4000) UPPER(col_1_varchar) = REPEAT("C", 4000) LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000)
-0 0 0
-0 0 0
-1 1 1
-SELECT
-col_1_varchar = REPEAT("c", 4000)
-FROM worklog5743 WHERE col_1_varchar like '%c__%';
-col_1_varchar = REPEAT("c", 4000)
-1
-SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ;
-SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10)
-kkkkaaaaaa
-kkkkbbbbbb
-kkkkcccccc
-SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ;
-CONCAT(SUBSTRING(col_1_varchar,-5,3),'append')
-aaaappend
-bbbappend
-cccappend
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) ,
-col_2_varchar VARCHAR (4000) ,
-UNIQUE INDEX (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), REPEAT("o", 4000));
-INSERT INTO worklog5743
-VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE
-FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_varchar col_1_varchar 3072 BTREE
-SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL;
-col_1_varchar
-NULL
-NULL
-SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000))
-FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1;
-col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000))
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varchar = REPEAT("c", 4000)
-AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
-WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) ,
-PRIMARY KEY (col_1_varchar (3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-connect con1,localhost,root,,;
-connection con1;
-SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500)
-FROM worklog5743;
-col_1_varchar = REPEAT("c", 3500) col_2_varchar = REPEAT("o", 3500)
-1 1
-connection default;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500));
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-col_1_varchar = REPEAT("b", 3500)
-0
-0
-COMMIT;
-connection con1;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500)
-WHERE col_1_varchar = REPEAT("a", 3500)
-AND col_2_varchar = REPEAT("o", 3500);
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-col_1_varchar = REPEAT("b", 3500)
-1
-0
-connection default;
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500);
-SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("p", 3500);
-col_1_varchar = REPEAT("a", 3500)
-0
-connection con1;
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("b", 4000)
-AND col_2_varbinary = REPEAT("p", 4000);
-col_1_varbinary = REPEAT("b", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000)
-1
-0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
-Warnings:
-Warning 1071 Specified key was too long; max key length is 3072 bytes
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000)
-1
-0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(500))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000);
-col_1_text = REPEAT("b", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
-Warnings:
-Warning 1071 Specified key was too long; max key length is 3072 bytes
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000)
-AND col_2_text = REPEAT("p", 4000);
-col_1_text = REPEAT("b", 4000)
-1
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000)
-0
-1
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073));
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073));
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)),
-REPEAT("o", 4000));
-INSERT INTO worklog5743
-VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000));
-ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DROP TABLE worklog5743;
-set global innodb_large_prefix=0;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-set global innodb_large_prefix=0;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(767))
-) engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT('a',4000),REPEAT('b',4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000));
-affected rows: 0
-info: Records: 0 Duplicates: 0 Warnings: 1
-Warnings:
-Warning 1071 Specified key was too long; max key length is 767 bytes
-ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
-affected rows: 0
-info: Records: 0 Duplicates: 0 Warnings: 0
-SHOW CREATE TABLE worklog5743;
-Table Create Table
-worklog5743 CREATE TABLE `worklog5743` (
- `col_1_varchar` varchar(4000) NOT NULL,
- `col_2_varchar` varchar(4000) DEFAULT NULL,
- PRIMARY KEY (`col_1_varchar`(767)),
- KEY `prefix_idx` (`col_1_varchar`(767))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
-DROP TABLE worklog5743;
-connection default;
diff --git a/mysql-test/suite/innodb_zip/r/large_blob.result b/mysql-test/suite/innodb_zip/r/large_blob.result
new file mode 100644
index 00000000000..7070d610f58
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/large_blob.result
@@ -0,0 +1,83 @@
+#
+# This tests the use of large blobs in InnoDB.
+#
+call mtr.add_suppression("InnoDB: Warning: a long semaphore wait");
+SET GLOBAL innodb_file_per_table = OFF;
+#
+# System tablespace, Row Format = Redundant
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# System tablespace, Row Format = Compact
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+SET GLOBAL innodb_file_per_table = ON;
+#
+# Separate tablespace, Row Format = Redundant
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compact
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compressed, Key Block Size = 2k
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compressed, Key Block Size = 1k
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Dynamic
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result
new file mode 100644
index 00000000000..5645b1ee310
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/restart.result
@@ -0,0 +1,1236 @@
+SET default_storage_engine=InnoDB;
+#
+# A series of tests to make sure tables are opened after restart.
+# Bug#13357607 Compressed file-per-table tablespaces fail to open
+#
+set global innodb_file_per_table=on;
+#
+# Create and insert records into a REDUNDANT row formatted table.
+#
+CREATE TABLE t1_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
+INSERT INTO t1_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+SHOW CREATE TABLE t1_restart;
+Table Create Table
+t1_restart CREATE TABLE `t1_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+SELECT count(*) FROM t1_restart;
+count(*)
+16
+#
+# Create and insert records into a COMPACT row formatted table.
+#
+CREATE TABLE t2_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPACT ENGINE=InnoDB;
+INSERT INTO t2_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t2_restart;
+Table Create Table
+t2_restart CREATE TABLE `t2_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT count(*) FROM t2_restart;
+count(*)
+16
+#
+# Create and insert records into a COMPRESSED row formatted table.
+#
+CREATE TABLE t3_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB;
+INSERT INTO t3_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+SHOW CREATE TABLE t3_restart;
+Table Create Table
+t3_restart CREATE TABLE `t3_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+SELECT count(*) FROM t3_restart;
+count(*)
+16
+#
+# Create and insert records into a DYNAMIC row formatted table.
+#
+CREATE TABLE t4_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB;
+INSERT INTO t4_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SELECT count(*) FROM t4_restart;
+count(*)
+16
+#
+# Create and insert records into a table that uses a remote DATA DIRECTORY.
+#
+CREATE TABLE t5_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t5_restart;
+count(*)
+16
+#
+# Create and insert records into a partitioned table that uses
+# a remote DATA DIRECTORY for each partition.
+#
+CREATE TABLE t6_restart(
+c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB
+PARTITION BY HASH(c1) (
+PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir');
+INSERT INTO t6_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB) */
+SELECT count(*) FROM t6_restart;
+count(*)
+16
+#
+# Create and insert records into a subpartitioned table that uses
+# a remote DATA DIRECTORY for each subpartition.
+#
+CREATE TABLE t7_restart(
+c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB
+PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
+PARTITION p0 VALUES LESS THAN (10) (
+SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'),
+PARTITION p1 VALUES LESS THAN MAXVALUE (
+SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'));
+INSERT INTO t7_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB)) */
+SELECT count(*) FROM t7_restart;
+count(*)
+16
+#
+# Create and insert records into a table that uses a general tablespace.
+#
+CREATE TABLESPACE s1_restart ADD DATAFILE 's1_restart.ibd';
+CREATE TABLE t8_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPACT ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t8_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t8_restart;
+Table Create Table
+t8_restart CREATE TABLE `t8_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT count(*) FROM t8_restart;
+count(*)
+65
+CREATE TABLE t9_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t9_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t9_restart;
+Table Create Table
+t9_restart CREATE TABLE `t9_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SELECT count(*) FROM t9_restart;
+count(*)
+65
+#
+# Show these tables in information_schema.
+#
+=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
+Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
+test/t1_restart test/t1_restart 0 8 Redundant 0 Single
+test/t2_restart test/t2_restart 1 8 Compact 0 Single
+test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
+test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
+test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+test/t8_restart s1_restart 129 8 Compact 0 General
+test/t9_restart s1_restart 161 8 Dynamic 0 General
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart General DEFAULT 0 Any MYSQLD_DATADIR/s1_restart.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
+#
+# Shutdown the server and list the tablespace OS files
+#
+---- MYSQL_DATA_DIR/test
+t1_restart.frm
+t1_restart.ibd
+t2_restart.frm
+t2_restart.ibd
+t3_restart.frm
+t3_restart.ibd
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.isl
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+t8_restart.frm
+t9_restart.frm
+---- MYSQL_TMP_DIR/alt_dir
+test
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Start the server and show that tables are still visible and accessible.
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+SHOW CREATE TABLE t1_restart;
+Table Create Table
+t1_restart CREATE TABLE `t1_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+SHOW CREATE TABLE t2_restart;
+Table Create Table
+t2_restart CREATE TABLE `t2_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t3_restart;
+Table Create Table
+t3_restart CREATE TABLE `t3_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+SHOW CREATE TABLE t8_restart;
+Table Create Table
+t8_restart CREATE TABLE `t8_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t9_restart;
+Table Create Table
+t9_restart CREATE TABLE `t9_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t8_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t9_restart);
+SELECT count(*) FROM t1_restart;
+count(*)
+32
+SELECT count(*) FROM t2_restart;
+count(*)
+32
+SELECT count(*) FROM t3_restart;
+count(*)
+32
+SELECT count(*) FROM t4_restart;
+count(*)
+32
+SELECT count(*) FROM t5_restart;
+count(*)
+32
+SELECT count(*) FROM t6_restart;
+count(*)
+32
+SELECT count(*) FROM t7_restart;
+count(*)
+32
+SELECT count(*) FROM t8_restart;
+count(*)
+130
+SELECT count(*) FROM t9_restart;
+count(*)
+130
+#
+# Show these tables in information_schema.
+#
+=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
+Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
+test/t1_restart test/t1_restart 0 8 Redundant 0 Single
+test/t2_restart test/t2_restart 1 8 Compact 0 Single
+test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
+test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
+test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+test/t8_restart s1_restart 129 8 Compact 0 General
+test/t9_restart s1_restart 161 8 Dynamic 0 General
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart General DEFAULT 0 Any MYSQLD_DATADIR/s1_restart.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
+DROP TABLE t1_restart;
+DROP TABLE t2_restart;
+DROP TABLE t3_restart;
+DROP TABLE t8_restart;
+DROP TABLE t9_restart;
+DROP TABLESPACE s1_restart;
+#
+# Truncate the remote tablespaces.
+#
+TRUNCATE TABLE t5_restart;
+ALTER TABLE t6_restart TRUNCATE PARTITION p2;
+ALTER TABLE t7_restart TRUNCATE PARTITION p1;
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+SELECT count(*) FROM t5_restart;
+count(*)
+8
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000012 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t6_restart;
+count(*)
+21
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SELECT count(*) FROM t7_restart;
+count(*)
+9
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server and make a backup of a tablespace
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.frm.bak
+t5_restart.isl
+t5_restart.isl.bak
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t5_restart.ibd.bak
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Start the server and show the tablespaces.
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+SELECT count(*) FROM t5_restart;
+count(*)
+8
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000009 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t6_restart;
+count(*)
+21
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SELECT count(*) FROM t7_restart;
+count(*)
+9
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Try to rename a tablespace to a file that already exists
+#
+RENAME TABLE t5_restart TO t55_restart;
+ERROR 42S01: Table 't55_restart' already exists
+RENAME TABLE t5_restart TO t55_restart;
+ERROR HY000: Error on rename of './test/t5_restart' to './test/t55_restart' (errno: 184 - Tablespace already exists)
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.isl
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Rename file table and tablespace
+#
+RENAME TABLE t5_restart TO t55_restart;
+RENAME TABLE t6_restart TO t66_restart;
+RENAME TABLE t7_restart TO t77_restart;
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+16
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000024 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+42
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+18
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+#
+# Restart the server
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+32
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000048 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+84
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+36
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server
+#
+#
+# Move the remote tablespaces to a new location and change the ISL files
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+---- MYSQL_TMP_DIR/new_dir/test
+# Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't55_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't66_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't77_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.isl
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+---- MYSQL_TMP_DIR/new_dir/test
+t4_restart.ibd
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+#
+# Start the server and check tablespaces.
+#
+# restart
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+count(*)
+64
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000099 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+64
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000096 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/new_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+168
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+72
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server
+#
+#
+# Move the remote tablespaces back to the default datadir and delete the ISL file.
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.isl
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/new_dir/test
+t4_restart.ibd
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+# Moving 't4_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't55_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't66_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't77_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t66_restart.frm
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+t77_restart.frm
+---- MYSQL_TMP_DIR/new_dir/test
+#
+# Start the server and check tablespaces.
+#
+# restart
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+count(*)
+128
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000195 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+128
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000192 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+336
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 ENGINE = InnoDB,
+ PARTITION p1 ENGINE = InnoDB,
+ PARTITION p2 ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+144
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 ENGINE = InnoDB,
+ SUBPARTITION s1 ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 ENGINE = InnoDB,
+ SUBPARTITION s3 ENGINE = InnoDB)) */
+#
+# Cleanup
+#
+DROP TABLE t4_restart;
+DROP TABLE t55_restart;
+DROP TABLE t66_restart;
+DROP TABLE t77_restart;
diff --git a/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result
new file mode 100644
index 00000000000..5cdfe162b6a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result
@@ -0,0 +1,135 @@
+USE test;
+DROP TABLE IF EXISTS tab5;
+Warnings:
+Note 1051 Unknown table 'test.tab5'
+DROP TABLE IF EXISTS tab6;
+Warnings:
+Note 1051 Unknown table 'test.tab6'
+#set the other madatory flags before test starts
+SET GLOBAL Innodb_file_per_table=on;
+#set the compression level=0 (No compress)
+SET global innodb_compression_level=0;
+#check the compression level and the compressed_pages is default
+SELECT @@innodb_compression_level;
+@@innodb_compression_level
+0
+SELECT @@Innodb_file_per_table;
+@@Innodb_file_per_table
+1
+#create table with 1K block size
+CREATE TABLE tab5 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+#create indexes
+CREATE INDEX idx1 ON tab5(col_4(10));
+CREATE INDEX idx2 ON tab5(col_5(10));
+CREATE INDEX idx3 ON tab5(col_6(10));
+CREATE INDEX idx4 ON tab5(col_7(10));
+CREATE INDEX idx5 ON tab5(col_8(10));
+CREATE INDEX idx6 ON tab5(col_11);
+#load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+#insert 10 records
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+#set the compression level=9 (High compress)
+SET global innodb_compression_level=9;
+#create table with 1K block size
+CREATE TABLE tab6 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+#create indexes
+CREATE INDEX idx1 ON tab6(col_4(10));
+CREATE INDEX idx2 ON tab6(col_5(10));
+CREATE INDEX idx3 ON tab6(col_6(10));
+CREATE INDEX idx4 ON tab6(col_7(10));
+CREATE INDEX idx5 ON tab6(col_8(10));
+CREATE INDEX idx6 ON tab6(col_11);
+#load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+#insert 10 records
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+#diff the sizes of the No compressed table and high compressed table
+SET @size=(SELECT
+(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024)
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab5' AND ENGINE='InnoDB' AND table_schema='test')
+-
+(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab6' AND ENGINE='InnoDB' AND table_schema='test')
+FROM DUAL);
+#check the size of the table, it should not be Negative value
+#The results of this query Test pass = 1 and fail=0
+SELECT @size >= 0;
+@size >= 0
+1
+#
+# Cleanup
+#
+DROP TABLE tab5;
+DROP TABLE tab6;
+#reset back the compression_level to default.
diff --git a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
new file mode 100644
index 00000000000..3b98527250b
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
@@ -0,0 +1,8084 @@
+#******************************************************************
+# Test 1: Test the interaction between stats and compression level
+# and logging of compressed pages configuration
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and innodb_compression_level=0
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=0;
+#******************************************************************
+# Test 1-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for deterministic reasons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=2;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 2: test the interaction between wl6347 & wl6344 (2.2)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and innodb_compression_level=9
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+#******************************************************************
+# Test 2-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 159744
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 122880
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 212992
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 245760
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 344064
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 3: test the interaction between wl6347 & wl6344 (2.3)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# innodb_compression_level=6 (default)
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+#******************************************************************
+# Test 3-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 1K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 86016
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 86016
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 122880
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 172032
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 245760
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 344064
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 4: test the interaction between wl6347 & wl6344 (2.5 & 2.6)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# Innodb_compression_failure_threshold_pct=0
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+@@innodb_cmp_per_index_enabled 1
+SELECT @@innodb_compression_failure_threshold_pct;
+@@innodb_compression_failure_threshold_pct 0
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table 1
+SELECT @@innodb_compression_level;
+@@innodb_compression_level 6
+#******************************************************************
+# Test 4-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_file_per_table=on;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 5: test the interaction between wl6347 & wl6344 (2.7)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# Innodb_compression_failure_threshold_pct=10
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_compression_level=Default;
+# check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+@@innodb_cmp_per_index_enabled 1
+SELECT @@innodb_compression_failure_threshold_pct;
+@@innodb_compression_failure_threshold_pct 10
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table 1
+SELECT @@innodb_compression_level;
+@@innodb_compression_level 6
+#******************************************************************
+# Test 5-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 6: Create multiple tables & indexes having same name in 2 diff DB's
+# Check the stats of the table. (1.1)
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+SET GLOBAL innodb_file_per_table=ON;
+SET GLOBAL innodb_compression_level=default;
+SET GLOBAL innodb_compression_failure_threshold_pct=default;
+# create a table page size=1K
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='test' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+database_name test
+table_name tab5
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+database_name test
+table_name tab5
+index_name idx1
+compress_ops 1
+compress_ops_ok 1
+CREATE DATABASE sb;
+USE sb;
+# create a table page size=1K (testcase-1)
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx1 ON tab5(col_1(10));
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='sb' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+database_name sb
+table_name tab5
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+database_name sb
+table_name tab5
+index_name idx1
+compress_ops 1
+compress_ops_ok 1
+DROP TABLE tab5, test.tab5;
+DROP DATABASE sb;
+# reset the flags
+SET GLOBAL innodb_file_per_table=default;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
+SET GLOBAL innodb_compression_failure_threshold_pct=default;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_1.result b/mysql-test/suite/innodb_zip/r/wl6470_1.result
new file mode 100644
index 00000000000..ea1866d69eb
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6470_1.result
@@ -0,0 +1,598 @@
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb key_block_size = 4;
+set innodb_strict_mode=off;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb key_block_size = 8;
+set innodb_strict_mode=default;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+set global innodb_file_per_table = 0;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_2.result b/mysql-test/suite/innodb_zip/r/wl6470_2.result
new file mode 100644
index 00000000000..b001cd73882
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6470_2.result
@@ -0,0 +1,667 @@
+create procedure populate_tables()
+begin
+declare n int default 20;
+declare inner_loop int default 100;
+set global innodb_file_per_table=on;
+drop table if exists t1,t2,t3,t4;
+create temporary table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create temporary table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create temporary table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create temporary table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create temporary table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150),(190);
+while (n > 0) do
+start transaction;
+insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t3 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t4 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t5 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+if (n > 10) then
+commit;
+else
+delete from t1 where c1 > 10 ;
+delete from t2 where c1 > 10 ;
+delete from t3 where c1 > 10 ;
+delete from t4 where c1 > 10 ;
+delete from t5 where c1 > 10 ;
+rollback;
+start transaction;
+update t1 set c1 = c1 + 1000 where c1 > 10;
+update t2 set c1 = c1 + 1000 where c1 > 10;
+update t3 set c1 = c1 + 1000 where c1 > 10;
+update t4 set c1 = c1 + 1000 where c1 > 10;
+update t5 set c1 = c1 + 1000 where c1 > 10;
+rollback;
+end if;
+start transaction;
+insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+delete from t1 where c1 between 100 and 110;
+delete from t2 where c1 between 100 and 110;
+delete from t3 where c1 between 100 and 110;
+delete from t4 where c1 between 100 and 110;
+delete from t5 where c1 between 100 and 110;
+update t1 set c1 = c1+1 where c1>110;
+update t2 set c1 = c1+1 where c1>110;
+update t3 set c1 = c1+1 where c1>110;
+update t4 set c1 = c1+1 where c1>110;
+update t5 set c1 = c1+1 where c1>110;
+savepoint a;
+insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+savepoint b;
+insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+savepoint c;
+rollback to b;
+rollback to a;
+commit;
+commit;
+rollback;
+set n = n - 1;
+end while;
+end|
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
+#---client 1 : dml operation ---"
+connection con1;
+#---client 2 : dml operation ---"
+connection con2;
+# In connection 1
+connection con1;
+select count(*) from t1;
+count(*)
+20
+select count(*) from t2;
+count(*)
+20
+select count(*) from t3;
+count(*)
+20
+select count(*) from t4;
+count(*)
+20
+select count(*) from t5;
+count(*)
+20
+select c1 from t1;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t2;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t3;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t4;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t5;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 2
+connection con2;
+select count(*) from t1;
+count(*)
+20
+select count(*) from t2;
+count(*)
+20
+select count(*) from t3;
+count(*)
+20
+select count(*) from t4;
+count(*)
+20
+select count(*) from t5;
+count(*)
+20
+select c1 from t1;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t2;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t3;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t4;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t5;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 1
+connection con1;
+set autocommit = 0;
+insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t3 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t5 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+set autocommit = 1;
+select c1,c2 from t1 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t2 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t3 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t4 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t5 where c1 in (20,1);
+c1 c2
+20 20
+replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+update ignore t1 set c1 = 20 where c1 = 140 ;
+update ignore t2 set c1 = 20 where c1 = 140 ;
+update ignore t3 set c1 = 20 where c1 = 140 ;
+update ignore t4 set c1 = 20 where c1 = 140 ;
+update ignore t5 set c1 = 20 where c1 = 140 ;
+select count(*) from t1 where c1 = 140;
+count(*)
+1
+select count(*) from t2 where c1 = 140;
+count(*)
+1
+select count(*) from t3 where c1 = 140;
+count(*)
+1
+select count(*) from t4 where c1 = 140;
+count(*)
+1
+select count(*) from t5 where c1 = 140;
+count(*)
+1
+"running select * into outfile <file> from t1 ;
+create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
+select count(*) from temp_1;
+count(*)
+0
+"running load data infile <file> into temp_1 ;
+select count(*) from temp_1;
+count(*)
+20
+alter table temp_1 add column c10 int default 99 ,
+add column c11 varchar(100) default 'test';
+alter table temp_1 add primary key (c1);
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55);
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-1 -1 a a a a a 100.550 99 test
+select count(*) from temp_1 where c10 = 99 and c11 like 'test';
+count(*)
+21
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
+on duplicate key update c1=-2,c2=-2;
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-2 -2 a a a a a 100.550 99 test
+drop table t1 ,t2 ,t3,t4,t5,t6,temp_1;
+disconnect con1;
+connection con2;
+drop table t1 ,t2 ,t3,t4,t5,t6;
+disconnect con2;
+connection default;
+drop procedure populate_tables;
+create temporary table prep_1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+PREPARE stm FROM "insert into prep_1 values(?,?,repeat(concat(' tc3_',?),30),repeat(concat(' tc4_',?),800),repeat(concat(' tc_',?),800),repeat(concat(' tc6_',?),245),repeat(concat(' tc7_',?),245),now(),(100.55+?))";
+set @var = 5;
+set @var_static = 5;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+1 tc3_1 tc3_1 tc
+2 tc3_2 tc3_2 tc
+3 tc3_3 tc3_3 tc
+4 tc3_4 tc3_4 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+10
+PREPARE stm_1 FROM "UPDATE prep_1 SET c1 = c1 + 1";
+EXECUTE stm_1;
+EXECUTE stm_1;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+3 tc3_1 tc3_1 tc
+4 tc3_2 tc3_2 tc
+5 tc3_3 tc3_3 tc
+6 tc3_4 tc3_4 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+10
+PREPARE stm_2 FROM "DELETE FROM prep_1 ORDER BY c1 LIMIT 1";
+EXECUTE stm_2;
+EXECUTE stm_2;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+5 tc3_3 tc3_3 tc
+6 tc3_4 tc3_4 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+8
+drop prepare stm;
+drop prepare stm_1;
+drop prepare stm_2;
+drop table prep_1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_1.result b/mysql-test/suite/innodb_zip/r/wl6501_1.result
new file mode 100644
index 00000000000..4337275d50b
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_1.result
@@ -0,0 +1,1150 @@
+set global innodb_file_per_table=on;
+# Verify that 'TRUNCATE TABLE' statement works fine and the size
+# of .ibd file is equal to the initial size after truncation.
+drop table if exists t1,t2,t3,t4,t6;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table 'test.t4'
+Note 1051 Unknown table 'test.t6'
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_during_drop_index_temp_table";
+"---debug ib_trunc_crash_during_drop_index_temp_table point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t5;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+"---debug ib_trunc_crash_drop_reinit_done_create_to_start---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t5;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
new file mode 100644
index 00000000000..23acb33adca
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
@@ -0,0 +1,489 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
new file mode 100644
index 00000000000..cb8a4d5a157
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
@@ -0,0 +1,553 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+call mtr.add_suppression("does not exist in the InnoDB internal");
+set global innodb_file_per_table = on;
+"1. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set innodb_strict_mode=off;
+create temporary table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check Error Table 'test.t' doesn't exist
+test.t check status Operation failed
+"2. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set innodb_strict_mode=off;
+create temporary table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check Error Table 'test.t' doesn't exist
+test.t check status Operation failed
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
new file mode 100644
index 00000000000..74f1e9dd1ad
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
@@ -0,0 +1,489 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
new file mode 100644
index 00000000000..9c197737137
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
@@ -0,0 +1,354 @@
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Antelope';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compact
+key_block_size=NUMBER;
+Warnings:
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compressed
+key_block_size=NUMBER;
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compressed
+key_block_size=16;
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compressed
+key_block_size=16;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 0;
+set global innodb_file_format = 'Antelope';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compact
+key_block_size=NUMBER;
+Warnings:
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6560.result b/mysql-test/suite/innodb_zip/r/wl6560.result
new file mode 100644
index 00000000000..bf46d8a41a0
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6560.result
@@ -0,0 +1,418 @@
+set global innodb_file_per_table = off;
+# files in MYSQL_DATA_DIR
+ibtmp1
+select @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+0
+create temporary table t1 (i int, f float, c char(100)) engine=innodb;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+select * from t1 where i = 98;
+i f c
+98 1.3 jaipur
+select * from t1 where i < 100;
+i f c
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 33.33 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL sec_index NULL NULL NULL 5 60.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+select * from t1 where f > 1.29999;
+i f c
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 20.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
+select * from t1 where i = 100;
+i f c
+100 1.1 pune
+delete from t1 where i < 97;
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 kolkata
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.44 delhi
+96 1.5 kolkata
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+alter table t1 import tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop table t1;
+#files in MYSQL_TMP_DIR
+set global innodb_file_per_table = 1;
+select @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+1
+create temporary table t1
+(i int, f float, c char(100)) engine = innodb key_block_size = 4;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f` float DEFAULT NULL,
+ `c` char(100) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+select * from t1 where i = 98;
+i f c
+98 1.3 jaipur
+select * from t1 where i < 100;
+i f c
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 33.33 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL sec_index NULL NULL NULL 5 60.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+select * from t1 where f > 1.29999;
+i f c
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 20.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
+select * from t1 where i = 100;
+i f c
+100 1.1 pune
+delete from t1 where i < 97;
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 kolkata
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.44 delhi
+96 1.5 kolkata
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop table t1;
+set global innodb_file_per_table = off;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+while (i <= 20000) DO
+insert into t1 values (i, 'a', 'b');
+SET i = i + 1;
+END WHILE;
+END|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+20000
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+set autocommit=1;
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+drop procedure populate_t1;
+drop table t1;
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+insert into t1 values (1, 'c', 'b');
+select * from t1;
+keyc c1 c2
+1 c b
+# restart
+# files in MYSQL_DATA_DIR
+ibtmp1
+use test;
+select * from t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+"testing temp-table creation in --innodb_read_only mode"
+# restart: --innodb-read-only
+use test;
+show tables;
+Tables_in_test
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+ERROR HY000: InnoDB is in read only mode.
+"testing system and temp tablespace name conflict"
+"restarting server in normal mode"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+drop table t1;
+# test condition of full-temp-tablespace
+# restart: --innodb_temp_data_file_path=ibtmp1:12M
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+while (i <= 20000) DO
+insert into t1 values (i, 'a', 'b');
+SET i = i + 1;
+END WHILE;
+END|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+ERROR HY000: The table 't1' is full
+drop procedure populate_t1;
+drop table t1;
+set innodb_strict_mode = off;
+set global innodb_file_per_table = 0;
+set global innodb_file_format = 'Antelope';
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+set global innodb_file_per_table = 1;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+set innodb_strict_mode = on;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+drop table t;
+set global innodb_file_format = 'Barracuda';
+set innodb_strict_mode = off;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+set innodb_strict_mode = default;
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+set innodb_strict_mode = on;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+set innodb_strict_mode = off;
+#files in MYSQL_TMP_DIR
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic key_block_size = 4;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER unless ROW_FORMAT=COMPRESSED.
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compact;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+create temporary table t (
+i int)
+engine = innodb key_block_size = 4;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+"testing temp tablespace non-support for raw device"
+"testing temp tablespace non-support for raw device"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
+"try starting server with temp-tablespace size < min. threshold"
+"try starting server with sys-tablespace size < min. threshold"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
+"try starting server with no file specified for temp-tablespace"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6915_1.result b/mysql-test/suite/innodb_zip/r/wl6915_1.result
new file mode 100644
index 00000000000..0ffc2f43265
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6915_1.result
@@ -0,0 +1,2060 @@
+call mtr.ADD_suppression(".*Resizing redo log.*");
+call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*");
+call mtr.ADD_suppression(".*New log files created.*");
+SELECT @@global.innodb_undo_tablespaces;
+@@global.innodb_undo_tablespaces
+0
+CREATE PROCEDURE populate_tables(IN id VARCHAR(10))
+begin
+declare n int default 20;
+set global innodb_file_per_table=on;
+DROP TABLE IF EXISTS t1,t2,t3,t4;
+CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=redundant;
+set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=compact;
+set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;
+set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=dynamic;
+set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+while (n > 0) do
+START TRANSACTION;
+set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+savepoint a;
+set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+savepoint b;
+set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+if (n > 10) then
+if (n > 10 and n <=12) then
+ROLLBACK TO SAVEPOINT a;
+COMMIT;
+end if;
+if (n > 12 and n < 15) then
+ROLLBACK TO SAVEPOINT b;
+COMMIT;
+end if;
+if (n > 15) then
+COMMIT;
+end if;
+else
+if (n > 5) then
+START TRANSACTION;
+DELETE FROM t1_temp WHERE c1 > 10 ;
+DELETE FROM t2_temp WHERE c1 > 10 ;
+DELETE FROM t3_temp WHERE c1 > 10 ;
+DELETE FROM t4_temp WHERE c1 > 10 ;
+rollback;
+START TRANSACTION;
+update t1_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t2_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t3_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t4_temp set c1 = c1 + 1000 WHERE c1 > 10;
+rollback;
+end if;
+end if;
+if (n < 5) then
+rollback;
+end if;
+FLUSH logs;
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t2_temp DROP PRIMARY KEY;
+ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t3_temp DROP PRIMARY KEY;
+ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t4_temp DROP PRIMARY KEY;
+ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+FLUSH tables;
+START TRANSACTION;
+set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+DELETE FROM t1_temp WHERE c1 between 100 and 110;
+DELETE FROM t2_temp WHERE c1 between 100 and 110;
+DELETE FROM t3_temp WHERE c1 between 100 and 110;
+DELETE FROM t4_temp WHERE c1 between 100 and 110;
+update t1_temp set c1 = c1+1 WHERE c1>110;
+update t2_temp set c1 = c1+1 WHERE c1>110;
+update t3_temp set c1 = c1+1 WHERE c1>110;
+update t4_temp set c1 = c1+1 WHERE c1>110;
+savepoint a;
+set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+savepoint b;
+set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+savepoint c;
+rollback to b;
+rollback to a;
+COMMIT;
+COMMIT;
+rollback;
+set n = n - 1;
+end while;
+end|
+#---client 1 : dml operation ---"
+#---client 2 : dml operation ---"
+# In connection 1
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 2
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 1
+set AUTOCOMMIT = 0;
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t2_temp DROP PRIMARY KEY;
+ALTER TABLE t2_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t3_temp DROP PRIMARY KEY;
+ALTER TABLE t3_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t4_temp DROP PRIMARY KEY;
+ALTER TABLE t4_temp ADD PRIMARY KEY (c1);
+INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+set AUTOCOMMIT = 1;
+SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+SELECT count(*) FROM t1_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t2_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t3_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t4_temp WHERE c1 = 140;
+count(*)
+1
+ALTER TABLE t1_temp ADD COLUMN c10 int default 99 ,
+ADD COLUMN c11 varchar(100) default 'test';
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55);
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-1 -1 a a a a a 100.550 99 test
+SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test';
+count(*)
+27
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55)
+ON DUPLICATE KEY UPDATE c1=-2,c2=-2;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-2 -2 a a a a a 100.550 99 test
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+call populate_tables('_1');;
+call populate_tables('_2');;
+"#connection 1 - verify tables"
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+"#connection 2 - verify tables"
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+call populate_tables('_1');;
+call populate_tables('_2');;
+"#connection 1 - verify tables"
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+"#connection 2 - verify tables"
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+DROP PROCEDURE populate_tables;