On Sun, Jul 13, 2003 at 03:46:08AM +1000, Paul Hampson wrote:
> Just looking at some of my records, would I be right in
> observing that the default *sql.conf files don't account
> for Acct-Output-Gigawords and Acct-Input-Gigawords?
>
> In the process of repairing damage done to my Calling-Station-ID
> and NASPortId fields by too-short field lengths, I noticed
> that several of my customers had managed to get a 1 in their
> Acct-Output-Gigawords, but that hadn't been taken into account
> in the mysql table...
>
> If I'm right and it's not being accounted for, is there any
> reason I wouldn't want to modify the query to be
> SET AcctInputOctets = %{Acct-Input-Octets} +
> (%{Acct-Input-Gigawords} * 4294967296)
Or SET AcctInputOctets
= (cast(%{Acct-Input-Gigawords:-0} as <64-bit-integer>) << 32)
+ %{Acct-Input-Octets:-0}
if binary shift is supported by DBMS.
However, default *sql schemas use numeric(N) fields for *Octets,
which 1) are slow; 2) sometimes require explicit value casting;
3) need to be expanded to numeric(20) to avoid overflows...
So I'll vote for second solution:
> Otherwise I'll add the Gigaword columns as extra columns.
You could put both of them into *sql.conf as an example,
and let admins to decide themselves which one to use :)
--
Fduch M. Pravking
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html