Skip to content

Commit

Permalink
Fix for Bug#85885 (25874048), resultSetConcurrency and resultSetType …
Browse files Browse the repository at this point in the history
…are swapped in call to prepareStatement.
  • Loading branch information
fjssilva committed Jul 3, 2017
1 parent 05201b0 commit 0844049
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Version 5.1.43

- Fix for Bug#85885 (25874048), resultSetConcurrency and resultSetType are swapped in call to prepareStatement.

- Fix for Bug#74932 (20066806), ConnectionImp Doesn't Close Server Prepared Statement (PreparedStatement Leak).

- WL#10536, Deprecating COM_SHUTDOWN.
Expand Down
6 changes: 3 additions & 3 deletions src/com/mysql/jdbc/ServerPreparedStatement.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
Expand Down Expand Up @@ -2780,8 +2780,8 @@ protected boolean containsOnDuplicateKeyUpdateInSQL() {
protected PreparedStatement prepareBatchedInsertSQL(MySQLConnection localConn, int numBatches) throws SQLException {
synchronized (checkClosed().getConnectionMutex()) {
try {
PreparedStatement pstmt = ((Wrapper) localConn.prepareStatement(this.parseInfo.getSqlForBatch(numBatches), this.resultSetConcurrency,
this.resultSetType)).unwrap(PreparedStatement.class);
PreparedStatement pstmt = ((Wrapper) localConn.prepareStatement(this.parseInfo.getSqlForBatch(numBatches), this.resultSetType,
this.resultSetConcurrency)).unwrap(PreparedStatement.class);
pstmt.setRetrieveGeneratedKeys(this.retrieveGeneratedKeys);

return pstmt;
Expand Down

0 comments on commit 0844049

Please sign in to comment.