summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-10-03 14:11:57 +0500
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-10-03 14:11:57 +0500
commitde70be9da6eb65875a42cf9143aa391adca44a11 (patch)
tree8ba27948aed88f32eb3ad395b101f7eed33a0b06 /myisam/mi_open.c
parentdc62ff5560fcd8596cba19b767cfb39396309d4f (diff)
downloadmariadb-git-de70be9da6eb65875a42cf9143aa391adca44a11.tar.gz
Bug#22052 Trailing spaces are not removed from UNICODE fields in an index
Fix: using charset-aware functions cs->cset->lengthsp() and cs->cset->fill() instead of single byte code which is not UCS2 compatible. myisam/mi_key.c: Using character-set aware functions to trim and append spaces. myisam/mi_open.c: Initialize charset for BINARY/VARBINARY to my_charset_bin, instead of NULL mysql-test/r/ctype_ucs.result: Adding test case mysql-test/t/ctype_ucs.test: Adding test case
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index a5b303f86d4..174890d57b6 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -323,6 +323,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
goto err;
}
}
+ else if (pos->type == HA_KEYTYPE_BINARY)
+ pos->charset= &my_charset_bin;
}
if (share->keyinfo[i].flag & HA_SPATIAL)
{