Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修正了两个 bug 新增了一个功能 #1662

Open
wants to merge 9 commits into
base: 1.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conf/dnindex.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#update
#Mon Apr 24 16:41:54 CST 2017
#Mon Oct 09 12:58:57 CST 2017
test_db=0
dh1=0
jdbchost=0
dataHost2=0
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/io/mycat/config/Versions.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
*/
public abstract class Versions {

/**协议版本**/
/**
* 协议版本
**/
public static final byte PROTOCOL_VERSION = 10;

/**服务器版本**/
public static byte[] SERVER_VERSION = "5.6.29-mycat-1.6.5-BETA-20170424174212".getBytes();
/**
* 服务器版本
**/
public static byte[] SERVER_VERSION = "5.6.29-mycat-1.6.5-release-20170930155225".getBytes();

public static void setServerVersion(String version) {
byte[] mysqlVersionPart = version.getBytes();
Expand All @@ -42,7 +46,7 @@ public static void setServerVersion(String version) {
break;
}

// 生成mycat version信息
// 重新拼接mycat version字节数组
byte[] newMycatVersion = new byte[mysqlVersionPart.length + SERVER_VERSION.length - startIndex];
System.arraycopy(mysqlVersionPart, 0, newMycatVersion, 0, mysqlVersionPart.length);
System.arraycopy(SERVER_VERSION, startIndex, newMycatVersion, mysqlVersionPart.length,
Expand Down
Loading