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
I tried to use following as trigger..
Create Trigger ftp
BEFORE UPDATE ON radacct
FOR EACH ROW
UPDATE radacct SET NEW.AcctInputOctets=(0 - NEW.AcctInputOctets) WHERE
UPDATE radacct SET NEW.AcctOutputOctets=(0 - NEW.AcctOutputOctets) WHERE
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.'
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?