SQL Cleanups (Was: Duplicate requests in a session)

Peter Nixon listuser at peternixon.net
Thu Aug 31 13:05:40 CEST 2006


-Moved to devel list from user list-
On Thu 31 Aug 2006 13:12, Alan DeKok wrote:
> Peter Nixon <listuser at peternixon.net> wrote:
> > Good question. Does anyone have anything against changing this?
>
>   They primary key should be a synthetic field, and not something
> derived directly from the packet.  Calling it 'acctuniqueid' is
> awkward, maybe renaming it to 'radiuskey'?
>
>   It can then be used in the SQL queries as
> %{Acct-Unique-ID:-%{Acct-Session-id}}, which should be safe for all
> configuration.

This makes sense to me. I think it should be for 2.0 though as changing the 
name of fields in a DB schema will break compatibility.

I have also been considering a number of other cleanups for 2.0

One of my pet peeves is that the mysql config file is called "sql.conf" which 
tends to confuse non-mysql users the first time around. This should be 
renamed to mysql.conf (oraclesql.conf should be renamed to oracle.conf also)

I think it may even be a good idea to make a raddb/sql/*.conf structure, 
either that or maybe we should name the files sql.mysql.conf, 
sql.postgresl.conf etc. This then allows sqlippool.mysql.conf also.
(Alternatively the sqlipool config should go inside the existing sql config 
files.)

Also, before a 2.0 release I would like to sit down and bring the queries for 
the different SQL variants as close together as possible as they have 
gradually diverged over the last few years. (Much of it my fault as I have 
been continually adding new features to the postgresql schema :-)

Thoughts?

-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20060831/b88c3262/attachment.pgp>


More information about the Freeradius-Devel mailing list