2.0 mysql.sql
Peter Nixon
listuser at peternixon.net
Mon Jul 23 12:22:09 CEST 2007
On Fri 20 Jul 2007, Hugh Messenger wrote:
> Peter - a couple of things about the MySQL stuff:
>
> 1) I just noticed that the ./docs/examples/mysql.sql schema in the 2.0
> HEAD doesn't look right:
>
> #
> # Table structure for table 'radippool'
> #
> CREATE TABLE radippool (
> id int(11) unsigned NOT NULL auto_increment,
> pool_name varchar(30) NOT NULL,
> FramedIPAddress varchar(15) NOT NULL default ,
> NASIPAddress varchar(15) NOT NULL default ,
> CalledStationId VARCHAR(30) NOT NULL,
> CallingStationID VARCHAR(30) NOT NULL,
> expiry_time DATETIME NOT NULL default '0000-00-00 00:00:00',
> username varchar(64) NOT NULL default ,
> pool_key varchar(30) NOT NULL,
> PRIMARY KEY (id)
> );
>
> Note the missing default values. The 1.1.7 branch has a more correct
> looking version.
Ahh, yes. I caught and fixed this in 1.1.7 and forgot HEAD.. Grrr.. I hate
working on multiple branches :-(
> 2) Also, I just noticed in the 2.0 mysql-ippool-dialup.conf, the
> allocate-clear query has ...
>
> allocate-clear = "UPDATE ${ippool_table} \
> SET NASIPAddress = '', pool_key = 0, \
> CallingStationID = '', username = '', \
> expiry_time = '0000-00-00 00:00:00' \
> WHERE expiry_time <= NOW() - INTERVAL 1 SECOND
> AND nasipaddress = '%{Nas-IP-Address}'"
>
> Note the lower case 'nasipaddress'. Pretty please for to remember that
> MySQL on Windows is cASe SenSITiVe when it comes to column names. Well,
> by default. Yes, one can make the names case insensitive, but that can
> cause problems.
>
> And yeah, there aren't many of us using MySQL on Windows behind FR, but I
> happen to be one of them. Don't ask. :)
>
> FYI, slippool.conf in 1.1.7 has the correct case-ification.
ok. Its fixed. I am beginning to think that for 2.0, maybe we should just
make EVERYTHING lowercase for ALL database backends. It would be one less
compatibility issue to deal with. Would anyone take issue with that? (I
realise it has backwards compatibility issues to MySQL on windows users.
Does it affect anyone else though?)
Cheers
--
Peter Nixon
http://peternixon.net/
More information about the Freeradius-Users
mailing list