Change order of logic for checking the condition for using Bulk Copy API
Fix | Change order of logic for checking the condition for using Bulk Copy API
@@ -2056,7 +2056,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
localUserSQL = userSQL;
try {
- if (isInsert(localUserSQL) && connection.isAzureDW() && (this.useBulkCopyForBatchInsert)) {
+ if (this.useBulkCopyForBatchInsert && connection.isAzureDW() && isInsert(localUserSQL)) {
// From the JDBC spec, section 9.1.4 - Making Batch Updates:
// The CallableStatement.executeBatch method (inherited from PreparedStatement) will
// throw a BatchUpdateException if the stored procedure returns anything other than an
@@ -2201,7 +2201,7 @@ public class SQLServerPreparedStatement extends SQLServerStatement implements IS
localUserSQL = userSQL;
try {
- if (isInsert(localUserSQL) && connection.isAzureDW() && (this.useBulkCopyForBatchInsert)) {
+ if (this.useBulkCopyForBatchInsert && connection.isAzureDW() && isInsert(localUserSQL)) {
// From the JDBC spec, section 9.1.4 - Making Batch Updates:
// The CallableStatement.executeBatch method (inherited from PreparedStatement) will
// throw a BatchUpdateException if the stored procedure returns anything other than an
