Skip to content

Commit

Permalink
PS-9218: Merge MySQL 8.4.0 (MTR test fixes)
Browse files Browse the repository at this point in the history
https://perconadev.atlassian.net/browse/PS-9218

- Remove enable/disbale_reconnect usages.
- Replication related terminilogy changes.
- Remove percona.bug1380010 test. It is outdated after changes in
  mysql/mysql-server@8fbd2c7.
  There is a test to check same issue added in mysql/mysql-server@81f812b.
- Updated mysqldump_innodb_optimize_keys to use UNIQUE KEY for
  innodb-optimize-keys check as a result of mysql/mysql-server@3a3a079
  • Loading branch information
oleksandr-kachan committed Jun 26, 2024
1 parent ae626a3 commit 925c404
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 133 deletions.
1 change: 0 additions & 1 deletion mysql-test/include/send_kill_to_mysqld.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ if ($_kill_signal == '')
--source include/expect_crash.inc

# Kill the connected server
--disable_reconnect
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
--let KILL_SIGNAL = $_kill_signal
--perl
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/include/binlog_utils_udf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ FLUSH BINARY LOGS;
--let $stage = 1
while($stage <= $number_of_stages)
{
--let $binlog_file_name = query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_file_name = query_get_value(SHOW BINARY LOG STATUS, File, 1)

--let $substage = 1
while($substage <= $number_of_substages)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
--echo # Tests for kill_idle_transaction feature that do not depend on transactional SEs
--echo #

--disable_query_log
call mtr.add_suppression("IO-layer timeout before wait_timeout was reached");
--enable_query_log

CREATE TABLE t1 (a INT) ENGINE=MyISAM;

let $saved_kill_idle_transaction= `SELECT @@kill_idle_transaction`;
Expand All @@ -24,9 +28,7 @@ sleep 2;

--echo # Current connection idle transaction killed, reconnecting
--source include/wait_until_disconnected.inc
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect

--echo # With a low wait_timeout and high kill_idle_transaction the lower value takes precedence
SET GLOBAL kill_idle_transaction= 100000;
Expand All @@ -36,9 +38,7 @@ BEGIN;
sleep 6;
--echo # Current connection idle transaction killed, reconnecting
--source include/wait_until_disconnected.inc
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect

--echo # Cleanup
DROP TABLE t1;
Expand Down
40 changes: 0 additions & 40 deletions mysql-test/suite/percona/r/bug1380010.result

This file was deleted.

2 changes: 1 addition & 1 deletion mysql-test/suite/percona/r/bug74778.result
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ RENAME TABLE mysql.procs_priv TO procs_priv_backup;
SHOW grants;
Grants for root@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION
GRANT ALLOW_NONEXISTENT_DEFINER,APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_ANY_DEFINER,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,TRANSACTION_GTID_TAG,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION
GRANT ALLOW_NONEXISTENT_DEFINER,APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_PRIVILEGES,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,OPTIMIZE_LOCAL_TABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_ANY_DEFINER,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,TRANSACTION_GTID_TAG,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION
GRANT PROXY ON ``@`` TO `root`@`localhost` WITH GRANT OPTION
RENAME TABLE procs_priv_backup TO mysql.procs_priv;
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/r/innodb_version.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SELECT @@innodb_version;
@@innodb_version
8.3.x-x
8.4.x-x
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ DROP TABLE t1;
CREATE TABLE `t1` (
`id` int DEFAULT NULL,
`a` int DEFAULT NULL,
KEY (`id`),
UNIQUE KEY (`id`),
FOREIGN KEY (`a`) REFERENCES `t1` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
Expand Down Expand Up @@ -805,7 +805,7 @@ LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES (1,1),(2,2),(3,3),(4,NULL),(NULL,4);
ALTER TABLE `t1`
ADD KEY `id` (`id`),
ADD UNIQUE KEY `id` (`id`),
ADD KEY `a` (`a`);
ALTER TABLE `t1` ADD CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`id`);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# restart: --skip-name-resolve --admin-address=::ffff:127.0.0.1 --admin_port=ADMIN_PORT --admin-ssl=OFF --proxy_protocol_networks=*
# restart: --skip-name-resolve --admin-address=::ffff:127.0.0.1 --admin_port=ADMIN_PORT --admin-tls-version= --proxy_protocol_networks=*
# An unproxied client connection should be accepted when connection to an extra_port if proxying enabled on the server
SHOW GLOBAL STATUS LIKE 'Threads_connected';
Variable_name Value
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/r/ssl_bug75311.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
SHOW STATUS LIKE 'Ssl_cipher_list';
Variable_name Value
Ssl_cipher_list DHE-RSA-AES256-SHA
Ssl_cipher_list ECDHE-RSA-AES128-GCM-SHA256
1 change: 0 additions & 1 deletion mysql-test/suite/percona/t/aborted_clients.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME=

# Kill a connection, check that aborted_clients is incremented
connect(con2,localhost,root,,);
--disable_reconnect
--error ER_QUERY_INTERRUPTED
KILL CONNECTION_ID();
disconnect con2;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/percona/t/backup_safe_binlog_info.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ INSERT INTO t1 VALUES (1);
CREATE TABLE t2(a INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES(2);

--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
--let $binlog_file= query_get_value(SHOW BINARY LOG STATUS, File, 1)
--let $binlog_pos= query_get_value(SHOW BINARY LOG STATUS, Position, 1)

LOCK TABLES FOR BACKUP;

Expand Down
60 changes: 0 additions & 60 deletions mysql-test/suite/percona/t/bug1380010.test

This file was deleted.

3 changes: 1 addition & 2 deletions mysql-test/suite/percona/t/bug_ps1095.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ CREATE TABLE t1 (i int);
--sleep 9
--source include/wait_until_disconnected.inc


--enable_reconnect
--connect
--connection default
DROP TABLE t1;

1 change: 0 additions & 1 deletion mysql-test/suite/percona/t/change_user_notembedded.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SELECT "A testcase needs at leat one query executed";
--source include/count_sessions.inc
connect (test,localhost,root,,);
connection test;
--enable_reconnect
--error ER_ACCESS_DENIED_ERROR,CR_SERVER_GONE_ERROR,CR_SERVER_LOST
change_user foo,bar;
--error ER_ACCESS_DENIED_ERROR,CR_SERVER_GONE_ERROR,CR_SERVER_LOST
Expand Down
1 change: 0 additions & 1 deletion mysql-test/suite/percona/t/failed_auth_3909.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ change_user u1;

--error ER_ACCESS_DENIED_ERROR
change_user u2;
--enable_reconnect

--error ER_ACCESS_DENIED_ERROR
change_user u2,password;
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/percona/t/group_commit_crash.test
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ while ($numinserts)
INSERT INTO t2(a, b, c, d) VALUES ('a', 'b', 'c', 'd');
}

--enable_reconnect

while ($numtests)
{
RESET BINARY LOGS AND GTIDS;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/t/innodb_version.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Bug #917246: Unintentional change of innodb_version format in 5.1.60
########################################################################

--replace_regex /8\.3\.[0-9]+-[0-9]+/8.3.x-x/
--replace_regex /8\.4\.[0-9]+-[0-9]+/8.4.x-x/
SELECT @@innodb_version;
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/t/mysqlbinlog_ssl_compress.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RESET BINARY LOGS AND GTIDS;

create table t1 (word varchar(20));

--let $binlog_start_pos=query_get_value(SHOW MASTER STATUS, Position, 1)
--let $binlog_start_pos=query_get_value(SHOW BINARY LOG STATUS, Position, 1)
# simple test for simple statement and various events
insert into t1 values ("abirvalg");
flush logs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ DROP TABLE t1;
CREATE TABLE `t1` (
`id` int DEFAULT NULL,
`a` int DEFAULT NULL,
KEY (`id`),
UNIQUE KEY (`id`),
FOREIGN KEY (`a`) REFERENCES `t1` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Expand Down
3 changes: 2 additions & 1 deletion mysql-test/suite/percona/t/proxy_protocol_admin_port.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
--source include/have_ipv4_mapped.inc
--source include/add_extra_root_users.inc
--source include/count_sessions.inc
--source include/suppress_tls_off.inc

--let $PORT_OFFSET = 100
--expr $ADMIN_PORT = $MASTER_MYPORT + $PORT_OFFSET
--let $restart_parameters=restart: --skip-name-resolve --admin-address=::ffff:127.0.0.1 --admin_port=$ADMIN_PORT --admin-ssl=OFF --proxy_protocol_networks=*
--let $restart_parameters=restart: --skip-name-resolve --admin-address=::ffff:127.0.0.1 --admin_port=$ADMIN_PORT --admin-tls-version= --proxy_protocol_networks=*
--replace_result $ADMIN_PORT ADMIN_PORT
--source include/restart_mysqld.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/t/ssl_bug75311-master.opt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# --ssl-cipher= - we need only this TLSv1.2 cipher
# --tls-version= - server accepts only TLSv1.2

--ssl-cipher=DHE-RSA-AES256-SHA --tls-ciphersuites= --tls-version=TLSv1.2
--ssl-cipher=ECDHE-RSA-AES128-GCM-SHA256 --tls-ciphersuites= --tls-version=TLSv1.2
2 changes: 0 additions & 2 deletions mysql-test/suite/percona/t/tc-heuristic-recover.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ COMMIT;
--error 1
--exec $MYSQLD_CMD --tc-heuristic-recover=ROLLBACK --console > $restart_log 2>&1
--exec echo "restart" > $restart_file
--enable_reconnect
--source include/wait_until_connected_again.inc

--echo 2 should be absent:
Expand All @@ -39,7 +38,6 @@ COMMIT;
--error 1
--exec $MYSQLD_CMD --tc-heuristic-recover=COMMIT --console >> $restart_log 2>&1
--exec echo "restart" > $restart_file
--enable_reconnect
--source include/wait_until_connected_again.inc

--echo 2 should be absent due to COMMIT to ROLLBACK conversion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ sleep 2;

--echo # Current connection idle transaction killed, reconnecting
--source include/wait_until_disconnected.inc
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
SELECT * FROM t1;

--echo #
--echo # Test that row locks are released on idle transaction kill
--echo #

--disable_query_log
call mtr.add_suppression("IO-layer timeout before wait_timeout was reached");
--enable_query_log

SET GLOBAL kill_idle_transaction= 2;

--connect (conn1,localhost,root,,)
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/percona_innodb/t/bug64663.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ SET debug="+d,crash_innodb_add_index_after";
--error CR_SERVER_LOST
ALTER TABLE t1 ADD INDEX (b);

--enable_reconnect

--source include/wait_until_connected_again.inc

# Ignore ndb_binlog_index to have same results not depending on whether NDB is enabled or not
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/t/auth_rpl.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug
--echo # Cleanup (on slave).
--source include/rpl/stop_replica.inc
--replace_column 2 ####
eval CHANGE REPLICATION SOURCE TO SOURCE_USER='$master_user', SOURCE_PASSWORD='';
eval CHANGE REPLICATION SOURCE TO SOURCE_USER='$source_user', SOURCE_PASSWORD='';
DROP USER 'plug_user';

--echo # Cleanup (on master).
Expand Down

0 comments on commit 925c404

Please sign in to comment.