~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.cc

  • Committer: Toru Maesaka
  • Date: 2008-12-01 11:00:41 UTC
  • mto: (632.1.17 devel)
  • mto: This revision was merged to the branch mainline in revision 637.
  • Revision ID: dev@torum.net-20081201110041-gia57w4pw4qwh13t
Third pass of replacing MySQL's strmake() with libc calls

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
  buff[2]= '#';
277
277
  pos= (unsigned char*) my_stpcpy((char*) buff+3, drizzle_errno_to_sqlstate(sql_errno));
278
278
 
279
 
  length= (uint) (strmake((char*) pos, err, DRIZZLE_ERRMSG_SIZE-1) -
280
 
                  (char*) buff);
 
279
  char *tmp= strncpy((char*)pos, err, DRIZZLE_ERRMSG_SIZE-1);
 
280
  tmp+= strlen((char*)pos);
 
281
  tmp[0]= '\0';
 
282
  length= (uint32_t)(tmp-(char*)buff);
281
283
  err= (char*) buff;
282
284
 
283
285
  net_write_command(net,(unsigned char) 255, (unsigned char*) "", 0, (unsigned char*) err, length);