|
| 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