summaryrefslogtreecommitdiff
path: root/apps/couch
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-08-11 11:25:29 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-27 16:24:44 -0400
commit153504e3665654def448539fafc592833e01f95b (patch)
tree85c9bb46a8b11f90f3f35f33b7ef86ce4ad0b6b2 /apps/couch
parent4bb8f3d695c83043732459a395ffd17b827b77b9 (diff)
initialize #db{} so that validation funs are loaded on first write
BugzID 10675
Diffstat (limited to 'apps/couch')
-rw-r--r--apps/couch/include/couch_db.hrl2
-rw-r--r--apps/couch/src/couch_db_updater.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/couch/include/couch_db.hrl b/apps/couch/include/couch_db.hrl
index 79af0db6..20f451d9 100644
--- a/apps/couch/include/couch_db.hrl
+++ b/apps/couch/include/couch_db.hrl
@@ -166,7 +166,7 @@
update_seq,
name,
filepath,
- validate_doc_funs = [],
+ validate_doc_funs = undefined,
security = [],
security_ptr = nil,
user_ctx = #user_ctx{},
diff --git a/apps/couch/src/couch_db_updater.erl b/apps/couch/src/couch_db_updater.erl
index e4f8d0ca..eebd32fb 100644
--- a/apps/couch/src/couch_db_updater.erl
+++ b/apps/couch/src/couch_db_updater.erl
@@ -463,7 +463,7 @@ refresh_validate_doc_funs(Db) ->
case Db#db.name of
<<"shards/", _:18/binary, DbName/binary>> ->
fabric:reset_validation_funs(DbName),
- Db#db{validate_doc_funs=ProcessDocFuns};
+ Db#db{validate_doc_funs=undefined};
_ ->
Db#db{validate_doc_funs=ProcessDocFuns}
end.