256 lines
10 KiB
Plaintext
256 lines
10 KiB
Plaintext
--echo # This test scripts covers upgrade of tables, views, tablespaces,
|
|
--echo # events, stored routines and triggers from 5.7 to 8.0.
|
|
|
|
--echo # Set different paths for --datadir
|
|
let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data57;
|
|
|
|
--echo # Stop DB server which was created by MTR default
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--source include/shutdown_mysqld.inc
|
|
|
|
--echo # Copy the remote tablespace & DB zip files from suite location to working location.
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/data57.zip $MYSQL_TMP_DIR/data57.zip
|
|
|
|
--echo # Check that the file exists in the working folder.
|
|
--file_exists $MYSQL_TMP_DIR/data57.zip
|
|
|
|
--echo # Unzip the zip file.
|
|
--exec unzip -qo $MYSQL_TMP_DIR/data57.zip -d $MYSQL_TMP_DIR
|
|
|
|
--echo # Create a bootstrap file in temp location
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
--exec echo $MYSQL_TMP_DIR/bootstrap.log
|
|
|
|
--echo # Copy mismatch .frms to test_mismatch dir
|
|
--copy_files_wildcard $MYSQL_TMP_DIR/data57/mismatch_frms/ $MYSQL_TMP_DIR/data57/test_mismatch/ *
|
|
|
|
--echo # Copy pre 5.0 decimal files to test dir
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/41_decimal.frm $MYSQL_TMP_DIR/data57/test/41_decimal.frm
|
|
|
|
--echo # Starting the DB server will fail since the data dir contains
|
|
--echo # tables with non native partitioning.
|
|
let MYSQLD_LOG= $MYSQL_TMP_DIR/server.log;
|
|
--error 1
|
|
--exec $MYSQLD --no-defaults $extra_args --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=$MYSQLD_LOG --datadir=$MYSQLD_DATADIR1
|
|
|
|
let SEARCH_FILE= $MYSQLD_LOG;
|
|
--let SEARCH_PATTERN= Unknown storage engine 'partition'
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Table upgrade required for `test`.`41_decimal`. Please dump/reload table to fix it!
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in creating TABLE_SHARE from p4_hash.frm file.
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t1_col_name
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t2_col_type
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t3_col_num
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t4_index_name
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t5_index_cols
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t6_indexes_num
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t7_indexes_unique
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t8_col_type_nulls
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for test_mismatch.t9_index_prefix_len
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Table mismatch_frms/t1_col_name is not found in InnoDB dictionary
|
|
--source include/search_pattern.inc
|
|
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # Check upgrade of tablespaces with a missing tablespace file.
|
|
--echo # ------------------------------------------------------------------
|
|
|
|
--echo # Upgrade fails for the case where the general tablespace file is removed.
|
|
--remove_file $MYSQL_TMP_DIR/data57/test_tablespace_2.ibd
|
|
--error 1
|
|
--exec $MYSQLD --no-defaults $extra_args --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=$MYSQLD_LOG --datadir=$MYSQLD_DATADIR1
|
|
|
|
--let SEARCH_PATTERN= Error in fixing SE data for tablespace.t3
|
|
--source include/search_pattern.inc
|
|
|
|
--echo # Upgrade fails for the case where the file per tablespace is removed.
|
|
--remove_file $MYSQL_TMP_DIR/data57/test/parent.ibd
|
|
|
|
--error 1
|
|
--exec $MYSQLD --no-defaults $extra_args --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=$MYSQLD_LOG --datadir=$MYSQLD_DATADIR1
|
|
|
|
--let SEARCH_PATTERN= Got error 197 from SE while migrating tablespaces
|
|
--source include/search_pattern.inc
|
|
|
|
--echo # Remove copied files
|
|
#--remove_file $MYSQLD_LOG
|
|
--remove_file $MYSQL_TMP_DIR/data57.zip
|
|
--force-rmdir $MYSQL_TMP_DIR/data57
|
|
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # Check upgrade of tables and stored programs using long enum elements.
|
|
--echo # ------------------------------------------------------------------
|
|
|
|
--echo # Set different path for --datadir
|
|
let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data57_enum;
|
|
|
|
--echo # DB server which was started above is not running, no need for shutdown
|
|
|
|
--echo # Copy the remote tablespace & DB zip files from suite location to working location.
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/data57_enum.zip $MYSQL_TMP_DIR/data57_enum.zip
|
|
|
|
--echo # Check that the file exists in the working folder.
|
|
--file_exists $MYSQL_TMP_DIR/data57_enum.zip
|
|
|
|
--echo # Unzip the zip file.
|
|
--exec unzip -qo $MYSQL_TMP_DIR/data57_enum.zip -d $MYSQL_TMP_DIR
|
|
|
|
# Copy .frm file with generated column containing removed function.
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/t_gcol_dep.frm $MYSQL_TMP_DIR/data57_enum/test/t_gcol_dep.frm
|
|
|
|
--echo #
|
|
--echo # BUG#26743291 : VIEW WITH EXPLICIT COLUMN NAME > 64 IS MARKED
|
|
--echo # INVALID WHEN UPGRADED TO 8.0.
|
|
|
|
--write_file $MYSQL_TMP_DIR/data57_enum/test/v1.frm
|
|
TYPE=VIEW
|
|
query=select 1 AS `a123456789012345678901234567890123456789012345678901234567890123456789`
|
|
md5=fc83a6c1fde1c4183a3c24c91751f36f
|
|
updatable=0
|
|
algorithm=0
|
|
definer_user=root
|
|
definer_host=localhost
|
|
suid=2
|
|
with_check_option=0
|
|
timestamp=2017-10-20 06:39:41
|
|
create-version=1
|
|
source=select 1
|
|
client_cs_name=utf8
|
|
connection_cl_name=utf8_general_ci
|
|
view_body_utf8=select 1 AS `a123456789012345678901234567890123456789012345678901234567890123456789`
|
|
EOF
|
|
|
|
--echo # Starting the DB server will fail since the data dir contains
|
|
--echo # a table and a stored program with a too long enum literals.
|
|
let MYSQLD_LOG= $MYSQL_TMP_DIR/server.log;
|
|
--error 1
|
|
--exec $MYSQLD --no-defaults $extra_args --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=$MYSQLD_LOG --datadir=$MYSQLD_DATADIR1
|
|
|
|
--let SEARCH_PATTERN= Error in Creating DD entry for test.t_long_enum
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in creating stored program 'test.p_long_enum'
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in processing generated columns for table test.t_gcol_dep
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= No database selected
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Incorrect column name 'a123456789012345678901234567890123456789012345678901234567890123456789'
|
|
--source include/search_pattern.inc
|
|
|
|
--echo # Remove copied files
|
|
--remove_file $MYSQLD_LOG
|
|
--remove_file $MYSQL_TMP_DIR/data57_enum.zip
|
|
--force-rmdir $MYSQL_TMP_DIR/data57_enum
|
|
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # Check upgrade from 5.7 when events/triggers/views/routines contain GROUP BY DESC.
|
|
--echo # ------------------------------------------------------------------
|
|
|
|
--echo # Set different path for --datadir
|
|
let $MYSQLD_DATADIR1 = $MYSQL_TMP_DIR/data57_upgrade_groupby_desc;
|
|
|
|
--echo # DB server which was started above is not running, no need for shutdown
|
|
|
|
--echo # Copy the remote tablespace & DB zip files from suite location to working location.
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/data57_upgrade_groupby_desc.zip $MYSQL_TMP_DIR/data57_upgrade_groupby_desc.zip
|
|
|
|
--echo # Check that the file exists in the working folder.
|
|
--file_exists $MYSQL_TMP_DIR/data57_upgrade_groupby_desc.zip
|
|
|
|
--echo # Unzip the zip file.
|
|
--exec unzip -qo $MYSQL_TMP_DIR/data57_upgrade_groupby_desc.zip -d $MYSQL_TMP_DIR
|
|
|
|
--echo #
|
|
--echo # Upgrade tests for WL#8693
|
|
--echo #
|
|
|
|
--echo # Starting the DB server will fail since the data dir contains
|
|
--echo # events/triggers/views/routines contain GROUP BY DESC
|
|
let MYSQLD_LOG= $MYSQL_TMP_DIR/server.log;
|
|
--error 1
|
|
--exec $MYSQLD --no-defaults $extra_args --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=$MYSQLD_LOG --datadir=$MYSQLD_DATADIR1
|
|
|
|
--let SEARCH_PATTERN= Trigger 'trigger_groupby_desc' has an error in its body
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in parsing Triggers from t1.TRG file
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in parsing Event 'test'.'event_groupby_desc' during upgrade
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in parsing Routine 'test'.'function_groupby_desc' during upgrade
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in parsing Routine 'test'.'procedure_groupby_desc' during upgrade
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Error in parsing View 'test'.'view_groupby_desc' during upgrade
|
|
--source include/search_pattern.inc
|
|
|
|
--let SEARCH_PATTERN= Failed to Populate DD tables.
|
|
--source include/search_pattern.inc
|
|
|
|
--echo # Remove copied files
|
|
--remove_file $MYSQLD_LOG
|
|
--remove_file $MYSQL_TMP_DIR/data57_upgrade_groupby_desc.zip
|
|
--force-rmdir $MYSQL_TMP_DIR/data57_upgrade_groupby_desc
|
|
|
|
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # Bug#28760011: UPGRADE TO 8.0.12 FAILS
|
|
--echo # Check upgrade from 5.7 when triggers are listed in wrong order in the TRG file.
|
|
--echo # ------------------------------------------------------------------
|
|
|
|
--echo # Set different path for log file and datadir, and unzip the zip file.
|
|
--let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/save_dd_upgrade_57_trigger_order.log
|
|
--let $MYSQLD_DATADIR_57 = $MYSQL_TMP_DIR/data57_upgrade_trigger_order
|
|
--exec unzip -qo $MYSQLTEST_VARDIR/std_data/data57_upgrade_trigger_order.zip -d $MYSQL_TMP_DIR
|
|
|
|
--echo # DB server which was started above is not running, no need for shutdown, just start
|
|
--echo # the server. This will not fail after the bugfix since the trigger order is now corrected.
|
|
--exec echo "restart: --datadir=$MYSQLD_DATADIR_57 --log-error-verbosity=3 --log-error=$MYSQLD_LOG --upgrade=MINIMAL" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--enable_reconnect
|
|
--let $wait_counter= 3000
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
--echo # Stop the server.
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--source include/shutdown_mysqld.inc
|
|
|
|
--echo # Remove the datadir, but keep the error log in case.
|
|
--force-rmdir $MYSQL_TMP_DIR/data57_upgrade_trigger_order
|
|
|
|
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # End-of-test cleanup.
|
|
--echo # ------------------------------------------------------------------
|
|
--echo # Restart the server with default options.
|
|
--source include/start_mysqld.inc
|