~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/net_serv.cc

  • Committer: Lee Bieber
  • Date: 2010-10-27 18:28:56 UTC
  • mfrom: (1883.1.3 build)
  • Revision ID: kalebral@gmail.com-20101027182856-q3wqtbv1t4egkjsk
Merge Andrew - fix bug 667360: --defaults-file not processed before paths read           
Merge Andrew - fix bug 656577: Importing SQL script results in silent failure    
Merge Andrew - fix bug 667053: drizzledump minor output cleanup needed

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);
599
599
my_real_read(NET *net, size_t *complen)
600
600
{
601
601
  unsigned char *pos;
602
 
  size_t length;
 
602
  size_t length= 0;
603
603
  uint32_t i,retry_count=0;
604
604
  size_t len=packet_error;
605
605
  uint32_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
674
674
      {
675
675
        if (drizzleclient_net_realloc(net,helping))
676
676
        {
 
677
          /* Clear the buffer so libdrizzle doesn't keep retrying */
 
678
          while (len > 0)
 
679
          {
 
680
            length= read(net->vio->sd, net->buff, min((size_t)net->max_packet, len));
 
681
            assert((long)length > 0L);
 
682
            len-= length;
 
683
          }
 
684
            
677
685
          len= packet_error;          /* Return error and close connection */
678
686
          goto end;
679
687
        }