File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/java/com/alipay/oceanbase/rpc Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ private void login() throws Exception {
195195 // no need to retry when the username or password is wrong.
196196 if (e instanceof ObTableAuthException ) {
197197 throw new ObTableLoginException (errMessage , e );
198+ } else if (e instanceof FeatureNotSupportedException ) {
199+ throw e ;
198200 }
199201 }
200202 }
Original file line number Diff line number Diff line change @@ -2525,7 +2525,8 @@ private static void parseObVersionFromSQL(String serverVersion)
25252525 }
25262526 }
25272527
2528- public static void parseObVerionFromLogin (String serverVersion ) {
2528+ public static void parseObVerionFromLogin (String serverVersion )
2529+ throws FeatureNotSupportedException {
25292530 Pattern pattern ;
25302531 if (serverVersion .startsWith ("OceanBase_CE" )) {
25312532 // serverVersion in CE is like "OceanBase_CE 4.0.0.0"
@@ -2540,6 +2541,10 @@ public static void parseObVerionFromLogin(String serverVersion) {
25402541 (short ) Integer .parseInt (matcher .group (2 )),
25412542 (byte ) Integer .parseInt (matcher .group (3 )),
25422543 (byte ) Integer .parseInt (matcher .group (4 )));
2544+ if (ObGlobal .obVsnMajor () < 4 ) {
2545+ throw new FeatureNotSupportedException (
2546+ "The current client version supports only server version greater than or equal to 4.0.0.0" );
2547+ }
25432548 }
25442549 }
25452550}
You can’t perform that action at this time.
0 commit comments