Changeset: c30bf9423b5a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c30bf9423b5a
Modified Files:
        monetdb5/modules/mal/pcre.c
Branch: Oct2014
Log Message:

Merge with Jan2014 branch.


diffs (41 lines):

diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -1236,19 +1236,25 @@ BATPCRElike3(bat *ret, int *bid, str *pa
                        BATloop(strs, p, q) {
                                const char *s = (str)BUNtail(strsi, p);
 
-                               pos = pcre_exec(re, NULL, s, (int) strlen(s), 
0, 0, NULL, 0);
+                               if (*s == '\200') {
+                                       br[i] = bit_nil;
+                                       r->T->nonil = 0;
+                                       r->T->nil = 1;
+                               } else {
+                                       pos = pcre_exec(re, NULL, s, (int) 
strlen(s), 0, 0, NULL, 0);
 
-                               if (pos >= 0)
-                                       br[i] = *not? FALSE:TRUE;
-                               else if (pos == -1)
-                                       br[i] = *not? TRUE: FALSE;
-                               else {
-                                       BBPreleaseref(strs->batCacheid);
-                                       BBPreleaseref(r->batCacheid);
-                                       res = createException(MAL, 
"pcre.match", OPERATION_FAILED
-                                                       ": matching of regular 
expression (%s) failed with %d", ppat, pos);
-                                       GDKfree(ppat);
-                                       return res;
+                                       if (pos >= 0)
+                                               br[i] = *not? FALSE:TRUE;
+                                       else if (pos == -1)
+                                               br[i] = *not? TRUE: FALSE;
+                                       else {
+                                               BBPreleaseref(strs->batCacheid);
+                                               BBPreleaseref(r->batCacheid);
+                                               res = createException(MAL, 
"pcre.match", OPERATION_FAILED
+                                                                               
          ": matching of regular expression (%s) failed with %d", ppat, pos);
+                                               GDKfree(ppat);
+                                               return res;
+                                       }
                                }
                                i++;
                        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to