aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchmark/bench_db.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-09-22 19:04:56 +0300
committerlevlam <levlam@telegram.org>2021-09-22 19:04:56 +0300
commita0cc1be3e6009850f24a7e704f09328ed31a2702 (patch)
treed08845caed38d1644c721af767e501388b181726 /benchmark/bench_db.cpp
parentf073c790c5ac4fdff024246056c96c9b694c13c6 (diff)
Add allow_creation parameter to SqliteDb::init.
Diffstat (limited to 'benchmark/bench_db.cpp')
-rw-r--r--benchmark/bench_db.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/benchmark/bench_db.cpp b/benchmark/bench_db.cpp
index bb557fd79..61ce57ab0 100644
--- a/benchmark/bench_db.cpp
+++ b/benchmark/bench_db.cpp
@@ -98,10 +98,9 @@ class SqliteKVBench final : public td::Benchmark {
td::string path = "testdb.sqlite";
td::SqliteDb::destroy(path).ignore();
if (is_encrypted) {
- td::SqliteDb::change_key(path, td::DbKey::password("cucumber"), td::DbKey::empty()).ensure();
- db = td::SqliteDb::open_with_key(path, td::DbKey::password("cucumber")).move_as_ok();
+ db = td::SqliteDb::change_key(path, true, td::DbKey::password("cucumber"), td::DbKey::empty()).move_as_ok();
} else {
- db = td::SqliteDb::open_with_key(path, td::DbKey::empty()).move_as_ok();
+ db = td::SqliteDb::open_with_key(path, true, td::DbKey::empty()).move_as_ok();
}
db.exec("PRAGMA encoding=\"UTF-8\"").ensure();
db.exec("PRAGMA synchronous=NORMAL").ensure();