summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-14 10:04:07 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-14 10:04:07 +0200
commitf57ecb7786177e0af3b1e3ec94302720b2e0f967 (patch)
treefcbed357c5bcdb373830413086d4f58ff9ba2998 /strings
parent9bfbe7fbce86eab5a8a5de7e401772f058872716 (diff)
parentd364e64ae28c5588ea0ad013738a8dfe18412292 (diff)
downloadmariadb-git-f57ecb7786177e0af3b1e3ec94302720b2e0f967.tar.gz
5.5 merge
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-utf8.c8
-rw-r--r--strings/decimal.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index c439b6023fb..b96ca0e5bbe 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -4340,6 +4340,10 @@ static const char filename_safe_char[128]=
#define MY_FILENAME_ESCAPE '@'
+/*
+ note, that we cannot trust 'e' here, it's may be fake,
+ see strconvert()
+*/
static int
my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
@@ -4361,7 +4365,7 @@ my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALL3;
byte1= s[1];
- byte2= s[2];
+ byte2= byte1 ? s[2] : 0;
if (byte1 >= 0x30 && byte1 <= 0x7F &&
byte2 >= 0x30 && byte2 <= 0x7F)
@@ -4386,7 +4390,7 @@ my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
(byte2= hexlo(byte2)) >= 0)
{
int byte3= hexlo(s[3]);
- int byte4= hexlo(s[4]);
+ int byte4= hexlo(s[3] ? s[4] : 0);
if (byte3 >=0 && byte4 >=0)
{
*pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4;
diff --git a/strings/decimal.c b/strings/decimal.c
index edcb4c52354..edff4c02885 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -669,7 +669,7 @@ int decimal_shift(decimal_t *dec, int shift)
if (do_left)
{
do_mini_left_shift(dec, l_mini_shift, beg, end);
- mini_shift=- l_mini_shift;
+ mini_shift= -l_mini_shift;
}
else
{