未验证 提交 d3aa8e14 编写于 作者: Z zhaojun 提交者: GitHub

update mysql & postgresql version for proxy (#5721)

* update mysql & postgresql version for proxy

* fix unit test error
上级 3116fb5e
......@@ -71,7 +71,7 @@ public final class PostgreSQLAuthenticationEngine implements AuthenticationEngin
backendConnection.setCurrentSchema(databaseName);
// TODO send a md5 authentication request message
context.write(new PostgreSQLAuthenticationOKPacket(true));
context.write(new PostgreSQLParameterStatusPacket("server_version", "8.4"));
context.write(new PostgreSQLParameterStatusPacket("server_version", "12.3"));
context.write(new PostgreSQLParameterStatusPacket("client_encoding", "UTF8"));
context.write(new PostgreSQLParameterStatusPacket("server_encoding", "UTF8"));
context.writeAndFlush(new PostgreSQLReadyForQueryPacket());
......
......@@ -79,9 +79,9 @@ public final class MySQLNegotiateHandlerTest {
mySQLNegotiateHandler.channelRead(channelHandlerContext, handshakePacket);
verify(channel).writeAndFlush(ArgumentMatchers.any(MySQLHandshakeResponse41Packet.class));
ServerInfo serverInfo = ReflectionUtil.getFieldValueFromClass(mySQLNegotiateHandler, "serverInfo", ServerInfo.class);
assertThat(serverInfo.getServerVersion().getMajor(), is(5));
assertThat(serverInfo.getServerVersion().getMinor(), is(6));
assertThat(serverInfo.getServerVersion().getSeries(), is(4));
assertThat(serverInfo.getServerVersion().getMajor(), is(8));
assertThat(serverInfo.getServerVersion().getMinor(), is(0));
assertThat(serverInfo.getServerVersion().getSeries(), is(20));
}
@Test
......
......@@ -34,7 +34,7 @@ public final class MySQLServerInfo {
/**
* Server version.
*/
public static final String SERVER_VERSION = "5.6.4-Sharding-Proxy 4.1.0";
public static final String SERVER_VERSION = "8.0.20-Sharding-Proxy 4.1.0";
/**
* Charset code 0x21 is utf8_general_ci.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册