From: Marcin Siodelski Date: Thu, 27 Sep 2018 10:34:20 +0000 (+0200) Subject: [#93,!35] Changed option def code from tinyint to smallint. X-Git-Tag: 5-netconf-extend-syntax_base~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eaed8f82ea0ce31a5b556d9bcf29c9c38b3154e;p=thirdparty%2Fkea.git [#93,!35] Changed option def code from tinyint to smallint. --- diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc index e978bb245a..1235bda527 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc @@ -81,7 +81,7 @@ MySqlConfigBackendImpl::getOptionDefs(const int index, // statement. MySqlBindingCollection out_bindings = { MySqlBinding::createInteger(), // id - MySqlBinding::createInteger(), // code + MySqlBinding::createInteger(), // code MySqlBinding::createString(128), // name MySqlBinding::createString(128), // space MySqlBinding::createInteger(), // 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(), + out_bindings[1]->getInteger(), static_cast (out_bindings[4]->getInteger()), array_type)); } else { // Create non-array option. last_def.reset(new OptionDefinition(out_bindings[2]->getString(), - out_bindings[1]->getInteger(), + out_bindings[1]->getInteger(), static_cast (out_bindings[4]->getInteger()), out_bindings[7]->getStringOrDefault("").c_str())); diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 6c7511d5b7..2d325a49ef 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -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, diff --git a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in index 9549d40355..f50207a17e 100644 --- a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in @@ -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,