[Koha-bugs] [Bug 29579] Show saved SQL report ID in database query

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 25 03:30:48 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29579

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #137990|0                           |1
        is obsolete|                            |

--- Comment #15 from David Nind <david at davidnind.com> ---
Created attachment 138068
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138068&action=edit
Bug 29579: Show saved SQL report ID in database query

When trying to figure out which saved SQL report caused too much load, it's
useful to have the report id show in the mysql process list.

This patch adds the saved SQL ID number as a comment line in front
of the SQL before passing it to the database.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Create a long running query like:
   SELECT * FROM borrowers a, borrowers b, borrowers c, borrowers d
4) Connect to the database using koha-mysql
5) Execute "show processlist;"
6) Note the Info column looks something like:
   SELECT * FROM borrowers a, borrowers b, borrowers c, borrowers d /*
saved_sql.id: 1 */

Signed-off-by: David Nind <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list