@@ -646,7 +646,7 @@ private GreetingPacket receiveGreeting() throws IOException {
646646 }
647647
648648 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 ));
650650 byte [] statementResult = channel .read ();
651651 if (statementResult [0 ] == (byte ) 0xFF /* error */ ) {
652652 byte [] bytes = Arrays .copyOfRange (statementResult , 1 , statementResult .length );
@@ -669,7 +669,7 @@ private void requestBinaryLogStream() throws IOException {
669669 dumpBinaryLogCommand = new DumpBinaryLogCommand (serverId , binlogFilename , binlogPosition );
670670 }
671671 }
672- channel .writeBuffered (dumpBinaryLogCommand );
672+ channel .write (dumpBinaryLogCommand );
673673 }
674674
675675 private void ensureEventDataDeserializer (EventType eventType ,
@@ -703,7 +703,7 @@ private void authenticate(GreetingPacket greetingPacket) throws IOException {
703703 if (serverSupportsSSL ) {
704704 SSLRequestCommand sslRequestCommand = new SSLRequestCommand ();
705705 sslRequestCommand .setCollation (collation );
706- channel .writeBuffered (sslRequestCommand , packetNumber ++);
706+ channel .write (sslRequestCommand , packetNumber ++);
707707 SSLSocketFactory sslSocketFactory =
708708 this .sslSocketFactory != null ?
709709 this .sslSocketFactory :
@@ -718,7 +718,7 @@ private void authenticate(GreetingPacket greetingPacket) throws IOException {
718718 AuthenticateCommand authenticateCommand = new AuthenticateCommand (schema , username , password ,
719719 greetingPacket .getScramble ());
720720 authenticateCommand .setCollation (collation );
721- channel .writeBuffered (authenticateCommand , packetNumber );
721+ channel .write (authenticateCommand , packetNumber );
722722 byte [] authenticationResult = channel .read ();
723723 if (authenticationResult [0 ] != (byte ) 0x00 /* ok */ ) {
724724 if (authenticationResult [0 ] == (byte ) 0xFF /* error */ ) {
@@ -748,7 +748,7 @@ private void switchAuthentication(byte[] authenticationResult, boolean usingSSLS
748748 String scramble = buffer .readZeroTerminatedString ();
749749
750750 Command switchCommand = new AuthenticateNativePasswordCommand (scramble , password );
751- channel .writeBuffered (switchCommand , (usingSSLSocket ? 4 : 3 ));
751+ channel .write (switchCommand , (usingSSLSocket ? 4 : 3 ));
752752 byte [] authResult = channel .read ();
753753
754754 if (authResult [0 ] != (byte ) 0x00 ) {
@@ -790,7 +790,7 @@ public void run() {
790790 connectionLost = System .currentTimeMillis () - eventLastSeen > keepAliveInterval ;
791791 } else {
792792 try {
793- channel .writeBuffered (new PingCommand ());
793+ channel .write (new PingCommand ());
794794 } catch (IOException e ) {
795795 connectionLost = true ;
796796 }
@@ -894,7 +894,7 @@ public boolean isConnected() {
894894 }
895895
896896 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'" ));
898898 ResultSetRowPacket [] resultSet = readResultSet ();
899899 if (resultSet .length != 0 ) {
900900 return resultSet [0 ].getValue (1 ).toUpperCase ();
@@ -904,7 +904,7 @@ private String fetchGtidPurged() throws IOException {
904904
905905 private void fetchBinlogFilenameAndPosition () throws IOException {
906906 ResultSetRowPacket [] resultSet ;
907- channel .writeBuffered (new QueryCommand ("show master status" ));
907+ channel .write (new QueryCommand ("show master status" ));
908908 resultSet = readResultSet ();
909909 if (resultSet .length == 0 ) {
910910 throw new IOException ("Failed to determine binlog filename/position" );
@@ -915,7 +915,7 @@ private void fetchBinlogFilenameAndPosition() throws IOException {
915915 }
916916
917917 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'" ));
919919 ResultSetRowPacket [] resultSet = readResultSet ();
920920 if (resultSet .length == 0 ) {
921921 return ChecksumType .NONE ;
@@ -924,7 +924,7 @@ private ChecksumType fetchBinlogChecksum() throws IOException {
924924 }
925925
926926 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" ));
928928 byte [] statementResult = channel .read ();
929929 if (statementResult [0 ] == (byte ) 0xFF /* error */ ) {
930930 byte [] bytes = Arrays .copyOfRange (statementResult , 1 , statementResult .length );
0 commit comments