Search in sources :

Example 31 with ErrorPacket

use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.

the class FetchStoreNodeOfChildTableHandler method errorResponse.

@Override
public void errorResponse(byte[] data, BackendConnection conn) {
    finished.incrementAndGet();
    ErrorPacket err = new ErrorPacket();
    err.read(data);
    LOGGER.info("errorResponse " + err.getErrNo() + " " + new String(err.getMessage()));
    if (canReleaseConn()) {
        conn.release();
    }
}
Also used : ErrorPacket(com.actiontech.dble.net.mysql.ErrorPacket)

Example 32 with ErrorPacket

use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.

the class MultiNodeDdlHandler method connectionError.

@Override
public void connectionError(Throwable e, BackendConnection conn) {
    LOGGER.info("backend connect", e);
    ErrorPacket errPacket = new ErrorPacket();
    errPacket.setPacketId(++packetId);
    errPacket.setErrNo(ErrorCode.ER_ABORTING_CONNECTION);
    errPacket.setMessage(StringUtil.encode(e.toString(), session.getSource().getCharset().getResults()));
    err = errPacket;
    executeConnError(conn);
}
Also used : ErrorPacket(com.actiontech.dble.net.mysql.ErrorPacket)

Example 33 with ErrorPacket

use of com.actiontech.dble.net.mysql.ErrorPacket in project dble by actiontech.

the class PacketUtil method getShutdown.

public static ErrorPacket getShutdown() {
    ErrorPacket error = new ErrorPacket();
    error.setPacketId(1);
    error.setErrNo(ErrorCode.ER_SERVER_SHUTDOWN);
    error.setMessage("The server has been shutdown".getBytes());
    return error;
}
Also used : ErrorPacket(com.actiontech.dble.net.mysql.ErrorPacket)

Aggregations

ErrorPacket (com.actiontech.dble.net.mysql.ErrorPacket)33 MySQLConnection (com.actiontech.dble.backend.mysql.nio.MySQLConnection)3 QueryNode (com.actiontech.dble.plan.node.QueryNode)3 ViewMeta (com.actiontech.dble.meta.ViewMeta)2 MySQLOutPutException (com.actiontech.dble.plan.common.exception.MySQLOutPutException)2 PlanNode (com.actiontech.dble.plan.node.PlanNode)2 MySQLPlanNodeVisitor (com.actiontech.dble.plan.visitor.MySQLPlanNodeVisitor)2 SQLSelectStatement (com.alibaba.druid.sql.ast.statement.SQLSelectStatement)2 PhysicalDBNode (com.actiontech.dble.backend.datasource.PhysicalDBNode)1 DMLResponseHandler (com.actiontech.dble.backend.mysql.nio.handler.query.DMLResponseHandler)1 AllAnySubQueryHandler (com.actiontech.dble.backend.mysql.nio.handler.query.impl.subquery.AllAnySubQueryHandler)1 InSubQueryHandler (com.actiontech.dble.backend.mysql.nio.handler.query.impl.subquery.InSubQueryHandler)1 SingleRowSubQueryHandler (com.actiontech.dble.backend.mysql.nio.handler.query.impl.subquery.SingleRowSubQueryHandler)1 SubQueryHandler (com.actiontech.dble.backend.mysql.nio.handler.query.impl.subquery.SubQueryHandler)1 CallBackHandler (com.actiontech.dble.backend.mysql.nio.handler.util.CallBackHandler)1 CoordinatorLogEntry (com.actiontech.dble.backend.mysql.xa.CoordinatorLogEntry)1 TxState (com.actiontech.dble.backend.mysql.xa.TxState)1 HeartbeatPacket (com.actiontech.dble.net.mysql.HeartbeatPacket)1 OkPacket (com.actiontech.dble.net.mysql.OkPacket)1 ItemAllAnySubQuery (com.actiontech.dble.plan.common.item.subquery.ItemAllAnySubQuery)1