summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-03-31 11:04:48 +0400
committerAlexander Barkov <bar@mariadb.org>2016-03-31 11:04:48 +0400
commit1d73005bf357a607423f858482c52ecb4712607d (patch)
tree974a3bbb7f8ee2ef7c0b15aa16aed03baa18926a /storage
parent282497dd6d1049b4fb963641504c2733752845a7 (diff)
downloadmariadb-git-1d73005bf357a607423f858482c52ecb4712607d.tar.gz
MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_difference
- Removing the "diff_if_only_endspace_difference" argument from MY_COLLATION_HANDLER::strnncollsp(), my_strnncollsp_simple(), as well as in the function template MY_FUNCTION_NAME(strnncollsp) in strcoll.ic - Removing the "diff_if_only_space_different" from ha_compare_text(), hp_rec_key_cmp(). - Adding a new function my_strnncollsp_padspace_bin() and reusing it instead of duplicate code pieces in my_strnncollsp_8bit_bin(), my_strnncollsp_latin1_de(), my_strnncollsp_tis620(), my_strnncollsp_utf8_cs(). - Adding more tests for better coverage of the trailing space handling. - Removing the unused definition of HA_END_SPACE_ARE_EQUAL
Diffstat (limited to 'storage')
-rw-r--r--storage/heap/heapdef.h3
-rw-r--r--storage/heap/hp_delete.c2
-rw-r--r--storage/heap/hp_hash.c15
-rw-r--r--storage/heap/hp_update.c4
-rw-r--r--storage/heap/hp_write.c2
-rw-r--r--storage/innobase/handler/ha_innodb.cc10
-rw-r--r--storage/maria/ma_check.c2
-rw-r--r--storage/maria/ma_ft_boolean_search.c8
-rw-r--r--storage/maria/ma_ft_nlq_search.c2
-rw-r--r--storage/maria/ma_ft_parser.c2
-rw-r--r--storage/maria/ma_ft_update.c4
-rw-r--r--storage/maria/ma_unique.c2
-rw-r--r--storage/maria/ma_write.c2
-rw-r--r--storage/myisam/ft_boolean_search.c8
-rw-r--r--storage/myisam/ft_nlq_search.c2
-rw-r--r--storage/myisam/ft_parser.c2
-rw-r--r--storage/myisam/ft_stopwords.c2
-rw-r--r--storage/myisam/ft_update.c4
-rw-r--r--storage/myisam/mi_check.c2
-rw-r--r--storage/myisam/mi_unique.c2
-rw-r--r--storage/myisam/mi_write.c2
-rw-r--r--storage/tokudb/hatoku_cmp.cc3
-rw-r--r--storage/xtradb/handler/ha_innodb.cc10
23 files changed, 44 insertions, 51 deletions
diff --git a/storage/heap/heapdef.h b/storage/heap/heapdef.h
index d5c0ad96b05..8706819c182 100644
--- a/storage/heap/heapdef.h
+++ b/storage/heap/heapdef.h
@@ -86,8 +86,7 @@ extern ulong hp_mask(ulong hashnr,ulong buffmax,ulong maxlength);
extern void hp_movelink(HASH_INFO *pos,HASH_INFO *next_link,
HASH_INFO *newlink);
extern int hp_rec_key_cmp(HP_KEYDEF *keydef,const uchar *rec1,
- const uchar *rec2,
- my_bool diff_if_only_endspace_difference);
+ const uchar *rec2);
extern int hp_key_cmp(HP_KEYDEF *keydef,const uchar *rec,
const uchar *key);
extern void hp_make_key(HP_KEYDEF *keydef,uchar *key,const uchar *rec);
diff --git a/storage/heap/hp_delete.c b/storage/heap/hp_delete.c
index 0c1c2c4c8f8..12f2c65f00b 100644
--- a/storage/heap/hp_delete.c
+++ b/storage/heap/hp_delete.c
@@ -123,7 +123,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
while (pos->ptr_to_rec != recpos)
{
- if (flag && !hp_rec_key_cmp(keyinfo, record, pos->ptr_to_rec, 0))
+ if (flag && !hp_rec_key_cmp(keyinfo, record, pos->ptr_to_rec))
last_ptr=pos; /* Previous same key */
gpos=pos;
if (!(pos=pos->next_key))
diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c
index b727c71d3de..eaf284c2015 100644
--- a/storage/heap/hp_hash.c
+++ b/storage/heap/hp_hash.c
@@ -513,8 +513,6 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const uchar *rec)
keydef Key definition
rec1 Record to compare
rec2 Other record to compare
- diff_if_only_endspace_difference
- Different number of end space is significant
NOTES
diff_if_only_endspace_difference is used to allow us to insert
@@ -525,8 +523,7 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const uchar *rec)
<> 0 Key differes
*/
-int hp_rec_key_cmp(HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2,
- my_bool diff_if_only_endspace_difference)
+int hp_rec_key_cmp(HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2)
{
HA_KEYSEG *seg,*endseg;
@@ -561,7 +558,7 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2,
}
if (seg->charset->coll->strnncollsp(seg->charset,
pos1,char_length1,
- pos2,char_length2, 0))
+ pos2,char_length2))
return 1;
}
else if (seg->type == HA_KEYTYPE_VARTEXT1) /* Any VARCHAR segments */
@@ -601,9 +598,7 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const uchar *rec1, const uchar *rec2,
if (cs->coll->strnncollsp(seg->charset,
pos1, char_length1,
- pos2, char_length2,
- seg->flag & HA_END_SPACE_ARE_EQUAL ?
- 0 : diff_if_only_endspace_difference))
+ pos2, char_length2))
return 1;
}
else
@@ -671,7 +666,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key)
if (seg->charset->coll->strnncollsp(seg->charset,
(uchar*) pos, char_length_rec,
- (uchar*) key, char_length_key, 0))
+ (uchar*) key, char_length_key))
return 1;
}
else if (seg->type == HA_KEYTYPE_VARTEXT1) /* Any VARCHAR segments */
@@ -699,7 +694,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key)
if (cs->coll->strnncollsp(seg->charset,
(uchar*) pos, char_length_rec,
- (uchar*) key, char_length_key, 0))
+ (uchar*) key, char_length_key))
return 1;
}
else
diff --git a/storage/heap/hp_update.c b/storage/heap/hp_update.c
index 8757f8e87c5..7afd7f61788 100644
--- a/storage/heap/hp_update.c
+++ b/storage/heap/hp_update.c
@@ -37,7 +37,7 @@ int heap_update(HP_INFO *info, const uchar *old, const uchar *heap_new)
p_lastinx= share->keydef + info->lastinx;
for (keydef= share->keydef, end= keydef + share->keys; keydef < end; keydef++)
{
- if (hp_rec_key_cmp(keydef, old, heap_new, 0))
+ if (hp_rec_key_cmp(keydef, old, heap_new))
{
if ((*keydef->delete_key)(info, keydef, old, pos, keydef == p_lastinx) ||
(*keydef->write_key)(info, keydef, heap_new, pos))
@@ -76,7 +76,7 @@ int heap_update(HP_INFO *info, const uchar *old, const uchar *heap_new)
}
while (keydef >= share->keydef)
{
- if (hp_rec_key_cmp(keydef, old, heap_new, 0))
+ if (hp_rec_key_cmp(keydef, old, heap_new))
{
if ((*keydef->delete_key)(info, keydef, heap_new, pos, 0) ||
(*keydef->write_key)(info, keydef, old, pos))
diff --git a/storage/heap/hp_write.c b/storage/heap/hp_write.c
index a1d81fd808d..392662f69ae 100644
--- a/storage/heap/hp_write.c
+++ b/storage/heap/hp_write.c
@@ -386,7 +386,7 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
do
{
if (pos->hash_of_key == hash_of_key &&
- ! hp_rec_key_cmp(keyinfo, record, pos->ptr_to_rec, 1))
+ ! hp_rec_key_cmp(keyinfo, record, pos->ptr_to_rec))
{
DBUG_RETURN(my_errno=HA_ERR_FOUND_DUPP_KEY);
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 5edb6dc5190..150f21ad8ae 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -6339,7 +6339,7 @@ innobase_mysql_cmp(
having indexes on such data need to rebuild their tables! */
ret = charset->coll->strnncollsp(
- charset, a, a_length, b, b_length, 0);
+ charset, a, a_length, b, b_length);
if (ret < 0) {
return(-1);
@@ -6433,7 +6433,7 @@ innobase_mysql_cmp_prefix(
charset = innobase_get_fts_charset(mysql_type, charset_number);
result = ha_compare_text(charset, (uchar*) a, a_length,
- (uchar*) b, b_length, 1, 0);
+ (uchar*) b, b_length, 1);
return(result);
}
@@ -6453,7 +6453,7 @@ innobase_fts_text_cmp(
return(ha_compare_text(
charset, s1->f_str, static_cast<uint>(s1->f_len),
- s2->f_str, static_cast<uint>(s2->f_len), 0, 0));
+ s2->f_str, static_cast<uint>(s2->f_len), 0));
}
/******************************************************************//**
compare two character string case insensitively according to their charset. */
@@ -6476,7 +6476,7 @@ innobase_fts_text_case_cmp(
return(ha_compare_text(
charset, s1->f_str, static_cast<uint>(s1->f_len),
- s2->f_str, static_cast<uint>(newlen), 0, 0));
+ s2->f_str, static_cast<uint>(newlen), 0));
}
/******************************************************************//**
Get the first character's code position for FTS index partition. */
@@ -6524,7 +6524,7 @@ innobase_fts_text_cmp_prefix(
result = ha_compare_text(
charset, s2->f_str, static_cast<uint>(s2->f_len),
- s1->f_str, static_cast<uint>(s1->f_len), 1, 0);
+ s1->f_str, static_cast<uint>(s1->f_len), 1);
/* We switched s1, s2 position in ha_compare_text. So we need
to negate the result */
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 5035df26b18..89b1a733fc9 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -5642,7 +5642,7 @@ static int sort_maria_ft_key_write(MARIA_SORT_PARAM *sort_param,
if (ha_compare_text(sort_param->seg->charset,
a+1,a_len-1,
- ft_buf->lastkey+1,val_off-1, 0, 0)==0)
+ ft_buf->lastkey+1,val_off-1, 0)==0)
{
uchar *p;
if (!ft_buf->buf) /* store in second-level tree */
diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c
index af2ad6f1ba9..2d7989821fb 100644
--- a/storage/maria/ma_ft_boolean_search.c
+++ b/storage/maria/ma_ft_boolean_search.c
@@ -163,7 +163,7 @@ static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1,(*a)->len - 1,
- (uchar*) (*b)->word + 1,(*b)->len - 1, 0, 0);
+ (uchar*) (*b)->word + 1,(*b)->len - 1, 0);
if (!i)
i=CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
@@ -413,7 +413,7 @@ static int _ft2_search_no_lock(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
extra-1,
(uchar*) ftbw->word+1,
ftbw->len-1,
- (my_bool) (ftbw->flags & FTB_FLAG_TRUNC), 0);
+ (my_bool) (ftbw->flags & FTB_FLAG_TRUNC));
}
if (r) /* not found */
@@ -905,7 +905,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word+1, ftbw->len-1,
- (my_bool)(ftbw->flags&FTB_FLAG_TRUNC), 0) < 0)
+ (my_bool)(ftbw->flags&FTB_FLAG_TRUNC)) < 0)
b= c;
else
a= c;
@@ -932,7 +932,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word + 1,ftbw->len - 1,
- (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0))
+ (my_bool)(ftbw->flags & FTB_FLAG_TRUNC)))
{
if (ftb->with_scan & FTB_FLAG_TRUNC)
continue;
diff --git a/storage/maria/ma_ft_nlq_search.c b/storage/maria/ma_ft_nlq_search.c
index 5eb916112d7..6a148643428 100644
--- a/storage/maria/ma_ft_nlq_search.c
+++ b/storage/maria/ma_ft_nlq_search.c
@@ -119,7 +119,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
info->last_key.data+1,
info->last_key.data_length +
info->last_key.ref_length - extra - 1,
- key.data+1, key.data_length-1, 0, 0))
+ key.data+1, key.data_length-1, 0))
break;
if (subkeys.i < 0)
diff --git a/storage/maria/ma_ft_parser.c b/storage/maria/ma_ft_parser.c
index 81b5ea5119c..84a92a011c0 100644
--- a/storage/maria/ma_ft_parser.c
+++ b/storage/maria/ma_ft_parser.c
@@ -34,7 +34,7 @@ typedef struct st_my_maria_ft_parser_param
static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2)
{
return ha_compare_text(cs, (uchar*) w1->pos, w1->len,
- (uchar*) w2->pos, w2->len, 0, 0);
+ (uchar*) w2->pos, w2->len, 0);
}
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
diff --git a/storage/maria/ma_ft_update.c b/storage/maria/ma_ft_update.c
index 99748c65ebf..a166b7b21fb 100644
--- a/storage/maria/ma_ft_update.c
+++ b/storage/maria/ma_ft_update.c
@@ -184,7 +184,7 @@ int _ma_ft_cmp(MARIA_HA *info, uint keynr, const uchar *rec1, const uchar *rec2)
if ((ftsi1.pos != ftsi2.pos) &&
(!ftsi1.pos || !ftsi2.pos ||
ha_compare_text(cs, ftsi1.pos,ftsi1.len,
- ftsi2.pos,ftsi2.len,0,0)))
+ ftsi2.pos,ftsi2.len,0)))
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
}
DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL);
@@ -212,7 +212,7 @@ int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf,
while(old_word->pos && new_word->pos)
{
cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len,
- (uchar*) new_word->pos,new_word->len,0,0);
+ (uchar*) new_word->pos,new_word->len,0);
cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5);
if (cmp < 0 || cmp2)
diff --git a/storage/maria/ma_unique.c b/storage/maria/ma_unique.c
index fd823f7b52d..ec22a7a0112 100644
--- a/storage/maria/ma_unique.c
+++ b/storage/maria/ma_unique.c
@@ -238,7 +238,7 @@ my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, pos_a, a_length,
- pos_b, b_length, 0, 1))
+ pos_b, b_length, 0))
return 1;
}
else
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index f57c462e7c0..63bbdf83854 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -880,7 +880,7 @@ ChangeSet@1.2562, 2008-04-09 07:41:40+02:00, serg@janus.mylan +9 -0
DBUG_ASSERT(info->ft1_to_ft2==0);
if (alen == blen &&
ha_compare_text(keyinfo->seg->charset, a, alen,
- b, blen, 0, 0) == 0)
+ b, blen, 0) == 0)
{
/* Yup. converting */
info->ft1_to_ft2=(DYNAMIC_ARRAY *)
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index 6befe3b2d7a..3b403a41c4c 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -163,7 +163,7 @@ static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1,
- (uchar*) (*b)->word + 1, (*b)->len - 1, 0, 0);
+ (uchar*) (*b)->word + 1, (*b)->len - 1, 0);
if (!i)
i= CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
@@ -416,7 +416,7 @@ static int _ft2_search_no_lock(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
info->lastkey_length-extra-1,
(uchar*) ftbw->word+1,
ftbw->len-1,
- (my_bool) (ftbw->flags & FTB_FLAG_TRUNC),0);
+ (my_bool) (ftbw->flags & FTB_FLAG_TRUNC));
}
if (r) /* not found */
@@ -913,7 +913,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word+1, ftbw->len-1,
- (my_bool) (ftbw->flags & FTB_FLAG_TRUNC), 0) < 0)
+ (my_bool) (ftbw->flags & FTB_FLAG_TRUNC)) < 0)
b= c;
else
a= c;
@@ -940,7 +940,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
ftbw= ftb->list[c];
if (ha_compare_text(ftb->charset, (uchar*)word, len,
(uchar*)ftbw->word + 1,ftbw->len - 1,
- (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0))
+ (my_bool)(ftbw->flags & FTB_FLAG_TRUNC)))
{
if (ftb->with_scan & FTB_FLAG_TRUNC)
continue;
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c
index 9524b6f1833..d9a9a03919e 100644
--- a/storage/myisam/ft_nlq_search.c
+++ b/storage/myisam/ft_nlq_search.c
@@ -114,7 +114,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
if (keylen &&
ha_compare_text(aio->charset,info->lastkey+1,
- info->lastkey_length-extra-1, keybuff+1,keylen-1,0,0))
+ info->lastkey_length-extra-1, keybuff+1,keylen-1,0))
break;
if (subkeys.i < 0)
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c
index 5612b4bec14..c8d99b68e8a 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -32,7 +32,7 @@ typedef struct st_my_ft_parser_param
static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2)
{
return ha_compare_text(cs, (uchar*) w1->pos, w1->len,
- (uchar*) w2->pos, w2->len, 0, 0);
+ (uchar*) w2->pos, w2->len, 0);
}
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c
index 7b2d520a65a..3bf31bf3d66 100644
--- a/storage/myisam/ft_stopwords.c
+++ b/storage/myisam/ft_stopwords.c
@@ -35,7 +35,7 @@ static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)),
{
return ha_compare_text(ft_stopword_cs,
(uchar *)w1->pos,w1->len,
- (uchar *)w2->pos,w2->len,0,0);
+ (uchar *)w2->pos,w2->len,0);
}
static void FT_STOPWORD_free(FT_STOPWORD *w, TREE_FREE action,
diff --git a/storage/myisam/ft_update.c b/storage/myisam/ft_update.c
index 19144ff01fb..10a36650b0a 100644
--- a/storage/myisam/ft_update.c
+++ b/storage/myisam/ft_update.c
@@ -180,7 +180,7 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const uchar *rec1, const uchar *rec2)
if ((ftsi1.pos != ftsi2.pos) &&
(!ftsi1.pos || !ftsi2.pos ||
ha_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len,
- (uchar*) ftsi2.pos,ftsi2.len,0,0)))
+ (uchar*) ftsi2.pos,ftsi2.len,0)))
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
}
DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL);
@@ -209,7 +209,7 @@ int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf,
while(old_word->pos && new_word->pos)
{
cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len,
- (uchar*) new_word->pos,new_word->len,0,0);
+ (uchar*) new_word->pos,new_word->len,0);
cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5);
if (cmp < 0 || cmp2)
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index bab0ad2b6a4..57ac5bdca97 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -3939,7 +3939,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a)
if (ha_compare_text(sort_param->seg->charset,
((uchar *)a)+1,a_len-1,
- (uchar*) ft_buf->lastkey+1,val_off-1, 0, 0)==0)
+ (uchar*) ft_buf->lastkey+1,val_off-1, 0)==0)
{
if (!ft_buf->buf) /* store in second-level tree */
{
diff --git a/storage/myisam/mi_unique.c b/storage/myisam/mi_unique.c
index cdf3e618275..5192d404939 100644
--- a/storage/myisam/mi_unique.c
+++ b/storage/myisam/mi_unique.c
@@ -214,7 +214,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
- (uchar *) pos_b, b_length, 0, 1))
+ (uchar *) pos_b, b_length, 0))
return 1;
}
else
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index ff96ee8751b..ff12f335af1 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -543,7 +543,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
get_key_length(alen,a);
DBUG_ASSERT(info->ft1_to_ft2==0);
if (alen == blen &&
- ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0, 0)==0)
+ ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0)==0)
{
/* yup. converting */
info->ft1_to_ft2=(DYNAMIC_ARRAY *)
diff --git a/storage/tokudb/hatoku_cmp.cc b/storage/tokudb/hatoku_cmp.cc
index be0ea1e3ff3..606a771eb30 100644
--- a/storage/tokudb/hatoku_cmp.cc
+++ b/storage/tokudb/hatoku_cmp.cc
@@ -921,8 +921,7 @@ static inline int cmp_toku_string(
a_buf,
a_num_bytes,
b_buf,
- b_num_bytes,
- 0
+ b_num_bytes
);
return ret_val;
}
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index b6d259c8bda..df0f74fbb92 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -6675,7 +6675,7 @@ innobase_mysql_cmp(
having indexes on such data need to rebuild their tables! */
ret = charset->coll->strnncollsp(
- charset, a, a_length, b, b_length, 0);
+ charset, a, a_length, b, b_length);
if (ret < 0) {
return(-1);
@@ -6769,7 +6769,7 @@ innobase_mysql_cmp_prefix(
charset = innobase_get_fts_charset(mysql_type, charset_number);
result = ha_compare_text(charset, (uchar*) a, a_length,
- (uchar*) b, b_length, 1, 0);
+ (uchar*) b, b_length, 1);
return(result);
}
@@ -6789,7 +6789,7 @@ innobase_fts_text_cmp(
return(ha_compare_text(
charset, s1->f_str, static_cast<uint>(s1->f_len),
- s2->f_str, static_cast<uint>(s2->f_len), 0, 0));
+ s2->f_str, static_cast<uint>(s2->f_len), 0));
}
/******************************************************************//**
compare two character string case insensitively according to their charset. */
@@ -6812,7 +6812,7 @@ innobase_fts_text_case_cmp(
return(ha_compare_text(
charset, s1->f_str, static_cast<uint>(s1->f_len),
- s2->f_str, static_cast<uint>(newlen), 0, 0));
+ s2->f_str, static_cast<uint>(newlen), 0));
}
/******************************************************************//**
Get the first character's code position for FTS index partition. */
@@ -6860,7 +6860,7 @@ innobase_fts_text_cmp_prefix(
result = ha_compare_text(
charset, s2->f_str, static_cast<uint>(s2->f_len),
- s1->f_str, static_cast<uint>(s1->f_len), 1, 0);
+ s1->f_str, static_cast<uint>(s1->f_len), 1);
/* We switched s1, s2 position in ha_compare_text. So we need
to negate the result */