~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_query/logging_query.cc

  • Committer: Brian Aker
  • Date: 2010-02-14 01:56:51 UTC
  • mto: (1273.16.5 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: brian@gaz-20100214015651-ror9j0xu7dccz0ct
Two fixes for "make dist"

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
    if (re)
277
277
    {
278
278
      int this_pcre_rc;
279
 
      this_pcre_rc = pcre_exec(re, pe, session->query.c_str(), session->query.length(), 0, 0, NULL, 0);
 
279
      this_pcre_rc = pcre_exec(re, pe, session->query, session->query_length, 0, 0, NULL, 0);
280
280
      if (this_pcre_rc < 0)
281
281
        return false;
282
282
    }
298
298
               // dont need to quote the db name, always CSV safe
299
299
               (int)session->db.length(), dbs,
300
300
               // do need to quote the query
301
 
               quotify((unsigned char *)session->getQueryString().c_str(),
 
301
               quotify((unsigned char *)session->getQueryString(),
302
302
                       session->getQueryLength(), qs, sizeof(qs)),
303
303
               // command_name is defined in drizzled/sql_parse.cc
304
304
               // dont need to quote the command name, always CSV safe
326
326
 
327
327
static Logging_query *handler= NULL;
328
328
 
329
 
static int logging_query_plugin_init(drizzled::plugin::Context &context)
 
329
static int logging_query_plugin_init(drizzled::plugin::Registry &registry)
330
330
{
331
331
  handler= new Logging_query();
332
 
  context.add(handler);
 
332
  registry.add(handler);
 
333
 
 
334
  return 0;
 
335
}
 
336
 
 
337
static int logging_query_plugin_deinit(drizzled::plugin::Registry &registry)
 
338
{
 
339
  registry.remove(handler);
 
340
  delete handler;
333
341
 
334
342
  return 0;
335
343
}
416
424
  N_("Log queries to a CSV file"),
417
425
  PLUGIN_LICENSE_GPL,
418
426
  logging_query_plugin_init,
 
427
  logging_query_plugin_deinit,
 
428
  NULL,   /* status variables */
419
429
  logging_query_system_variables,
420
430
  NULL
421
431
}