tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56586] New: initSQL should be committed if defaultAutoCommit == false
Date Mon, 02 Jun 2014 20:25:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56586

            Bug ID: 56586
           Summary: initSQL should be committed if defaultAutoCommit ==
                    false
           Product: Tomcat Modules
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
          Assignee: dev@tomcat.apache.org
          Reporter: cservin@cromagnon.com

The initSQL is meant to initialize the JDBC connections.

If defaultAutoCommit == false and rollbackOnReturn == true the connection
initialization will be rolled back causing the initialization to be lost for
that connection.

This could be fixed by inserting:

if ( !connection.getAutoCommit() ) connection.commit();

after line 375 in PooledConnection.java

Sorry for the lack of a proper diff, I have not built tomcat-jdbc from source.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message