|
| 1 | +--source include/have_case_sensitive_file_system.inc |
| 2 | + |
| 3 | +############################################################################### |
| 4 | +# |
| 5 | +# Bug#31789964 : HELP TABLES UPGRADE FAILS ENTIRE SERVER UPGRADE - WITHOUT |
| 6 | +# PRINTING ERROR... |
| 7 | +# |
| 8 | +############################################################################### |
| 9 | +# To create the file std_data/upgrade/data_57_help_tables.zip |
| 10 | +# |
| 11 | +# - In 5.7, execute: |
| 12 | +# |
| 13 | +# CREATE SCHEMA test; |
| 14 | +# ALTER TABLE mysql.help_topic CONVERT TO CHARACTER SET latin1; |
| 15 | +# ALTER TABLE mysql.help_category CONVERT TO CHARACTER SET latin1; |
| 16 | +# ALTER TABLE mysql.help_relation CONVERT TO CHARACTER SET latin1; |
| 17 | +# ALTER TABLE mysql.help_keyword CONVERT TO CHARACTER SET latin1; |
| 18 | +# |
| 19 | +# - then zip the data folder |
| 20 | +# |
| 21 | +# zip -r data_57_help_tables.zip db/ |
| 22 | +# |
| 23 | +############################################################################### |
| 24 | + |
| 25 | +--echo # Copy the 5.7 data zip file to working directory and check it exists. |
| 26 | +--copy_file $MYSQLTEST_VARDIR/std_data/upgrade/data_57_help_tables.zip $MYSQL_TMP_DIR/data_57_help_tables.zip |
| 27 | +--file_exists $MYSQL_TMP_DIR/data_57_help_tables.zip |
| 28 | + |
| 29 | +--echo # Unzip 5.7 data directory. |
| 30 | +--exec unzip -qo $MYSQL_TMP_DIR/data_57_help_tables.zip -d $MYSQL_TMP_DIR/data_57_help_tables |
| 31 | + |
| 32 | +--echo # Set data directory and log file |
| 33 | +--let $MYSQLD_DATADIR1= $MYSQL_TMP_DIR/data_57_help_tables/db |
| 34 | +--let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/data_57_help_tables.log |
| 35 | + |
| 36 | +--echo # Restart server to trigger upgrade. |
| 37 | +--echo # Upgrade of help tables should succeed. |
| 38 | + |
| 39 | +--replace_result $MYSQLD MYSQLD $MYSQLD_DATADIR1 MYSQLD_DATADIR1 $MYSQLD_LOG MYSQLD_LOG |
| 40 | +--let $restart_parameters = restart: --datadir=$MYSQLD_DATADIR1 --log-error=$MYSQLD_LOG |
| 41 | +--let $wait_counter= 10000 |
| 42 | +--source include/restart_mysqld.inc |
| 43 | + |
| 44 | +--echo # Check for errors in the error log. |
| 45 | +--let SEARCH_FILE= $MYSQLD_LOG |
| 46 | +--let SEARCH_PATTERN= \[ERROR\] |
| 47 | +--source include/search_pattern.inc |
| 48 | + |
| 49 | +--echo # Check for mysql_upgrade_info file in data directory. |
| 50 | +--file_exists $MYSQLD_DATADIR1/mysql_upgrade_info |
| 51 | + |
| 52 | +--echo # Cleanup. |
| 53 | +--remove_file $MYSQL_TMP_DIR/data_57_help_tables.zip |
| 54 | +--force-rmdir $MYSQL_TMP_DIR/data_57_help_tables |
| 55 | + |
| 56 | +--echo # Restart the server with default options. |
| 57 | +--let $restart_parameters= |
| 58 | +--source include/restart_mysqld.inc |
0 commit comments