~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/net_serv.cc

  • Committer: Thomi Richards
  • Date: 2010-10-30 00:42:01 UTC
  • mfrom: (1891 staging)
  • mto: This revision was merged to the branch mainline in revision 1894.
  • Revision ID: thomir@gmail.com-20101030004201-zxi50ffop5xlvzve
fixed merge conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
  if (length >= net->max_packet_size)
159
159
  {
160
160
    /* @todo: 1 and 2 codes are identical. */
161
 
    net->error= 1;
 
161
    net->error= 3;
162
162
    net->last_errno= ER_NET_PACKET_TOO_LARGE;
163
163
    my_error(ER_NET_PACKET_TOO_LARGE, MYF(0));
164
164
    return(1);
600
600
my_real_read(NET *net, size_t *complen)
601
601
{
602
602
  unsigned char *pos;
603
 
  size_t length;
 
603
  size_t length= 0;
604
604
  uint32_t i,retry_count=0;
605
605
  size_t len=packet_error;
606
606
  uint32_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
675
675
      {
676
676
        if (drizzleclient_net_realloc(net,helping))
677
677
        {
 
678
          /* Clear the buffer so libdrizzle doesn't keep retrying */
 
679
          while (len > 0)
 
680
          {
 
681
            length= read(net->vio->get_fd(), net->buff, min((size_t)net->max_packet, len));
 
682
            assert((long)length > 0L);
 
683
            len-= length;
 
684
          }
 
685
            
678
686
          len= packet_error;          /* Return error and close connection */
679
687
          goto end;
680
688
        }