On Thu, Apr 29, 2004 at 12:29:28PM +0200, Michael Markstaller wrote: > I've just copied the queries from the CVS-snapshot in sql.conf to my running (0.9.3) > for getting updated acct-session time etc and noticed one possible wrong query in > the sql.conf of the CVS-snapshot/sql.conf, maybe something to correct:
> it reads (DATE_SUB for starttime): > accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId, > AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, > AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, > AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, > AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, > AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', > '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', > '%{NAS-Port-Type}', DATE_SUB('%S',%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0}, > 'seconds'), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', > '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', > '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', > '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', > '%{Acct-Delay-Time}')" > but I *think* it should read: > accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId, > AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, > AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, > AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, > AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, > AcctStopDelay) values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', > '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', > '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + > %{Acct-Delay-Time:-0}) SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', > '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', > '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', > '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', > '%{Acct-Delay-Time}')" Correct, as far as I can see. Comitted to CVS. (Same for update_query_alt.) -- Paul "TBBle" Hampson, on an alternate email client. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html