data source. This is an error since it indicates a problem in the earlier
processing of the query.
-% DATASRC_SQLITE_SETUP setting up SQLite database
+% DATASRC_SQLITE_SETUP setting up new SQLite3 database in '%1'
The database for SQLite data source was found empty. It is assumed this is the
first run and it is being initialized with current schema. It'll still contain
-no data, but it will be ready for use.
+no data, but it will be ready for use. If this is indeed the first run of
+Bind10, it is to be expected and completely harmless. If you just configured
+a data source to point to an existing file and you see this, you may have
+misspelled the file name.
+
+% DATASRC_SQLITE_SETUP_OLD_API setting up new SQLite database
+The database for SQLite data source was found empty. It is assumed this is the
+first run and it is being initialized with current schema. It'll still contain
+no data, but it will be ready for use. This is similar to DATASRC_SQLITE_SETUP
+message, but it is logged from the old API. You should never see it, since the
+API is deprecated.
% DATASRC_STATIC_CLASS_NOT_CH static data source can handle CH class only
An error message indicating that a query requesting a RR for a class other
// return db version
pair<int, int>
-createDatabase(sqlite3* db) {
- logger.info(DATASRC_SQLITE_SETUP);
+createDatabase(sqlite3* db, const std::string& name) {
+ logger.warn(DATASRC_SQLITE_SETUP).arg(name);
// try to get an exclusive lock. Once that is obtained, do the version
// check *again*, just in case this process was racing another
}
void
-checkAndSetupSchema(Initializer* initializer) {
+checkAndSetupSchema(Initializer* initializer, const std::string& name) {
sqlite3* const db = initializer->params_.db_;
pair<int, int> schema_version = checkSchemaVersion(db);
if (schema_version.first == -1) {
- schema_version = createDatabase(db);
+ schema_version = createDatabase(db, name);
} else if (schema_version.first != SQLITE_SCHEMA_MAJOR_VERSION) {
LOG_ERROR(logger, DATASRC_SQLITE_INCOMPATIBLE_VERSION)
.arg(schema_version.first).arg(schema_version.second)
isc_throw(SQLite3Error, "Cannot open SQLite database file: " << name);
}
- checkAndSetupSchema(&initializer);
+ checkAndSetupSchema(&initializer, name);
initializer.move(dbparameters_.get());
}
// return db version
pair<int, int> create_database(sqlite3* db) {
- logger.info(DATASRC_SQLITE_SETUP);
+ logger.info(DATASRC_SQLITE_SETUP_OLD_API);
// try to get an exclusive lock. Once that is obtained, do the version
// check *again*, just in case this process was racing another