Search in sources :

Example 21 with ErrorPacket

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

the class SQLJob method errorResponse.

@Override
public void errorResponse(byte[] err, BackendConnection conn) {
    ErrorPacket errPg = new ErrorPacket();
    errPg.read(err);
    String errMsg = "error response errno:" + errPg.errno + ", " + new String(errPg.message) + " from of sql :" + sql + " at con:" + conn;
    // ER_SPECIFIC_ACCESS_DENIED_ERROR
    if (errPg.errno == 1227) {
        LOGGER.warn(errMsg);
    } else {
        LOGGER.info(errMsg);
    }
    conn.release();
    doFinished(true, errMsg);
}
Also used : ErrorPacket(io.mycat.net.mysql.ErrorPacket)

Aggregations

ErrorPacket (io.mycat.net.mysql.ErrorPacket)21 IOException (java.io.IOException)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)3 HandshakePacket (io.mycat.net.mysql.HandshakePacket)2 ConnectionException (io.mycat.net.ConnectionException)1 AuthPacket (io.mycat.net.mysql.AuthPacket)1 BinaryPacket (io.mycat.net.mysql.BinaryPacket)1 HeartbeatPacket (io.mycat.net.mysql.HeartbeatPacket)1 OkPacket (io.mycat.net.mysql.OkPacket)1 Reply323Packet (io.mycat.net.mysql.Reply323Packet)1 ServerConnection (io.mycat.server.ServerConnection)1 BufferedInputStream (java.io.BufferedInputStream)1 BufferedOutputStream (java.io.BufferedOutputStream)1 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 Socket (java.net.Socket)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1