Changeset: 162816365973 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/162816365973 Modified Files: monetdb5/modules/mal/pcre.c monetdb5/modules/mal/tablet.c Branch: ascii-flag Log Message:
Use GDKstrcasecmp instead of GDKstrncasecmp for compares to the end. 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 @@ -167,9 +167,10 @@ re_match(const char *restrict s, const s return false; if (*s == '\0') return false; - /* in "atend" comparison, include NUL byte in the compare */ + /* in "atend" comparison, compare whole string, else + * only part */ if ((!r->search || r->atend) && - GDKstrncasecmp(s, r->k, SIZE_MAX, r->len + r->atend) != 0) { + (r->atend ? GDKstrcasecmp(s, r->k) : GDKstrncasecmp(s, r->k, SIZE_MAX, r->len)) != 0) { /* no match */ if (!r->search) return false; diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -1007,9 +1007,7 @@ SQLload_parse_row(READERtask *task, int /* check for user defined NULL string */ if ((!quote || !fmt->null_length) && fmt->nullstr && task->fields[i][idx] - && GDKstrncasecmp(task->fields[i][idx], fmt->nullstr, - SIZE_MAX, - fmt->null_length + 1) == 0) + && GDKstrcasecmp(task->fields[i][idx], fmt->nullstr) == 0) task->fields[i][idx] = 0; } } else { @@ -1046,9 +1044,7 @@ SQLload_parse_row(READERtask *task, int ; /* check for user defined NULL string */ if (fmt->nullstr && task->fields[i][idx] - && GDKstrncasecmp(task->fields[i][idx], fmt->nullstr, - SIZE_MAX, - fmt->null_length + 1) == 0) { + && GDKstrcasecmp(task->fields[i][idx], fmt->nullstr) == 0) { task->fields[i][idx] = 0; } } _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org