jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r480496 - in /jackrabbit/branches/1.1/jackrabbit/src: main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java
Date Wed, 29 Nov 2006 09:37:58 GMT
Author: jukka
Date: Wed Nov 29 01:37:57 2006
New Revision: 480496

URL: http://svn.apache.org/viewvc?view=rev&rev=480496
Log:
branches/1.1: Merged revision 479968 (JCR-649)

Modified:
    jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
    jackrabbit/branches/1.1/jackrabbit/src/test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java

Modified: jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java?view=diff&rev=480496&r1=480495&r2=480496
==============================================================================
--- jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
(original)
+++ jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
Wed Nov 29 01:37:57 2006
@@ -165,7 +165,7 @@
                 }
             }
         }
-        return Pattern.compile(regexp.toString());
+        return Pattern.compile(regexp.toString(), Pattern.DOTALL);
     }
 
     /**

Modified: jackrabbit/branches/1.1/jackrabbit/src/test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.1/jackrabbit/src/test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java?view=diff&rev=480496&r1=480495&r2=480496
==============================================================================
--- jackrabbit/branches/1.1/jackrabbit/src/test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java
(original)
+++ jackrabbit/branches/1.1/jackrabbit/src/test/java/org/apache/jackrabbit/core/query/SimpleQueryTest.java
Wed Nov 29 01:37:57 2006
@@ -279,6 +279,23 @@
         checkResult(result, 1);
     }
 
+    public void testLikeWithLineTerminator() throws Exception {
+        Node n = testRootNode.addNode("node1");
+        n.setProperty("value", new String[]{"foo\nbar"});
+
+        testRootNode.save();
+
+        String sql = "SELECT * FROM nt:base WHERE jcr:path LIKE '" + testRoot + "/%' AND
value LIKE 'foo%bar'";
+        Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
+        QueryResult result = q.execute();
+        checkResult(result, 1);
+
+        sql = "SELECT * FROM nt:base WHERE jcr:path LIKE '" + testRoot + "/%' AND value LIKE
'foo_bar'";
+        q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
+        result = q.execute();
+        checkResult(result, 1);
+    }
+
     public void testNotEqual() throws Exception {
         Node n = testRootNode.addNode("node1");
         n.setProperty("value", new String[]{"foo"});



Mime
View raw message