List:General Discussion« Previous MessageNext Message »
From:Marcel Grandemange Date:July 7 2009 9:45pm
Subject:Triggers For Radius DB
View as plain text  
Good Day.

 

I hope someone can assist me.

 

I have a freeradius server running off mysql.

 

Now I would like to use triggers to negate some of the traffic logged within
it.

 

 

I tried to use following as trigger..

 

Create Trigger ftp

BEFORE UPDATE ON radacct

FOR EACH ROW

BEGIN

UPDATE radacct SET NEW.AcctInputOctets=(0 - NEW.AcctInputOctets) WHERE
NASPortId=21;

UPDATE radacct SET NEW.AcctOutputOctets=(0 - NEW.AcctOutputOctets) WHERE
NASPortId=21;

END;

 

 

 

And Many variants of that but only ends up locking the db in someway with
messages such as.

 

 

Tue Jul  7 23:34:12 2009 : Error: rlm_sql_mysql: Cannot store result

Tue Jul  7 23:34:12 2009 : Error: rlm_sql_mysql: MySQL error 'Can't update
table 'radacct' in stored function/trigger because it is already used by
statement which invoked this stored function/trigger.'

 

 

From Freeradius.

 

 

I have managed to get triggers working to a separate db altogether but not
from the same db to the same db.

 

 

What am I doing wrong?

 

 

 

Regards.

 

 

Marcel Grandemange


Thread
Triggers For Radius DBMarcel Grandemange7 Jul
  • Re: Triggers For Radius DBDan Nelson8 Jul
    • RE: Triggers For Radius DBMarcel Grandemange8 Jul