use of io.mycat.backend.mysql.MySQLMessage in project Mycat-Server by MyCATApache.
the class EOFPacket method read.
public void read(byte[] data) {
MySQLMessage mm = new MySQLMessage(data);
packetLength = mm.readUB3();
packetId = mm.read();
fieldCount = mm.read();
warningCount = mm.readUB2();
status = mm.readUB2();
}
use of io.mycat.backend.mysql.MySQLMessage in project Mycat-Server by MyCATApache.
the class ErrorPacket method read.
public void read(byte[] data) {
MySQLMessage mm = new MySQLMessage(data);
packetLength = mm.readUB3();
packetId = mm.read();
fieldCount = mm.read();
errno = mm.readUB2();
if (mm.hasRemaining() && (mm.read(mm.position()) == SQLSTATE_MARKER)) {
mm.read();
sqlState = mm.readBytes(5);
}
message = mm.readBytes();
}
use of io.mycat.backend.mysql.MySQLMessage in project Mycat-Server by MyCATApache.
the class LongDataPacket method read.
public void read(byte[] data) {
MySQLMessage mm = new MySQLMessage(data);
packetLength = mm.readUB3();
packetId = mm.read();
byte code = mm.read();
assert code == PACKET_FALG;
pstmtId = mm.readUB4();
paramId = mm.readUB2();
this.longData = mm.readBytes(packetLength - (1 + 4 + 2));
}
use of io.mycat.backend.mysql.MySQLMessage in project Mycat-Server by MyCATApache.
the class OkPacket method read.
public void read(BinaryPacket bin) {
packetLength = bin.packetLength;
packetId = bin.packetId;
MySQLMessage mm = new MySQLMessage(bin.data);
fieldCount = mm.read();
affectedRows = mm.readLength();
insertId = mm.readLength();
serverStatus = mm.readUB2();
warningCount = mm.readUB2();
if (mm.hasRemaining()) {
this.message = mm.readBytesWithLength();
}
}
use of io.mycat.backend.mysql.MySQLMessage in project Mycat-Server by MyCATApache.
the class ResetPacket method read.
public void read(byte[] data) {
MySQLMessage mm = new MySQLMessage(data);
packetLength = mm.readUB3();
packetId = mm.read();
byte code = mm.read();
assert code == PACKET_FALG;
pstmtId = mm.readUB4();
}
Aggregations