https://bz.apache.org/bugzilla/show_bug.cgi?id=63320

            Bug ID: 63320
           Summary: StatementCache interceptor does not cache statements
                    that return values in dedicated columns
           Product: Tomcat Modules
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
          Assignee: dev@tomcat.apache.org
          Reporter: ronny.schu...@tomtom.com
  Target Milestone: ---

The StatementCache interceptor does not cache calls to 

 Connection#prepareStatement(String, String[])

and most likely 

 Connection#prepareStatement(String, int[])

The reason is CacheKey#equals and #hashCode, that use Array#equals resp.
#hashCode when processing the args array, which does not work correctly as the
args array contains a nested array in this case. Switching to Arrays#deepEquals
resp. #deepHashCode fixes the issue.

We need to use the StatementCache together with Spring, as Springs JdbcTemplate
creates a new statement for each call and Oracle looks up the type of the
return values for each created statement, which got dramatically slower with
Oracle 18.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to