From: Marcin Siodelski Date: Sat, 6 Jul 2019 18:11:17 +0000 (+0200) Subject: [#715,!411] Removed dead code from the mysql_cb_impl.cc X-Git-Tag: Kea-1.6.0-beta2~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca536526c3c38196cb7ef2d481fe8835bc00ea71;p=thirdparty%2Fkea.git [#715,!411] Removed dead code from the mysql_cb_impl.cc As a result of the review. --- diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc index 00c18aef04..17baf3fbd0 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc @@ -540,21 +540,6 @@ MySqlConfigBackendImpl::createUpdateOptionDef(const db::ServerSelector& server_s MySqlTransaction transaction(conn_); - // Need to check if this definition already exists. We can't follow - // the same pattern as for shared networks and subnets, to try to insert - // the definition first and fall back to update if the DuplicateEntry - // exception is thrown, because the option code/space is not unique - // within the dhcpX_option_def table. Inserting another option definition - // with existing option code/name would not violate the key and the - // option definition instance would be inserted successfully. Therefore, - // we first fetch the option definition for the given server, code and - // space name. If it exists, we simply update it. - OptionDefinitionPtr existing_definition = - getOptionDef(get_option_def_code_space, - server_selector, - option_def->getCode(), - option_def->getOptionSpaceName()); - // Create scoped audit revision. As long as this instance exists // no new audit revisions are created in any subsequent calls. ScopedAuditRevision audit_revision(this,