diff options
author | unknown <bar@mysql.com> | 2004-08-20 21:29:36 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-08-20 21:29:36 +0500 |
commit | 8f68a9eb6f62183742d8f37bc5ec94a48e831a5d (patch) | |
tree | 77eca49fe4354ee00d4083971772d414e6c8b413 /myisam/mi_key.c | |
parent | a6352443c139415016131962291ba4509c5f0621 (diff) | |
download | mariadb-git-8f68a9eb6f62183742d8f37bc5ec94a48e831a5d.tar.gz |
Bug#4594 "column index make = failed for gbk, but like works"
Fix for MyISAM. Tests for MyISAM and HASH+BTREE.
Diffstat (limited to 'myisam/mi_key.c')
-rw-r--r-- | myisam/mi_key.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 36fe01a27f2..8f5f0e829ef 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -42,7 +42,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, byte *pos,*end; uchar *start; reg1 HA_KEYSEG *keyseg; - my_bool is_unique=info->s->keyinfo[keynr].flag & HA_NOSAME; + my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT; DBUG_ENTER("_mi_make_key"); if(info->s->keyinfo[keynr].flag & HA_SPATIAL) @@ -75,7 +75,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, *key++=1; /* Not NULL */ } - char_length= (is_unique && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length; + char_length= (!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length; pos= (byte*) record+keyseg->start; if (keyseg->flag & HA_SPACE_PACK) @@ -193,7 +193,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old, { uchar *start_key=key; HA_KEYSEG *keyseg; - my_bool is_unique=info->s->keyinfo[keynr].flag & HA_NOSAME; + my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT; DBUG_ENTER("_mi_pack_key"); for (keyseg=info->s->keyinfo[keynr].seg ; @@ -217,7 +217,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old, continue; /* Found NULL */ } } - char_length= (is_unique && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length; + char_length= (!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length; pos=old; if (keyseg->flag & HA_SPACE_PACK) { |