~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/internal/my_write.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "config.h"
17
17
 
18
18
#include "drizzled/internal/my_sys.h"
 
19
#include "drizzled/internal/thread_var.h"
19
20
#include "drizzled/error.h"
20
21
#include <cerrno>
21
22
 
47
48
      Count-=writenbytes;
48
49
    }
49
50
    errno=errno;
50
 
#ifndef NO_BACKGROUND
51
 
    if (my_thread_var->abort)
52
 
      MyFlags&= ~ MY_WAIT_IF_FULL;              /* End if aborted by user */
53
 
    if ((errno == ENOSPC || errno == EDQUOT) &&
54
 
        (MyFlags & MY_WAIT_IF_FULL))
55
 
    {
56
 
      if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
57
 
        my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
58
 
                 "unknown", errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
59
 
      sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
60
 
      continue;
61
 
    }
62
 
 
63
 
    if ((writenbytes == 0 || writenbytes == (size_t) -1))
64
 
    {
65
 
      if (errno == EINTR)
66
 
      {
67
 
        continue;                               /* Interrupted */
68
 
      }
69
 
 
70
 
      if (!writenbytes && !errors++)            /* Retry once */
71
 
      {
72
 
        /* We may come here if the file quota is exeeded */
73
 
        errno=EFBIG;                            /* Assume this is the error */
74
 
        continue;
75
 
      }
76
 
    }
77
 
    else
78
 
      continue;                                 /* Retry */
79
 
#endif
80
51
    if (MyFlags & (MY_NABP | MY_FNABP))
81
52
    {
82
53
      if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))