mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
SQLite: Add pragma integrity_check
This commit is contained in:
parent
3e8ff836aa
commit
b2bcb19b22
1 changed files with 8 additions and 0 deletions
|
@ -53,6 +53,14 @@ ErrorResult SQLite::DoOpen(RecordValPtr options) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( int res = sqlite3_exec(db, "pragma integrity_check", NULL, NULL, &errorMsg); res != SQLITE_OK ) {
|
||||||
|
std::string err = util::fmt("Error executing integrity check: %s", errorMsg);
|
||||||
|
Error(err.c_str());
|
||||||
|
sqlite3_free(errorMsg);
|
||||||
|
Close();
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
auto tuning_params = options->GetField<TableVal>("tuning_params")->ToMap();
|
auto tuning_params = options->GetField<TableVal>("tuning_params")->ToMap();
|
||||||
for ( const auto& [k, v] : tuning_params ) {
|
for ( const auto& [k, v] : tuning_params ) {
|
||||||
auto ks = k->AsListVal()->Idx(0)->AsStringVal();
|
auto ks = k->AsListVal()->Idx(0)->AsStringVal();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue