polardbxengine/mysql-test/suite/xengine_main/t/mysql_upgrade.test

74 lines
2.2 KiB
Plaintext

-- source include/no_valgrind_without_big.inc
--source include/mysql_upgrade_preparation.inc
#
# Bug #28547424 - MYSQL_UPGRADE FAILES WITH SYNTAX ERROR ON INPLACE FROM 5.7 TO 8.0
#
--let $sql_mode_old= `SELECT @@sql_mode`
--let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/mysql_upgrade_test.log
--replace_result $MYSQLD_LOG MYSQLD_LOG
--let $restart_parameters = restart:--upgrade=FORCE --sql-mode=$sql_mode_old,ANSI_QUOTES --log-error=$MYSQLD_LOG
--let $wait_counter= 10000
--source include/restart_mysqld.inc
--echo # There should be no errors
--let SEARCH_FILE= $MYSQLD_LOG
--let SEARCH_PATTERN= \[ERROR\]
--source include/search_pattern.inc
--remove_file $MYSQLD_LOG
--echo # Restart server with defaults
--let $restart_parameters = restart:
--source include/restart_mysqld.inc
--echo #
--echo # Bug #27549249: MYSQL_UPGRADE FAILED TO CHANGE @@SESSION.SQL_LOG_BIN
--echo # WHEN AUTOCOMMIT IS OFF
--echo #
# Filter out ndb_binlog_index to mask differences due to running with or
# without ndb.
--let $restart_parameters = restart:--upgrade=FORCE --autocommit=0
--let $wait_counter= 10000
--source include/restart_mysqld.inc
--echo # Restart server with defaults
--let $restart_parameters = restart:
--source include/restart_mysqld.inc
--echo #
--echo # Bug #28392985: SESSION USER DOES NOT HAVE PRIV SESSION_VARIABLES_ADMIN IN UPGRADED DATABASE
--echo #
SHOW GRANTS FOR "mysql.session"@localhost;
REVOKE SESSION_VARIABLES_ADMIN ON *.* FROM "mysql.session"@localhost;
# Filter out ndb_binlog_index to mask differences due to running with or
# without ndb.
--let $restart_parameters = restart:--upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc
--echo # Must have SESSION_VARIABLES_ADMIN;
SHOW GRANTS FOR "mysql.session"@localhost;
--echo #
--echo # Bug #28855207: 8.0.13 - MYSQL_UPGRADE FAILS DUE TO PRIMARY KEY ERROR WITHOUT STATING THE TABLE
--echo #
--let restart_parameters=restart: --sql_require_primary_key=1 --upgrade=FORCE
--let $wait_counter= 10000
--source include/restart_mysqld.inc
let $restart_parameters = restart: ;
--source include/restart_mysqld.inc
--source include/mysql_upgrade_cleanup.inc
--echo
--echo End of tests
--source suite/xengine/include/check_xengine_log_error.inc