Skip to content
Permalink
Browse files

0004084: DB2 AS400 dialect is mis-identified as Generic

  • Loading branch information...
erilong committed Aug 29, 2019
1 parent 1d94f77 commit 567dcb2f0bcb6f5ea13c48a7d5993ed40aad068e
@@ -257,13 +257,15 @@ public static synchronized IDatabasePlatform createNewPlatformInstance(DataSourc
}
}

if (nameVersion[2].equalsIgnoreCase("as400")) {
nameVersion[0] = DatabaseNamesConstants.DB2AS400;
}

if (nameVersion[0].toLowerCase().indexOf(DatabaseNamesConstants.DB2) != -1 && nameVersion[2].equalsIgnoreCase("db2")) {
String productVersion = getDatabaseProductVersion(dataSource);
if (nameVersion[0].toUpperCase().indexOf("Z") != -1
|| (productVersion != null && productVersion.startsWith("DSN"))) {
nameVersion[0] = DatabaseNamesConstants.DB2ZOS;
} else if (nameVersion[0].indexOf("400") != -1) {
nameVersion[0] = DatabaseNamesConstants.DB2AS400;
} else {
nameVersion[0] = DatabaseNamesConstants.DB2;
}

0 comments on commit 567dcb2

Please sign in to comment.
You can’t perform that action at this time.