~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/mf_iocache.cc

  • Committer: Monty Taylor
  • Date: 2008-07-05 11:08:18 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: monty@inaugust.com-20080705110818-xyc8ehdym3r7nf6t
Add Jay's test optoins at the target of make test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
  only be created if a write exeeds the file buffer or if one calls
32
32
  flush_io_cache().  
33
33
*/
34
 
#include <drizzled/server_includes.h>
 
34
 
 
35
#include "mysql_priv.h"
 
36
#ifdef HAVE_REPLICATION
35
37
 
36
38
extern "C" {
37
39
 
43
45
  @retval
44
46
    0   if record read
45
47
*/
46
 
int _my_b_net_read(register IO_CACHE *info, unsigned char *Buffer,
 
48
 
 
49
 
 
50
int _my_b_net_read(register IO_CACHE *info, uchar *Buffer,
47
51
                   size_t Count __attribute__((unused)))
48
52
{
49
53
  ulong read_length;
50
54
  NET *net= &(current_thd)->net;
 
55
  DBUG_ENTER("_my_b_net_read");
51
56
 
52
57
  if (!info->end_of_file)
53
 
    return(1);  /* because my_b_get (no _) takes 1 byte at a time */
 
58
    DBUG_RETURN(1);     /* because my_b_get (no _) takes 1 byte at a time */
54
59
  read_length=my_net_read(net);
55
60
  if (read_length == packet_error)
56
61
  {
57
62
    info->error= -1;
58
 
    return(1);
 
63
    DBUG_RETURN(1);
59
64
  }
60
65
  if (read_length == 0)
61
66
  {
62
67
    info->end_of_file= 0;                       /* End of file from client */
63
 
    return(1);
 
68
    DBUG_RETURN(1);
64
69
  }
65
70
  /* to set up stuff for my_b_get (no _) */
66
 
  info->read_end = (info->read_pos = (unsigned char*) net->read_pos) + read_length;
 
71
  info->read_end = (info->read_pos = (uchar*) net->read_pos) + read_length;
67
72
  Buffer[0] = info->read_pos[0];                /* length is always 1 */
68
73
 
69
74
  /*
76
81
 
77
82
  info->read_pos++;
78
83
 
79
 
  return(0);
 
84
  DBUG_RETURN(0);
80
85
}
81
86
 
82
87
} /* extern "C" */
 
88
#endif /* HAVE_REPLICATION */
 
89
 
 
90