~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2010-11-07 00:54:27 UTC
  • mfrom: (1909.1.2 merge)
  • Revision ID: brian@tangent.org-20101107005427-a3kcx1lytrm36a97
Rollup merge of iocache work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
923
923
  my_message(errcode, err, MYF(0));
924
924
  if (file > 0)
925
925
  {
926
 
    (void) end_io_cache(cache);
 
926
    (void) cache->end_io_cache();
927
927
    (void) internal::my_close(file, MYF(0));
928
928
    (void) internal::my_delete(path.file_string().c_str(), MYF(0));             // Delete file on error
929
929
    file= -1;
933
933
 
934
934
bool select_to_file::send_eof()
935
935
{
936
 
  int error= test(end_io_cache(cache));
 
936
  int error= test(cache->end_io_cache());
937
937
  if (internal::my_close(file, MYF(MY_WME)))
938
938
    error= 1;
939
939
  if (!error)
955
955
  /* In case of error send_eof() may be not called: close the file here. */
956
956
  if (file >= 0)
957
957
  {
958
 
    (void) end_io_cache(cache);
 
958
    (void) cache->end_io_cache();
959
959
    (void) internal::my_close(file, MYF(0));
960
960
    file= -1;
961
961
  }
1053
1053
  if ((file= internal::my_create(target_path.file_string().c_str(), 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0)
1054
1054
    return file;
1055
1055
  (void) fchmod(file, 0666);                    // Because of umask()
1056
 
  if (init_io_cache(cache, file, 0L, internal::WRITE_CACHE, 0L, 1, MYF(MY_WME)))
 
1056
  if (cache->init_io_cache(file, 0L, internal::WRITE_CACHE, 0L, 1, MYF(MY_WME)))
1057
1057
  {
1058
1058
    internal::my_close(file, MYF(0));
1059
1059
    internal::my_delete(target_path.file_string().c_str(), MYF(0));  // Delete file on error, it was just created
1585
1585
}
1586
1586
 
1587
1587
 
1588
 
 
1589
 
 
1590
 
/**
1591
 
  Check the killed state of a user thread
1592
 
  @param session  user thread
1593
 
  @retval 0 the user thread is active
1594
 
  @retval 1 the user thread has been killed
1595
 
*/
1596
 
int session_killed(const Session *session)
1597
 
{
1598
 
  return(session->killed);
1599
 
}
1600
 
 
1601
 
 
1602
 
const struct charset_info_st *session_charset(Session *session)
1603
 
{
1604
 
  return(session->charset());
1605
 
}
1606
 
 
1607
1588
/**
1608
1589
  Mark transaction to rollback and mark error as fatal to a sub-statement.
1609
1590