Skip to content

Commit

Permalink
PXC-4435: PXC 8.4.0 refresh - Q2 2024
Browse files Browse the repository at this point in the history
https://perconadev.atlassian.net/browse/PXC-4435

1. Addressed review comments
2. Galera repo pointer updated
  • Loading branch information
kamil-holubicki committed Sep 6, 2024
1 parent 76a49ef commit 58d4956
Show file tree
Hide file tree
Showing 12 changed files with 481 additions and 229 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "percona-xtradb-cluster-galera"]
path = percona-xtradb-cluster-galera
url = https://github.com/kamil-holubicki/galera
branch = PXC-4435-galera
url = https://github.com/percona/galera
branch = 4.x-8.0
[submodule "wsrep-lib"]
path = wsrep-lib
url = https://github.com/percona/wsrep-lib.git
Expand Down
4 changes: 0 additions & 4 deletions mysql-test/collections/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ innodb_undo.i_s_files_32k : BUG#3129 PXC requires 16k In
# innodb_gis
innodb_gis.gis_split_nan : BUG#3129 PXC requires 16k InnoDB page size (https://jira.percona.com/browse/PXC-3129)

# keyring tests
keyring_encrypted_file.keyring_migration_bugs @darwin : Bug#31041633

# Tests that run ALTER on the "mysql" database
innodb.mysql_ts_alter_encrypt_1 : BUG#29531106 - ATTACHABLE_TRX(): ASSERTION `!M_THD->TRANSACTION_ROLLBACK_REQUEST' FAILED
component_keyring_file.mysql_ts_alter_encrypt_1 : BUG#29531106 - ATTACHABLE_TRX(): ASSERTION `!M_THD->TRANSACTION_ROLLBACK_REQUEST' FAILED
Expand All @@ -94,7 +91,6 @@ component_keyring_file.mysql_ts_alter_encrypt_1 : BUG#29531106 - ATTACHABLE_TRX(
# main suite tests
main.initialize : BUG#3129 PXC requires 16k InnoDB page size (https://jira.percona.com/browse/PXC-3129)
main.ds_mrr-big @solaris : BUG#14168107 Test leads to timeout on Solaris on slow sparc servers.
main.gtid_next_xa_binlog_off : BUG#33650776 Failure of XA COMMIT of prepared txn, can result in txn rollback
main.print_stacktrace : Bug#36027494 Add mtr test for my_print_stacktrace

# Disabled due to InnoDB issues
Expand Down
1 change: 0 additions & 1 deletion mysql-test/include/mtr_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ BEGIN
'auto_increment_offset',
'auto_increment_increment',
'wsrep_data_home_dir',
'keyring_file_data',
'innodb_thread_sleep_delay')
ORDER BY VARIABLE_NAME;

Expand Down
4 changes: 3 additions & 1 deletion mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4492,6 +4492,7 @@ sub default_mysqld {
user => $opt_user,
password => '',
worker => DEFAULT_WORKER_ID,
bind_local => $opt_bind_local
});

my $mysqld = $config->group('mysqld.1') or
Expand Down Expand Up @@ -5353,7 +5354,8 @@ ($)
user => $opt_user,
vardir => $opt_vardir,
worker => $tinfo->{worker} ||
DEFAULT_WORKER_ID
DEFAULT_WORKER_ID,
bind_local => $opt_bind_local
});

# Write the new my.cnf
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/galera-x/t/prep_stmt_sundries.test
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ source ../include/wait_for_status_variables.inc;
--let $assert_cond= [SHOW GLOBAL STATUS LIKE "Prepared_stmt_count", Value, 1] = 0
--source include/assert.inc

# When Percona Telemetry is built-in it installs the component, which changes conters values
# When Percona Telemetry is built-in it installs the component, which changes counters values
--let $Com_stmt_prepare_expected = 11
--let $Com_stmt_execute_expected = 6
--let $Com_stmt_close_expected = 7
Expand Down
6 changes: 4 additions & 2 deletions mysql-test/suite/perfschema/r/dd_version_check.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"Checking the data dictionary properties ..."
SUBSTRING_INDEX(SUBSTRING(properties, LOCATE('PS_VERSION', properties), 30), ';', 1)
DATA DICTIONARY TAG
PS_VERSION=80300
DATA DICTIONARY VERSION
80300
"Checking the performance schema database structure ..."
CHECK STATUS
The tables in the performance_schema were last changed in MySQL 8.3.0
The tables in the performance_schema were last changed in MySQL 8.3.0, with a PFS_DD_VERSION = 80300
108 changes: 81 additions & 27 deletions mysql-test/suite/perfschema/t/dd_version_check.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,26 @@ drop procedure if exists test.pfs_check_proc;

SET SESSION debug= '+d,skip_dd_table_access_check';
SELECT SUBSTRING_INDEX(SUBSTRING(properties, LOCATE('PS_VERSION', properties), 30), ';', 1)
into @actual_dd_version_tag
FROM mysql.dd_properties;
SET SESSION debug= '-d,skip_dd_table_access_check';

SELECT @actual_dd_version_tag as "DATA DICTIONARY TAG";

SELECT SUBSTRING(@actual_dd_version_tag, 12) into @actual_dd_version;
SELECT @actual_dd_version as "DATA DICTIONARY VERSION";

SET @old_group_concat_max_len = @@group_concat_max_len;

# We need 1700 rows of varchar(64) concatenated
SET group_concat_max_len = 200000;

create table test.pfs_published_schema
(version varchar(20), signature varchar(64), primary key (version));
(version varchar(20) not null,
pfs_dd_version integer not null,
signature varchar(64) not null,
primary key (version),
unique key(pfs_dd_version));

#
# MAINTAINER:
Expand All @@ -35,11 +45,12 @@ create table test.pfs_published_schema
# database structure is detected, acting as a fail safe.
#
# If a change was intended, then:
# - (a) Go in storage/perfschema/pfs_dd_version.h
# - (a) Go in storage/perfschema/pfs_dd_version.h,
# find the declaration of variable PFS_DD_VERSION,
# and create a new version number for this release
# - (b) Add a row in table test.pfs_published_schema
# for the new schema published, using the signature
# of the new schema.
# for the new schema published, using the new PFS_DD_VERSION
# and the signature of the new schema.
#
# (a) will ensure that upgrades from old releases
# will notice the schema change, and upgrade
Expand All @@ -62,79 +73,89 @@ create table test.pfs_published_schema
# Keeping track of all signatures published in GA ...

insert into test.pfs_published_schema
values("MySQL 8.0.17",
values("MySQL 8.0.17", 80017,
"b77ece4deaa3c4676d817ed98c3cc33f5b1a08a001bf610a7d02fb52a42b613d");

insert into test.pfs_published_schema
values("MySQL 8.0.172",
values("MySQL 8.0.172", 800172,
"4b2535cee3a558d09b93caaa1fe9021da9e758ffcacd0922bea81ae9799175dc");

insert into test.pfs_published_schema
values("MySQL 8.0.18",
values("MySQL 8.0.18", 80018,
"1d6747d842bb2483c860cd7b28e886bdc6111ff61fd6b4d07e367aa7b3e9d9bf");

insert into test.pfs_published_schema
values("MySQL 8.0.19",
values("MySQL 8.0.19", 80019,
"f58dba20c4234c34cedfcacd3b9a295dcac77a09b79d5f41d5f740878f272d4d");

insert into test.pfs_published_schema
values("MySQL 8.0.20",
values("MySQL 8.0.20", 80020,
"a9aa0ab4a94ca91622145d735e60bbb03577616970351032d3194d8bfd7a69c7");

insert into test.pfs_published_schema
values("MySQL 8.0.21",
values("MySQL 8.0.21", 80021,
"112972e1f7d2b3a351a14979ecc3b419efc81e79dc029078a3a94955be218e5a");

insert into test.pfs_published_schema
values("MySQL 8.0.22",
values("MySQL 8.0.22", 80022,
"55f21a1c75161f414bb75eb0f46c24becf15232dcf3938d4c80bc3361ecdedea");

insert into test.pfs_published_schema
values("MySQL 8.0.23",
values("MySQL 8.0.23", 80023,
"6f3e7fc656953ea433e9c857619a3d5cb252bfc068291657c4b56acb7ef012e1");

insert into test.pfs_published_schema
values("MySQL 8.0.24",
values("MySQL 8.0.24", 80024,
"223d896eddc7fc8b25b622edbc714a3493ceffe4dd694595c833e693e19db41f");

insert into test.pfs_published_schema
values("MySQL 8.0.25",
values("MySQL 8.0.25", 80025,
"2c0f18a287586e591cf58a670c0768c72cf76b571173e7008e58fb59983fbd1f");

insert into test.pfs_published_schema
values("MySQL 8.0.27",
values("MySQL 8.0.27", 80027,
"69d5f4536bc649b4a198a5d135c1619817889aa9eae4a7d1c7d8f0e06d89a79f");

insert into test.pfs_published_schema
values("MySQL 8.0.28",
values("MySQL 8.0.28", 80028,
"493bc6b273f75ba7ace80a626a940757e2353dffabd52b6bde9781c938a2edcb");

insert into test.pfs_published_schema
values("MySQL 8.0.29",
values("MySQL 8.0.29", 80029,
"73a49507e32a69a288febb39895e45da17f9aa7409146431a4d1ee5d4639aebc");

insert into test.pfs_published_schema
values("MySQL 8.0.30",
values("MySQL 8.0.30", 80030,
"611d5a5a1e863c674f20a6afa078525c11b5b175dcb5b6537e1755e7923abe55");

insert into test.pfs_published_schema
values("MySQL 8.0.31",
values("MySQL 8.0.31", 80031,
"3f3b1274f3924c5874cbe6dd331ab14217ec89ff0b378fef2305c1d7e1918630");

insert into test.pfs_published_schema
values("MySQL 8.0.32",
values("MySQL 8.0.32", 80032,
"556baad25ce27574fea75370799eaca7877291d4b7b54c36e6ce54017bb4e927");

insert into test.pfs_published_schema
values("MySQL 8.0.33",
values("MySQL 8.0.33", 80033,
"1182e14dbd5a25625152b84217f967e8733fc599efbb6e7f1e193eb3bc083123");

insert into test.pfs_published_schema
values("MySQL 8.2.0",
values("MySQL 8.2.0", 80200,
"566f78af08ea40a489c9d7ccb0f398896f36d5bee49f621680b0fdf382660da4");

# MySQL 8.3.0 was incorrectly published with PFS_DD_VERSION 80200,
# which is a bug.
# The tooling now detects this, to prevent similar bugs:
#
# --error ER_DUP_ENTRY
# insert into test.pfs_published_schema
# values("MySQL 8.3.0", 80200,
# "This should have been caught in 8.3.0");

# Correct entry
insert into test.pfs_published_schema
values("MySQL 8.3.0",
values("MySQL 8.3.0", 80300,
"e76782448cff7ad04f95786b1eaf47604c50678d28ac9cdad3e57bbe84bcee93");

create table test.pfs_check_table
Expand All @@ -145,12 +166,13 @@ create table test.pfs_check_table

delimiter $$;

create procedure test.pfs_check_proc()
create procedure test.pfs_check_proc(actual_dd_version integer)
begin
declare whole_schema longtext;
declare max_length int;
declare found_signature varchar(64);
declare found_version varchar(20);
declare found_dd_version int;

insert into test.pfs_check_table(t)
select concat(CATALOG_NAME, "-",
Expand Down Expand Up @@ -234,7 +256,9 @@ begin

select SHA2(whole_schema, 256) into found_signature;

select version into found_version from test.pfs_published_schema
select version, pfs_dd_version
into found_version, found_dd_version
from test.pfs_published_schema
where signature = found_signature;

if found_version is null
Expand All @@ -249,6 +273,10 @@ begin
Make sure, by using now(), that this will not happen.
See the comments in the MAINTAINER section of this test.
*/

select "YOU MUST READ THE MAINTAINER NOTES IN THIS TEST."
as MAINTAINER_ACTION_NEEDED, NOW() as "NOW";

select concat("Unknown signature ",
found_signature,
", fix PFS_DD_VERSION now (",
Expand All @@ -259,8 +287,34 @@ begin
end;
end if;

if (actual_dd_version != found_dd_version)
then
begin
declare full_msg text;

/*
Booby trap: actually verify that the PFS_DD_VERSION
declared in table test.pfs_published_schema corresponds to reality,
that is, that is corresponds to the PS_VERSION
contained in the data dictionary on disk.
*/

select "YOU MUST READ THE MAINTAINER NOTES IN THIS TEST."
as MAINTAINER_ACTION_NEEDED, NOW() as "NOW";

select concat("Incoherent PFS_DD_VERSION ",
found_dd_version,
", fix PFS_DD_VERSION now (",
now(),
")") into full_msg;

signal sqlstate "50000" set message_text = full_msg;
end;
end if;

select concat("The tables in the performance_schema were last changed in ",
found_version) as "CHECK STATUS";
found_version, ", with a PFS_DD_VERSION = ",
found_dd_version) as "CHECK STATUS";

end
$$
Expand All @@ -269,7 +323,7 @@ delimiter ;$$

--echo "Checking the performance schema database structure ..."

call test.pfs_check_proc();
call test.pfs_check_proc(@actual_dd_version);

# Debug
# select count(*) from test.pfs_check_table;
Expand Down
Loading

0 comments on commit 58d4956

Please sign in to comment.