On 10 Jul 2013, at 23:59, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 10 Jul 2013, at 16:29, Phil Mayers <p.mayers@IMPERIAL.AC.UK> wrote:
On 10/07/13 15:43, Arran Cudbard-Bell wrote:
Update sections may now also return fail.
Can you clarify - AIUI, sql xlat can now also distinguish between empty and fail, so if I do this:
update { request:Tmp-String-0 := "%{sql:...}" }
...and the SQL server is down, the xlat will fail and the update section as a whole will fail? If so - very very cool. -
Yes. Errors bubble from sql_xlat up to the update section. If the value returned from the SQL statement is empty, a zero length attribute will be created, as with 2.x.x, provided that the statement completed successfully.
Ah, yes, and the reason for the failure will be available in Module-Failure-Msg, which is now pretty much always populated correctly as it's updated by the RERROR REDEBUG REDEBUG2 macros. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team