| 1 |
# Tests if upgrade from 5.7, containing partitioned Tables with discarded |
| 2 |
# Tablespaces fails as it should. |
| 3 |
# |
| 4 |
# Uses data prepared by discarded_partition.inc script |
| 5 |
# |
| 6 |
|
| 7 |
--source include/have_case_sensitive_file_system.inc |
| 8 |
--source include/have_innodb_16k.inc |
| 9 |
--source include/no_valgrind_without_big.inc |
| 10 |
|
| 11 |
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect; |
| 12 |
--exec echo "wait" > $restart_file |
| 13 |
--shutdown_server |
| 14 |
--source include/wait_until_disconnected.inc |
| 15 |
|
| 16 |
# Unzip data files from 5.7 |
| 17 |
--copy_file $MYSQLTEST_VARDIR/std_data/upgrade/discarded_partition_data_5730.zip $MYSQL_TMP_DIR/discarded_partition_data_5730.zip |
| 18 |
--file_exists $MYSQL_TMP_DIR/discarded_partition_data_5730.zip |
| 19 |
--exec unzip -qo $MYSQL_TMP_DIR/discarded_partition_data_5730.zip -d $MYSQL_TMP_DIR |
| 20 |
|
| 21 |
# Start MySQL with datadir containing data from 5.7 and log errors |
| 22 |
let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err; |
| 23 |
--error 0,1 |
| 24 |
--remove_file $error_log |
| 25 |
let SEARCH_FILE= $error_log; |
| 26 |
|
| 27 |
let $BUGDATADIR = $MYSQL_TMP_DIR/data_upgrade; |
| 28 |
|
| 29 |
# Make sure that MySQL start failed and search error log for message |
| 30 |
# about impossible upgrade because of discarded Tablespaces |
| 31 |
--error 1 |
| 32 |
--exec $MYSQLD_CMD --loose-console --datadir=$BUGDATADIR > $error_log 2>&1 |
| 33 |
let SEARCH_PATTERN= \[ERROR\] \[[^]]*\] \[[^]]*\] Upgrade failed because database contains discarded tablespaces\.; |
| 34 |
--source include/search_pattern.inc |
| 35 |
|
| 36 |
# Cleanup |
| 37 |
--remove_file $error_log |
| 38 |
--force-rmdir $MYSQL_TMP_DIR/data_upgrade |
| 39 |
--remove_file $MYSQL_TMP_DIR/discarded_partition_data_5730.zip |
| 40 |
|
| 41 |
# Write file to make mysql-test-run.pl start up the server again |
| 42 |
--exec echo "restart" > $restart_file |
| 43 |
|
| 44 |
# Turn on reconnect |
| 45 |
--enable_reconnect |
| 46 |
|
| 47 |
# Call script that will poll the server waiting for it to be back online again |
| 48 |
--source include/wait_until_connected_again.inc |
| 49 |
|
| 50 |
# Turn off reconnect again |
| 51 |
--disable_reconnect |