Query Logging output missing a comma

Bug #402831 reported by Ronald Bradford
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Jay Pipes

Bug Description

Version 2009.07.1097 logging_query output appears to be missing a comma between third and second last variables. as shown in the following output

Further information:
1248214561824590,1,1,"","select @@version_comment limit 1","Query",1248214561824590,1240,1240,1,00,0
1248214582588346,1,3,"","show global variables like 'logging_query%'","Query",1248214582588346,1958,1706,6,62,0

Code seems to confirm a missing ',' in the snprintf however this syntax with 64bit ints is newer then my C skills.

 snprintf(msgbuf, MAX_MSG_LEN,
               "%"PRIu64",%"PRIu64",%"PRIu64",\"%.*s\",\"%s\",\"%.*s\","
               "%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64
               "%"PRIu32",%"PRIu32"\n",
               t_mark,
               session->thread_id,
               session->query_id,
               // dont need to quote the db name, always CSV safe
               dbl, dbs,
               // do need to quote the query
               quotify((unsigned char *)session->query,
                       session->query_length, qs, sizeof(qs)),
               // command_name is defined in drizzled/sql_parse.cc
               // dont need to quote the command name, always CSV safe
               (int)command_name[session->command].length,
               command_name[session->command].str,
               // counters are at end, to make it easier to add more
               (t_mark - session->connect_utime),
               (t_mark - session->start_utime),
               (t_mark - session->utime_after_lock),
               session->sent_row_count,
               session->examined_row_count,
               session->tmp_table,
               session->total_warn_count);

Related branches

Revision history for this message
Jay Pipes (jaypipes) wrote :

Yep, your diagnosis is correct. This should be trivial fix like you point out.

Changed in drizzle:
importance: Undecided → Medium
status: New → Confirmed
Jay Pipes (jaypipes)
Changed in drizzle:
assignee: nobody → Jay Pipes (jaypipes)
milestone: none → aloha
Revision history for this message
Jay Pipes (jaypipes) wrote :

Fix committed in lp:~jaypipes/drizzle/bugs

Changed in drizzle:
status: Confirmed → Fix Committed
Jay Pipes (jaypipes)
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.