When there is a duplicate syspref and DEBUG is set, updatedatabase.pl dies early, resulting in an endless loop of not getting the system updated.
Created attachment 13652 [details] [review] 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.
Upgrading this to BLOCKER because when the RM isn't happy, nobody is happy.
The easiest way to test this is to set your database version back, then run from the command line: export DEBUG=1 installer/data/mysql/updatedatabase.pl Without the patch, you won't get through the upgrade.
Created attachment 13808 [details] [review] [SIGNED-OFF] 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
Created attachment 13837 [details] [review] 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.
This patch has been pushed to master.
Pushed to 3.10.x and 3.8.x, will be in 3.10.1 and 3.8.8