were made to the PostgreSQL database schema. In addition, the
upgrade scripts were renamed to ensure proper file name ordering.
Note that PostgreSQL CB is not yet functional.
- (Gitlab #2244)
+ (Gitlab #2183, #2244, #2245)
1974. [func] fdupont
The global parameter lookup has been refactored to provide better
* Alpine - 3.12, 3.13
* CentOS — 7, 8
-* Debian — 9, 10
-* Fedora — 33, 34
-* FreeBSD — 12.1, 13.0
+* Debian — 9, 10, 11
+* Fedora — 34
+* FreeBSD — 12, 13
* Ubuntu — 18.04, 20.04, 21.04
There are currently no plans to port Kea to Windows systems.
engineering staff, and other constraints.
* Alpine — 3.11
-* FreeBSD - 11.4
+* FreeBSD - 11
* macOS — 10.13, 10.14
Community-Maintained
// i.e. DDNS configuration. If we have a reserved hostname we should
// use it and send it back.
if (ctx->currentHost() && !ctx->currentHost()->getHostname().empty()) {
- // Qualify if there is an a suffix configured.
+ // Qualify if there is a suffix configured.
std::string hostname = d2_mgr.qualifyName(ctx->currentHost()->getHostname(),
*(ex.getContext()->getDdnsParams()), false);
// Convert it to lower case.
-// Copyright (C) 2019-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2019-2022 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
EXPECT_TRUE(client.getContext().response_);
}
-// Verifies that an a client query with a truncated length in
+// Verifies that a client query with a truncated length in
// vendor option (125) will still be processed by the server.
TEST_F(Dhcpv4SrvTest, truncatedVIVSOOption) {
NakedDhcpv4Srv srv(0);
ServerSelector::ALL(), "deleting all servers",
false);
- // No argumens, hence empty input bindings.
+ // No arguments, hence empty input bindings.
PsqlBindArray in_bindings;
// Attempt to delete the servers.
// Attempt to update the server.
if (!updateDeleteQuery(update_index, in_bindings)) {
// Possible only if someone deleted it since we tried to insert it,
- // the query is broken, or the bindings are nonesense.
+ // the query is broken, or the bindings are nonsense.
isc_throw(Unexpected, "Update server failed to find server tag: " << tag);
}
}
std::string server_tag = tag.get();
server_bindings.add(server_tag);
- // Insert the server assocation.
+ // Insert the server association.
insertQuery(index, server_bindings);
// Remove the prior server tag.
-// Copyright (C) 2020-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2020-2022 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
(kea-dhcp-ddns) but is organized as an independent library so that it
can be reused as needed by other components.
-For a more detaliled documentation about the design and class separation
+For a more detailed documentation about the design and class separation
see @ref src/bin/d2/d2.dox.
@section d2srvMTConsiderations Multi-Threading Consideration for D2 Server Library
"DATABASE_MYSQL_ROLLBACK", "rolling back MySQL database",
"DATABASE_MYSQL_START_TRANSACTION", "starting new MySQL transaction",
"DATABASE_PGSQL_COMMIT", "committing to PostgreSQL database",
- "DATABASE_PGSQL_CREATE_SAVEPOINT", "creating a new PostgreSQL savepoinat: %1",
+ "DATABASE_PGSQL_CREATE_SAVEPOINT", "creating a new PostgreSQL savepoint: %1",
"DATABASE_PGSQL_DEALLOC_ERROR", "An error occurred deallocating SQL statements while closing the PostgreSQL lease database: %1",
"DATABASE_PGSQL_FATAL_ERROR", "Unrecoverable PostgreSQL error occurred: Statement: <%1>, reason: %2 (error code: %3).",
"DATABASE_PGSQL_ROLLBACK", "rolling back PostgreSQL database",
committed to the database. Note that depending on the PostgreSQL settings,
the committal may not include a write to disk.
-% DATABASE_PGSQL_CREATE_SAVEPOINT creating a new PostgreSQL savepoinat: %1
+% DATABASE_PGSQL_CREATE_SAVEPOINT creating a new PostgreSQL savepoint: %1
The code is issuing a call to create a savepoint within the current
-transaction. Database modications made up to this point will be preserved
+transaction. Database modifications made up to this point will be preserved
should a subsequent call to rollback to this savepoint occurs prior to the
transaction being committed.
% DATABASE_PGSQL_ROLLBACK_SAVEPOINT rolling back PostgreSQL database to savepoint: $1
The code is issuing a call to rollback to the given savepoint. Any database
-modications that were made after the savepoint was created will be rolled back
+modifications that were made after the savepoint was created will be rolled back
and not committed to the database.
% DATABASE_PGSQL_START_TRANSACTION starting a new PostgreSQL transaction
@section cfgglobals Global Parameters
-The global paramaters handle direct (vs using a search in a name to
+The global parameters handle direct (vs using a search in a name to
value table) access to global scalar (i.e. not list or map) parameter values.
This is related to the procedure to add a new global scalar parameter to
// Should still have 3 networks.
// Network1 should have doubled its valid lifetime but still only have
- // the orignal two subnets. Merge should discard assocations on CB
+ // the orignal two subnets. Merge should discard associations on CB
// subnets and preserve the associations from existing config.
ASSERT_EQ(3, cfg_to.getAll()->size());
ASSERT_NO_FATAL_FAILURE(checkMergedNetwork(cfg_to, "network1", Triplet<uint32_t>(200),
// Should still have 3 networks.
// Network1 should have doubled its valid lifetime but still only have
- // the orignal two subnets. Merge should discard assocations on CB
+ // the orignal two subnets. Merge should discard associations on CB
// subnets and preserve the associations from existing config.
ASSERT_EQ(3, cfg_to.getAll()->size());
ASSERT_NO_FATAL_FAILURE(checkMergedNetwork(cfg_to, "network1", Triplet<uint32_t>(200),
/// @throw DbOperationError if the rollback failed.
void rollbackToSavepoint(const std::string& name);
- /// @brief Excutes the an SQL statement.
+ /// @brief Executes the an SQL statement.
///
/// It executes the given SQL text after first checking the
- /// connectition for usability. After the statement is excuted
+ /// connection for usability. After the statement is executed
/// @c checkStatementError() is invoked to ensure we detect
/// connectivity issues properly.
/// It is intended to be used to execute utility statements such
/// as commit, rollback et al, which have no parameters, return no
/// results, and are not pre-compiled.
///
- /// @param sql SQL statment to execute.
+ /// @param sql SQL statement to execute.
void executeSQL(const std::string& sql);
/// @brief Checks a result set's SQL state against an error state.
}
}
- /// @brief Excutes a prepared SQL statement.
+ /// @brief Executes a prepared SQL statement.
///
/// It executes the given prepared SQL statement, after checking
/// for usability and input parameter sanity. After the statement
- /// is excuted @c checkStatementError() is invoked to ensure we detect
+ /// is executed @c checkStatementError() is invoked to ensure we detect
/// connectivity issues properly. Upon successful execution, the
/// the result set is returned. It may be used for any form of
- /// prepared SQL statement (e.g query, insert, udpate, delete...),
+ /// prepared SQL statement (e.g query, insert, update, delete...),
/// with or without input parameters.
///
/// @param statement PgSqlTaggedStatement describing the prepared
/// an inclusive range.
///
/// @param expected_rows Collection of rows of data that we expect to be
- /// fetched. Note the rows should be in the order you expedct them to be
+ /// fetched. Note the rows should be in the order you expect them to be
/// returned from the database.
/// @param begin_int beginning of the range to include.
/// @param end_int end fo the range to include.
TestRowSet fetched_rows;
// Run the select. The row consumption lambda should populate
- // fethched_rows based on the the result set returned by the select.
+ // fetched_rows based on the the result set returned by the select.
conn_->selectQuery(tagged_statements[GET_BY_INT_RANGE], in_bindings,
[&](PgSqlResult& r, int row) {
TestRow fetched_row;
/// @brief Tests updating data using PgSqlConnection::updateDeleteQuery()
///
/// In this test, the input data is a set of rows that describe
- /// which rows in the database to udpate and how. For each row
+ /// which rows in the database to update and how. For each row
/// in the set we find the record in the database with matching
/// int_col value and replace its text_col value with the the
/// text value from the input the row.
/// verify actual data CRUD results.
TEST_F(PgSqlConnectionTest, executePreparedStatement) {
- // Executing with no paramters when they are required should throw.
+ // Executing with no parameters when they are required should throw.
// First we'll omit the bindings (defaults to empty).
PgSqlResultPtr r;
ASSERT_THROW_MSG(r = conn_->executePreparedStatement(tagged_statements[INSERT_VALUE]),
conn_->commit();
ASSERT_TRUE(conn_->isTransactionStarted());
- // Rollback should end the transaction without commiting changes.
+ // Rollback should end the transaction without committing changes.
conn_->rollback();
ASSERT_FALSE(conn_->isTransactionStarted());
EXPECT_THROW(conn_->rollback(), isc::Unexpected);
}
-// Verifies that savepointes operate correctly.
+// Verifies that savepoints operate correctly.
TEST_F(PgSqlConnectionTest, savepoints) {
// We want to trigger DuplicateEntry errors so let's
// add a unique constraint to the table.
// Rollback to the savepoint.
ASSERT_NO_THROW_LOG(conn_->rollbackToSavepoint("sp_one"));
- // Commit the transcation.
+ // Commit the transaction.
conn_->commit();
// We should not be in a transaction but we should
TestRowSet third_row = {{3, "three"}};
ASSERT_NO_THROW_LOG(testInsert(third_row));
- // Commit the transcation.
+ // Commit the transaction.
conn_->commit();
// We should not be in a transaction and we should
INSERT INTO dhcp_option_scope (scope_id, scope_name)
VALUES(6, 'pd-pool');
+-- Drop the existing function, createOptionAuditDHCP6 so we can replace it
+-- with one that has slightly different arguments.
DROP FUNCTION IF EXISTS createOptionAuditDHCP6(modification_type VARCHAR(32),
scope_id SMALLINT, option_id INT, subnet_id BIGINT,
host_id INT, network_name VARCHAR(128),
:param text: the script content to be analyzed
:type text: str
- :param is_upgrade_script: determines if it is a an upgrade script or a
+ :param is_upgrade_script: determines if it is an upgrade script or a
dhcpdb_create script. Different delimiters are used for each.
:type is_upgrade_script: bool