Hi,

> On 31 Aug 2017, at 16.26, chris.milling...@uk.fujitsu.com wrote:
> 
> Using some perl pasted from the net I get the below when the replyattr is 
> greater that 81 charaters?
>  
> DBD::ODBC::st fetchrow_array failed: st_fetch/SQLFetch (long truncated DBI 
> attribute LongTruncOk not set and/or LongReadLen too small) (SQL-HY000) 
> [state was HY000 now 01004]
> [unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.7.17-0ubuntu0.16.04.1] 
> (SQL-01004) at ./dbitest line 47.
>  

ODBC driver seems to have by default a constraint on DB reply size, so the 
constraint needs to 
increased.

DB handle can be modified by defining ConnectionHook in Radiator configuration.

E.g.

<AuthBy SQL>
   Identifier ODBC_DB

   # Rest of the config
   ...

   # Allow truncating db reply to 2000 characters
   ConnectionHook sub { $_[1]->{'LongTruncOk'} = 1; $_[1]->{'LongReadLen'} = 
2000; }
</AuthBy>


Ref: https://metacpan.org/pod/DBI#LongReadLen


BR
-- 
Tuure Vartiainen <varti...@open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.

_______________________________________________
radiator mailing list
radiator@lists.open.com.au
http://lists.open.com.au/mailman/listinfo/radiator

Reply via email to