diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-24 23:38:12 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-01-24 23:38:12 +0100 |
commit | 9b744da32e64d8a6cd342faba8fc3232884d60f2 (patch) | |
tree | a22558b6c869ba777292d3ce231222408614d5b3 /common/storage_lmdb.cpp | |
parent | b36ae2d0e0b0ee9865fdc7e628374853d160b55a (diff) | |
download | sink-9b744da32e64d8a6cd342faba8fc3232884d60f2.tar.gz sink-9b744da32e64d8a6cd342faba8fc3232884d60f2.zip |
Uid index + query using that index.
...and a couple of other fixes.
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index bede6aa..b7fbfed 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -218,6 +218,11 @@ bool Storage::write(void const *keyPtr, size_t keySize, void const *valuePtr, si | |||
218 | return false; | 218 | return false; |
219 | } | 219 | } |
220 | 220 | ||
221 | if (!keyPtr || keySize == 0) { | ||
222 | std::cerr << "tried to write empty key." << std::endl; | ||
223 | return false; | ||
224 | } | ||
225 | |||
221 | const bool implicitTransaction = !d->transaction || d->readTransaction; | 226 | const bool implicitTransaction = !d->transaction || d->readTransaction; |
222 | if (implicitTransaction) { | 227 | if (implicitTransaction) { |
223 | if (!startTransaction()) { | 228 | if (!startTransaction()) { |