1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-04-18 21:24:07 +03:00
mariadb-connector-c/man/mysql_kill.3
2024-10-25 07:38:00 +02:00

46 lines
1.2 KiB
Groff

.\" Automatically generated by Pandoc 3.5
.\"
.TH "mysql_kill" "3" "" "Version 3.3" "MariaDB Connector/C"
.SS Name
mysql_kill \- Kills a connection
.SS Synopsis
.IP
.EX
#include \f[B]<mysql.h>\f[R]
int mysql_kill(MYSQL * mysql,
unsigned long);
.EE
.SS Description
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[CR]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[CR]long\f[R] \- process id
.SS Notes
.IP \[bu] 2
To stop a running command without killing the connection use
\f[CR]KILL QUERY\f[R].
.IP \[bu] 2
The \f[CR]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
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]