@@ -646,7 +646,7 @@ private GreetingPacket receiveGreeting() throws IOException {
646
646
}
647
647
648
648
private void enableHeartbeat () throws IOException {
649
- channel .writeBuffered (new QueryCommand ("set @master_heartbeat_period=" + heartbeatInterval * 1000000 ));
649
+ channel .write (new QueryCommand ("set @master_heartbeat_period=" + heartbeatInterval * 1000000 ));
650
650
byte [] statementResult = channel .read ();
651
651
if (statementResult [0 ] == (byte ) 0xFF /* error */ ) {
652
652
byte [] bytes = Arrays .copyOfRange (statementResult , 1 , statementResult .length );
@@ -669,7 +669,7 @@ private void requestBinaryLogStream() throws IOException {
669
669
dumpBinaryLogCommand = new DumpBinaryLogCommand (serverId , binlogFilename , binlogPosition );
670
670
}
671
671
}
672
- channel .writeBuffered (dumpBinaryLogCommand );
672
+ channel .write (dumpBinaryLogCommand );
673
673
}
674
674
675
675
private void ensureEventDataDeserializer (EventType eventType ,
@@ -703,7 +703,7 @@ private void authenticate(GreetingPacket greetingPacket) throws IOException {
703
703
if (serverSupportsSSL ) {
704
704
SSLRequestCommand sslRequestCommand = new SSLRequestCommand ();
705
705
sslRequestCommand .setCollation (collation );
706
- channel .writeBuffered (sslRequestCommand , packetNumber ++);
706
+ channel .write (sslRequestCommand , packetNumber ++);
707
707
SSLSocketFactory sslSocketFactory =
708
708
this .sslSocketFactory != null ?
709
709
this .sslSocketFactory :
@@ -718,7 +718,7 @@ private void authenticate(GreetingPacket greetingPacket) throws IOException {
718
718
AuthenticateCommand authenticateCommand = new AuthenticateCommand (schema , username , password ,
719
719
greetingPacket .getScramble ());
720
720
authenticateCommand .setCollation (collation );
721
- channel .writeBuffered (authenticateCommand , packetNumber );
721
+ channel .write (authenticateCommand , packetNumber );
722
722
byte [] authenticationResult = channel .read ();
723
723
if (authenticationResult [0 ] != (byte ) 0x00 /* ok */ ) {
724
724
if (authenticationResult [0 ] == (byte ) 0xFF /* error */ ) {
@@ -748,7 +748,7 @@ private void switchAuthentication(byte[] authenticationResult, boolean usingSSLS
748
748
String scramble = buffer .readZeroTerminatedString ();
749
749
750
750
Command switchCommand = new AuthenticateNativePasswordCommand (scramble , password );
751
- channel .writeBuffered (switchCommand , (usingSSLSocket ? 4 : 3 ));
751
+ channel .write (switchCommand , (usingSSLSocket ? 4 : 3 ));
752
752
byte [] authResult = channel .read ();
753
753
754
754
if (authResult [0 ] != (byte ) 0x00 ) {
@@ -790,7 +790,7 @@ public void run() {
790
790
connectionLost = System .currentTimeMillis () - eventLastSeen > keepAliveInterval ;
791
791
} else {
792
792
try {
793
- channel .writeBuffered (new PingCommand ());
793
+ channel .write (new PingCommand ());
794
794
} catch (IOException e ) {
795
795
connectionLost = true ;
796
796
}
@@ -894,7 +894,7 @@ public boolean isConnected() {
894
894
}
895
895
896
896
private String fetchGtidPurged () throws IOException {
897
- channel .writeBuffered (new QueryCommand ("show global variables like 'gtid_purged'" ));
897
+ channel .write (new QueryCommand ("show global variables like 'gtid_purged'" ));
898
898
ResultSetRowPacket [] resultSet = readResultSet ();
899
899
if (resultSet .length != 0 ) {
900
900
return resultSet [0 ].getValue (1 ).toUpperCase ();
@@ -904,7 +904,7 @@ private String fetchGtidPurged() throws IOException {
904
904
905
905
private void fetchBinlogFilenameAndPosition () throws IOException {
906
906
ResultSetRowPacket [] resultSet ;
907
- channel .writeBuffered (new QueryCommand ("show master status" ));
907
+ channel .write (new QueryCommand ("show master status" ));
908
908
resultSet = readResultSet ();
909
909
if (resultSet .length == 0 ) {
910
910
throw new IOException ("Failed to determine binlog filename/position" );
@@ -915,7 +915,7 @@ private void fetchBinlogFilenameAndPosition() throws IOException {
915
915
}
916
916
917
917
private ChecksumType fetchBinlogChecksum () throws IOException {
918
- channel .writeBuffered (new QueryCommand ("show global variables like 'binlog_checksum'" ));
918
+ channel .write (new QueryCommand ("show global variables like 'binlog_checksum'" ));
919
919
ResultSetRowPacket [] resultSet = readResultSet ();
920
920
if (resultSet .length == 0 ) {
921
921
return ChecksumType .NONE ;
@@ -924,7 +924,7 @@ private ChecksumType fetchBinlogChecksum() throws IOException {
924
924
}
925
925
926
926
private void confirmSupportOfChecksum (ChecksumType checksumType ) throws IOException {
927
- channel .writeBuffered (new QueryCommand ("set @master_binlog_checksum= @@global.binlog_checksum" ));
927
+ channel .write (new QueryCommand ("set @master_binlog_checksum= @@global.binlog_checksum" ));
928
928
byte [] statementResult = channel .read ();
929
929
if (statementResult [0 ] == (byte ) 0xFF /* error */ ) {
930
930
byte [] bytes = Arrays .copyOfRange (statementResult , 1 , statementResult .length );
0 commit comments