Bug #15117 | FOUND_ROWS() does not work if getColumnDisplaySize() was called before | ||
---|---|---|---|
Submitted: | 21 Nov 2005 22:56 | Modified: | 11 Nov 2009 2:36 |
Reporter: | Thomas Kellerer | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.11 | OS: | Windows (Windows 2000) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[21 Nov 2005 22:56]
Thomas Kellerer
[22 Nov 2005 4:45]
Mark Matthews
Not sure there's an easy work-around. Calling ResultSetMetaData.getColumnDisplaySize() requires a query to the database the first time a column with a given character set needs this information (and is then cached per-connection). This query clears out the value for FOUND_ROWS(). The workaround is to issue your query for FOUND_ROWS() before calling RSMD.getColumnDisplaySize(). You'll of course want to do this on a different Statement from the same connection so that the result set isn't implicitly closed by the driver.