summaryrefslogtreecommitdiff
path: root/include
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
commit353ecd9ab6a1f1c96d7a403d865eeffe6271cb46 (patch)
treeead3e129281c65f52e3d4f313afe9583ab920b1b /include
parent53b85cb805391a0cdd994fdbf6706fce92c422ba (diff)
downloadmariadb-git-353ecd9ab6a1f1c96d7a403d865eeffe6271cb46.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')
-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);