]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#93,!35] Changed option def code from tinyint to smallint.
authorMarcin Siodelski <marcin@isc.org>
Thu, 27 Sep 2018 10:34:20 +0000 (12:34 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 8 Oct 2018 14:39:22 +0000 (16:39 +0200)
src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc
src/share/database/scripts/mysql/dhcpdb_create.mysql
src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in

index e978bb245a8b31114c58905813e3191d980b095f..1235bda527f8e9399ad373a220dc29baae251689 100644 (file)
@@ -81,7 +81,7 @@ MySqlConfigBackendImpl::getOptionDefs(const int index,
     // statement.
     MySqlBindingCollection out_bindings = {
         MySqlBinding::createInteger<uint64_t>(), // id
-        MySqlBinding::createInteger<uint8_t>(), // code
+        MySqlBinding::createInteger<uint16_t>(), // code
         MySqlBinding::createString(128), // name
         MySqlBinding::createString(128), // space
         MySqlBinding::createInteger<uint8_t>(), // type
@@ -118,14 +118,14 @@ MySqlConfigBackendImpl::getOptionDefs(const int index,
             if (array_type) {
                 // Create array option.
                 last_def.reset(new OptionDefinition(out_bindings[2]->getString(),
-                                                    out_bindings[1]->getInteger<uint8_t>(),
+                                                    out_bindings[1]->getInteger<uint16_t>(),
                                                     static_cast<OptionDataType>
                                                     (out_bindings[4]->getInteger<uint8_t>()),
                                                     array_type));
             } else {
                 // Create non-array option.
                 last_def.reset(new OptionDefinition(out_bindings[2]->getString(),
-                                                    out_bindings[1]->getInteger<uint8_t>(),
+                                                    out_bindings[1]->getInteger<uint16_t>(),
                                                     static_cast<OptionDataType>
                                                     (out_bindings[4]->getInteger<uint8_t>()),
                                                     out_bindings[7]->getStringOrDefault("").c_str()));
index 6c7511d5b7c19d9aa8e4e50ab203b17d657fa199..2d325a49efc80391a6a3a8300d366e1db621b4ba 100644 (file)
@@ -856,7 +856,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_global_parameter_server (
 -- -----------------------------------------------------
 CREATE TABLE IF NOT EXISTS dhcp4_option_def (
     id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-    code TINYINT(3) UNSIGNED NOT NULL,
+    code SMALLINT UNSIGNED NOT NULL,
     name VARCHAR(128) NOT NULL,
     space VARCHAR(128) NOT NULL,
     type TINYINT UNSIGNED NOT NULL,
@@ -1097,7 +1097,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_global_parameter_server (
 -- -----------------------------------------------------
 CREATE TABLE IF NOT EXISTS dhcp6_option_def (
     id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-    code TINYINT(3) UNSIGNED NOT NULL,
+    code SMALLINT UNSIGNED NOT NULL,
     name VARCHAR(128) NOT NULL,
     space VARCHAR(128) NOT NULL,
     type TINYINT UNSIGNED NOT NULL,
index 9549d40355e5a04f1ef91b1e86b3a2c63f638890..f50207a17e67fc56671d761ace52c3bee1e540f3 100644 (file)
@@ -191,7 +191,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_global_parameter_server (
 #
 CREATE TABLE IF NOT EXISTS dhcp4_option_def (
     id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-    code TINYINT(3) UNSIGNED NOT NULL,
+    code SMALLINT UNSIGNED NOT NULL,
     name VARCHAR(128) NOT NULL,
     space VARCHAR(128) NOT NULL,
     modification_ts TIMESTAMP NOT NULL,
@@ -417,7 +417,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_global_parameter_server (
 #
 CREATE TABLE IF NOT EXISTS dhcp6_option_def (
     id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-    code TINYINT(3) UNSIGNED NOT NULL,
+    code SMALLINT UNSIGNED NOT NULL,
     name VARCHAR(128) NOT NULL,
     space VARCHAR(128) NOT NULL,
     modification_ts TIMESTAMP NOT NULL,