polardbxengine/mysql-test/t/dd_schema_definition_after_...

66 lines
3.1 KiB
Plaintext

--echo ########################################################################
--echo #
--echo # This test will first verify the DD schema of the currently running
--echo # server, and dump the SHOW CREATE statements for the DD tables to
--echo # a file. Then, it will unzip a data dirctory from version 5.7,
--echo # estart the server to make it do upgrade, and verify that the DD tables
--echo # after upgrade are similar to those that are created when initializing
--echo # the target server.
--echo #
--echo # The zipped 5.7 data directory can be restored on any file system.
--echo # There is a corresponding test for upgrade after 8.0.
--echo #
--echo ########################################################################
--source include/have_debug.inc
--source include/no_valgrind_without_big.inc
--source include/mysql_upgrade_preparation.inc
--echo ########################################################################
--echo # Assert target schema ids.
--echo ########################################################################
--source include/dd_schema_assert_ids.inc
--echo ########################################################################
--echo # Assert target schema table names.
--echo ########################################################################
--source include/dd_schema_assert_and_fill_table_names.inc
--echo ########################################################################
--echo # Dump DD table definitions to file.
--echo ########################################################################
--let $target_table_defs = $MYSQL_TMP_DIR/target_definitions.txt
--let $file = $target_table_defs
--source include/dd_schema_dump_table_defs_debug.inc
--echo ########################################################################
--echo # Dump mysql.dd_properties to file.
--echo ########################################################################
--let $target_dd_props = $MYSQL_TMP_DIR/target_dd_properties.txt
--let $file = $target_dd_props
# We must filter out unpredictable values such as root page no and ids.
# This simple filter will remove a bit more than strictly necessary.
--let $filter = id|root|MYSQLD_VERSION_LO
--source include/dd_schema_dd_properties.inc
--echo ########################################################################
--echo # Stop the running server.
--echo ########################################################################
--let $shutdown_server_timeout= 300
--source include/shutdown_mysqld.inc
--echo ########################################################################
--let $VERSION = 57022
--echo # Test upgrade from $VERSION.
--echo ########################################################################
--source include/dd_schema_definition_after_upgrade_debug.inc
--echo ########################################################################
--echo # Cleanup: Remove definition files and restart with default options.
--echo ########################################################################
--remove_file $target_table_defs
--remove_file $target_dd_props
let $restart_parameters =;
--source include/start_mysqld.inc