[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: ippool-dhcp and Oracle
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2013-03-31 16:51:10
Message-ID: 5158697E.7020606 () deployingradius ! com
[Download RAW message or body]

Бен Томпсон wrote:
> Firstly the ippool table for the oracle ippool schema contains various
> columns which are defined as NOT NULL:

  That is probably too strong a requirement.

> CREATE TABLE radippool (
>         id INT PRIMARY KEY,
>         pool_name VARCHAR(30) NOT NULL,
>         framedipaddress VARCHAR(30) NOT NULL,
>         nasipaddress VARCHAR(30) NOT NULL,
>         pool_key INT NOT NULL,
>         CalledStationId VARCHAR(64),
>         CallingStationId VARCHAR(64) NOT NULL,
>         expiry_time timestamp(0) NOT NULL,
>         username VARCHAR(100)
> );
> 
> The problem is that we also have insert and update staements which try
> to insert empty strings e.g. (taken from the standard ippol
> queries.conf):

  Yes.  Those queries try to clear the entries... i.e. set them to NULL.

> As I understand it, and empty string and NULL are the same thing in
> Oracle so this update statement will not work as is. I suppose we need
> to change the schema and this is what i have done for testing, but I
> want to understand why it is like this. I don't understand how the
> standard ippool queries.conf ever worked as it is trying to insert
> empty strings into NOT NULL columns.

  I think no one ever tested it on Oracle.

> I can create a new schema and send a patch, but I just wanted to
> double check that this is the right thing to do.

  It's the right thing to do.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic