static void log_current_query()

in plugin/server_audit/server_audit.cc [2219:2232]


static void log_current_query(MYSQL_THD thd)
{
  struct connection_info *cn;
  if (!thd)
    return;
  cn= get_loc_info(thd);
  if (!ci_needs_setup(cn) && cn->query_length)
  {
    cn->log_always= 1;
    log_statement_ex(cn, cn->query_time, thd_get_thread_id(thd),
		     cn->query, cn->query_length, 0, "QUERY", 0);
    cn->log_always= 0;
  }
}