~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_gearman/logging_gearman.cc

  • Committer: Brian Aker
  • Date: 2010-12-08 18:53:46 UTC
  • mto: This revision was merged to the branch mainline in revision 1983.
  • Revision ID: brian@tangent.org-20101208185346-89uak2ofyivk1yss
Update schema, make sure that it always ruturns a valid string (it just
makes the entire interface simpler to use).

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
    unsigned char qs[255];
239
239
  
240
240
    // to avoid trying to printf %s something that is potentially NULL
241
 
    const char *dbs= session->db.empty() ? "" : session->db.c_str();
 
241
    drizzled::util::string::const_shared_ptr dbs(session->schema());
242
242
  
243
243
    msgbuf_len=
244
244
      snprintf(msgbuf.get(), MAX_MSG_LEN,
249
249
               session->thread_id,
250
250
               session->getQueryId(),
251
251
               // dont need to quote the db name, always CSV safe
252
 
               (int)session->getSchema().length(), dbs,
 
252
               (int)dbs->size(), dbs->c_str(),
253
253
               // do need to quote the query
254
254
               quotify((const unsigned char *)session->getQueryString()->c_str(), session->getQueryString()->length(), qs, sizeof(qs)),
255
255
               // command_name is defined in drizzled/sql_parse.cc