~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-security

« back to all changes in this revision

Viewing changes to sql/filesort.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-16 13:59:34 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20150716135934-plzpylrt211i3se4
Tags: 5.5.44-0ubuntu0.12.04.1
* SECURITY UPDATE: Update to 5.5.44 to fix security issues (LP: #1475294)
  - http://www.oracle.com/technetwork/topics/security/cpujul2015-2367936.html
  - CVE-2015-2582
  - CVE-2015-2620
  - CVE-2015-2643
  - CVE-2015-2648
  - CVE-2015-4737
  - CVE-2015-4752
  - CVE-2015-4757

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
 
2
   Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
203
203
    const ulong min_sort_memory=
204
204
      max(MIN_SORT_MEMORY,
205
205
          ALIGN_SIZE(MERGEBUFF2 * (param.rec_length + sizeof(uchar*))));
 
206
    /*
 
207
      Cannot depend on num_rows. For external sort, space for upto MERGEBUFF2
 
208
      rows is required.
 
209
    */
 
210
    if (num_rows < MERGEBUFF2)
 
211
      num_rows= MERGEBUFF2;
 
212
 
206
213
    while (memory_available >= min_sort_memory)
207
214
    {
208
215
      ulong keys= memory_available / (param.rec_length + sizeof(char*));