Commit 85d51dd1 authored by Tor Didriksen's avatar Tor Didriksen

remerge 5.1 => 5.5

parents f4cf7562 a44794d0
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
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
......@@ -199,7 +200,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
{
const ulong min_sort_memory=
max(MIN_SORT_MEMORY, param.sort_length * MERGEBUFF2);
max(MIN_SORT_MEMORY,
ALIGN_SIZE(MERGEBUFF2 * (param.rec_length + sizeof(uchar*))));
while (memory_available >= min_sort_memory)
{
ulong keys= memory_available / (param.rec_length + sizeof(char*));
......
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