提交 c21156ff authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 1739b00f
......@@ -93,6 +93,9 @@ public class SessionRemote implements SessionInterface, DataHandler {
trans.setSSL(ci.isSSL());
trans.init();
trans.writeInt(clientVersion);
if (clientVersion >= Constants.TCP_PROTOCOL_VERSION_6) {
trans.writeInt(clientVersion);
}
trans.writeString(db);
trans.writeString(ci.getOriginalURL());
trans.writeString(ci.getUserName());
......@@ -106,6 +109,9 @@ public class SessionRemote implements SessionInterface, DataHandler {
}
try {
done(trans);
if (clientVersion >= Constants.TCP_PROTOCOL_VERSION_6) {
clientVersion = trans.readInt();
}
} catch (SQLException e) {
trans.close();
throw e;
......
......@@ -69,7 +69,7 @@ public class TcpServerThread implements Runnable {
if (!server.allow(transfer.getSocket())) {
throw Message.getSQLException(ErrorCode.REMOTE_CONNECTION_NOT_ALLOWED);
}
if (clientVersion == Constants.TCP_PROTOCOL_VERSION_6) {
if (clientVersion >= Constants.TCP_PROTOCOL_VERSION_6) {
// version 6 and newer: read max version (currently not used)
transfer.readInt();
} else if (clientVersion != Constants.TCP_PROTOCOL_VERSION_5) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论