<row>
<entry>Flexible Identifier</entry>
<entry>Support customers</entry>
- <entry>Kea 1.2.0 beta</entry>
+ <entry>Kea 1.2.0</entry>
<entry>Kea software provides a way to handle host reservations
that include addresses, prefixes, options, client classes and
other features. The reservation can be based on hardware address,
<para>Currently this library is only available to ISC customers with a
support contract.</para>
- <para>The library allows defining an expression, using notation
+ <para>The library allows for defining an expression, using notation
initially used for client classification only. See <xref
linkend="classification-using-expressions" /> for detailed description
of the syntax available. One notable difference is that for client
// The address in the Host structure is an IOAddress object. Convert
// this to an integer for storage.
ipv4_address_ = host->getIPv4Reservation().toUint32();
+ ipv4_address_null_ = ipv4_address_ == 0 ? MLM_TRUE : MLM_FALSE;
bind_[5].buffer_type = MYSQL_TYPE_LONG;
bind_[5].buffer = reinterpret_cast<char*>(&ipv4_address_);
bind_[5].is_unsigned = MLM_TRUE;
- // bind_[5].is_null = &MLM_FALSE; // commented out for performance
- // reasons, see memset() above
+ bind_[5].is_null = &ipv4_address_null_;
// hostname : VARCHAR(255) NULL
strncpy(hostname_, host->getHostname().c_str(), HOSTNAME_MAX_LEN - 1);
# Add missing 'client-id' host identifier type.
INSERT INTO host_identifier_type VALUES (3, 'client-id');
+# Recreate the trigger removing dependent host entries.
+DROP TRIGGER host_BDEL;
+
+DELIMITER $$
+CREATE TRIGGER host_BDEL BEFORE DELETE ON hosts FOR EACH ROW
+-- Edit trigger body code below this line. Do not edit lines above this one
+BEGIN
+DELETE FROM ipv6_reservations WHERE ipv6_reservations.host_id = OLD.host_id;
+DELETE FROM dhcp4_options WHERE dhcp4_options.host_id = OLD.host_id;
+DELETE FROM dhcp6_options WHERE dhcp6_options.host_id = OLD.host_id;
+END
+$$
+DELIMITER ;
+
+
# Update the schema version number
UPDATE schema_version
SET version = '5', minor = '1';
# Add missing 'client-id' host identifier type.
INSERT INTO host_identifier_type VALUES (3, 'client-id');
+# Recreate the trigger removing dependent host entries.
+DROP TRIGGER host_BDEL;
+
+DELIMITER $$
+CREATE TRIGGER host_BDEL BEFORE DELETE ON hosts FOR EACH ROW
+-- Edit trigger body code below this line. Do not edit lines above this one
+BEGIN
+DELETE FROM ipv6_reservations WHERE ipv6_reservations.host_id = OLD.host_id;
+DELETE FROM dhcp4_options WHERE dhcp4_options.host_id = OLD.host_id;
+DELETE FROM dhcp6_options WHERE dhcp6_options.host_id = OLD.host_id;
+END
+$$
+DELIMITER ;
+
# Update the schema version number
UPDATE schema_version
SET version = '5', minor = '1';