mirror of
https://github.com/MariaDB/server.git
synced 2025-02-15 18:05:32 +01:00
![Marko Mäkelä](/assets/img/avatar_default.png)
The issue was a bad merge of MDEV-12253 from 10.1 to 10.2
in commit f9cc391863
.
In that merge, I wrongly assumed that all test file conflicts
for mysql-test/suite/encryption had been properly resolved in
bb-10.2-MDEV-12253 (commit 76aa6be77635c7017459ce33b41c837c9acb606d)
while in fact, some files there had been copied from the 10.1 branch.
This commit is based on a manually done conflict resolution of
the mysql-test/suite/encryption on the same merge, applied to
the current 10.2 branch.
As part of this commit, the test encryption.innodb-bad-key-change4
which was shortly disabled due to MDEV-11336 will be re-enabled again.
(While the test enables innodb_defragment, it does not fail even though
enabling innodb_defragment currently has no effect.)
93 lines
2.8 KiB
Text
93 lines
2.8 KiB
Text
#
|
|
# MDEV-8773: InnoDB innochecksum does not work with encrypted or page compressed tables
|
|
#
|
|
|
|
# Don't test under embedded
|
|
-- source include/not_embedded.inc
|
|
# Require InnoDB
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_file_key_management_plugin.inc
|
|
|
|
if (!$INNOCHECKSUM) {
|
|
--echo Need innochecksum binary
|
|
--die Need innochecksum binary
|
|
}
|
|
|
|
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
|
|
|
# zlib
|
|
set global innodb_compression_algorithm = 1;
|
|
|
|
--echo # Create and populate a tables
|
|
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=NO;
|
|
CREATE TABLE t4 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED=1;
|
|
CREATE TABLE t5 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
|
|
--disable_query_log
|
|
--let $i = 1000
|
|
while ($i)
|
|
{
|
|
INSERT INTO t1 (b) VALUES (REPEAT('abcdefghijklmnopqrstuvwxyz', 100));
|
|
dec $i;
|
|
}
|
|
INSERT INTO t2 SELECT * FROM t1;
|
|
INSERT INTO t3 SELECT * FROM t1;
|
|
INSERT INTO t4 SELECT * FROM t1;
|
|
INSERT INTO t5 SELECT * FROM t1;
|
|
--enable_query_log
|
|
|
|
let $MYSQLD_DATADIR=`select @@datadir`;
|
|
let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
|
|
let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd;
|
|
let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd;
|
|
let t4_IBD = $MYSQLD_DATADIR/test/t4.ibd;
|
|
let t5_IBD = $MYSQLD_DATADIR/test/t5.ibd;
|
|
|
|
--echo # Write file to make mysql-test-run.pl expect the "crash", but don't
|
|
--echo # start it until it's told to
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
|
|
--echo # We give 30 seconds to do a clean shutdown because we do not want
|
|
--echo # to redo apply the pages of t1.ibd at the time of recovery.
|
|
--echo # We want SQL to initiate the first access to t1.ibd.
|
|
shutdown_server 30;
|
|
|
|
--echo # Wait until disconnected.
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
--echo # Run innochecksum on t1
|
|
-- disable_result_log
|
|
--exec $INNOCHECKSUM $t1_IBD
|
|
|
|
--echo # Run innochecksum on t2
|
|
|
|
--exec $INNOCHECKSUM $t2_IBD
|
|
|
|
--echo # Run innochecksum on t3
|
|
|
|
--exec $INNOCHECKSUM $t3_IBD
|
|
|
|
--echo # Run innochecksum on t4
|
|
|
|
--exec $INNOCHECKSUM $t4_IBD
|
|
|
|
--echo # Run innochecksum on t4
|
|
|
|
--exec $INNOCHECKSUM $t4_IBD
|
|
|
|
--enable_result_log
|
|
|
|
--echo # Write file to make mysql-test-run.pl start up the server again
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--enable_reconnect
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
--echo # Cleanup
|
|
DROP TABLE t1, t2, t3, t4, t5;
|
|
|
|
# reset system
|
|
--disable_query_log
|
|
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
|
--enable_query_log
|