ippool-dhcp and Oracle

Бен Томпсон b.thompson at latera.ru
Sun Mar 31 17:13:07 CEST 2013


> Many thanks. I will give it a try.

I am still working on this but, I have some further issues which I
need to resolve.

Firstly the ippool table for the oracle ippool schema contains various
columns which are defined as NOT NULL:

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):

 allocate-clear = "UPDATE ${ippool_table} \
  SET nasipaddress = '', pool_key = 0, callingstationid = '', \
  expiry_time = current_timestamp - INTERVAL '1' second(1) \
  WHERE pool_key = '${pool-key}'"

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 can create a new schema and send a patch, but I just wanted to
double check that this is the right thing to do.


More information about the Freeradius-Users mailing list