summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-01-15 10:39:52 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2018-01-15 10:39:52 +0200
commit5f80e0f752bd34c77bfd9df39b5ead0477b8813b (patch)
tree218b3a8867fcd8c0aece0748d40dee4221e8d58b
parent5140257a0abd79de1e6f36cece5cdb203426653b (diff)
downloadmariadb-git-bb-MDEV-13103.tar.gz
Add test case to test big endian and little endian checksums withbb-MDEV-13103
(1) normal table (2) encrypted table (3) page compressed table (4) page compressed and encrypted table (2) row compressed table (5) row compressed and encrypted table
-rw-r--r--mysql-test/suite/encryption/t/innodb-checksum.test81
-rw-r--r--mysql-test/suite/encryption/t/innodb-checksum.zipbin0 -> 155248 bytes
2 files changed, 81 insertions, 0 deletions
diff --git a/mysql-test/suite/encryption/t/innodb-checksum.test b/mysql-test/suite/encryption/t/innodb-checksum.test
new file mode 100644
index 00000000000..7e1f3b1f794
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-checksum.test
@@ -0,0 +1,81 @@
+--source include/have_innodb.inc
+--source include/have_file_key_management_plugin.inc
+-- source include/have_innodb_16k.inc
+
+create table t0_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb;
+create table t1_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb encrypted=yes;
+create table t2_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=yes;
+create table t3_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=yes encrypted=yes;
+create table t4_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb row_format=compressed;
+create table t5_be (c1 int not null auto_increment primary key, b char(200)) engine=innodb row_format=compressed encrypted=yes;
+
+create table t0_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb;
+create table t1_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb encrypted=yes;
+create table t2_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=yes;
+create table t3_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=yes encrypted=yes;
+create table t4_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb row_format=compressed;
+create table t5_le (c1 int not null auto_increment primary key, b char(200)) engine=innodb row_format=compressed encrypted=yes;
+
+alter table t0_be discard tablespace;
+alter table t1_be discard tablespace;
+alter table t2_be discard tablespace;
+alter table t3_be discard tablespace;
+alter table t4_be discard tablespace;
+alter table t5_be discard tablespace;
+
+alter table t0_le discard tablespace;
+alter table t1_le discard tablespace;
+alter table t2_le discard tablespace;
+alter table t3_le discard tablespace;
+alter table t4_le discard tablespace;
+alter table t5_le discard tablespace;
+
+-- exec unzip -qo $MYSQL_TEST_DIR/suite/encryption/t/innodb-checksum.zip -d $MYSQLTEST_VARDIR/tmp/innodb-checksum
+
+-- let DATADIR = `SELECT @@datadir`
+
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t0_be.ibd $DATADIR/test/t0_be.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t1_be.ibd $DATADIR/test/t1_be.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t2_be.ibd $DATADIR/test/t2_be.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t3_be.ibd $DATADIR/test/t3_be.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t4_be.ibd $DATADIR/test/t4_be.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t5_be.ibd $DATADIR/test/t5_be.ibd
+
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t0_le.ibd $DATADIR/test/t0_le.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t1_le.ibd $DATADIR/test/t1_le.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t2_le.ibd $DATADIR/test/t2_le.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t3_le.ibd $DATADIR/test/t3_le.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t4_le.ibd $DATADIR/test/t4_le.ibd
+-- copy_file $MYSQLTEST_VARDIR/tmp/innodb-checksum/t5_le.ibd $DATADIR/test/t5_le.ibd
+
+alter table t0_be import tablespace;
+alter table t1_be import tablespace;
+alter table t2_be import tablespace;
+alter table t3_be import tablespace;
+alter table t4_be import tablespace;
+alter table t5_be import tablespace;
+
+alter table t0_le import tablespace;
+alter table t1_le import tablespace;
+alter table t2_le import tablespace;
+alter table t3_le import tablespace;
+alter table t4_le import tablespace;
+alter table t5_le import tablespace;
+
+select * from t0_be;
+select * from t1_be;
+select * from t2_be;
+select * from t3_be;
+select * from t4_be;
+select * from t5_be;
+
+select * from t0_le;
+select * from t1_le;
+select * from t2_le;
+select * from t3_le;
+select * from t4_le;
+select * from t5_le;
+
+drop table t0_be, t1_be, t2_be, t3_be, t4_be, t5_be;
+drop table t0_le, t1_le, t2_le, t3_le, t4_le, t5_le;
+
diff --git a/mysql-test/suite/encryption/t/innodb-checksum.zip b/mysql-test/suite/encryption/t/innodb-checksum.zip
new file mode 100644
index 00000000000..b1f546ec7f7
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb-checksum.zip
Binary files differ