218 lines
9.3 KiB
Plaintext
218 lines
9.3 KiB
Plaintext
# Set different paths for --datadir
|
|
###########################################################################
|
|
# Stop the default mtr server
|
|
###########################################################################
|
|
# Stop DB server which was created by MTR default
|
|
###########################################################################
|
|
# Setup the 5.7 data directory
|
|
###########################################################################
|
|
# Copy the remote tablespace & DB zip files from suite location to working location.
|
|
# Check that the file exists in the working folder.
|
|
# Unzip the zip file.
|
|
# These files are added to test error scenario, delete from for upgrade testing.
|
|
# Remove myisam partitioned tables. There are used for negative testing.
|
|
###########################################################################
|
|
# Test the --upgrade=NONE option with a 5.7 data directory
|
|
###########################################################################
|
|
# Search for the error messege in the server error log.
|
|
Pattern "Server shutting down because upgrade is required, yet prohibited by the command line option \'--upgrade=NONE\'\." found
|
|
###########################################################################
|
|
# Test the --upgrade=MINIMAL option with a 5.7 data directory
|
|
###########################################################################
|
|
# Search for the error messege in the server error log.
|
|
Pattern "Table \'mysql.component\' doesn\'t exist" found
|
|
Pattern "The mysql\.component table is missing or has an incorrect definition\." found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.user\]" found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.db\]\." found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.tables_priv\]\." found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.columns_priv\]\." found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.procs_priv\]\." found
|
|
Pattern "Storage engine \'MyISAM\' does not support system tables\. \[mysql\.proxies_priv\]\." found
|
|
Pattern "Column count of mysql\.user is wrong\. Expected 51, found 45\. The table is probably corrupted" found
|
|
Pattern "The current layout of the ACL tables does not conform to the server\'s expected layout" found
|
|
Pattern "ACL table mysql\.role_edges missing\. Some operations may fail\." found
|
|
Pattern "ACL table mysql\.default_roles missing\. Some operations may fail\." found
|
|
Pattern "ACL table mysql\.global_grants missing\. Some operations may fail\." found
|
|
Pattern "ACL table mysql\.password_history missing\. Some operations may fail\." found
|
|
Pattern "The system table mysql\.global_grants is missing. Please perform the MySQL upgrade procedure\." found
|
|
Pattern "System table \'func\' is expected to be transactional\." found
|
|
Pattern "Info table is not ready to be used\. Table \'mysql.slave_master_info\' cannot be opened\." found
|
|
Pattern "Error in checking mysql\.slave_master_info repository info type of TABLE\." found
|
|
Pattern "Error creating master info\: Error checking repositories\." found
|
|
Pattern "Slave: Failed to initialize the master info structure for channel \'\'; its record may still be present in \'mysql.slave_master_info\' table, consider deleting it\." found
|
|
Pattern "Failed to create or recover replication info repositories\." found
|
|
Pattern "Server upgrade is required, but skipped by command line option \'--upgrade=MINIMAL\'\." found
|
|
###########################################################################
|
|
# Test the --upgrade=NONE option with a 5.7 data directory with upgraded
|
|
# data dictionary but skipped server upgrade
|
|
###########################################################################
|
|
# Search for the error messege in the server error log.
|
|
Pattern "Server shutting down because upgrade is required, yet prohibited by the command line option \'--upgrade=NONE\'\." found
|
|
###########################################################################
|
|
# Complete the upgrade on a data directory that has an upgraded data
|
|
# dictionary but skipped server upgrade
|
|
###########################################################################
|
|
# There should be no errors
|
|
Pattern "\[ERROR\]" not found
|
|
###########################################################################
|
|
# Test upgrade of help tables
|
|
###########################################################################
|
|
# Truncate a help table
|
|
TRUNCATE TABLE mysql.help_topic;
|
|
SELECT COUNT(*) = 0 FROM mysql.help_topic;
|
|
COUNT(*) = 0
|
|
1
|
|
# restart: --upgrade=FORCE --log-error=MYSQLD_LOG
|
|
SELECT COUNT(*) != 0 FROM mysql.help_topic;
|
|
COUNT(*) != 0
|
|
1
|
|
###########################################################################
|
|
# Cleanup
|
|
###########################################################################
|
|
###########################################################################
|
|
# Setup 5.7 data directory
|
|
###########################################################################
|
|
# Copy the remote tablespace & DB zip files from suite location to working location.
|
|
# Check that the file exists in the working folder.
|
|
# Unzip the zip file.
|
|
# These files are added to test error scenario, delete from for upgrade testing.
|
|
# Remove myisam partitioned tables. There are used for negative testing.
|
|
###########################################################################
|
|
# Test complete upgrade on 5.7 data directory
|
|
###########################################################################
|
|
# There should be no errors
|
|
Pattern "\[ERROR\]" not found
|
|
###########################################################################
|
|
# Bug#29365552: LEFTOVER SYSTEM TABLES AFTER 5.7 => 8.0 IN-PLACE UPGRADE
|
|
###########################################################################
|
|
general_log.CSM
|
|
general_log.CSV
|
|
general_log_XXX.sdi
|
|
slow_log.CSM
|
|
slow_log.CSV
|
|
slow_log_XXX.sdi
|
|
###########################################################################
|
|
# Cleanup
|
|
###########################################################################
|
|
###########################################################################
|
|
# Bug#29791350: NON-INSTALL IN-PLACE UPGRADE FAILING FROM 5.7.25 TO 8.0.16
|
|
###########################################################################
|
|
###########################################################################
|
|
# Cleanup
|
|
###########################################################################
|
|
###########################################################################
|
|
# Bug#29996434: 8.0.16 AUTO- UPGRADE CAPTURES WRONG AUTO_INCREMENT VALUES FOR TABLE METADATA
|
|
###########################################################################
|
|
SELECT table_name, Auto_increment FROM INFORMATION_SCHEMA.tables WHERE table_schema='test';
|
|
TABLE_NAME AUTO_INCREMENT
|
|
t1 3
|
|
t2 3
|
|
t3 NULL
|
|
SHOW CREATE TABLE test.t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` int(11) NOT NULL AUTO_INCREMENT,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
|
SHOW CREATE TABLE test.t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`t1_ref` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `t1_ref` (`t1_ref`),
|
|
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_ref`) REFERENCES `t1` (`a`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
|
SHOW CREATE TABLE test.t3;
|
|
Table Create Table
|
|
t3 CREATE TABLE `t3` (
|
|
`id` int(11) DEFAULT NULL,
|
|
`t1_ref` int(11) DEFAULT NULL,
|
|
KEY `t1_ref` (`t1_ref`),
|
|
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`t1_ref`) REFERENCES `t1` (`a`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
SELECT * FROM test.t1;
|
|
a
|
|
1
|
|
2
|
|
INSERT INTO test.t1 VALUES(NULL);
|
|
SELECT * FROM test.t1;
|
|
a
|
|
1
|
|
2
|
|
3
|
|
SELECT * FROM test.t2;
|
|
id t1_ref
|
|
1 1
|
|
2 2
|
|
INSERT INTO test.t2 VALUES(NULL, 1);
|
|
SELECT * FROM test.t2;
|
|
id t1_ref
|
|
1 1
|
|
3 1
|
|
2 2
|
|
SELECT * FROM test.t3;
|
|
id t1_ref
|
|
INSERT INTO test.t3 VALUES(1, 1);
|
|
SELECT * FROM test.t3;
|
|
id t1_ref
|
|
1 1
|
|
SELECT table_name, Auto_increment FROM INFORMATION_SCHEMA.tables WHERE table_schema='test';
|
|
TABLE_NAME AUTO_INCREMENT
|
|
t1 3
|
|
t2 3
|
|
t3 NULL
|
|
SHOW CREATE TABLE test.t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` int(11) NOT NULL AUTO_INCREMENT,
|
|
PRIMARY KEY (`a`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
|
SHOW CREATE TABLE test.t2;
|
|
Table Create Table
|
|
t2 CREATE TABLE `t2` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`t1_ref` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `t1_ref` (`t1_ref`),
|
|
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_ref`) REFERENCES `t1` (`a`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
|
SHOW CREATE TABLE test.t3;
|
|
Table Create Table
|
|
t3 CREATE TABLE `t3` (
|
|
`id` int(11) DEFAULT NULL,
|
|
`t1_ref` int(11) DEFAULT NULL,
|
|
KEY `t1_ref` (`t1_ref`),
|
|
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`t1_ref`) REFERENCES `t1` (`a`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
SELECT * FROM test.t1;
|
|
a
|
|
1
|
|
2
|
|
INSERT INTO test.t1 VALUES(NULL);
|
|
SELECT * FROM test.t1;
|
|
a
|
|
1
|
|
2
|
|
5
|
|
SELECT * FROM test.t2;
|
|
id t1_ref
|
|
1 1
|
|
2 2
|
|
INSERT INTO test.t2 VALUES(NULL, 1);
|
|
SELECT * FROM test.t2;
|
|
id t1_ref
|
|
1 1
|
|
5 1
|
|
2 2
|
|
SELECT * FROM test.t3;
|
|
id t1_ref
|
|
INSERT INTO test.t3 VALUES(1, 1);
|
|
SELECT * FROM test.t3;
|
|
id t1_ref
|
|
1 1
|
|
###########################################################################
|
|
# Cleanup
|
|
###########################################################################
|
|
# restart:
|