Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/heap/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 11 kB image not shown  

Quelle  grant_revoke_current.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[170] ABAP[98] VDM[68]} [Methode: maximale Elemente, drei Dimensionen]

--source include/not_embedded.inc

--disable_cursor_protocol
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
--enable_cursor_protocol

--error ER_INVALID_ROLE
grant select on *.* to current_role;
--error ER_INVALID_ROLE
revoke select on *.* from current_role;
--error ER_INVALID_ROLE
revoke all, grant option from current_role;

create role r1;
grant insert on test.* to r1;
grant r1 to current_user;
set role r1;
select current_role();

grant select on *.* to current_role;
show grants for current_role;
revoke insert on test.* from current_role;
show grants for current_role;
revoke all, grant option from current_role;
show grants for current_role;

set password=password('foobar');
show grants;
grant r1 to current_user() identified by 'barfoo';
show grants;
set password='';

#cleanup
drop role r1;
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';

[zur Elbe Produktseite wechseln0.14QuellennavigatorsAnalyse erneut starten2026-10-08]