summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2005-08-02 12:09:49 -0700
committerigor@rurik.mysql.com <>2005-08-02 12:09:49 -0700
commitb5f33d2bc43838269054a5c71f9a2a36af711647 (patch)
treefda6ff51b26035e9a98ce70509ddd925d7e54b59 /myisam
parent2889025accafd9f7a5c7b2788b9e34f31dc257e4 (diff)
parent8420d76f8d5ad60310e970db643b351930231baa (diff)
downloadmariadb-git-b5f33d2bc43838269054a5c71f9a2a36af711647.tar.gz
Manual merge
Diffstat (limited to 'myisam')
-rw-r--r--myisam/sort.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/myisam/sort.c b/myisam/sort.c
index f2f8c8ef7ec..fabd713ef45 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -587,13 +587,15 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
while (!got_error &&
!my_b_read(&sinfo->tempfile_for_exceptions,(byte*)&key_length,
- sizeof(key_length)) &&
- !my_b_read(&sinfo->tempfile_for_exceptions,(byte*)mergebuf,
- (uint) key_length))
+ sizeof(key_length)))
{
- if (_mi_ck_write(info,sinfo->key,(uchar*) mergebuf,
- key_length - info->s->rec_reflength))
- got_error=1;
+ byte ft_buf[HA_FT_MAXBYTELEN + HA_FT_WLEN + 10];
+ if (key_length > sizeof(ft_buf) ||
+ my_b_read(&sinfo->tempfile_for_exceptions, (byte*)ft_buf,
+ (uint)key_length) ||
+ _mi_ck_write(info, sinfo->key, (uchar*)ft_buf,
+ key_length - info->s->rec_reflength))
+ got_error=1;
}
}
}