Bug #20687 | Caching serverside prepared statements broken | ||
---|---|---|---|
Submitted: | 25 Jun 2006 15:41 | Modified: | 26 Jul 2006 18:17 |
Reporter: | th nb | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 3.1.13 | OS: | Any (All) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[25 Jun 2006 15:41]
th nb
[27 Jun 2006 6:45]
Tonci Grgin
Hi and thanks for your problem report. In my opinion this is not a bug but expected behavior since this functionality is missing as can be seen in DatabaseMetaData.java: public boolean supportsStatementPooling() throws SQLException { return false; } What I'm not sure is wether this is a server side or connector side issue. I will consult on this matter. From JDBC specs: "The connection pool and statement pool are implemented by the application server. However, this functionality could also be implemented by the driver or underlying data source. This discussion of statement pooling is meant to allow for any of these implementations." The workaround you provided is dengerous since there's no control mechanism to limit number of pooled prepared statements which can lead to slowdown: "In many cases, reusing statements is a significant optimization. This is especially true for complex prepared statements. However, it should also be noted that leaving large numbers of statements open may have an adverse impact on the use of resources." In my opinion, you should set this report to severity S3 or S4 (feature request).
[27 Jun 2006 12:31]
Mark Matthews
There's a bug in that DatabaseMetaData.supportsStatementPooling() returns "false", although we don't yet use the "standard" javax.sql interfaces for limiting the number of pooled statements. I've verified that the bug with pooled prepared statement does exist.
[27 Jun 2006 20:13]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8349
[27 Jun 2006 20:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8350
[27 Jun 2006 20:31]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8351