3.0 SQL pooling question
a.cudbardb at freeradius.org
Fri Jun 14 16:54:10 CEST 2013
On 14 Jun 2013, at 14:04, Alan DeKok <aland at deployingradius.com> wrote:
> Phil Mayers wrote:
>> I'm actually thinking of errors where the SQL server is up, but
>> responding incorrectly (e.g. cached query plans are invalid due to
>> schema changes).
>> I guess there would need to be a per-driver set of options as to which
>> error codes count as "down"?
> I'd hard-code those, quite frankly. They're database-specific, and
> there's no reason to make them configurable.
Agreed. There's not usually any way to resolve an error string to an error code, so you'd either have to specify individual error numbers (which could be messed up by the errors being enumerated differently between library versions), or write translation tables in the drivers to convert strings to the macro values.
FYI: SQL_DOWN was renamed to RLM_SQL_RECONNECT (i think SQL_DOWN conflicted with one of the drivers). Forgotten that had happened.
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Devel