You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/02/26 10:09:22 UTC

DO NOT REPLY [Bug 27246] New: - PreparedStatement cache should be different depending on the Catalog

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27246>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27246

PreparedStatement cache should be different depending on the Catalog

           Summary: PreparedStatement cache should be different depending on
                    the Catalog
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: ludovic@pobox.com


When you use the setCatalog function there seesm to be an issue with the
PreparedStatement cache giving you cached statements corresponding to a
different database...

Reproduction:

0/ setup two databases (in my case it is mysql) with the same table with
different a different amount of lines in the table
1/ open a connection
2/ run a query to count number of lines of the table
3/ switch databases using setCatalog
4/ run the same query
5/ you get the same result as before (the result from the 1st database)

Now if you do it the other way around, then you get the result from the second
database..
I believe the problem can only come from the prepared statement cache..

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org