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@xxxxxxxxxxxxxx>
Date: 05-Mar-2007 11:34
Subject: Patch for clear JDBC cache
To: JCS Developers List <jcs-dev@xxxxxxxxxxxxxxxxxx>
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;
|