summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c5
-rw-r--r--myisam/sort.c13
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;