Changeset: e57df3a6603e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e57df3a6603e
Modified Files:
monetdb5/modules/atoms/str.c
monetdb5/modules/mal/Tests/All
testing/Mtest.py.in
Branch: default
Log Message:
Merge with Jul2015 branch.
diffs (106 lines):
diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c
--- a/monetdb5/modules/atoms/str.c
+++ b/monetdb5/modules/atoms/str.c
@@ -1439,6 +1439,7 @@ convertCase(BAT *from, BAT *to, str *res
const unsigned char *src = (const unsigned char *) s;
const unsigned char *end = (const unsigned char *) (src + len);
BUN UTF8_CONV_r;
+ int lower_to_upper = from == UTF8_lowerBat;
if (strNil(s)) {
*res = GDKstrdup(str_nil);
@@ -1450,9 +1451,21 @@ convertCase(BAT *from, BAT *to, str *res
int c;
UTF8_GETCHAR(c, src);
- HASHfnd_int(UTF8_CONV_r, fromi, &c);
- if (UTF8_CONV_r != BUN_NONE)
- c = *(int*) BUNtloc(toi, UTF8_CONV_r);
+ if (c < 0x80) {
+ /* for ASCII characters we don't need
to do a hash
+ * lookup */
+ if (lower_to_upper) {
+ if ('a' <= c && c <= 'z')
+ c += 'A' - 'a';
+ } else {
+ if ('A' <= c && c <= 'Z')
+ c += 'a' - 'A';
+ }
+ } else {
+ HASHfnd_int(UTF8_CONV_r, fromi, &c);
+ if (UTF8_CONV_r != BUN_NONE)
+ c = *(int*) BUNtloc(toi,
UTF8_CONV_r);
+ }
if (dst + 6 > (unsigned char *) *res + len) {
/* not guaranteed to fit, so allocate
more space;
* also allocate enough for the rest of
the
diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
--- a/monetdb5/modules/mal/Tests/All
+++ b/monetdb5/modules/mal/Tests/All
@@ -31,26 +31,26 @@ mat
remoteInit
-remote01
-remote02
-HAVE_GEOM?remote03
-remote04
-remote06
-remote07
-remote08
-remote09
-remote11
-remote12
+!BAD_HOSTNAME?remote01
+!BAD_HOSTNAME?remote02
+!BAD_HOSTNAME&HAVE_GEOM?remote03
+!BAD_HOSTNAME?remote04
+!BAD_HOSTNAME?remote06
+!BAD_HOSTNAME?remote07
+!BAD_HOSTNAME?remote08
+!BAD_HOSTNAME?remote09
+!BAD_HOSTNAME?remote11
+!BAD_HOSTNAME?remote12
# needs Merovingian and aims at SQL
-#remote88
-#remote89
-remote99
+#!BAD_HOSTNAME?remote88
+#!BAD_HOSTNAME?remote89
+!BAD_HOSTNAME?remote99
-remote10
+!BAD_HOSTNAME?remote10
# this will always return something else
-#sabaoth00
-sabaoth01
+#!BAD_HOSTNAME?sabaoth00
+!BAD_HOSTNAME?sabaoth01
partition
batpartition
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -331,6 +331,7 @@ CONDITIONALS = {
'HAVE_RUBY' : "",
'MERCURIAL' : "",
'RELEASERUN' : "",
+ 'BAD_HOSTNAME' : "",
}
# a bunch of classes to help with generating (X)HTML files
@@ -3785,6 +3786,12 @@ def main(argv) :
pass
os.chdir(BACK)
+ # check whether our hostname makes sense
+ try:
+ socket.getaddrinfo(socket.gethostname(), 50000)
+ except:
+ CONDITIONALS['BAD_HOSTNAME'] = '#' # True
+
# read '.Mapprove.rc'
if THISFILE == 'Mapprove.py':
f = os.path.join(TSTTRGBASE, TSTPREF, '.Mapprove.rc')
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list