diff options
author | unknown <epotemkin@bk-internal.mysql.com> | 2008-01-10 18:03:26 +0100 |
---|---|---|
committer | unknown <epotemkin@bk-internal.mysql.com> | 2008-01-10 18:03:26 +0100 |
commit | cd6dc10c4602e056b0892714dbe35eba497a40f2 (patch) | |
tree | 9714776ef7e2f3f906076f2926f205d24bac9d39 | |
parent | 0c49363d1e135eebe48ec1378c966c9238b7924f (diff) | |
parent | eb80c468c0ee8f5363fae0f4cc544c53b4208367 (diff) | |
download | mariadb-git-cd6dc10c4602e056b0892714dbe35eba497a40f2.tar.gz |
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
into bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
sql/filesort.cc:
Auto merged
-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 23bc5c04648..f2216c12ce4 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -245,10 +245,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= (uchar *) 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; |