src/lib/dhcpsrv/pgsql_lease_mgr.cc
PgSqlLeaseMgr::PgSqlLeaseMgr() - now validates schema version before
preparing SQL statements
PgSqlLeaseMgr::getVersion() - no longers uses pre-prepared statement
or formal statement execution error checking
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_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
Replaced this class heirarchy:
AddressStatsQuery4 <-- MySqlAddressStatsQuery4
AddressStatsQuery6 <-- MySqlAddressStatsQuery6
With this one:
LeaseStatsQuery <-- MySqlLeaseStatsQuery
src/lib/dhcpsrv/cfg_subnets6.cc
- CfgSubnets6::removeStatistics() - added removal of declined stats
- CfgSubnets6::updateStatistics() - added call to recountAddressStats6()
src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
- Added TaggedStatement RECOUNT_LEASE6_STATS
- MySqlAddressStatsQuery6 - new MySql derivation of AddressStatsQuery6
- MySqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
creates and starts a MySqlAddressStatsQuery6
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
- GenericLeaseMgrTest::checkAddressStats4 renamed to checkAddressStats as
it applies to either v4 or v6
- GenericLeaseMgrTest::makeLease6() - new method which creates a minimal
IPv6 lease and adds it to lease storage
- GenericLeaseMgrTest::testRecountAddressStats6() - new method which
checks IPv6 lease stats recounting
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
- TEST_F(MySqlLeaseMgrTest, recountAddressStats6) - new test