Skip to content

Commit

Permalink
Fix a bug where connection setup would fail if compression was turned…
Browse files Browse the repository at this point in the history
… off in both the driver and the server
  • Loading branch information
bhvkshah committed Dec 13, 2023
1 parent befa7de commit ff8264d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ else if(pluginName.equalsIgnoreCase(RedshiftConstants.IDP_TOKEN_PLUGIN))
paramList.add(new String[]{"TimeZone", createRedshiftTimeZone()});
}

paramList.add(new String[]{"_pq_.compression", info.getProperty("compression", RedshiftProperty.COMPRESSION.get(info))});
if(!("off".equalsIgnoreCase(RedshiftProperty.COMPRESSION.get(info))))
{
paramList.add(new String[]{"_pq_.compression", info.getProperty("compression", RedshiftProperty.COMPRESSION.get(info))});
}

Version assumeVersion = ServerVersion.from(RedshiftProperty.ASSUME_MIN_SERVER_VERSION.get(info));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ private int updateQueryMode(int flags) {
}
}

public void execute(Query query, ParameterList parameters, ResultHandler handler,
public void execute(Query query, ParameterList parameters, ResultHandler handler,
int maxRows, int fetchSize, int flags) throws SQLException {
// Wait for current ring buffer thread to finish, if any.
// Shouldn't call from synchronized method, which can cause dead-lock.
Expand Down

0 comments on commit ff8264d

Please sign in to comment.