~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.cc

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
            ha_rows affected_rows, uint64_t id, const char *message)
168
168
{
169
169
  NET *net= &thd->net;
170
 
  uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
 
170
  uchar buff[DRIZZLE_ERRMSG_SIZE+10],*pos;
171
171
 
172
172
  if (! net->vio)       // hack for re-parsing queries
173
173
  {
279
279
  NET *net= &thd->net;
280
280
  uint length;
281
281
  /*
282
 
    buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + MYSQL_ERRMSG_SIZE:512
 
282
    buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + DRIZZLE_ERRMSG_SIZE:512
283
283
  */
284
 
  uchar buff[2+1+SQLSTATE_LENGTH+MYSQL_ERRMSG_SIZE], *pos;
 
284
  uchar buff[2+1+SQLSTATE_LENGTH+DRIZZLE_ERRMSG_SIZE], *pos;
285
285
 
286
286
  if (net->vio == 0)
287
287
  {
294
294
  {
295
295
    /* The first # is to make the protocol backward compatible */
296
296
    buff[2]= '#';
297
 
    pos= (uchar*) strmov((char*) buff+3, mysql_errno_to_sqlstate(sql_errno));
 
297
    pos= (uchar*) strmov((char*) buff+3, drizzle_errno_to_sqlstate(sql_errno));
298
298
  }
299
 
  length= (uint) (strmake((char*) pos, err, MYSQL_ERRMSG_SIZE-1) -
 
299
  length= (uint) (strmake((char*) pos, err, DRIZZLE_ERRMSG_SIZE-1) -
300
300
                  (char*) buff);
301
301
  err= (char*) buff;
302
302