Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  grant_kill.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[106] ADA[53] Haskell[53]} [Methode: maximale Elemente, drei Dimensionen]

-- source include/not_embedded.inc

--echo #
--echo # Start of 10.5 tests
--echo #

--echo #
--echo # MDEV-21743 Split up SUPER privilege to smaller privileges 
--echo #
--disable_service_connection

--echo #
--echo # Test that KILL is not allowed without CONNECTION ADMIN
--echo #

CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT ALL PRIVILEGES ON *.* TO bar@localhost;
REVOKE CONNECTION ADMIN ON *.* FROM bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--error ER_KILL_DENIED_ERROR
--eval KILL $id
--disconnect foo
--disconnect bar
--connection default
DROP USER foo@localhost;
DROP USER bar@localhost;

--echo #
--echo # Test that KILL is allowed with CONNECTION ADMIN
--echo #

CREATE USER foo@localhost;
GRANT SELECT ON *.* TO foo@localhost;
CREATE USER bar@localhost;
GRANT PROCESS, CONNECTION ADMIN ON *.* TO bar@localhost;
--connect (foo,localhost,foo,,)
let $id=`select connection_id()`;
--connect (bar,localhost,bar,,)
evalp SELECT user FROM information_schema.processlist WHERE id=$id;
--replace_result $id ID
--eval KILL $id
--connection default
let $wait_condition=
    select count(*) = 0 from information_schema.processlist
    where user = "foo";
--source include/wait_condition.inc
--disconnect foo
--disconnect bar
DROP USER foo@localhost;
DROP USER bar@localhost;

--enable_service_connection

--echo # End of 10.5 tests

[Dauer der Verarbeitung: 0.3 Sekunden, vorverarbeitet 2026-10-24]

                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,187,975
#Domains=976,315