jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Forbes" <forbes...@googlemail.com>
Subject Fwd: Patch for clear JDBC cache
Date Mon, 12 Mar 2007 10:41:12 GMT
What is the best way for handling patches? Should I open a Jira issue,
and attach a patch?

Regards
Al

---------- Forwarded message ----------
From: Al Forbes <forbes.al@googlemail.com>
Date: 05-Mar-2007 11:34
Subject: Patch for clear JDBC cache
To: JCS Developers List <jcs-dev@jakarta.apache.org>


Hi,

When clearing a cache with a key ending with a colon, the SQL has the
syntax "xxx = like key". The = causes an SQL syntax error.

svn diff src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
Index: src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
===================================================================
--- src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
 (revision 514637)
+++ src/java/org/apache/jcs/auxiliary/disk/jdbc/JDBCDiskCache.java
 (working copy)
@@ -554,7 +554,7 @@
             {
                 // remove all keys of the same name group.
                 sql = "delete from " +
getJdbcDiskCacheAttributes().getTableName() + " where REGION = '"
-                    + this.getCacheName() + "' and CACHE_KEY = like
'" + key + "%'";
+                   + this.getCacheName() + "' and CACHE_KEY like '" +
key + "%'";
             }
             Connection con = poolAccess.getConnection();
             Statement sStatement = null;

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


Mime
View raw message