| 1 |
--source include/not_valgrind.inc |
| 2 |
|
| 3 |
--echo ## Test: Upgrade data directory. |
| 4 |
--echo # a) start MySQLd with 5.7 data directory, do the upgrade. |
| 5 |
--echo # b) verify that X Plugin "information about acceptin client |
| 6 |
--echo # connections (logs) are printed after upgrade finishes. |
| 7 |
|
| 8 |
--echo |
| 9 |
--echo ## a) Restart the server with 5.7 data directory. |
| 10 |
--echo # Copy and unzip the datadir. |
| 11 |
copy_file $MYSQLTEST_VARDIR/std_data/data_57.zip $MYSQL_TMP_DIR/data_57.zip; |
| 12 |
file_exists $MYSQL_TMP_DIR/data_57.zip; |
| 13 |
mkdir $MYSQL_TMP_DIR/data_57/; |
| 14 |
exec unzip -qo $MYSQL_TMP_DIR/data_57.zip -d $MYSQL_TMP_DIR/data_57/; |
| 15 |
let $DATADIR = $MYSQL_TMP_DIR/data_57/data/; |
| 16 |
|
| 17 |
--echo # Mark that error-logs generated until now are not important. |
| 18 |
let $error_pattern = SAVEPOS; |
| 19 |
source ../include/assert_error_log_sequence.inc; |
| 20 |
|
| 21 |
--echo # Restart the server with "5.7" data directory. |
| 22 |
replace_result $DATADIR DATADIR; |
| 23 |
let $restart_parameters = restart: --datadir=$DATADIR; |
| 24 |
let $wait_counter=3000; |
| 25 |
source include/restart_mysqld.inc; |
| 26 |
|
| 27 |
--echo |
| 28 |
--echo ## b) Confirm that X Plugin "accepting" logs are printed after upgrade. |
| 29 |
# The 5.7 data dir, doesn't have mtr directory. We must create i manually. |
| 30 |
disable_query_log; |
| 31 |
CREATE SCHEMA mtr; |
| 32 |
enable_query_log; |
| 33 |
let $error_pattern =System.*Server upgrade from '50700' to '800..' started. |
| 34 |
System.*Server upgrade from '50700' to '800..' completed. |
| 35 |
System.*X Plugin ready for connections. Bind-address: .* port: ; |
| 36 |
|
| 37 |
let $ignore_line_count=0; |
| 38 |
--source ../include/assert_error_log_sequence.inc |
| 39 |
|
| 40 |
--echo |
| 41 |
--echo ## Cleanup: restart the server and restore the default database. |
| 42 |
--let $restart_parameters = restart: |
| 43 |
--source include/restart_mysqld.inc |
| 44 |
|
| 45 |
# Remove files created by the test. |
| 46 |
--remove_file $MYSQL_TMP_DIR/data_57.zip |
| 47 |
--force-rmdir $MYSQL_TMP_DIR/data_57/ |