~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_read.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "mysys/mysys_priv.h"
17
 
#include "mysys/mysys_err.h"
 
16
#include "drizzled/internal/mysys_priv.h"
 
17
#include "drizzled/my_error.h"
18
18
#include <errno.h>
19
19
 
20
20
 
43
43
    errno= 0;                                   /* Linux doesn't reset this */
44
44
    if ((readbytes= read(Filedes, Buffer, Count)) != Count)
45
45
    {
46
 
      my_errno= errno ? errno : -1;
 
46
      errno= errno ? errno : -1;
47
47
      if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
48
48
      {
49
49
        continue;                              /* Interrupted */
52
52
      {
53
53
        if (readbytes == (size_t) -1)
54
54
          my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG),
55
 
                   "unknown", my_errno);
 
55
                   "unknown", errno);
56
56
        else if (MyFlags & (MY_NABP | MY_FNABP))
57
57
          my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG),
58
 
                   "unknown", my_errno);
 
58
                   "unknown", errno);
59
59
      }
60
60
      if (readbytes == (size_t) -1 ||
61
61
          ((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))