Remove unwanted method parameter
@@ -548,7 +548,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
getNextResult();
}
catch (SQLException e) {
- if (retryBasedOnFailedReuseOfCachedHandle(e, attempt, needsPrepare))
+ if (retryBasedOnFailedReuseOfCachedHandle(e, attempt))
continue;
else
throw e;
@@ -566,7 +566,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
/** Should the execution be retried because the re-used cached handle could not be re-used due to server side state changes? */
private boolean retryBasedOnFailedReuseOfCachedHandle(SQLException e,
- int attempt, boolean needsPrepare) {
+ int attempt) {
// Only retry based on these error codes and if statementPooling is enabled:
// 586: The prepared statement handle %d is not valid in this context. Please verify that current database, user default schema, and
// ANSI_NULLS and QUOTED_IDENTIFIER set options are not changed since the handle is prepared.
@@ -2692,7 +2692,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
throw e;
// Retry if invalid handle exception.
- if (retryBasedOnFailedReuseOfCachedHandle(e, attempt, needsPrepare)) {
+ if (retryBasedOnFailedReuseOfCachedHandle(e, attempt)) {
// reset number of batches prepare
numBatchesPrepared = numBatchesExecuted;
retry = true;
@@ -2723,7 +2723,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
}
}
catch (SQLException e) {
- if (retryBasedOnFailedReuseOfCachedHandle(e, attempt, needsPrepare) && connection.isStatementPoolingEnabled()) {
+ if (retryBasedOnFailedReuseOfCachedHandle(e, attempt) && connection.isStatementPoolingEnabled()) {
// Reset number of batches prepared.
numBatchesPrepared = numBatchesExecuted;
continue;
