Commit 142a4a7f authored by Robert Anderson's avatar Robert Anderson

Removed dependency on NAS-Port-Id as it may not be available - instead use NAS-Port

parent 60578f0d
2011-11-08:
/* change accounting index accounting_idx4 and accounting_idx5 */
DROP INDEX accounting_idx4 ON accounting;
DROP INDEX accounting_idx5 ON accounting;
CREATE INDEX accounting_idx5 ON accounting (Username,AcctSessionID,NASIPAddress,NASPort,PeriodKey);
CREATE INDEX accounting_idx4 ON accounting (Username,AcctSessionID,NASIPAddress,NASPort);
2011-11-04:
/* accounting_stop_status_query */
CREATE INDEX accounting_idx4 ON accounting (Username,AcctSessionID,NASIPAddress,NASPortID);
......
......@@ -248,9 +248,9 @@ CREATE TABLE @PREFIX@accounting (
CREATE INDEX @PREFIX@accounting_idx1 ON @PREFIX@accounting (Username);
CREATE INDEX @PREFIX@accounting_idx2 ON @PREFIX@accounting (PeriodKey);
/* accounting_stop_status_query */
CREATE INDEX @PREFIX@accounting_idx4 ON @PREFIX@accounting (Username,AcctSessionID,NASIPAddress,NASPortID);
CREATE INDEX @PREFIX@accounting_idx4 ON @PREFIX@accounting (Username,AcctSessionID,NASIPAddress,NASPort);
/* accounting_update_query */
CREATE INDEX @PREFIX@accounting_idx5 ON @PREFIX@accounting (Username,AcctSessionID,NASIPAddress,NASPortID,PeriodKey);
CREATE INDEX @PREFIX@accounting_idx5 ON @PREFIX@accounting (Username,AcctSessionID,NASIPAddress,NASPort,PeriodKey);
......
......@@ -153,7 +153,7 @@ sub init
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
GROUP BY
PeriodKey
ORDER BY
......@@ -176,7 +176,7 @@ sub init
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
AND PeriodKey = %{query.PeriodKey}
';
......@@ -190,7 +190,7 @@ sub init
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
';
$config->{'accounting_usage_query'} = '
......@@ -216,7 +216,7 @@ sub init
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
AND PeriodKey = %{query.PeriodKey}
ORDER BY
ID
......
......@@ -331,7 +331,7 @@ accounting_update_get_records_query=<<EOT
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
GROUP BY
PeriodKey
ORDER BY
......@@ -354,7 +354,7 @@ accounting_update_query=<<EOT
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
AND PeriodKey = %{query.PeriodKey}
EOT
......@@ -368,7 +368,7 @@ accounting_stop_status_query=<<EOT
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
EOT
accounting_usage_query=<<EOT
......@@ -394,7 +394,7 @@ accounting_select_duplicates_query=<<EOT
Username = %{user.Username}
AND AcctSessionID = %{request.Acct-Session-Id}
AND NASIPAddress = %{request.NAS-IP-Address}
AND NASPortID = %{request.NAS-Port-Id}
AND NASPort = %{request.NAS-Port}
AND PeriodKey = %{query.PeriodKey}
ORDER BY
ID DESC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment