Skip to content

Commit 8c765e0

Browse files
author
chengyitian
committed
AJ-832: fix issue about connect;
1 parent 065ad18 commit 8c765e0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/com/xxdb/DBConnection.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,17 @@ public boolean connect(String hostName, int port, String userId, String password
869869
}
870870

871871
try {
872-
BasicBoolean isClientAuth = (BasicBoolean) conn_.run("isClientAuth", new ArrayList<>(), 0);
872+
BasicBoolean isClientAuth = null;
873+
try {
874+
isClientAuth = (BasicBoolean) conn_.run("isClientAuth", new ArrayList<>(), 0);
875+
} catch (Exception e) {
876+
if (e.getMessage().contains("Can't recognize function name isClientAuth"))
877+
bt = (BasicTable) conn_.run("rpc(getControllerAlias(),getClusterPerf)", 0);
878+
else
879+
throw e;
880+
break;
881+
}
882+
873883
if (isClientAuth.getBoolean())
874884
bt = (BasicTable) conn_.run("getClusterPerf", new ArrayList<>(), 0);
875885
else

0 commit comments

Comments
 (0)