You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
CONC-696: Replace COM_PROCESS_KILL by KILL command
Since COM_PROCESS_KILL isn't supported by newer MySQL versions.
This commit is contained in:
@@ -2785,10 +2785,13 @@ mysql_refresh(MYSQL *mysql,uint options)
|
|||||||
int STDCALL
|
int STDCALL
|
||||||
mysql_kill(MYSQL *mysql,ulong pid)
|
mysql_kill(MYSQL *mysql,ulong pid)
|
||||||
{
|
{
|
||||||
char buff[12];
|
char buff[26];
|
||||||
int4store(buff,pid);
|
|
||||||
/* if we kill our own thread, reading the response packet will fail */
|
if (pid & (~0xFFFFFFFFUL))
|
||||||
return(ma_simple_command(mysql, COM_PROCESS_KILL,buff,4,0,0));
|
snprintf(buff, sizeof buff, "KILL %llu", (ulonglong)pid);
|
||||||
|
else
|
||||||
|
snprintf(buff, sizeof buff, "KILL %lu", pid);
|
||||||
|
return mysql_real_query(mysql, (char *)buff, (ulong)strlen(buff));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user