You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Merge branch '3.3' into 3.4
This commit is contained in:
@@ -3313,10 +3313,17 @@ mysql_refresh(MYSQL *mysql,uint options)
|
||||
int STDCALL
|
||||
mysql_kill(MYSQL *mysql,ulong pid)
|
||||
{
|
||||
char buff[12];
|
||||
int4store(buff,pid);
|
||||
/* if we kill our own thread, reading the response packet will fail */
|
||||
return(ma_simple_command(mysql, COM_PROCESS_KILL,buff,4,0,0));
|
||||
char buff[16];
|
||||
|
||||
/* process id can't be larger than 4-bytes */
|
||||
if (pid & (~0xFFFFFFFFUL))
|
||||
{
|
||||
my_set_error(mysql, CR_CONNECTION_ERROR, SQLSTATE_UNKNOWN, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
snprintf(buff, sizeof buff, "KILL %lu", pid);
|
||||
return mysql_real_query(mysql, (char *)buff, (ulong)strlen(buff));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user