Skip to content

Commit 634790e

Browse files
committed
Bug #32101184: INNODB.IMPORT_COMPRESS_ENCRYPT FAILS ON 32 BUT WITH KEYRING LOAD ERROR
The keyring_file format is not portable in 5.7. Thus, splitting the test that relies on stored keyring data files into two: one for all platforms and a new one that's using the stored data and is to run only on 64 bit platforms. Change-Id: Ic431252ee1a20cf2276f85067a5ad71bebbe0453
1 parent cfaaf80 commit 634790e

File tree

4 files changed

+64
-45
lines changed

4 files changed

+64
-45
lines changed
-2.51 KB
Binary file not shown.
2.53 KB
Binary file not shown.

mysql-test/suite/innodb/t/import_compress_encrypt.test

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -170,48 +170,4 @@ DROP TABLE t1;
170170
#--rmdir $MYSQL_TMP_DIR/import_57_32
171171
--remove_file $MYSQL_TMP_DIR/import_57_32.zip
172172

173-
--echo
174-
--echo # Test 4 : check table from old version are read correctly after upgrade
175-
--echo
176-
177-
--echo # Stop the running the server
178-
--source include/shutdown_mysqld.inc
179-
180-
--echo # Copy and unzip the datadir.
181-
--copy_file $MYSQLTEST_VARDIR/std_data/data_57_32.zip $MYSQL_TMP_DIR/data_57_32.zip
182-
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
183-
--exec unzip -qo $MYSQL_TMP_DIR/data_57_32.zip -d $MYSQL_TMP_DIR
184-
let $DATADIR = $MYSQL_TMP_DIR/data;
185-
186-
--echo # Restart the server against the unzipped datadir
187-
--replace_result $DATADIR DATADIR $KEYRING_PLUGIN_OPT KEYRING_PLUGIN_OPT
188-
--let $restart_parameters = restart: --datadir=$DATADIR --innodb-page-size=16k --early-plugin-load=keyring_file=$KEYRING_PLUGIN --loose-keyring_file_data=$MYSQL_TMP_DIR/data/keyring $KEYRING_PLUGIN_OPT
189-
--let $wait_counter=3000
190-
--source include/start_mysqld.inc
191-
192-
--echo # Verify tables after upgrade
193-
USE test;
194-
SHOW CREATE TABLE t1;
195-
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
196-
197-
--echo # Run some DML statements
198-
INSERT INTO t1(c2,b,p_c1) VALUES(AES_ENCRYPT("5dd0786a3c7adf503202b8e234a95cbe643bc752028e1792ca8e6ef86c69582eb1cc478670c8e5d6c0133d1b4e5c98017aeb893f9db5f1bff397bc9e0f5fde48","abc"),10,100);
199-
DELETE FROM t1 WHERE c1=50001;
200-
201-
--echo # Verify results
202-
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
203-
204-
--echo # Cleanup
205-
DROP TABLE t1;
206-
remove_file $MYSQL_TMP_DIR/mysecret_keyring;
207-
--echo # Shutdown server
208-
--source include/shutdown_mysqld.inc
209-
210-
--echo # Remove copied files
211-
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
212-
#--rmdir $MYSQL_TMP_DIR/data
213-
--remove_file $MYSQL_TMP_DIR/data_57_32.zip
214-
215-
--echo # Restarting server without keyring to restore server state
216-
let $restart_parameters =;
217-
--source include/start_mysqld.inc
173+
--source include/force_restart.inc
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Test "ALTER TABLE ... IMPORT TABLESPACE" in InnoDB
2+
3+
--source include/have_lowercase0.inc
4+
--source include/have_innodb_16k.inc
5+
--source include/have_punch_hole.inc
6+
--source include/not_embedded.inc
7+
--source include/have_64bit.inc # The disk keyring_file data are not portable
8+
9+
--echo #
10+
--echo # Bug#31313533 : IMPORT FAILS FOR ENCRYPT AND COMPRESSION ENABLED TDE TABLES
11+
--echo # upgrade section
12+
--echo #
13+
14+
--disable_query_log
15+
call mtr.add_suppression("Resizing redo log");
16+
call mtr.add_suppression("Starting to delete and rewrite log files");
17+
call mtr.add_suppression("New log files created");
18+
# Table 'performance_schema'.'processlist' was added in 5.7.39
19+
# It is not present in the 5.7.32 import test file.
20+
call mtr.add_suppression("Optional native table 'performance_schema'.'processlist' has the wrong structure or is missing");
21+
--enable_query_log
22+
23+
--echo
24+
--echo # Test 4 : check table from old version are read correctly after upgrade
25+
--echo
26+
27+
--echo # Stop the running the server
28+
--source include/shutdown_mysqld.inc
29+
30+
--echo # Copy and unzip the datadir.
31+
--copy_file $MYSQLTEST_VARDIR/std_data/data_57_32.zip $MYSQL_TMP_DIR/data_57_32.zip
32+
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
33+
--exec unzip -qo $MYSQL_TMP_DIR/data_57_32.zip -d $MYSQL_TMP_DIR
34+
let $DATADIR = $MYSQL_TMP_DIR/data;
35+
36+
--echo # Restart the server against the unzipped datadir
37+
--replace_result $DATADIR DATADIR $KEYRING_PLUGIN_OPT KEYRING_PLUGIN_OPT
38+
--let $restart_parameters = restart: --datadir=$DATADIR --innodb-page-size=16k --early-plugin-load=keyring_file=$KEYRING_PLUGIN --loose-keyring_file_data=$MYSQL_TMP_DIR/data/keyring $KEYRING_PLUGIN_OPT
39+
--let $wait_counter=3000
40+
--source include/start_mysqld.inc
41+
42+
--echo # Verify tables after upgrade
43+
USE test;
44+
SHOW CREATE TABLE t1;
45+
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
46+
47+
--echo # Run some DML statements
48+
INSERT INTO t1(c2,b,p_c1) VALUES(AES_ENCRYPT("5dd0786a3c7adf503202b8e234a95cbe643bc752028e1792ca8e6ef86c69582eb1cc478670c8e5d6c0133d1b4e5c98017aeb893f9db5f1bff397bc9e0f5fde48","abc"),10,100);
49+
DELETE FROM t1 WHERE c1=50001;
50+
51+
--echo # Verify results
52+
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
53+
54+
--echo # Cleanup
55+
DROP TABLE t1;
56+
57+
--let $restart_parameters= restart
58+
--source include/restart_mysqld.inc
59+
60+
--echo # Remove copied files
61+
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
62+
#--force-rmdir $MYSQL_TMP_DIR/data
63+
--remove_file $MYSQL_TMP_DIR/data_57_32.zip

0 commit comments

Comments
 (0)