diff options
author | adam <anton@adamansky.com> | 2012-11-19 18:12:36 +0700 |
---|---|---|
committer | adam <anton@adamansky.com> | 2012-11-19 18:12:36 +0700 |
commit | e615057a3aed55fe18f221fac846e57d527759fd (patch) | |
tree | b3e3eb011ca596e8d1a999d6b1fe9523b91a3826 /tcejdb | |
parent | 3919590530ef652ca1fe46fac2fc2dfb0ac8d3a7 (diff) | |
download | ejdb-e615057a3aed55fe18f221fac846e57d527759fd.tar.gz ejdb-e615057a3aed55fe18f221fac846e57d527759fd.tar.bz2 ejdb-e615057a3aed55fe18f221fac846e57d527759fd.zip |
#9
Diffstat (limited to 'tcejdb')
-rw-r--r-- | tcejdb/ejdb.c | 5 | ||||
-rw-r--r-- | tcejdb/ejdb.h | 1 | ||||
-rw-r--r-- | tcejdb/testejdb/t2.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/tcejdb/ejdb.c b/tcejdb/ejdb.c index 7cb70d2..765442f 100644 --- a/tcejdb/ejdb.c +++ b/tcejdb/ejdb.c @@ -1661,7 +1661,7 @@ static TCLIST* _qryexecute(EJCOLL *jcoll, const EJQ *q, uint32_t *outcount, int EJQ *ejq; TCMALLOC(ejq, sizeof (*ejq)); _qrydup(q, ejq, EJQINTERNAL); - + *outcount = 0; bool onlycount = (qflags & JBQRYCOUNT); //quering only for result set count bool all = false; //need all records @@ -2898,13 +2898,12 @@ static int _parse_qobj_impl(EJDB *jb, EJQ *q, bson_iterator *it, TCMAP *qmap, TC if (isckey) { if (pqf == NULL && !strcmp("$set", fkey)) { //top level set OP qf.flags |= EJCONDSET; - qf.q->flags |= EJQUPDATING; } else if (!strcmp("$inc", fkey)) { qf.flags |= EJCONDINC; - qf.q->flags |= EJQUPDATING; } if ((qf.flags & (EJCONDSET | EJCONDINC))) { assert(qf.updateobj == NULL); + qf.q->flags |= EJQUPDATING; qf.updateobj = bson_create(); bson_init(qf.updateobj); bson_type sbt; diff --git a/tcejdb/ejdb.h b/tcejdb/ejdb.h index a32b59a..41fd6cd 100644 --- a/tcejdb/ejdb.h +++ b/tcejdb/ejdb.h @@ -69,7 +69,6 @@ enum { /** Index modes, index types. */ enum { /*< Query search mode flags in ejdbqryexecute() */ JBQRYCOUNT = 1, /*< Query only count(*) */ - JBQRYUPDATE = 1 << 1 /*< Updating query */ }; /** diff --git a/tcejdb/testejdb/t2.c b/tcejdb/testejdb/t2.c index c546952..884cd4a 100644 --- a/tcejdb/testejdb/t2.c +++ b/tcejdb/testejdb/t2.c @@ -2854,7 +2854,7 @@ void testUpdate1() { //https://github.com/Softmotions/ejdb/issues/9 tcxstrdel(log); ejdbquerydel(q1); - + } |