-
Incident report
-
Resolution: Fixed
-
Major
-
1.4.3
-
None
I changed one line of code in include/classes/graph.inc.php, where the SQL query is generated.
At line #995 we have:
Code:
$calc_field = 'round('.$x.'(mod(clock+'.$z.','.$p.'))/('.$p.'),0)'; / required for 'group by' support of Oracle */
...which I changed to:
Code:
$calc_field = 'round('.$x.'::int8*(mod(clock+'.$z.','.$p.'))/('.$p.'),0)'; /* required for 'group by' support of Oracle */
This works great in my setup and I can now get graphs for >25d 13h periods (one month for example!)...
Now, this is obviously not a portable fix... Oracle, MySQL, SQLITE and others will probably not like the '::int8' I inserted.
Questions:
- How would one go about implementing a general fix ?
- What is that 'i' column for, anyway ? (it looks like a complex SQL based way of generating a sequential index... could it be generated on the PHP side, eliminating this question at all ?)
I'll keep an eye on feedback or reach me at ex #dot# vitorino #at# gmail #dot# com
Cheers,