diff options
author | svoj@mysql.com <> | 2005-08-02 12:12:37 +0500 |
---|---|---|
committer | svoj@mysql.com <> | 2005-08-02 12:12:37 +0500 |
commit | 0f98bf44ef55cb12d3c4965ffdfc25d00d5a765d (patch) | |
tree | f2cb71563dbf0970cb26ed97931736e7fbea021e /myisam | |
parent | ca56883011ffd39e2c0e25bbe024e383b54bd412 (diff) | |
parent | 19fe33e16ca3fe23e3df42a9d388e8f649446dbe (diff) | |
download | mariadb-git-0f98bf44ef55cb12d3c4965ffdfc25d00d5a765d.tar.gz |
Merge mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.0
into mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.1
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/sort.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/myisam/sort.c b/myisam/sort.c index 7c6efa9a05b..0bbf7efa659 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_MAXLEN + 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; } } } |