Fix bug when initSQL is used, then we should always execute it upon connection creation.
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 25 Mar 2009 14:38:33 +0000 (14:38 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 25 Mar 2009 14:38:33 +0000 (14:38 +0000)
Bug report attributed to Torin McCabe

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@758272 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

index d84fee9..bc051d3 100644 (file)
@@ -266,6 +266,7 @@ public class PooledConnection {
         }
         long now = System.currentTimeMillis();
         if (this.poolProperties.getValidationInterval() > 0 &&
+            (validateAction!=VALIDATE_INIT) &&    
             (now - this.lastValidated) <
             this.poolProperties.getValidationInterval()) {
             return true;