diff options
author | unknown <evgen@moonbone.local> | 2008-01-10 19:23:36 +0300 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2008-01-10 19:23:36 +0300 |
commit | eb80c468c0ee8f5363fae0f4cc544c53b4208367 (patch) | |
tree | 53e6b88d687d08c80722360bd6c444394d52f32e | |
parent | dafd3f439cf40ae17ba4225738413e74155f7997 (diff) | |
parent | 1a8bcceb2d829f868421472995e65b66655d5d33 (diff) | |
download | mariadb-git-eb80c468c0ee8f5363fae0f4cc544c53b4208367.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/work/33675-bug-5.0-opt-mysql
-rw-r--r-- | sql/filesort.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc index 5a8e3627758..43b079e83d5 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -239,10 +239,14 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, } else { + if (table_sort.buffpek && table_sort.buffpek_len < maxbuffer) + { + x_free(table_sort.buffpek); + table_sort.buffpek= 0; + } if (!(table_sort.buffpek= read_buffpek_from_file(&buffpek_pointers, maxbuffer, - (table_sort.buffpek_len < maxbuffer ? - NULL : table_sort.buffpek)))) + table_sort.buffpek))) goto err; buffpek= (BUFFPEK *) table_sort.buffpek; table_sort.buffpek_len= maxbuffer; |