[fix](mysql-channel) initialize mysql serializer by default (#31083)
This commit is contained in:
@ -27,9 +27,6 @@ import java.nio.ByteBuffer;
|
||||
* And don't need to allocate a real ByteBuffer.
|
||||
*/
|
||||
public class DummyMysqlChannel extends MysqlChannel {
|
||||
public DummyMysqlChannel() {
|
||||
this.serializer = MysqlSerializer.newInstance();
|
||||
}
|
||||
|
||||
public void setSequenceId(int sequenceId) {
|
||||
this.sequenceId = sequenceId;
|
||||
|
||||
@ -75,7 +75,7 @@ public class MysqlChannel {
|
||||
protected boolean isSslHandshaking;
|
||||
private SSLEngine sslEngine;
|
||||
|
||||
protected volatile MysqlSerializer serializer;
|
||||
protected volatile MysqlSerializer serializer = MysqlSerializer.newInstance();
|
||||
|
||||
// mysql flag CLIENT_DEPRECATE_EOF
|
||||
private boolean clientDeprecatedEOF;
|
||||
@ -111,8 +111,6 @@ public class MysqlChannel {
|
||||
remoteHostPortString = connection.getPeerAddress().toString();
|
||||
remoteIp = connection.getPeerAddress().toString();
|
||||
}
|
||||
// The serializer and buffers should only be created if this is a real MysqlChannel
|
||||
this.serializer = MysqlSerializer.newInstance();
|
||||
this.defaultBuffer = ByteBuffer.allocate(16 * 1024);
|
||||
this.headerByteBuffer = ByteBuffer.allocate(PACKET_HEADER_LEN);
|
||||
this.sendBuffer = ByteBuffer.allocate(2 * 1024 * 1024);
|
||||
|
||||
Reference in New Issue
Block a user