summaryrefslogtreecommitdiffstats
path: root/ml
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-08-31 10:04:14 +0300
committerGitHub <noreply@github.com>2022-08-31 10:04:14 +0300
commit77b0e7bccd7666ad6df609051a2736aec29e2d39 (patch)
treea0933be2982e4d9dea590069a1c838e252690f25 /ml
parentc9620ca3ed6af773216356ea91fd0140c7e2725a (diff)
sqlite3 global statistics (#13594)
Diffstat (limited to 'ml')
-rw-r--r--ml/Database.cc2
-rw-r--r--ml/Database.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ml/Database.cc b/ml/Database.cc
index 06d0cdecbd..b46f627f6a 100644
--- a/ml/Database.cc
+++ b/ml/Database.cc
@@ -105,7 +105,7 @@ Database::Database(const std::string &Path) {
// Create anomaly events table if it does not exist.
char *ErrMsg;
- RC = sqlite3_exec(Conn, SQL_CREATE_ANOMALIES_TABLE, nullptr, nullptr, &ErrMsg);
+ RC = sqlite3_exec_monitored(Conn, SQL_CREATE_ANOMALIES_TABLE, nullptr, nullptr, &ErrMsg);
if (RC == SQLITE_OK)
return;
diff --git a/ml/Database.h b/ml/Database.h
index cc7b758724..f14755d1bd 100644
--- a/ml/Database.h
+++ b/ml/Database.h
@@ -32,7 +32,7 @@ public:
}
while (true) {
- switch (int RC = sqlite3_step(ParsedStmt)) {
+ switch (int RC = sqlite3_step_monitored(ParsedStmt)) {
case SQLITE_BUSY: case SQLITE_LOCKED:
usleep(SQLITE_INSERT_DELAY * USEC_PER_MS);
continue;