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/lib/dhcpsrv/mysql_lease_mgr.*
MySqlLeaseMgr::MySqlLeaseMgr() - now validates schema
after connecting
MySqlLeaseMgr::getVersion() - no longer relies on
pre-prepared statement or formal statement execution
error handling
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
LeaseMgrDbLostCallbackTest::testDbLostCallback() - replaced
use of getVersion() with getLease4() for testing DB usability
src/share/database/scripts/mysql/dhcpdb_create.mysql
src/share/database/scripts/mysql/dhcpdb_drop.mysql
src/share/database/scripts/mysql/upgrade_5.2_to_6.0.sh.in
Added MySQL v4/6 stat tables and triggers
src/lib/dhcpsrv/memfile_lease_mgr.cc
Suppress output of of rows with count values of 0
src/lib/dhcpsrv/mysql_lease_mgr.*
Added v4/v6 lease stat SQL statements
MySqlLeaseStatsQuery
- Added ctor variants that accomodate selection criteria
- Modified start() to handle three variants of selection
MySqlLeaseMgr
- Added start***Query4/6 variants
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
Added tests:
- TEST_F(MySqlLeaseMgrTest, leaseStatsQuery4)
- TEST_F(MySqlLeaseMgrTest, leaseStatsQuery6)
src/lib/dhcpsrv/mysql_connection.h
MySqlConnection::checkError<>() - modified to invoke
db lost callback
src/lib/dhcpsrv/dhcpsrv_messages.mes
Updated log messages
src/lib/dhcpsrv/mysql_lease_mgr.cc
MySqlLeaseMgr::getVersion() - updated to use checkError()
src/lib/dhcpsrv/pgsql_connection.*
PgSqlResult::PgSqlResult(PGresult *result) - now supports
construction with null PGresult. This is to accomodate rare
cases when PQ* statements can return NULL.
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.*
class LeaseMgrDbLostCallbackTest - new test fixture for
testing LeaseMgr DBLostCallback behavior
src/lib/dhcpsrv/tests/host_mgr_unittest.cc
class HostMgrDbLostCallbackTest
class MySQLHostMgrDbLostCallbackTest
class PostgreSQLHostMgrDbLostCallbackTest
- new test fixtures for testing HostMgr DBLostCallback behavior
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
class MySQLLeaseMgrDbLostCallbackTest - new test fixture for
testing MySQL LeaseMgr DBLostCallback behavior
src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
class PgSqlLeaseMgrDbLostCallbackTest - new test fixture for
testing Postgresql LeaseMgr DBLostCallback behavior
src/lib/dhcpsrv/tests/test_utils.*
int findLastSocketFd() - new function used for finding what
should be the fd of the SQL client socket
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
Updated lease and host database parameter sections
src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
Replaced this class heirarchy:
AddressStatsQuery4 <-- MySqlAddressStatsQuery4
AddressStatsQuery6 <-- MySqlAddressStatsQuery6
With this one:
LeaseStatsQuery <-- MySqlLeaseStatsQuery
The only review item not addressed with this commit is the
implementation of unit test that operates on the read only
database, i.e. the database containing tables on which the
given user only has SELECT privileges.
src/lib/dhcpsrv/pgsql_lease_mgr.h
src/lib/dhcpsrv/pgsql_lease_mgr.cc
- Added TaggedStatement RECOUNT_LEASE6_STATS
- PgSqlAddressStatsQuery6 - new class PgSql derivation of the IPv6
statistical lease data query
- PgSqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
creates and runs the IPv6 lease stats query
src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
TEST_F(PgSqlLeaseMgrTest, recountAddressStats6) - new test