~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/filesort.cc

  • Committer: Brian Aker
  • Date: 2010-11-06 22:20:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: brian@tangent.org-20101106222039-svjhoxtkw766w1bp
Additional io_cache encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
328
328
    goto err;
329
329
  }
330
330
 
331
 
  if (open_cached_file(&buffpek_pointers,drizzle_tmpdir.c_str(),TEMP_PREFIX, DISK_BUFFER_SIZE, MYF(MY_WME)))
 
331
  if (buffpek_pointers.open_cached_file(drizzle_tmpdir.c_str(),TEMP_PREFIX, DISK_BUFFER_SIZE, MYF(MY_WME)))
332
332
  {
333
333
    goto err;
334
334
  }
367
367
    table_sort.buffpek_len= maxbuffer;
368
368
    buffpek_pointers.close_cached_file();
369
369
        /* Open cached file if it isn't open */
370
 
    if (! my_b_inited(outfile) && open_cached_file(outfile,drizzle_tmpdir.c_str(),TEMP_PREFIX,READ_RECORD_BUFFER, MYF(MY_WME)))
 
370
    if (! my_b_inited(outfile) && outfile->open_cached_file(drizzle_tmpdir.c_str(),TEMP_PREFIX,READ_RECORD_BUFFER, MYF(MY_WME)))
371
371
    {
372
372
      goto err;
373
373
    }
721
721
 
722
722
  internal::my_string_ptr_sort((unsigned char*) sort_keys, (uint32_t) count, sort_length);
723
723
  if (!my_b_inited(tempfile) &&
724
 
      open_cached_file(tempfile, drizzle_tmpdir.c_str(), TEMP_PREFIX, DISK_BUFFER_SIZE, MYF(MY_WME)))
 
724
      tempfile->open_cached_file(drizzle_tmpdir.c_str(), TEMP_PREFIX, DISK_BUFFER_SIZE, MYF(MY_WME)))
725
725
  {
726
726
    return 1;
727
727
  }
1082
1082
  if (*maxbuffer < MERGEBUFF2)
1083
1083
    return 0;
1084
1084
  if (flush_io_cache(t_file) ||
1085
 
      open_cached_file(&t_file2,drizzle_tmpdir.c_str(),TEMP_PREFIX,DISK_BUFFER_SIZE, MYF(MY_WME)))
 
1085
      t_file2.open_cached_file(drizzle_tmpdir.c_str(),TEMP_PREFIX,DISK_BUFFER_SIZE, MYF(MY_WME)))
1086
1086
  {
1087
1087
    return 1;
1088
1088
  }