Author: markt
Date: Wed Aug 30 21:13:07 2017
New Revision: 1806736

URL: http://svn.apache.org/viewvc?rev=1806736&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61391
Ensure that failed queries are logged if the SlowQueryReport interceptor is 
configured to do so and the connection has been abandoned.
Patch provided by Craig Webb

Modified:
    
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1806736&r1=1806735&r2=1806736&view=diff
==============================================================================
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 Wed Aug 30 21:13:07 2017
@@ -104,9 +104,9 @@ public class SlowQueryReport extends Abs
             QueryStats qs = this.getQueryStats(sql);
             if (qs != null) {
                 qs.failure(delta, now);
-                if (isLogFailed() && log.isWarnEnabled()) {
-                    log.warn("Failed Query Report SQL="+sql+"; time="+delta+" 
ms;");
-                }
+            }
+            if (isLogFailed() && log.isWarnEnabled()) {
+                log.warn("Failed Query Report SQL="+sql+"; time="+delta+" 
ms;");
             }
         }
         return sql;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1806736&r1=1806735&r2=1806736&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Aug 30 21:13:07 2017
@@ -172,6 +172,11 @@
   <subsection name="jdbc-pool">
     <changelog>
       <fix>
+        <bug>61391</bug>: Ensure that failed queries are logged if the
+        <code>SlowQueryReport</code> interceptor is configured to do so and the
+        connection has been abandoned. Patch provided by Craig Webb. (markt)
+      </fix>
+      <fix>
         <bug>61425</bug>: Ensure that transaction of idle connection has
         terminated  when the <code>testWhileIdle</code> is set to
         <code>true</code> and <code>defaultAutoCommit</code> is set to



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

Reply via email to