diff options
author | unknown <serg@sergbook.mysql.com> | 2002-08-09 13:22:23 +0200 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2002-08-09 13:22:23 +0200 |
commit | b84a4f2fe747cb5a0a7877358846862c12effebc (patch) | |
tree | 36d1760fea840e85f71e6342bbcb75c6d9748bb4 /myisam | |
parent | 66eb6db7558f8a67ebd06b7d3e06ca9514a089d6 (diff) | |
download | mariadb-git-b84a4f2fe747cb5a0a7877358846862c12effebc.tar.gz |
fixed mi_comp_unique to use _mi_compare_text()
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_unique.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/myisam/mi_unique.c b/myisam/mi_unique.c index 5806502823a..b373693e6e0 100644 --- a/myisam/mi_unique.c +++ b/myisam/mi_unique.c @@ -170,19 +170,19 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const byte *a, const byte *b, memcpy_fixed((byte*) &pos_a,pos_a+keyseg->bit_start,sizeof(char*)); memcpy_fixed((byte*) &pos_b,pos_b+keyseg->bit_start,sizeof(char*)); } - end= pos_a+length; if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT) { - uchar *sort_order=keyseg->charset->sort_order; - while (pos_a != end) - if (sort_order[*(uchar*) pos_a++] != - sort_order[*(uchar*) pos_b++]) + if (_mi_compare_text(keyseg->charset, (uchar *)pos_a, length, + (uchar *)pos_b, length, 0)) return 1; } else + { + end= pos_a+length; while (pos_a != end) if (*pos_a++ != *pos_b++) return 1; + } } return 0; } |