Bugzilla – Attachment 192172 Details for
Bug 39164
Add max_statement_time to SQL report queries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39164: Strip the wrapper before validaing the SQL
Bug-39164-Strip-the-wrapper-before-validaing-the-S.patch (text/plain), 853 bytes, created by
Lucas Gass (lukeg)
on 2026-01-29 17:30:18 UTC
(
hide
)
Description:
Bug 39164: Strip the wrapper before validaing the SQL
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-01-29 17:30:18 UTC
Size:
853 bytes
patch
obsolete
>From a9e08b6de5eb929f1f2204683810e2c4ca11860a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 29 Jan 2026 17:29:39 +0000 >Subject: [PATCH] Bug 39164: Strip the wrapper before validaing the SQL > >--- > Koha/Report.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Report.pm b/Koha/Report.pm >index cb7f8fdcf56..a857d188359 100644 >--- a/Koha/Report.pm >+++ b/Koha/Report.pm >@@ -58,6 +58,9 @@ sub is_sql_valid { > $sql //= ''; > my @errors = (); > >+ #strip the 'SET STATEMENT max_statement_time=%d FOR %s' bit added in Bug 39164 before validating the SQL >+ $sql =~ s/^\s*SET\s+STATEMENT\s+max_statement_time\s*=\s*\d+\s+FOR\s+//i; >+ > if ( $sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i ) { > push @errors, { sqlerr => $1 }; > } elsif ( $sql !~ /^\s*SELECT\b\s*/i ) { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39164
:
189691
|
189693
|
192172
|
192283
|
192598
|
192983