Commit 8eaed8f8 authored by Marcin Siodelski's avatar Marcin Siodelski

[#93,!35] Changed option def code from tinyint to smallint.

parent 915be746
......@@ -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()));
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment