Interim-Updates
Peter Nixon
listuser at peternixon.net
Fri Jul 13 07:17:43 CEST 2007
On Fri 13 Jul 2007, Hugh Messenger wrote:
> > There is and easier and more correct
> > way to fix your problem simply by fixing the mysql query to work the
> > same way the existing postgresql query does. The next version of
> > FreeRADIUS will have this _bug_ fixed.
>
> So I presume all we need to do to the 1.1.x MySQL is the "shift gigawords
> left and OR it with the octets" thing ...
>
> AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 |
> '%{Acct-Input-Octets:-0}', \
> AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 |
> '%{Acct-Output-Octets:-0}' \
>
> ... in:
>
> accounting_update_query
> accounting_update_query_alt
> accounting_stop_query
> accounting_stop_query_alt
Exactly. Although of course your DB columns need to be able to hold the large
numbers as well so they should be of type BIGINT like:
AcctInputOctets bigint(20) default NULL,
AcctOutputOctets bigint(20) default NULL,
I updated the MySQL schema a couple of days ago to reflect this, but have not
updated the default queries yet as I haven't had time to test them. (MySQL
doesn't always accept "standard" SQL and I didnt want to break anything)
If someone has time to test this before I do, please shoot me a mail with
tested working queries for MySQL...
Cheers
--
Peter Nixon
http://peternixon.net/
More information about the Freeradius-Users
mailing list