diff options
author | unknown <serg@serg.mylan> | 2003-12-04 21:58:28 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-12-04 21:58:28 +0100 |
commit | 6a38e8299538296b5a207328b01b46dfb197e35d (patch) | |
tree | f52b83374a1d65b18565fed5c9f35dfcee9e3fb9 /myisam | |
parent | 649b9f4289e01c352af4d1bd4361d9846bc1d078 (diff) | |
download | mariadb-git-6a38e8299538296b5a207328b01b46dfb197e35d.tar.gz |
make a clear distinction between max_word_length in *characters* and in *bytes*
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_dump.c | 2 | ||||
-rw-r--r-- | myisam/ft_static.c | 4 | ||||
-rw-r--r-- | myisam/ft_update.c | 2 | ||||
-rw-r--r-- | myisam/mi_check.c | 6 | ||||
-rw-r--r-- | myisam/mi_create.c | 4 | ||||
-rw-r--r-- | myisam/myisamchk.c | 6 | ||||
-rw-r--r-- | myisam/sort.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/myisam/ft_dump.c b/myisam/ft_dump.c index 8c40878cf00..47134af71d6 100644 --- a/myisam/ft_dump.c +++ b/myisam/ft_dump.c @@ -29,7 +29,7 @@ static my_bool verbose; static char *query=NULL; static uint lengths[256]; -#define MAX_LEN (HA_FT_MAXLEN+10) +#define MAX_LEN (HA_FT_MAXBYTELEN+10) #define HOW_OFTEN_TO_WRITE 10000 static struct my_option my_long_options[] = diff --git a/myisam/ft_static.c b/myisam/ft_static.c index cf4f3d6a02a..0dcea5bec0c 100644 --- a/myisam/ft_static.c +++ b/myisam/ft_static.c @@ -19,7 +19,7 @@ #include "ftdefs.h" ulong ft_min_word_len=4; -ulong ft_max_word_len=HA_FT_MAXLEN; +ulong ft_max_word_len=HA_FT_MAXCHARLEN; ulong ft_query_expansion_limit=5; const char *ft_boolean_syntax="+ -><()~*:\"\"&|"; @@ -29,7 +29,7 @@ const HA_KEYSEG ft_keysegs[FT_SEGS]={ 63, /* language (will be overwritten) */ 0, 0, 0, /* null_bit, bit_start, bit_end */ HA_VAR_LENGTH | HA_PACK_KEY, /* flag */ - HA_FT_MAXLEN, /* length */ + HA_FT_MAXBYTELEN, /* length */ HA_FT_WLEN, /* start */ 0, /* null_pos */ NULL /* charset */ diff --git a/myisam/ft_update.c b/myisam/ft_update.c index b94a174b292..4015abbbeba 100644 --- a/myisam/ft_update.c +++ b/myisam/ft_update.c @@ -279,7 +279,7 @@ int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, uint _ft_make_key(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wptr, my_off_t filepos) { - byte buf[HA_FT_MAXLEN+16]; + byte buf[HA_FT_MAXBYTELEN+16]; DBUG_ENTER("_ft_make_key"); #if HA_FT_WTYPE == HA_KEYTYPE_FLOAT diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 6f794ad2ea8..6b2ad9744c4 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1979,7 +1979,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, sort_param.key_read=sort_ft_key_read; sort_param.key_write=sort_ft_key_write; - sort_param.key_length+=FT_MAX_WORD_LEN_FOR_SORT-HA_FT_MAXLEN; + sort_param.key_length+=FT_MAX_WORD_LEN_FOR_SORT-HA_FT_MAXBYTELEN; } else { @@ -2375,7 +2375,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, total_key_length+=sort_param[i].key_length; if (sort_param[i].keyinfo->flag & HA_FULLTEXT) - sort_param[i].key_length+=FT_MAX_WORD_LEN_FOR_SORT-ft_max_word_len; + sort_param[i].key_length+=FT_MAX_WORD_LEN_FOR_SORT-HA_FT_MAXBYTELEN; } sort_info.total_keys=i; sort_param[0].master= 1; @@ -3913,7 +3913,7 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows) { uint key_maxlength=key->maxlength; if (key->flag & HA_FULLTEXT) - key_maxlength+=FT_MAX_WORD_LEN_FOR_SORT-HA_FT_MAXLEN; + key_maxlength+=FT_MAX_WORD_LEN_FOR_SORT-HA_FT_MAXBYTELEN; return (key->flag & (HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY | HA_FULLTEXT) && ((ulonglong) rows * key_maxlength > (ulonglong) myisam_max_temp_length)); diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 0982e5bdaf6..9036ced751c 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -289,9 +289,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, } fulltext_keys++; - key_length+= HA_FT_MAXLEN+HA_FT_WLEN; + key_length+= HA_FT_MAXBYTELEN+HA_FT_WLEN; length++; /* At least one length byte */ - min_key_length_skipp+=HA_FT_MAXLEN; + min_key_length_skipp+=HA_FT_MAXBYTELEN; } else { diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 61a1736c521..a7528a14353 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -322,11 +322,11 @@ static struct my_option my_long_options[] = { "decode_bits", OPT_DECODE_BITS, "", (gptr*) &decode_bits, (gptr*) &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0}, { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", (gptr*) &ft_min_word_len, - (gptr*) &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXLEN, + (gptr*) &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXCHARLEN, 0, 1, 0}, { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", (gptr*) &ft_max_word_len, - (gptr*) &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXLEN, 10, - HA_FT_MAXLEN, 0, 1, 0}, + (gptr*) &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXCHARLEN, 10, + HA_FT_MAXCHARLEN, 0, 1, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; diff --git a/myisam/sort.c b/myisam/sort.c index 651b2331cd1..e28df1657a7 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -156,7 +156,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, while ((maxbuffer= (int) (records/(keys-1)+1)) != skr); if ((sort_keys=(uchar **)my_malloc(keys*(sort_length+sizeof(char*))+ - HA_FT_MAXLEN, MYF(0)))) + HA_FT_MAXBYTELEN, MYF(0)))) { if (my_init_dynamic_array(&buffpek, sizeof(BUFFPEK), maxbuffer, maxbuffer/2)) @@ -365,7 +365,7 @@ pthread_handler_decl(thr_find_all_keys,arg) } if ((sort_keys=(uchar **)my_malloc(keys*(sort_length+sizeof(char*))+ ((info->keyinfo->flag & HA_FULLTEXT) ? - HA_FT_MAXLEN : 0), MYF(0)))) + HA_FT_MAXBYTELEN : 0), MYF(0)))) { if (my_init_dynamic_array(&info->buffpek, sizeof(BUFFPEK), maxbuffer, maxbuffer/2)) |