~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

  • Committer: Padraig
  • Date: 2009-02-28 06:44:12 UTC
  • mto: (934.3.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 938.
  • Revision ID: posulliv@linux-lap-20090228064412-go48znrgh26swuph
Cleaning up merge_buffers() function a little bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <drizzled/table.h>
30
30
#include <drizzled/table_list.h>
31
31
 
 
32
#include <queue>
 
33
 
 
34
using namespace std;
 
35
 
32
36
/* functions defined in this file */
33
37
 
34
38
static char **make_char_array(char **old_pos, register uint32_t fields,
1087
1091
 
1088
1092
class buffpek_compare_if
1089
1093
{
1090
 
  qsort_cmp2 key_compare;
 
1094
  qsort2_cmp key_compare;
1091
1095
  void *key_compare_arg;
1092
1096
  public:
1093
 
  buffpek_compare_if(qsort_cmp2 in_key_compare, void *in_compare_arg)
1094
 
    : key_compare(in_compare_arg), key_compare_arg(in_compare_arg) { }
 
1097
  buffpek_compare_if(qsort2_cmp in_key_compare, void *in_compare_arg)
 
1098
    : key_compare(in_key_compare), key_compare_arg(in_compare_arg) { }
1095
1099
  inline bool operator()(BUFFPEK *i, BUFFPEK *j)
1096
1100
  {
1097
1101
    return key_compare(key_compare_arg,
1210
1214
  else
1211
1215
    cmp= 0;                                        // Not unique
1212
1216
 
1213
 
  while (queue.elements > 1)
 
1217
  while (queue.size() > 1)
1214
1218
  {
1215
1219
    if (*killed)
1216
1220
    {
1254
1258
                                          rec_length)))
1255
1259
        {
1256
1260
          queue.pop();
1257
 
          reuse_freed_buff(&queue, buffpek, rec_length);
1258
1261
          break;                        /* One buffer have been removed */
1259
1262
        }
1260
1263
        else if (error == -1)