]> git.koha-community.org Git - koha.git/commit
Bug 9135: updatedatabase.pl fails when DEBUG is set
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 23 Nov 2012 17:30:26 +0000 (12:30 -0500)
committerLiz Rea <liz@catalyst.net.nz>
Mon, 24 Dec 2012 01:26:38 +0000 (14:26 +1300)
commit0013f6fa45e755a285752a67af8729a47a2e79cd
treeb816727fc9254c23c56b8031e0b9fe801de0cb34
parentf5998416801dbc1b542a01c31ee8c95b977cd753
Bug 9135: updatedatabase.pl fails when DEBUG is set

When the DEBUG environment variable is set to a true value, all DBI
errors are treated as fatal. Unfortunately, duplicate keys are
incredibly common in updatedatabase.pl, since sysprefs are often added
in testing, then re-added once the patches have been pushed to master
(or added when on a maintenance branch, and then re-added when the
system is upgraded to either a newer maintenance branch or master).
This patch disables fatal errors for the updatedatabase.pl script.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and perlcritic pass.
To test, run from command line:
export DEBUG=1
installer/data/mysql/updatedatabase.pl

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
If a query causes an error, the script continues as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
installer/data/mysql/updatedatabase.pl