-
Thomas Markwalder authored
src/share/database/scripts/pgsql/dhcpdb_create.pgsql Adds lease<4/6>_stat tables and triggers src/share/database/scripts/pgsql/dhcpdb_drop.pgsql Added drops for lease<4/6>_stat tables and triggers src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh.in Adds lease<4/6>_stat tables and triggers Populates stat tables from existing lease table content src/bin/admin/tests/mysql_tests.sh.in mysql_lease6_stat_per_type() - fixed typo in test src/bin/admin/tests/pgsql_tests.sh.in run_statement() - new convenience fucntion for running statement with option expected outcome pgsql_upgrade_schema_to_version() - new function which converts the existing schema to a target version pgsql_lease4_stat_test() - tests v4 stat table and triggers in an new database pgsql_lease6_stat_test() - tests v6 stat table and triggers in an new database. pgsql_lease6_stat_per_type() - helper function which tests v6 stat table and triggers using a given address and lease type pgsql_lease_stat_upgrade_test() - tests data migration, stat table and trigger operations on an upgraded database src/lib/dhcpsrv/pgsql_lease_mgr.* Added new SQL statements for lease stats queries PgSqlLeaseStatsQuery Constructors - added variants to support where clause params start() - modified to support query variants based on where clause params PgSqlLeaseMgr Added start variants: - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id) - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id, const SubnetID& last_subnet_id) src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc New unit tests: - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery4) - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery6)
b0bea19c