DBZ-2296 return false instead of true from isGtidModeEnabled for GTID_MODEs of OFF_PERMISSIVE and ON_PERMISSIVE

This commit is contained in:
Liz Chatman 2023-01-03 12:03:15 -08:00 committed by Jiri Pechanec
parent bd47d7396d
commit 8a6fdab5d7
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ public boolean isGtidModeEnabled() {
try {
return queryAndMap("SHOW GLOBAL VARIABLES LIKE 'GTID_MODE'", rs -> {
if (rs.next()) {
return !"OFF".equalsIgnoreCase(rs.getString(2));
return "ON".equalsIgnoreCase(rs.getString(2));
}
return false;
});

View File

@ -74,7 +74,7 @@ private boolean isGtidModeEnabled() throws SQLException {
"SHOW GLOBAL VARIABLES LIKE 'GTID_MODE'",
rs -> {
if (rs.next()) {
return !"OFF".equalsIgnoreCase(rs.getString(2));
return "ON".equalsIgnoreCase(rs.getString(2));
}
throw new IllegalStateException("Cannot obtain GTID status");
});