glyustb / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

ERROR: integer out of range at /usr/local/bin/mogstats line 442 #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
invoke mogstats --stats=all

the setup is postgres 8.4.12 on debian stable.

when I take the sql from stats_for_files_sql and directly invoke it:

mogilefs=# SELECT dmid, classid, COUNT(classid), sum(length), sum(length::int4 
* devcount::int4) FROM file GROUP BY 1, 2;
ERROR:  integer out of range
mogilefs=#

when I change it to bigint it seems to work:

mogilefs=# SELECT dmid, classid, COUNT(classid), sum(length), sum(length::int8 
* devcount::int8) FROM file GROUP BY 1, 2;
 dmid | classid | count |     sum     |     sum     
------+---------+-------+-------------+-------------
    1 |       1 | 14259 | 18190273633 | 54501262413
(1 row)

Original issue reported on code.google.com by ch1qu1ta...@gmail.com on 15 Jun 2012 at 11:25

GoogleCodeExporter commented 9 years ago
Pushed your fix, will be released soon! Thanks!

Original comment by dorma...@rydia.net on 20 Jun 2012 at 5:06