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

Quelle  kill-2.result   Sprache: Lisp

 

#
# MDEV-6896 kill user command cause MariaDB crash!
#
create user foo@'127.0.0.1';
connect  con1,127.0.0.1,foo,,;
connection default;
select user from information_schema.processlist where id=$con1_id;
user
foo
kill user foo@'127.0.0.1';
drop user foo@'127.0.0.1';
#
# KILL USER and missing privileges
#
create user a@'127.0.0.1';
create user b@'127.0.0.1';
grant process on *.* to a@'127.0.0.1';
grant select on *.* to b@'127.0.0.1';
connect a,127.0.0.1,a;
show grants;
Grants for a@127.0.0.1
GRANT PROCESS ON *.* TO `a`@`127.0.0.1`
connect b,127.0.0.1,b;
show processlist;
Id User Host db Command Time State Info Progress
# b # test # # starting show processlist #
kill user a;
kill user x;
connection a;
select user from information_schema.processlist where id in (connection_id(), $b_id, $default_id) order by user;
user
a
b
root
kill user b;
ERROR HY000: Operation KILL USER failed for b@%
connection default;
disconnect a;
disconnect b;
drop user a@'127.0.0.1';
drop user b@'127.0.0.1';
# End of 10.3 tests
#
# MDEV-40554 KILL checks user (not priv_user) and doesn't verify hostname
#
create user u1@'::1' identified by 'pw1';
create user ''@'127.0.0.1';
connect u1_ipv6,::1,u1,pw1;
select current_user();
current_user()
u1@::1
# the reported case: same login name, but an anonymous account
connect u1_anon,127.0.0.1,u1,;
select user(), current_user();
user() current_user()
u1@127.0.0.1 @127.0.0.1
# anonymous users don't see the process list at all
show processlist;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) as `threads visible` from information_schema.processlist;
threads visible
1
select count(*) as `u1@'::1' visible`
     from information_schema.processlist where id=$cid_sock;
u1@'::1' visible
0
kill $cid_sock;
ERROR HY000: You are not owner of thread CID
show explain for $cid_sock;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
kill user u1@'::1';
connection u1_ipv6;
select user(), current_user();
user() current_user()
u1@::1 u1@::1
connection u1_anon;
connection default;
disconnect u1_anon;
drop user ''@'127.0.0.1';
# same login name, a real account, but a different host
create user u1@'127.0.0.1' identified by 'pw2';
connect u1_ipv4,127.0.0.1,u1,pw2;
select current_user();
current_user()
u1@127.0.0.1
# u1@127.0.0.1 must not see u1@'::1' - same user name, other account
show processlist;
Id User Host db Command Time State Info Progress
# u1 # # Query # # # #
select count(*) as `u1@'::1' visible`
     from information_schema.processlist where id=$cid_sock;
u1@'::1' visible
0
kill $cid_sock;
ERROR HY000: You are not owner of thread CID
show explain for $cid_sock;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
kill user u1@'::1';
connection u1_ipv6;
select user(), current_user();
user() current_user()
u1@::1 u1@::1
connection u1_ipv4;
# but another u1@127.0.0.1 connection is the same account, so it may
connect u1_tcp2,127.0.0.1,u1,pw2;
select count(*) as `u1@127.0.0.1 visible`
     from information_schema.processlist where id=$cid_tcp;
u1@127.0.0.1 visible
1
kill $cid_tcp;
# u1@'::1' was not killed
connection u1_ipv6;
select 1;
1
1
connection default;
disconnect u1_ipv6;
disconnect u1_tcp2;
drop user u1@'::1';
drop user u1@'127.0.0.1';
# End of 10.11 tests

Messung V0.5 in Prozent
C=46 H=100 G=77

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-10-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.