mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
[5629] MySQL and PostgreSQL host backends now verify schema version
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
This commit is contained in:
@@ -317,6 +317,11 @@ public:
|
||||
|
||||
/// @brief Returns backend version.
|
||||
///
|
||||
/// The method is called by the constructor after opening the database
|
||||
/// but prior to preparing SQL statements, to verify that the schema version
|
||||
/// is correct. Thus it must not rely on a pre-prepared statement or
|
||||
/// formal statement execution error checking.
|
||||
///
|
||||
/// @return Version number stored in the database, as a pair of unsigned
|
||||
/// integers. "first" is the major version number, "second" the
|
||||
/// minor number.
|
||||
|
Reference in New Issue
Block a user