src/lib/dhcpsrv/mysql_host_data_source.cc
MySqlHostDataSourceImpl::getVersion() - new function to
fetch version accessible to impl constructor
MySqlHostDataSourceImpl() - added schema validation after
connecting
MySqlHostDataSource::getVersion() - new uses impl method
src/lib/dhcpsrv/pgsql_host_data_source.cc
PgSqlHostDataSourceImpl()) - added schema validation after
connecting
PgSqlHostDataSourceImpl::getVersion() - no longer uses
pre-prepared statement
src/bin/dhcp4/ctrl_dhcp4_srv.*
src/bin/dhcp6/ctrl_dhcp6_srv.*
Changed dbReconnect() to accept ReconnectCtlPtr
Added commentary for dbReconnect and dbLostCallback
src/lib/dhcpsrv/database_connection.h
Removed extraneous typedef
many files:
Changed DatabaseConnection::Callback to ::DbLostCallback
src/lib/dhcpsrv/tests/database_connection_unittest.cc
Added commentary to text fixture and tests
kea-dhcp4
added support for max-reconnect-tries and reconnect-wait-time
to lease and host db parsers
Added a callback for when DB backends detect loss of connectivity
Added a self-rescheduling method to attempt to reconnect to the
backends if retries are enabled
dhcpsrv
Added a callback that DatabaseConnection derivations should invoke
when they lose connectivity.
Added an optional callback parameter from CfgDbAccess::createManagers()
all the way down to DatabaseConnection ctor.
pgsql_connection.cc
PgSqlConnection::~PgSqlConnection() - Added logic to close the
connection only when the connect state is still OK.
Otherwise it likes to core dump.
PgSqlConnection::checkStatementError() - Modified to invoke the
connectivity lost callback on "fatal" errors
pgsql_lease_mgr_unittest.cc
pgsql_host_data_source_unittest.cc
Added tests to verify that the lost callback is NOT invoked on an
open failure
src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
- Added PgSqlBasicsTest test fixture class and tests which exercise all of
the PostgreSQL data types we currently use with round-trip database writes
and reads
src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
- Moved PgSqlResult function impls from .h
- Added exception safe implementation of getColumnLabel() to PgSqlResult
src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
- PsqlBindArray::add() variants which accept raw pointers now throw
if the pointer is NULL
- PgSqlExchange::getColumnLabel() is now a wrapper around PgSqlResult method
src/lib/dhcpsrv/pgsql_host_data_source.h
src/lib/dhcpsrv/pgsql_host_data_source.cc
- Commentary clean up
src/lib/dhcpsrv/pgsql_lease_mgr.cc
- Commentary clean up
src/lib/dhcpsrv
pgsql_host_data_source.c
pgsql_host_data_source.h - new files, preliminary implementation
src/lib/dhcpsrv/Makefile.am
Added new files pgsql_host_data_source.cc, pgsql_host_data_source.h
src/lib/dhcpsrv/dhcpsrv_messages.mes
Added log messages DHCPSRV_PGSQL_HOST_DB_GET_VERSION, DHCPSRV_PGSQL_START_TRANSACTION
src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
Added PgSqlTransaction
Added PgSqlConnection::startTransaction()
src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
PsqlBindArray
- Added storage of conversion strings used for bound values
- Added add() variants for uint8_t, IOAddress, uint8_t buffer
- Added templated variant for miscellaneous types
PgSqlExchange
- Removed getColumnValue variants for various integers, replaced
with templated version for miscellaneous types
src/lib/dhcpsrv/pgsql_lease_mgr.cc
Added todo comment to remember to account for hwaddr columns added to lease6
src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
TEST(PsqlBindArray, basicOperation) - new test to exercise bind functions