Hm, does it "see" NULL greater than now()? Replace NULL in expiry_time column with "0000-00-00 00:00:00" (that's what MySQL thinks null datetime is - it will match IS NULL). And in that previous query replace = NULL with = '0000-00-00 00:00:00'.
If this is so, sqlippool schema will need to be changed.
This works. Yes, i think the schema really needs a update.
As always, patches are welcome.
It probably needs just a change from NULL to '0000-00-00 00:00:00' for the expiry_time default value in ippool.sql.
expiry_time IS NULL will match if value is '0000-00-00 00:00:00'. I will fix the queries to use MySQL null value (0000-00-00 00:00:00) and not NULL, since NULL doesn't work in <now() compare.
Yes, that should work...
I am afraid it won't. NULL and '0000-00-00 00:00:00' are treated differently in 4.x and 5.x MySQL versions. You can make it work for one but not the other. I have a different idea - scrap NULL and use now() as default. I'll see what needs to be changed for queries to work. Ivan Kalik Kalik Informatika ISP