summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/june.mysql.com>2007-10-24 16:09:30 +0500
committerunknown <svoj@mysql.com/june.mysql.com>2007-10-24 16:09:30 +0500
commit660d66263ba1e9c5ec197cc29ddc425b200b58ca (patch)
treeead3e129281c65f52e3d4f313afe9583ab920b1b /include/my_sys.h
parentd244374f2bfc11ff26058e3110941c9cc799488b (diff)
downloadmariadb-git-660d66263ba1e9c5ec197cc29ddc425b200b58ca.tar.gz
BUG#31159 - fulltext search on ucs2 column crashes server
ucs2 doesn't provide required by fulltext ctype array. Crash happens because fulltext attempts to use unitialized ctype array. Fixed by converting ucs2 fields to compatible utf8 analogue. include/my_sys.h: Added a function to find compatible character set with ctype array available. Currently used by fulltext search to find compatible substitute for ucs2 collations. mysql-test/r/ctype_ucs.result: A test case for BUG#31159. mysql-test/t/ctype_ucs.test: A test case for BUG#31159. mysys/charset.c: Added a function to find compatible character set with ctype array available. Currently used by fulltext search to find compatible substitute for ucs2 collations. sql/item_func.cc: Convert ucs2 fields to utf8. Fulltext requires ctype array, but ucs2 doesn't provide it.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 759531fa649..4a0586b9f2d 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -784,6 +784,8 @@ extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
uint cs_flags, myf my_flags);
+extern CHARSET_INFO *get_compatible_charset_with_ctype(CHARSET_INFO
+ *original_cs);
extern void free_charsets(void);
extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);