Commit 611484f9 authored by Tor Didriksen's avatar Tor Didriksen

Bug#14111180 HANDLE_FATAL_SIGNAL IN PTR_COMPARE_1 / QUEUE_INSERT

Space available for merging was calculated incorrectly.
parent 5ecb7db4
/* /*
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -295,8 +295,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, ...@@ -295,8 +295,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
Use also the space previously used by string pointers in sort_buffer Use also the space previously used by string pointers in sort_buffer
for temporary key storage. for temporary key storage.
*/ */
param.keys=((param.keys*(param.rec_length+sizeof(char*))) / param.keys= table_sort.sort_keys_size / param.rec_length;
param.rec_length-1);
maxbuffer--; // Offset from 0 maxbuffer--; // Offset from 0
if (merge_many_buff(&param,(uchar*) sort_keys,buffpek,&maxbuffer, if (merge_many_buff(&param,(uchar*) sort_keys,buffpek,&maxbuffer,
&tempfile)) &tempfile))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment