summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c4
-rw-r--r--strings/ctype-uca.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 7de00025eda..4f3aaa6f668 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -185,8 +185,8 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
}
for (end= a + a_length-length; a < end ; a++)
{
- if (map[*a] != ' ')
- return (map[*a] < ' ') ? -swap : swap;
+ if (map[*a] != map[' '])
+ return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index 589276dbf23..8a51f9d7f75 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -7858,6 +7858,9 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t))
return 1;
}
+ if (!cs->caseinfo)
+ cs->caseinfo= my_unicase_default;
+
if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*))))
return 1;
bzero(newweights, 256*sizeof(uint16*));