Bugzilla – Attachment 28115 Details for
Bug 12214
SQL errors in reports are not shown to user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12214: add regression test for reporting error when running report with SQL error
Bug-12214-add-regression-test-for-reporting-error-.patch (text/plain), 1.41 KB, created by
Galen Charlton
on 2014-05-08 16:13:19 UTC
(
hide
)
Description:
Bug 12214: add regression test for reporting error when running report with SQL error
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2014-05-08 16:13:19 UTC
Size:
1.41 KB
patch
obsolete
>From 3d95911f416a6b39faaa6669807cde3fcdd21096 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Thu, 8 May 2014 16:09:07 +0000 >Subject: [PATCH] Bug 12214: add regression test for reporting error when > running report with SQL error > >To test: > >[1] Run prove -v t/db_dependent/Reports_Guided.t. Last test should > fail. >[2] Apply the main patch. >[3] Run step 1 again. This time, all tests should pass. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > t/db_dependent/Reports_Guided.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reports_Guided.t b/t/db_dependent/Reports_Guided.t >index ad34dbd..6633c2f 100755 >--- a/t/db_dependent/Reports_Guided.t >+++ b/t/db_dependent/Reports_Guided.t >@@ -5,7 +5,7 @@ > > use Modern::Perl; > >-use Test::More tests => 14; >+use Test::More tests => 15; > > use C4::Context; > >@@ -85,6 +85,19 @@ is_deeply( > 'running a query with a parameter returned the expected result' > ); > >+# for next test, we want to let execute_query capture any SQL errors >+$dbh->{RaiseError} = 0; >+my $errors; >+($sth, $errors) = execute_query( >+ 'SELECT surname FRM borrowers', # error in the query is intentional >+ 0, >+ 10, >+); >+ok( >+ defined($errors) && exists($errors->{queryerr}), >+ 'attempting to run a report with an SQL syntax error returns error message (Bug 12214)' >+); >+ > #End transaction > $dbh->rollback; > >-- >1.7.10.4
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 12214
:
28044
|
28115
|
28116
|
28117
|
28132
|
28133
|
28134
|
28135
|
28136