if (db_exist && r == SQLITE_CORRUPT) {
bxt_err("Open '%s' failed: %s", dbpath, sqlite3_errmsg(db));
- if (!strncmp(BASE_DB_PATH, dbpath, strlen(dbpath))) {
+ if (!strncmp(BASE_DB_PATH, dbpath, strlen(BASE_DB_PATH))) {
free(nm);
return NULL;
}
}
if (!db_exist) {
- if (strncmp(BASE_DB_PATH, dbpath, strlen(dbpath))) {
+ if (strncmp(BASE_DB_PATH, dbpath, strlen(BASE_DB_PATH))) {
r = sqlite3_exec(db, "PRAGMA journal_mode = WAL",
NULL, NULL, NULL);
if (r) {
}
}
- if (strncmp(BASE_DB_PATH, dbpath, strlen(dbpath))) {
+ if (strncmp(BASE_DB_PATH, dbpath, strlen(BASE_DB_PATH))) {
r = sqlite3_wal_autocheckpoint(db, BUXTON_DEFAULT_WAL_AUTOCHECKPOINT);
if (r != SQLITE_OK)
bxt_err("SET DEFAULT_WAL_AUTOCHECKPOINT failed : %d", r);