~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.cc

  • Committer: Olaf van der Spek
  • Date: 2011-05-05 11:49:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2306.
  • Revision ID: olafvdspek@gmail.com-20110505114951-tt45awrgnmkepvuf
Return void

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
        store(field.table_name) ||
511
511
        store(field.org_table_name) ||
512
512
        store(field.col_name) ||
513
 
        store(field.org_col_name) ||
514
 
        packet.realloc(packet.length()+12))
 
513
        store(field.org_col_name))
515
514
      goto err;
 
515
    packet.realloc(packet.length()+12);
516
516
 
517
517
    /* Store fixed length fields */
518
518
    pos= (char*) packet.ptr()+packet.length();
909
909
     The +9 comes from that strings of length longer than 16M require
910
910
     9 bytes to be stored (see storeLength).
911
911
  */
912
 
  if (packet_length+9+length > packet.alloced_length() &&
913
 
      packet.realloc(packet_length+9+length))
914
 
    return 1;
 
912
  if (packet_length+9+length > packet.alloced_length())
 
913
      packet.realloc(packet_length+9+length);
915
914
  unsigned char *to= storeLength((unsigned char*) packet.ptr()+packet_length, length);
916
915
  memcpy(to,from,length);
917
916
  packet.length((size_t) (to+length-(unsigned char*) packet.ptr()));
918
 
  return 0;
 
917
  return 0; // return void
919
918
}
920
919
 
921
920
/**