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

Adjusted MTR tests affected by the fix.
  • Loading branch information
kamil-holubicki committed Oct 11, 2024
1 parent 27468f8 commit ae464b1
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 14 deletions.
8 changes: 6 additions & 2 deletions mysql-test/r/grant.result
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,9 @@ show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql');
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_8'@'%' def test t1 UPDATE NO
'mysqltest_8'@'' def test t1 UPDATE NO
Expand All @@ -845,7 +847,9 @@ GRANT USAGE ON *.* TO `mysqltest_8`@``
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql');
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
flush privileges;
show grants for mysqltest_8@'';
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/r/information_schema_ci.result
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,9 @@ grant select (a) on test.t1 to joe@localhost with grant option;
select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE table_schema != 'sys';
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'joe'@'localhost' def test t1 a SELECT YES
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql');
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
drop view v1, v2, v3;
drop table t1;
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/r/information_schema_cs.result
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,9 @@ grant select (a) on test.t1 to joe@localhost with grant option;
select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE table_schema != 'sys';
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'joe'@'localhost' def test t1 a SELECT YES
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql');
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
drop view v1, v2, v3;
drop table t1;
Expand Down
8 changes: 6 additions & 2 deletions mysql-test/r/transactional_acl_tables.result
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,9 @@ SELECT host, db, user, table_name, column_name, column_priv FROM mysql.columns_p
host db user table_name column_name column_priv
h test u1 t1 a Select,Insert,Update,References
h test u1 t2 a Insert
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv
WHERE NOT (user = 'mysql.session'
AND table_name IN ('component', 'replication_group_members'));
host db user table_name grantor table_priv column_priv
h test u1 t1 root@localhost Select,Insert,Update,References
h test u1 t2 root@localhost Insert
Expand All @@ -1354,7 +1356,9 @@ COMMIT;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM u1@h;
SELECT host, db, user, table_name, column_name, column_priv FROM mysql.columns_priv;
host db user table_name column_name column_priv
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv
WHERE NOT (user = 'mysql.session'
AND table_name IN ('component', 'replication_group_members'));
host db user table_name grantor table_priv column_priv
localhost mysql mysql.session user root@localhost Select
localhost sys mysql.sys sys_config root@localhost Select
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/funcs_1/r/is_table_privileges.result
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ TABLE_NAME varchar(64) NO
PRIVILEGE_TYPE varchar(64) NO
IS_GRANTABLE varchar(3) NO
SELECT table_catalog, table_schema, table_name, privilege_type
FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL;
FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL
AND NOT (grantee = "'mysql.session'@'localhost'"
AND table_name IN ('component', 'replication_group_members'));
table_catalog table_schema table_name privilege_type
def mysql user SELECT
def sys sys_config SELECT
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/funcs_1/t/is_table_privileges.test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
# Show that TABLE_CATALOG is always NULL.
--sorted_result
SELECT table_catalog, table_schema, table_name, privilege_type
FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL;
FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL
AND NOT (grantee = "'mysql.session'@'localhost'"
AND table_name IN ('component', 'replication_group_members'));

--echo ######################################################################
--echo # Testcase 3.2.11.2+3.2.11.3+3.2.11.4:
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/log_first_rec_group-master.opt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--skip-log-bin
--skip-log-bin --loose-percona-telemetry-disable=ON
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--loose-percona-telemetry-disable=ON
8 changes: 6 additions & 2 deletions mysql-test/t/grant.test
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,9 @@ flush privileges;
show grants for mysqltest_8@'';
show grants for mysqltest_8;
--sorted_result
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql');
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
connect (conn5,localhost,mysqltest_8,,);
select * from t1;
disconnect conn5;
Expand All @@ -665,7 +667,9 @@ revoke update on t1 from mysqltest_8;
show grants for mysqltest_8@'';
show grants for mysqltest_8;
--sorted_result
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql');
select * from information_schema.table_privileges where table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));
flush privileges;
show grants for mysqltest_8@'';
show grants for mysqltest_8;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--loose-percona-telemetry-disable=ON
5 changes: 4 additions & 1 deletion mysql-test/t/information_schema_cs.test
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ select * from information_schema.views where table_schema !=
'sys' order by table_name;
grant select (a) on test.t1 to joe@localhost with grant option;
select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE table_schema != 'sys';
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql');
select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql')
and not (grantee = "'mysql.session'@'localhost'"
and table_name in ('component', 'replication_group_members'));

drop view v1, v2, v3;
drop table t1;
delete from mysql.user where user='joe';
Expand Down
1 change: 1 addition & 0 deletions mysql-test/t/mysql_upgrade-master.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--loose-percona-telemetry-disable=ON
8 changes: 6 additions & 2 deletions mysql-test/t/transactional_acl_tables.test
Original file line number Diff line number Diff line change
Expand Up @@ -1829,14 +1829,18 @@ CREATE TABLE t2 (a INT);
GRANT SELECT(a), UPDATE(a), INSERT(a), REFERENCES(a) ON t1 TO u1@h;
GRANT INSERT(a) ON t2 TO u1@h;
SELECT host, db, user, table_name, column_name, column_priv FROM mysql.columns_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv
WHERE NOT (user = 'mysql.session'
AND table_name IN ('component', 'replication_group_members'));
DELETE FROM mysql.columns_priv WHERE host = 'h' AND user = 'u1'
AND table_name = 't1';
COMMIT;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM u1@h;

SELECT host, db, user, table_name, column_name, column_priv FROM mysql.columns_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv;
SELECT host, db, user, table_name, grantor, table_priv, column_priv FROM mysql.tables_priv
WHERE NOT (user = 'mysql.session'
AND table_name IN ('component', 'replication_group_members'));
SHOW GRANTS FOR u1@h;

# Check whether on FLUSH PRIVILEGES the GRANT_TABLE::init handles OUT OF MEMORY
Expand Down

0 comments on commit ae464b1

Please sign in to comment.