Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/main/     Datei vom 1.9.2026 mit Größe 1 kB image not shown  

Quelle  deny_restart.result   Sprache: Lisp

 

#
# Check that privilege hashes are populated with DENY entries on startup
#
USE test;
CREATE TABLE t1 (id INT);
CREATE USER u@localhost;
GRANT SELECT ON test.t1 TO u@localhost;
DENY SELECT ON test.t1 TO u@localhost;
# Before restart: DENY is enforced
connect  con1, localhost, u,,;
SELECT * FROM test.t1;
ERROR 42000: SELECT command denied to user 'u'@'localhost' for table `test`.`t1`
disconnect con1;
connection default;
# Before restart: DENY is visible and persisted
SHOW GRANTS FOR u@localhost;
Grants for u@localhost
GRANT USAGE ON *.* TO `u`@`localhost`
GRANT SELECT ON `test`.`t1` TO `u`@`localhost`
DENY SELECT ON `test`.`t1` TO `u`@`localhost`
# Restart and verify again
# restart
SHOW GRANTS FOR u@localhost;
Grants for u@localhost
GRANT USAGE ON *.* TO `u`@`localhost`
GRANT SELECT ON `test`.`t1` TO `u`@`localhost`
DENY SELECT ON `test`.`t1` TO `u`@`localhost`
connect  con1, localhost, u,,;
SELECT * FROM test.t1;
ERROR 42000: SELECT command denied to user 'u'@'localhost' for table `test`.`t1`
disconnect con1;
connection default;
DROP USER u@localhost;
DROP TABLE test.t1;

Messung
CHZG
959610096

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland