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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to