mariadb/mysql-test/main/kill-2.result
Sergey Vojtovich 5b0c2ed259 MDEV-13257 - main.kill-2 failed in buildbot
Test output was affected by incompletely closed preceding connections.

Make test agnostic to concurrent connections by querying
information_schema.processlist only for connections that it uses.

Avoid querying for i_s.processlist db column. It is unstable due to
trylock_short(), can be "" if concurrent connection is holding
LOCK_thd_data.
2025-11-20 23:15:34 +04:00

42 lines
989 B
Text

#
# 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;
drop user a@'127.0.0.1';
drop user b@'127.0.0.1';
#
# End of 10.3 tests
#