diff options
author | unknown <bell@sanja.is.com.ua> | 2006-05-24 08:16:53 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2006-05-24 08:16:53 +0300 |
commit | 19be345d0cecceddd4acca9b198bcc0b3971a0eb (patch) | |
tree | 9156dfab3474fce7f84f60d7d471d3b89e1d3e4c /storage/myisam/ft_boolean_search.c | |
parent | 2b8527e94507acd10ff48fee4fe1b8814d246dea (diff) | |
parent | 157002b12f4134eb6ca2b84ba95558e3b6638929 (diff) | |
download | mariadb-git-19be345d0cecceddd4acca9b198bcc0b3971a0eb.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-5.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-merge-maria
BitKeeper/etc/ignore:
auto-union
include/my_base.h:
Auto merged
include/myisam.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_class.h:
Auto merged
storage/csv/ha_tina.cc:
Auto merged
storage/myisam/Makefile.am:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/ft_nlq_search.c:
Auto merged
storage/myisam/ft_parser.c:
Auto merged
storage/myisam/ft_update.c:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_create.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_key.c:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/myisam/mi_packrec.c:
Auto merged
storage/myisam/mi_search.c:
Auto merged
storage/myisam/mi_test1.c:
Auto merged
storage/myisam/mi_test2.c:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisam/myisamlog.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
BUILD/SETUP.sh:
merge
configure.in:
merge
libmysqld/Makefile.am:
merge
sql/handler.h:
merge
sql/set_var.cc:
merge
storage/Makefile.am:
merge
storage/myisam/myisamdef.h:
merge
Diffstat (limited to 'storage/myisam/ft_boolean_search.c')
-rw-r--r-- | storage/myisam/ft_boolean_search.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 8d48f533203..7fdd6714e4c 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -150,7 +150,7 @@ static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word DESC, ndepth DESC */ - int i= mi_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, + int i= ha_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, (uchar*) (*a)->word+1,(*a)->len-1,0,0); if (!i) i=CMP_NUM((*b)->ndepth,(*a)->ndepth); @@ -184,7 +184,7 @@ static int ftb_query_add_word(void *param, char *word, int word_len, case FT_TOKEN_WORD: ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root, sizeof(FTB_WORD) + - (info->trunc ? MI_MAX_KEY_BUFF : + (info->trunc ? HA_MAX_KEY_BUFF : word_len * ftb_param->ftb->charset->mbmaxlen + HA_FT_WLEN + ftb_param->ftb->info->s->rec_reflength)); @@ -334,7 +334,6 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) byte *lastkey_buf=ftbw->word+ftbw->off; LINT_INIT(off); - LINT_INIT(off); if (ftbw->flags & FTB_FLAG_TRUNC) lastkey_buf+=ftbw->len; @@ -378,7 +377,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (!r && !ftbw->off) { - r= mi_compare_text(ftb->charset, + r= ha_compare_text(ftb->charset, info->lastkey+1, info->lastkey_length-extra-1, (uchar*) ftbw->word+1, @@ -602,8 +601,9 @@ static int ftb_phrase_add_word(void *param, char *word, int word_len, { FT_WORD *phrase_word= (FT_WORD *)phrase->data; FT_WORD *document_word= (FT_WORD *)document->data; - if (my_strnncoll(phrase_param->cs, phrase_word->pos, phrase_word->len, - document_word->pos, document_word->len)) + if (my_strnncoll(phrase_param->cs, (uchar*) phrase_word->pos, + phrase_word->len, + (uchar*) document_word->pos, document_word->len)) return 0; } phrase_param->match++; @@ -836,7 +836,7 @@ static int ftb_find_relevance_add_word(void *param, char *word, int len, for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + 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) b= c; @@ -846,7 +846,7 @@ static int ftb_find_relevance_add_word(void *param, char *word, int len, for (; c >= 0; c--) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word + 1,ftbw->len - 1, (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0)) break; |