From 2651df184a1e0b5affa8acb4c3f89f5fdb0cd12d Mon Sep 17 00:00:00 2001 From: kolzeq Date: Thu, 31 Mar 2016 12:39:48 +0200 Subject: [PATCH] [misc] second merge correction --- .../jdbc/internal/protocol/AbstractConnectProtocol.java | 7 ++++--- src/test/java/org/mariadb/jdbc/ResultSetTest.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractConnectProtocol.java b/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractConnectProtocol.java index 4aa424b14..ffc924c1a 100644 --- a/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractConnectProtocol.java +++ b/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractConnectProtocol.java @@ -476,7 +476,7 @@ private void authentication(byte serverLanguage, int clientCapabilities, byte[] cap.send(writer); Buffer buffer = packetFetcher.getPacket(); - if ((buffer.getByteAt(0) & 0xFF) == Packet.EOF) { + if ((buffer.getByteAt(0) & 0xFF) == 0xFE) { InterfaceAuthSwitchSendResponsePacket interfaceSendPacket; if ((serverCapabilities & MariaDbServerCapabilities.PLUGIN_AUTH) != 0) { //AuthSwitchRequest packet. @@ -515,8 +515,9 @@ private int initializeClientCapabilities() { | MariaDbServerCapabilities.MULTI_RESULTS | MariaDbServerCapabilities.PS_MULTI_RESULTS | MariaDbServerCapabilities.FOUND_ROWS - | MariaDbServerCapabilities.CONNECT_ATTRS; - + | MariaDbServerCapabilities.PLUGIN_AUTH + | MariaDbServerCapabilities.CONNECT_ATTRS + | MariaDbServerCapabilities.PLUGIN_AUTH_LENENC_CLIENT_DATA; if (options.allowMultiQueries || (options.rewriteBatchedStatements)) { capabilities |= MariaDbServerCapabilities.MULTI_STATEMENTS; diff --git a/src/test/java/org/mariadb/jdbc/ResultSetTest.java b/src/test/java/org/mariadb/jdbc/ResultSetTest.java index ec812ffa2..8c461d271 100644 --- a/src/test/java/org/mariadb/jdbc/ResultSetTest.java +++ b/src/test/java/org/mariadb/jdbc/ResultSetTest.java @@ -27,7 +27,7 @@ public void isBeforeFirstFetchTest() throws SQLException { statement.setFetchSize(1); ResultSet resultSet = statement.executeQuery("SELECT * FROM result_set_test"); Assert.assertTrue(resultSet.isBeforeFirst()); - while(resultSet.next()) { + while (resultSet.next()) { Assert.assertFalse(resultSet.isBeforeFirst()); } Assert.assertFalse(resultSet.isBeforeFirst());