rlm_sqlite and sqlite3_step(), sqlite schema

Gabriel Blanchard gabe at teksavvy.ca
Wed Jul 15 05:38:58 CEST 2009

On 14-Jul-09, at 11:06 PM, Ben West wrote:
> Apologies for posting on the freeradius-user list about this.
> I serendipitously happened across this list's sqlite-related thread,
> and the related bugzilla entry, on very same day I was playing around
> with sqlite on v2.1.6 myself.
> https://bugs.freeradius.org/bugzilla/show_bug.cgi?id=3
Yeah that was me.
> An issue not addressed in the patch proposed in that bug entry is that
> the sql_sqlite.c apparently only invokes sqlite3_step() in its
> function sql_fetch_row(), which AFAIK is only called for SELECT
> queries.  This has the effect of UPDATE, DELETE, INSERT queries being
> compiled but never executed.

I really don't think this is the right approach at all. There is  
already functions in the rlm_sql module to do just this.

When it calls sql_select_query() you already know that it's a select  
query. When it calls sql_store_result() you know it's a UPDATE or  
INSERT or whatever. Anyway as far as I can tell that's what it does  
and it makes much more sense.


More information about the Freeradius-Devel mailing list