]> git.koha-community.org Git - koha.git/commit
Bug 29579: Show saved SQL report ID in database query
authorPasi Kallinen <pasi.kallinen@koha-suomi.fi>
Fri, 26 Nov 2021 09:54:52 +0000 (11:54 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 15 Feb 2022 07:41:38 +0000 (21:41 -1000)
commit39ec12fc48919a92a3ec12b4c766605556a9b0c3
tree53e1112627b73987ed6e6da4075cccccd0ab42ab
parent908ad2cd129676e469ed7ade46709704092c9ac3
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.

To test:
1) Run a saved report that takes long enough time, so you can:
2) Connect to the database with your preferred client, and use
   "show processlist;" to list all the running mysql processes.
3) The running saved SQL report should show up with
   "-- saved_sql.id=123" in the process info field.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Reports/Guided.pm