[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 Aug 1 14:49:22 CEST 2022


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #138068|0                           |1
        is obsolete|                            |
 Attachment #138460|0                           |1
        is obsolete|                            |

--- Comment #18 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 138466
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138466&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>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

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


More information about the Koha-bugs mailing list