Bug 9085 - Installer will not run with DEBUG set
Summary: Installer will not run with DEBUG set
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low major (vote)
Assignee: Chris Nighswonger
QA Contact: Paul Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 20:35 UTC by Chris Nighswonger
Modified: 2013-05-23 06:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9085 - Installer will not run with DEBUG set (2.10 KB, patch)
2012-11-14 20:41 UTC, Chris Nighswonger
Details | Diff | Splinter Review
Bug 9085 - Installer will not run with DEBUG set (2.18 KB, patch)
2012-11-15 13:14 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 9085 - Installer will not run with DEBUG set (2.24 KB, patch)
2012-11-20 11:06 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Nighswonger 2012-11-14 20:35:28 UTC
This is due to raising all db errors combined with the fact that attempts to make selections from a non-existent systempreferences table raises db errors.

The installer should run even with DEBUG set, otherwise dropping and recreating a development database becomes somewhat of a chore.
Comment 1 Chris Nighswonger 2012-11-14 20:41:11 UTC Comment hidden (obsolete)
Comment 2 Jared Camins-Esakov 2012-11-15 13:14:57 UTC Comment hidden (obsolete)
Comment 3 Paul Poulain 2012-11-20 11:06:02 UTC
QA comment:
 * I checked that this patch changed nothing in usual cases
 * add a safety check, usefull only if DEBUG is set. Maybe the test could have been done only when DEBUG is ON, but with Plack, dbh will be much more persistant than CGI, so the cost of the new eval {} is OK
 * passes koha-qa.plr
passed QA
Comment 4 Paul Poulain 2012-11-20 11:06:24 UTC
Created attachment 13547 [details] [review]
Bug 9085 - Installer will not run with DEBUG set

This is due to raising all db errors combined with the fact that attempts
to make selections from a non-existent systempreferences table raises db errors.

The installer should run even with DEBUG set, otherwise dropping and recreating
a development database becomes somewhat of a chore. This patch adds code to
check for the existence of the systempreferece table. If the table exists, then
RaiseError is enabled on the database handle. Otherwise it is disabled to allow
the installer to run without throwing an error.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The installer can now be run both with and without DEBUG set.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 5 Jared Camins-Esakov 2012-11-20 12:14:15 UTC
This patch has been pushed to master.
Comment 6 Paul Poulain 2012-11-20 15:23:21 UTC
Patch pushed to branch 3.10.x
Comment 7 Chris Cormack 2012-11-20 19:48:45 UTC
Pushed to 3.8.x will be in 3.8.7