File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
fe/fe-core/src/main/java/org/apache/doris Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1717
1818package org .apache .doris .mysql ;
1919
20+ import org .apache .doris .qe .GlobalVariable ;
21+
2022// MySQL protocol handshake packet.
2123public class MysqlHandshakePacket extends MysqlPacket {
2224 private static final int SCRAMBLE_LENGTH = 20 ;
@@ -25,7 +27,7 @@ public class MysqlHandshakePacket extends MysqlPacket {
2527 // JDBC uses this version to check which protocol the server support
2628 // Set the patch version to 99 to prevent the vulnerability scanning tool from
2729 // falsely reporting MySQL vulnerabilities
28- public static final String SERVER_VERSION = "5.7.99" ;
30+ public static final String DEFAULT_SERVER_VERSION = "5.7.99" ;
2931 // 33 stands for UTF-8 character set
3032 private static final int CHARACTER_SET = 33 ;
3133 // use default capability for all
@@ -53,7 +55,7 @@ public void writeTo(MysqlSerializer serializer) {
5355 MysqlCapability capability = MysqlProto .SERVER_USE_SSL ? SSL_CAPABILITY : CAPABILITY ;
5456
5557 serializer .writeInt1 (PROTOCOL_VERSION );
56- serializer .writeNulTerminateString (SERVER_VERSION );
58+ serializer .writeNulTerminateString (GlobalVariable . version );
5759 serializer .writeInt4 (connectionId );
5860 // first 8 bytes of auth plugin data
5961 serializer .writeBytes (authPluginData , 0 , 8 );
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ public final class GlobalVariable {
8787 + Version .DORIS_BUILD_VERSION + "-" + Version .DORIS_BUILD_SHORT_HASH
8888 + (Config .isCloudMode () ? " (Cloud Mode)" : "" );
8989
90- @ VariableMgr .VarAttr (name = VERSION , flag = VariableMgr . READ_ONLY )
91- public static String version = MysqlHandshakePacket .SERVER_VERSION ;
90+ @ VariableMgr .VarAttr (name = VERSION )
91+ public static String version = MysqlHandshakePacket .DEFAULT_SERVER_VERSION ;
9292
9393 // 0: table names are stored as specified and comparisons are case sensitive.
9494 // 1: table names are stored in lowercase on disk and comparisons are not case sensitive.
You can’t perform that action at this time.
0 commit comments