~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.cc

  • Committer: Brian Aker
  • Date: 2011-02-01 17:15:16 UTC
  • mto: (2132.1.4 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2134.
  • Revision ID: brian@tangent.org-20110201171516-h7rpqlmj6vyt6fc3
Additional error cleanup (passing error correctly to the client code).

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
}
397
397
 
398
398
 
399
 
void ClientMySQLProtocol::sendError(uint32_t sql_errno, const char *err)
 
399
void ClientMySQLProtocol::sendError(drizzled::error_t sql_errno, const char *err)
400
400
{
401
401
  uint32_t length;
402
402
  /*
404
404
  */
405
405
  unsigned char buff[2+1+SQLSTATE_LENGTH+DRIZZLE_ERRMSG_SIZE], *pos;
406
406
 
407
 
  assert(sql_errno);
 
407
  assert(sql_errno != EE_OK);
408
408
  assert(err && err[0]);
409
409
 
410
410
  /*
429
429
    return;
430
430
  }
431
431
 
432
 
  int2store(buff,sql_errno);
 
432
  int2store(buff, static_cast<uint16_t>(sql_errno));
433
433
  pos= buff+2;
434
434
 
435
435
  /* The first # is to make the client backward compatible */