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