Max length of SQl return string?

Alexander Silveröhrt Alexander.Silverohrt at
Thu Nov 28 15:41:27 CET 2013


We are doing a query which are supposed to comeback with a bunch of subscriber accounts.

 update request {
                Subscriber-Accounts := "%{sql-cisco-bng:SELECT GROUP_CONCAT(username SEPARATOR ';') FROM radcheck WHERE username LIKE '%{User-Name}%%'}"

But it seems that there is a limit on how long the return string can be?
In this case a query for acccount for user "" did return below accounts but the return query cuts off after a while. (And yes port 1 and port 2 also gets account for 10-19 and 20-22 which is why we noticed this bugg/feature..?) CH_VoIP CH_IPTV KAL_IPTV KAL_IPTV

Here is from the debug where one can see where it gets cut off
rlm_perl: sub-pre-auth: Debug: RAD_REQUEST in sub authorize: Subscriber-Accounts =; CH_VoIP; CH_IPTV;; KAL_IPTV; KAL_IPTV;

And and after splitted
rlm_perl: sub-pre-auth: i = 0, SQL Found Account[0]:
rlm_perl: sub-pre-auth: i = 1, SQL Found Account[1]: CH_VoIP
rlm_perl: sub-pre-auth: i = 2, SQL Found Account[2]: CH_IPTV
rlm_perl: sub-pre-auth: i = 3, SQL Found Account[3]:
rlm_perl: sub-pre-auth: i = 4, SQL Found Account[4]: KALEJDO_IPTV
rlm_perl: sub-pre-auth: i = 5, SQL Found Account[5]: KALEJDO_IPTV
rlm_perl: sub-pre-auth: i = 6, SQL Found Account[6]:

So my question is if there is a limitation can i change it somewhere and why is there one in the first place?

We temporary fixed it by a better matched SQL query which doesnt give us accounts we are not asking for..
Subscriber-Accounts := "%{sql-cisco-bng:SELECT GROUP_CONCAT(username SEPARATOR ';') AS FOO_RID FROM radcheck WHERE username LIKE '%{User-Name} %' OR username = '%{User-Name}'}"

but it is still going to give us problems in the future since users can have more than above exemples of accounts.

Thanks for your time.


********* DISCLAIMER *********

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and may include proprietary information. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list