diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-03 12:59:31 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-03 12:59:31 +0300 |
commit | 702256ebaa12ca37724f68da2bd5f5d2959b1e8f (patch) | |
tree | be04186411dc657ef6bbcbe01267d30f2675c914 /myisam/ft_update.c | |
parent | 775d09780fb32c101c4e5da2807817c1d1231ce9 (diff) | |
parent | 7daf5a5d0ee7b52508943c7095a2cc150abcf616 (diff) | |
download | mariadb-git-702256ebaa12ca37724f68da2bd5f5d2959b1e8f.tar.gz |
merge with 4.0
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
BUILD/SETUP.sh:
Auto merged
BUILD/compile-pentium-debug:
Auto merged
BitKeeper/triggers/post-commit:
Auto merged
configure.in:
Auto merged
Docs/manual.texi:
Auto merged
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/mysql_install.c:
Auto merged
extra/resolve_stack_dump.c:
Auto merged
extra/resolveip.c:
Auto merged
include/my_sys.h:
Auto merged
include/mysqld_error.h:
Auto merged
isam/pack_isam.c:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/ft_dump.c:
Auto merged
myisam/ft_test1.c:
Auto merged
myisam/ftdefs.h:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_test1.c:
Auto merged
myisam/mi_write.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/select_found.result:
Auto merged
mysql-test/t/select_found.test:
Auto merged
mysys/charset.c:
Auto merged
mysys/default.c:
Auto merged
mysys/hash.c:
Auto merged
sql/field.cc:
Auto merged
sql/gen_lex_hash.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/hostname.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/german/errmsg.txt:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/italian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/sql_update.cc:
Auto merged
sql/structs.h:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
strings/Makefile.am:
Auto merged
strings/ctype-ujis.c:
Auto merged
tools/mysqlmanager.c:
Auto merged
Diffstat (limited to 'myisam/ft_update.c')
-rw-r--r-- | myisam/ft_update.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/myisam/ft_update.c b/myisam/ft_update.c index 04b6becde86..3c9b31207c0 100644 --- a/myisam/ft_update.c +++ b/myisam/ft_update.c @@ -90,16 +90,13 @@ uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const byte *record) FT_SEG_ITERATOR ftsi; _mi_ft_segiterator_init(info, keynr, record, &ftsi); + ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset); while (_mi_ft_segiterator(&ftsi)) if (ftsi.pos) if (ft_parse(parsed, (byte *)ftsi.pos, ftsi.len)) return 1; - /* Handle the case where all columns are NULL */ - if (!is_tree_inited(parsed) && ft_parse(parsed, (byte*) "", 0)) - return 1; - else - return 0; + return 0; } FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, @@ -153,6 +150,7 @@ static int _mi_ft_erase(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wlist, int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) { FT_SEG_ITERATOR ftsi1, ftsi2; + CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; _mi_ft_segiterator_init(info, keynr, rec1, &ftsi1); _mi_ft_segiterator_init(info, keynr, rec2, &ftsi2); @@ -160,9 +158,8 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || - mi_compare_text(default_charset_info, - (uchar*) ftsi1.pos,ftsi1.len, - (uchar*) ftsi2.pos,ftsi2.len,0))) + mi_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, + (uchar*) ftsi2.pos,ftsi2.len,0))) return THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT; } return GEE_THEY_ARE_ABSOLUTELY_IDENTICAL; @@ -174,6 +171,7 @@ int _mi_ft_update(MI_INFO *info, uint keynr, byte *keybuf, { int error= -1; FT_WORD *oldlist,*newlist, *old_word, *new_word; + CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; uint key_length; int cmp, cmp2; @@ -185,9 +183,8 @@ int _mi_ft_update(MI_INFO *info, uint keynr, byte *keybuf, error=0; while(old_word->pos && new_word->pos) { - cmp= mi_compare_text(default_charset_info, - (uchar*) old_word->pos,old_word->len, - (uchar*) new_word->pos,new_word->len,0); + cmp= mi_compare_text(cs, (uchar*) old_word->pos,old_word->len, + (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) |