]> git.koha-community.org Git - koha.git/commit
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Aug 2021 06:59:40 +0000 (08:59 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Aug 2021 11:28:41 +0000 (07:28 -0400)
commite0d7ca07769e311db84d7b70c2f2fef8b15683b7
tree1b98a40f03fa683d30796b0c2e06783f218ed995
parent8ab917eb2e141ab013b99f9142c29b4128b66ab9
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports

Since bug 25026 DBMS errors are raised, but the report module is not
dealing correctly with the errors.
If an error occurred in execute_query, next queries will fail as well,
we should skip them.

Test plan:
1. Create report from SQL queries, containing errors (invalid syntax, etc.)
'SELECT id FROM borrowers' can do it
2. Execute the query
=> Without this patch you get a 500
=> With this patch applied you see that the error raised at DBMS level
is propagated to the UI
3. Confirm that there is no regression on valid queries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
reports/guided_reports.pl