Search in sources :

Example 1 with CommandPacket

use of io.mycat.net.mysql.CommandPacket in project Mycat-Server by MyCATApache.

the class KillConnectionHandler method connectionAcquired.

@Override
public void connectionAcquired(BackendConnection conn) {
    MySQLConnection mysqlCon = (MySQLConnection) conn;
    conn.setResponseHandler(this);
    CommandPacket packet = new CommandPacket();
    packet.packetId = 0;
    packet.command = MySQLPacket.COM_QUERY;
    packet.arg = new StringBuilder("KILL ").append(killee.getThreadId()).toString().getBytes();
    packet.write(mysqlCon);
}
Also used : CommandPacket(io.mycat.net.mysql.CommandPacket) MySQLConnection(io.mycat.backend.mysql.nio.MySQLConnection)

Aggregations

MySQLConnection (io.mycat.backend.mysql.nio.MySQLConnection)1 CommandPacket (io.mycat.net.mysql.CommandPacket)1