Bug #71396 | setMaxRows (SQL_SELECT_LIMIT) from one query used in later queries (sometimes) | ||
---|---|---|---|
Submitted: | 16 Jan 2014 8:59 | Modified: | 10 Mar 2014 22:21 |
Reporter: | Pasi Eronen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.28 | OS: | Any |
Assigned to: | Filipe Silva | CPU Architecture: | Any |
[16 Jan 2014 8:59]
Pasi Eronen
[20 Jan 2014 10:35]
Filipe Silva
Hi Pasi, Thank you for this bug report. We'll analyze this issue and answer back as soon as possible.
[21 Jan 2014 15:21]
Filipe Silva
Hi Pasi, Verified as described. Thank you.
[10 Mar 2014 22:21]
Daniel So
Added the following entry into the Connector/J 5.1.30 changelog: "It was intended that if a previous query on a connection had used the setMaxRows() method, in the next query, Connector/J would not cancel that by setting SQL_SELECT_LIMIT=DEFAULT if the query contained a LIMIT clause. However, in the actual implementation, the maximum row setting was reused in the subsequent query in various situations beyond expectation (for example, when a table name contains the string 'limit' in it). This fix removes the LIMIT-clause parsing and replaces it by a better way of controlling the maximum rows per session."