projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a181a1
)
Use NULL in the local database to indicate that blocks are not expired.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Wed, 23 May 2007 18:12:12 +0000
(11:12 -0700)
committer
Michael Vrable
<mvrable@turin.ucsd.edu>
Wed, 23 May 2007 18:12:12 +0000
(11:12 -0700)
localdb.cc
patch
|
blob
|
history
diff --git
a/localdb.cc
b/localdb.cc
index
cc88401
..
c58549b
100644
(file)
--- 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 "
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);
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 "
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;
const char *tail;
ObjectReference ref;