MINI MINI MANI MO
# Test "ALTER TABLE ... IMPORT TABLESPACE" in InnoDB
--source include/have_lowercase0.inc
--source include/have_innodb_16k.inc
--source include/have_punch_hole.inc
--source include/not_embedded.inc
--source include/have_64bit.inc # The disk keyring_file data are not portable
--echo #
--echo # Bug#31313533 : IMPORT FAILS FOR ENCRYPT AND COMPRESSION ENABLED TDE TABLES
--echo # upgrade section
--echo #
--disable_query_log
call mtr.add_suppression("Resizing redo log");
call mtr.add_suppression("Starting to delete and rewrite log files");
call mtr.add_suppression("New log files created");
# Table 'performance_schema'.'processlist' was added in 5.7.39
# It is not present in the 5.7.32 import test file.
call mtr.add_suppression("Optional native table 'performance_schema'.'processlist' has the wrong structure or is missing");
--enable_query_log
--echo
--echo # Test 4 : check table from old version are read correctly after upgrade
--echo
--echo # Stop the running the server
--source include/shutdown_mysqld.inc
--echo # Copy and unzip the datadir.
--copy_file $MYSQLTEST_VARDIR/std_data/data_57_32.zip $MYSQL_TMP_DIR/data_57_32.zip
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
--exec unzip -qo $MYSQL_TMP_DIR/data_57_32.zip -d $MYSQL_TMP_DIR
let $DATADIR = $MYSQL_TMP_DIR/data;
--echo # Restart the server against the unzipped datadir
--replace_result $DATADIR DATADIR $KEYRING_PLUGIN_OPT KEYRING_PLUGIN_OPT
--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
--let $wait_counter=3000
--source include/start_mysqld.inc
--echo # Verify tables after upgrade
USE test;
SHOW CREATE TABLE t1;
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
--echo # Run some DML statements
INSERT INTO t1(c2,b,p_c1) VALUES(AES_ENCRYPT("5dd0786a3c7adf503202b8e234a95cbe643bc752028e1792ca8e6ef86c69582eb1cc478670c8e5d6c0133d1b4e5c98017aeb893f9db5f1bff397bc9e0f5fde48","abc"),10,100);
DELETE FROM t1 WHERE c1=50001;
--echo # Verify results
SELECT c1, SUBSTRING(c2, 10, 10), SUBSTRING(c3, 10, 10), SUBSTRING(c4, 10, 10), b FROM t1 ORDER BY c1 limit 10;
--echo # Cleanup
DROP TABLE t1;
--let $restart_parameters= restart
--source include/restart_mysqld.inc
--echo # Remove copied files
--file_exists $MYSQL_TMP_DIR/data_57_32.zip
#--force-rmdir $MYSQL_TMP_DIR/data
--remove_file $MYSQL_TMP_DIR/data_57_32.zip
OHA YOOOO