=NULL for UODATE, "IS NULL" for SELECT
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Dec 2010 10:08:46 +0000 (11:08 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 14 Dec 2010 10:10:49 +0000 (11:10 +0100)
Closes bug #129

raddb/sql/mysql/ippool.conf

index a558eca..f27d615 100644 (file)
@@ -8,7 +8,7 @@
 # allocate-clear = "UPDATE ${ippool_table} \
 #  SET nasipaddress = '', pool_key = 0, \
 #  callingstationid = '', username = '', \
-#  expiry_time IS NULL \
+#  expiry_time = NULL \
 #  WHERE pool_key = '${pool-key}'"
 
 ## This series of queries allocates an IP address
@@ -19,7 +19,7 @@
  allocate-clear = "UPDATE ${ippool_table} \
   SET nasipaddress = '', pool_key = 0, \
   callingstationid = '', username = '', \
-  expiry_time IS NULL \
+  expiry_time = NULL \
   WHERE expiry_time <= NOW() - INTERVAL 1 SECOND \
   AND nasipaddress = '%{Nas-IP-Address}'"
 
@@ -76,7 +76,7 @@ start-update = "UPDATE ${ippool_table} \
 ## STOP record arrives
 stop-clear = "UPDATE ${ippool_table} \
  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '', \
- expiry_time IS NULL \
+ expiry_time = NULL \
  WHERE nasipaddress = '%{Nas-IP-Address}' AND pool_key = '${pool-key}' \
  AND username = '%{User-Name}' \
  AND callingstationid = '%{Calling-Station-Id}' \
@@ -99,13 +99,13 @@ alive-update = "UPDATE ${ippool_table} \
 ## NAS when an accounting ON record arrives
 on-clear = "UPDATE ${ippool_table} \
  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '', \
- expiry_time IS NULL \
+ expiry_time = NULL \
  WHERE nasipaddress = '%{Nas-IP-Address}'"
 
 ## This series of queries frees the IP numbers allocate to a
 ## NAS when an accounting OFF record arrives
 off-clear = "UPDATE ${ippool_table} \
  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '', \
- expiry_time IS NULL \
+ expiry_time = NULL \
  WHERE nasipaddress = '%{Nas-IP-Address}'"