How to execute TWO OR MORE Sql statement?

Alan Lumb freeradius at
Wed Jul 26 14:07:33 CEST 2006

> Create a stored procedure in the database that contains all of the SQL
> queries necessary. Then call that stored procedure via sql.conf. This
> works fine with Postgres.

MySQL 5 supports stored proceedures and functions, however I know that
mysql proceedures can cause problems as they can/will return multiple data
sets that can cause some apps problems (not sure about freeradius and its
support for mysql).

I gave up on such a method and moved to rlm_perl.  Now I have a perl
handling script that performs as many queries as I need and can put lots
of logic in the script, strip bits out of usernames and whatnot.  Also it
can look for certain flags in the database and if present send AV Pairs or
VSA's to the NAS to configure them differently.

my only issue has been getting rlm_perl to compile properly on suse
x86_64, and sometimes have had to goto the extreme of recompiling perl and
manually linking DynaLoader into

So in answer to the original question I recommend rlm_perl if you have the
time and patience to get around the setup problems.

More information about the Freeradius-Users mailing list