Skip to content

Commit

Permalink
PS-9453: percona_telemetry causes a long wait on COND_thd_list due to…
Browse files Browse the repository at this point in the history
… the absence of the root user

https://perconadev.atlassian.net/browse/PS-9453

Post push fix.

During the installation of Percona Telemetry Component we grant
'mysql.session' user with additional privileges.
It happens during the server startup, so servers started during the test
will have related timestamps different in general.
Some tests (e.g. clone plugin related) restore the clone instance state
by cloning the donor. In such a case restored instance will have
different timestamps at the beginning and the end of the test and MTR
check will complain because of different tables checksums.

Workaround this problem by excluding mysql.tables_priv from checksum
calculation. Instead, dump all tables privileges but without TIMESTAMP
column.

This is the same approach as for INFORMATION_SCHEMA.ROUTINES.
  • Loading branch information
kamil-holubicki committed Oct 23, 2024
1 parent 66b2a91 commit 9078f2d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mysql-test/include/mtr_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ BEGIN
AND USER NOT IN ('unauthenticated user','mysql.session', 'event_scheduler')
ORDER BY COMMAND;

-- During the installation of Percona Telemetry Component we grant 'mysql.session' user with additional privileges.
-- It happens during the server startup, so servers started during the test will have related timestamps different in general.
-- Some tests (e.g. clone plugin related) restore the clone instance state by cloning the donor. In such a case restored
-- instance will have different timestamps at the beginning and the end of the test and MTR check will complain because of
-- different tables checksums.
-- Workaround this problem by excluding mysql.tables_priv from checksum calculation.
-- Instead, dump all tables privileges but without TIMESTAMP column.
-- This is the same approach as for INFORMATION_SCHEMA.ROUTINES above.
SELECT /*+SET_VAR(use_secondary_engine=OFF)*/ host, db, user, table_name, grantor, table_priv, column_priv
FROM mysql.tables_priv ORDER BY host, db, user, table_name;

-- Checksum system tables to make sure they have been properly
-- restored after test.
-- skip mysql.proc however, as created timestamps may have been updated by
Expand Down Expand Up @@ -238,7 +249,6 @@ BEGIN
mysql.replication_group_member_actions,
mysql.role_edges,
mysql.slow_log,
mysql.tables_priv,
mysql.time_zone,
mysql.time_zone_leap_second,
mysql.time_zone_name,
Expand Down

0 comments on commit 9078f2d

Please sign in to comment.