Bugzilla – Attachment 120473 Details for
Bug 28287
reports execution should stop on execute_query errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28287: don't issue more SQL commands after first report SQL error
Bug-28287-dont-issue-more-SQL-commands-after-first.patch (text/plain), 1.28 KB, created by
Didier Gautheron
on 2021-05-04 15:40:27 UTC
(
hide
)
Description:
Bug 28287: don't issue more SQL commands after first report SQL error
Filename:
MIME Type:
Creator:
Didier Gautheron
Created:
2021-05-04 15:40:27 UTC
Size:
1.28 KB
patch
obsolete
>From a7d2d690720663891b4e26ffc1ebbc108287d8e9 Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Tue, 4 May 2021 17:16:46 +0200 >Subject: [PATCH] Bug 28287: don't issue more SQL commands after first report > SQL error > >--- > reports/guided_reports.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 49dfc95a3e..056b313065 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -824,10 +824,13 @@ elsif ($phase eq 'Run this report'){ > my ($sql,$header_types) = $report->prep_report( \@param_names, \@sql_params ); > $template->param(header_types => $header_types); > my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id ); >- my $total = nb_rows($sql) || 0; > unless ($sth) { > die "execute_query failed to return sth for report $report_id: $sql"; >- } else { >+ } >+ >+ my $total = 0; >+ unless ($errors) { >+ $total = nb_rows($sql) || 0; > my $headers = header_cell_loop($sth); > $template->param(header_row => $headers); > while (my $row = $sth->fetchrow_arrayref()) { >-- >2.11.0
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 28287
: 120473