Commit 43f3ad8d authored by Matthieu Dorier's avatar Matthieu Dorier

corrected flag for no_overwrite case in BDB's put_multi

parent f68072eb
......@@ -190,7 +190,7 @@ int BerkeleyDBDataStore::put_multi(size_t num_items,
databuilder.append((void*)values[i], vsizes[i]);
}
int flag = DB_MULTIPLE;
if(_no_overwrite) flag |= DB_NOOVERWRITE;
if(!_no_overwrite) flag |= DB_OVERWRITE_DUP;
int status = _dbm->put(NULL, &mkey, &mdata, flag);
if(status == 0) return SDSKV_SUCCESS;
if(status == DB_KEYEXIST) return SDSKV_ERR_KEYEXISTS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment