[CONJ-172] Return from result set not checked creating connection Created: 2015-07-29 Updated: 2015-09-02 Resolved: 2015-07-29 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.2.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Geoffrey Rutherford | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
JDBC |
||
| Description |
|
MySQLProtocol at line 417 SelectQueryResult qr = null; finally { if (qr != null)qr.close(); }doesn't check the return from qr.next which can be zero. Code should be: SelectQueryResult qr = null; try { qr = (SelectQueryResult) executeQuery(new MySQLQuery("show variables like 'max_allowed_packet'")); if (qr.next()) { setMaxAllowedPacket(qr.getValueObject(1).getInt()); } } finally { if (qr != null)qr.close(); } |
| Comments |
| Comment by Diego Dupin [ 2015-07-29 ] |
|
thanks for this point. |