From fb51ed45b5b584dc7223ecce4f2703f48a2dea17 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Wed, 23 May 2007 11:12:12 -0700 Subject: [PATCH] Use NULL in the local database to indicate that blocks are not expired. --- localdb.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/localdb.cc b/localdb.cc index cc88401..c58549b 100644 --- a/localdb.cc +++ b/localdb.cc @@ -163,8 +163,8 @@ void LocalDb::StoreObject(const ObjectReference& ref, sqlite3_stmt *stmt; static const char s[] = "insert into " - "block_index(segmentid, object, checksum, size, timestamp, expired) " - "values (?, ?, ?, ?, julianday('now'), 0)"; + "block_index(segmentid, object, checksum, size, timestamp) " + "values (?, ?, ?, ?, julianday('now'))"; const char *tail; rc = sqlite3_prepare_v2(db, s, strlen(s), &stmt, &tail); @@ -193,7 +193,7 @@ ObjectReference LocalDb::FindObject(const string &checksum, int64_t size) sqlite3_stmt *stmt; static const char s[] = "select segmentid, object from block_index " - "where checksum = ? and size = ? and expired = 0"; + "where checksum = ? and size = ? and expired is null"; const char *tail; ObjectReference ref; -- 2.20.1