From a175314c3e5827eb193872241446f2f8f5c9d33c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:07:14 +0200 Subject: Adding upstream version 1:10.5.12. Signed-off-by: Daniel Baumann --- mysql-test/suite/roles/none_public.test | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mysql-test/suite/roles/none_public.test (limited to 'mysql-test/suite/roles/none_public.test') diff --git a/mysql-test/suite/roles/none_public.test b/mysql-test/suite/roles/none_public.test new file mode 100644 index 00000000..a0ec2315 --- /dev/null +++ b/mysql-test/suite/roles/none_public.test @@ -0,0 +1,55 @@ +source include/not_embedded.inc; + +create role role1; + +--error ER_INVALID_ROLE +create role none; +--error ER_INVALID_ROLE +create role public; +--error ER_CANNOT_USER +drop role none; + +--error ER_INVALID_ROLE +grant none to role1; +--error ER_INVALID_ROLE +grant role1 to none; +--error ER_INVALID_ROLE +grant select on *.* to none; +--error ER_INVALID_ROLE +grant public to role1; +--error ER_INVALID_ROLE +grant role1 to public; +--error ER_INVALID_ROLE +grant select on *.* to public; + +--error ER_INVALID_ROLE +grant role1 to current_role; + +--error ER_INVALID_ROLE +revoke none from role1; +--error ER_INVALID_ROLE +revoke role1 from none; +--error ER_INVALID_ROLE +revoke select on *.* from none; +--error ER_INVALID_ROLE +revoke public from role1; +--error ER_INVALID_ROLE +revoke role1 from public; +--error ER_INVALID_ROLE +revoke select on *.* from public; + +--error ER_INVALID_ROLE +show grants for none; +--error ER_INVALID_ROLE +show grants for public; + +--error ER_INVALID_ROLE +create definer=none view test.v1 as select 1; +--error ER_INVALID_ROLE +create definer=public view test.v1 as select 1; + +drop role role1; + +insert mysql.global_priv values ('', 'none', '{"is_role":true}'), ('', 'public', '{"is_role":true}'); +flush privileges; +delete from mysql.global_priv where host=''; -- cgit v1.2.3