The touch_all scripts allow you to specify a where condition. If you have no records in the set, the result is divided by zero to get a percentage.
Created attachment 125133 [details] [review] Bug 29078: Resolve division by zero in touch_all scripts Illegal division by zero at misc/maintenance/touch_all_biblios.pl line 102. Trivial fix. Funny that the percentage is not even shown without verbose flag ;) Test plan: Run misc/maintenance/touch_all_biblios.pl -where 'biblionumber<0' You should now see: Good: 0, Bad: 0 (of 0) in 0 seconds Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Super trivial, self signoff
Created attachment 125275 [details] [review] Bug 29078: Resolve division by zero in touch_all scripts Illegal division by zero at misc/maintenance/touch_all_biblios.pl line 102. Trivial fix. Funny that the percentage is not even shown without verbose flag ;) Test plan: Run misc/maintenance/touch_all_biblios.pl -where 'biblionumber<0' You should now see: Good: 0, Bad: 0 (of 0) in 0 seconds Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All works as expected.. PQA
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.11
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.