Re: SQL query length



Hello Alan,
 
Thank you so much for your quick response!
 
Please check my comments inline below:
 
> Problem: When I have the attribute Session-Timeout in the radcheck
> table, I get a Segmentation Fault after the query as run, no matter if
> it returns results or not.
 doc/bugs

> a) I've noticed that freeradius performs Accounting-Request when this
> attribute is set, is this normal?

 I have no idea what you mean by that.  FreeRADIUS doesn't magically
create Accounting-Requests if it sees a Session-Timeout.
 
I think I've might misinterpreted a log. I've just tried to duplicate this behaviour without success, now I see only Access-Request packets. If this happens again, I'll try to be more informative.
 

> b) Is there a limit to the sql query length?

 In 1.1.x, yes.  About 253 octets in many cases.  If the queries are in
the configuration (e.g. rlm_sql_ippool), then the queries can be very long.
 
Ok, this is certainly a problem for me. I can't change freeradius version (at least not now, maybe in the future) so I assume the only option is to 'exec' external scripts to perform more complex queries, am I right?
 

 In 2.0, the queries in "unlang" can be about 7k in length.
 

> c) Is there a limit to the field name, i.e., should I use "SELECT
> This_is_a_very_long_field_name_having_ifs_nulls_etc AS ShortFieldName"
> or is it irrelevant?

 There is no limit to field names imposed by FreeRADIUS.

> d) The particular query performs a join to another table, may this be
> the source of the problem?

 Maybe, if you're using MySQL and an old version of the server.  See
doc/ChangeLog in 1.1.7.

> e) Is it mandatory that a query returns results?

 Yes.

> f) Can I use multiple 'query' in radius.conf, using the values from a
> first query to feed the next one?

 Yes, so long as the output from a query goes into a RADIUS attribute.
 
Can you please elaborate, Alan, maybe with a small example or pointer to documentation?
 
Thank you for your time! :-)
 


 Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.