Fixed thin JDBC driver compatibility problem.
@@ -219,6 +219,7 @@ public class JdbcThinTcpIo {
boolean accepted = reader.readBoolean();
if (accepted) {
+ if (reader.available() > 0) {
byte maj = reader.readByte();
byte min = reader.readByte();
byte maintenance = reader.readByte();
@@ -229,10 +230,11 @@ public class JdbcThinTcpIo {
byte[] hash = reader.readByteArray();
igniteVer = new IgniteProductVersion(maj, min, maintenance, stage, ts, hash);
-
- return;
}
-
+ else
+ igniteVer = new IgniteProductVersion((byte)2, (byte)0, (byte)0, "Unknown", 0L, null);
+ }
+ else {
short maj = reader.readShort();
short min = reader.readShort();
short maintenance = reader.readShort();
@@ -244,6 +246,7 @@ public class JdbcThinTcpIo {
throw new IgniteCheckedException("Handshake failed [driverProtocolVer=" + CURRENT_VER +
", remoteNodeProtocolVer=" + ver + ", err=" + err + ']');
}
+ }
/**
* @param cache Cache name.
