SQL Question

Richard J Palmer richard at merula.net
Fri Jul 5 21:29:41 CEST 2019


Hi

We have been working on tuning SQL behind a FreeRadius Server.

Part of this has been moving to stored procedures where possible and 
these are working well. However we have some cases that I need some 
help with.

EG at accounting start we have:

-----

(1735) sql1:    --> EXEC radius.[dbo].proc_RadaccInsert_1              
               'S60000026971709702CD00', 
'ae67d6f1a5a55e4868ff02b8f6d30da6',  etc
(1735) sql1: EXPAND /usr/local/var/log/radius/accounting.sql
(1735) sql1:    --> /usr/local/var/log/radius/accounting.sql
(1735) sql1: Executing query: EXEC radius.[dbo].proc_RadaccInsert_1    
                         'S60000026971709702CD00', 
'ae67d6f1a5a55e4868ff02b8f6d30da6',      etc
(1735) sql1: SQL query returned: success
(1735) sql1: -1 record(s) updated
(1735) sql1: No additional queries configured


-----

Now the stored procedure worked fine - However as it does a few checks 
after the insert we get

(1735) sql1: -1 record(s) updated
(1735) sql1: No additional queries configured

And FreeRadius assumes the query did not update the database

Is there a way that we can configure FreeRadius to 'ignore' the fact 
that number of records updated was -1 if the query returned OK and 
assume the query update was good (it was)  ?

Obviously I can look at the stored procedure and create a 'fake' query 
so that it returns the record update?


Richard Palmer | Director | Merula Limited
Company Registered in England and Wales No. 3243995
5 Avro Court, Huntingdon, Cambridgeshire, PE29 6XS
Phone 01480 222940 | Support 0845 330 0666
Support Email support at merula.net



More information about the Freeradius-Users mailing list