diff options
author | unknown <wax@mysql.com> | 2002-11-28 15:16:56 +0500 |
---|---|---|
committer | unknown <wax@mysql.com> | 2002-11-28 15:16:56 +0500 |
commit | 0c349665959e300485b7f64119cb20bdce5cd189 (patch) | |
tree | f9f80801133b595a293e2f8158244b1b1145104f /myisam | |
parent | b9a431c41ca843805ac630d0cf521d2c19083e01 (diff) | |
download | mariadb-git-0c349665959e300485b7f64119cb20bdce5cd189.tar.gz |
Correct view of sort.c and mi_too_big_key_for_sort()
myisam/mi_check.c:
Correct mi_too_big_key_for_sort()
myisam/sort.c:
Correct view, according rules
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 5 | ||||
-rw-r--r-- | myisam/sort.c | 13 |
2 files changed, 8 insertions, 10 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index ba90b2c5bcf..d3222a770a8 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -3682,10 +3682,7 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows) key_maxlength+=ft_max_word_len_for_sort-HA_FT_MAXLEN; return (key->flag & (HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY | HA_FULLTEXT) && ((ulonglong) rows * key_maxlength > - (ulonglong) myisam_max_temp_length || - (ulonglong) rows * (key_maxlength - key->minlength) / 2 > - myisam_max_extra_temp_length || - (rows == 0 && (key_maxlength / key->minlength) > 2))); + (ulonglong) myisam_max_temp_length)); } diff --git a/myisam/sort.c b/myisam/sort.c index 7152855a54b..24a76f11823 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -73,13 +73,14 @@ static int NEAR_F merge_index(MI_SORT_PARAM *,uint,uchar **,BUFFPEK *, int, IO_CACHE *); static int NEAR_F write_keys_varlen(MI_SORT_PARAM *info,uchar **sort_keys, - uint count, BUFFPEK *buffpek,IO_CACHE *tempfile); + uint count, BUFFPEK *buffpek, + IO_CACHE *tempfile); static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile,BUFFPEK *buffpek, uint sort_length); -static int NEAR_F write_merge_key(MI_SORT_PARAM *info, IO_CACHE *to_file,char* key, - uint sort_length, uint count)
; -static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info, IO_CACHE *to_file,char* key, - uint sort_length, uint count); +static int NEAR_F write_merge_key(MI_SORT_PARAM *info, IO_CACHE *to_file, + char* key, uint sort_length, uint count); +static int NEAR_F write_merge_key_varlen(MI_SORT_PARAM *info, IO_CACHE *to_file, + char* key, uint sort_length, uint count); inline int my_var_write(MI_SORT_PARAM *info,IO_CACHE *to_file,char *bufs); /* Creates a index of sorted keys @@ -786,7 +787,7 @@ static uint NEAR_F read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek, return((uint) -1); buffpek->file_pos+=length_of_key; buffp = buffp + sort_length; -
} + } buffpek->key=buffpek->base; buffpek->count-= count; buffpek->mem_count= count; |