1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

remerge 5.1 => 5.5

This commit is contained in:
Tor Didriksen
2013-10-29 19:55:38 +01:00

View File

@@ -1,4 +1,5 @@
/* 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*));