summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-12 10:06:07 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-12 10:06:07 -0500
commited20a67a1268bf517cfdbc1a897b659dce38f3a4 (patch)
tree9a6a3cee1a6aae3be87436b7dbed0708aab3ecd2
parent7fff147bd1fad81381fb36396021c3acb33da44d (diff)
Initialize invalidation to NULL!
-rw-r--r--src/c/urweb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 050a06c9..55d89fd5 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -585,6 +585,7 @@ uw_context uw_init(int id, uw_loggers *lg) {
ctx->numRecording = 0;
ctx->recordingOffset = 0;
+ ctx->inval = NULL;
ctx->remoteSock = -1;
@@ -4732,9 +4733,11 @@ void uw_Sqlcache_flush(uw_context ctx, uw_Sqlcache_Cache *cache, char **keys) {
inval->keys = keys;
inval->next = NULL;
if (ctx->inval) {
+ // An invalidation is already registered, so just extend it.
ctx->inval->next = inval;
} else {
uw_register_transactional(ctx, inval, uw_Sqlcache_flushCommit, NULL, uw_Sqlcache_flushFree);
}
+ // [ctx->inval] should always point to the last invalidation.
ctx->inval = inval;
}