# # MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key # --source include/have_innodb.inc --source include/not_embedded.inc call mtr.add_suppression("InnoDB: The page .* in file test/t1 cannot be decrypted"); # Suppression for builds where file_key_management plugin is linked statically call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); --echo # --echo # Restart the server with key 4 in the key file --echo # --write_file $MYSQLTEST_VARDIR/keys1.txt 1;770A8A65DA156D24EE2A093277530142 4;18420B5CBA31CCDFFE9716E91EB61374D05914F3ADE23E03 EOF --let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt --source include/restart_mysqld.inc CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1); --echo # --echo # Restart the server with a different value for key 4 in the key file --echo # --write_file $MYSQLTEST_VARDIR/keys2.txt 1;770A8A65DA156D24EE2A093277530142 4;22222222222222222222222222222222 EOF --let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt --source include/restart_mysqld.inc --error ER_GET_ERRMSG SELECT * FROM t1; --let $restart_parameters= --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt --source include/restart_mysqld.inc SELECT * FROM t1; DROP TABLE t1; --let $restart_parameters= --source include/restart_mysqld.inc --remove_file $MYSQLTEST_VARDIR/keys2.txt --remove_file $MYSQLTEST_VARDIR/keys1.txt