summaryrefslogtreecommitdiff
path: root/mysys/charset.c
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2009-02-02 17:25:42 +0400
committerAlexander Barkov <bar@mysql.com>2009-02-02 17:25:42 +0400
commit9a64fc52af6ef51624f5ad594a540a713e83fa14 (patch)
tree5a9fc6fc251aa5ee96fa3dfe3fc1fb28504b17ee /mysys/charset.c
parentda44c30130da88ec7839d2c69531c5e84626d8b3 (diff)
downloadmariadb-git-9a64fc52af6ef51624f5ad594a540a713e83fa14.tar.gz
Bug#41084 full-text index added to custom UCA collation not working
Problem: Custom UCA collations didn't set the MY_CS_STRNXFRM flag, which resulted in "prefix_search" method instead of the required "seq_search". Problem2: (not metioned in the bug report) Custom UCA collations didn't also set the MY_CS_UNICODE flag, so an attempt to compare a column with a custom UCA collation to another column with a non-Unicode character set led to the "illegal mix of collation" error. Fix: the two missing flags was added into collation initialization. Upgrade: - All fulltext indexes with custom UCA collations should be rebuilt. - Non-fulltext custom UCA indexes should likely be rebuild as well.
Diffstat (limited to 'mysys/charset.c')
-rw-r--r--mysys/charset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index 9bd8de4316a..8f47b4027ef 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -212,6 +212,8 @@ copy_uca_collation(CHARSET_INFO *to, CHARSET_INFO *from)
to->max_sort_char= from->max_sort_char;
to->mbminlen= from->mbminlen;
to->mbmaxlen= from->mbmaxlen;
+ to->state|= MY_CS_AVAILABLE | MY_CS_LOADED |
+ MY_CS_STRNXFRM | MY_CS_UNICODE;
}
@@ -246,14 +248,12 @@ static int add_collation(CHARSET_INFO *cs)
{
#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS)
copy_uca_collation(newcs, &my_charset_ucs2_unicode_ci);
- newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED;
#endif
}
else if (!strcmp(cs->csname, "utf8"))
{
#if defined (HAVE_CHARSET_utf8) && defined(HAVE_UCA_COLLATIONS)
copy_uca_collation(newcs, &my_charset_utf8_unicode_ci);
- newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED;
#endif
}
else