Opened 10 years ago

Closed 9 years ago

#7539 closed enhancement (fixed)

Improve logging in mythdbconn

Reported by: Dibblah Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: MythTV - General Version: head
Severity: low Keywords: database, logging
Cc: Ticket locked: no

Description

Currently, when Myth has -v database specified, logging shows queries going to the server.

The aim of this patch is to improve this logging:

  1. Show which database connection each query is assigned to. This helps to differentiate between different threads accessing the database concurrently.
  2. With -v database,extra the logging includes the full results of each query.
  3. Each query returns the size of the result set.

I am not sure 3 is actually a good idea, since it is dependent on mysql, essentially.

This is a first draft - I intend to split the change into it's functional components.

Attachments (2)

mythsqlverbose.patch (2.7 KB) - added by Dibblah 10 years ago.
myth.log (17.0 KB) - added by Dibblah 10 years ago.
Example of output

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Dibblah

Attachment: mythsqlverbose.patch added

Changed 10 years ago by Dibblah

Attachment: myth.log added

Example of output

comment:1 Changed 9 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [23524]) Enable some extra SQL debugging when run with "-v database,extra".

When VB_EXTRA is defined, we now log the results of the SQL command in addition to the SQL itself.

Closes #7539 using a patch based on Allan Stirling's patch in the ticket.

NOTE: This does modify the binary version since it adds ::next() to MSqlQuery,

so rebuild plugins, etc..

Note: See TracTickets for help on using tickets.