BaculaStats:collect "division by zero" error
Reportula is a php based web program that provides you a summarized ou
Status: Beta
Brought to you by:
oliveiraped
Originally created by: singler
On small database, when (max(starttime) - min(starttime)) is less than 1 hour, hoursbytes collection fails with:
[Illuminate\Database\QueryException]
SQLSTATE[22012]: Division by zero: 7 ERROR: division by zero (SQL: select
(sum(jobbytes)/date_part('hour', (max(starttime) - min(starttime)))) AS ho
ursbytes from "job" where "starttime" >= 2014-03-27 18:29 and "endtime" <=
2014-03-28 18:29)
because date_part returns zero, and then query tries to divide by zero.
sample data:
select max(starttime) - min(starttime) from job where starttime >= '2014-03-27 18:29' and endtime <= '2014-03-28 18:29'
"00:00:11"
select date_part('hour',max(starttime) - min(starttime)) from job where starttime >= '2014-03-27 18:29' and endtime <= '2014-03-28 18:29'
0
View and moderate all "issues Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Ticket changed by: oliveiraped