1mysql_kill(3) MariaDB Connector/C mysql_kill(3)
2
3
4
5 Name
6 mysql_kill - Kills a connection
7
8 Synopsis
9 #include <mysql.h>
10
11 int mysql_kill(MYSQL * mysql,
12 unsigned long);
13
14 Description
15 This function is used to ask the server to kill a MariaDB thread speci‐
16 fied by the processid parameter. This value must be retrieved by
17 [show-processlist()](SHOW PROCESSLIST]]. If trying to kill the own
18 connection mysql_thread_id(3) should be used.
19
20 Parameter
21 • mysql - a connection identifier, which was previously allocated by
22 mysql_init(3) and connected by mysql_real_connect(3). Returns 0 on
23 success, otherwise nonzero.
24
25 • long - process id
26
27 Notes
28 • To stop a running command without killing the connection use KILL
29 QUERY.
30
31 • The mysql_kill() function only kills a connection, it doesn’t free
32 any memory - this must be done explicitly by calling mysql_close(3).
33
34 Return value
35 Returns zero on success, non zero on error.
36
37 See also
38 • mysql_thread_id(3)
39
40 • mysql_close(3)
41
42 • mariadb_cancel(3)
43
44
45
46Version 3.2.2 mysql_kill(3)