From c29a2745d2afe351bac2db86a1821e3fc685864d Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 28 Aug 2017 15:16:41 +0200 Subject: [PATCH] Bug fix/fixes 2808 (#3156) * fixed jslint warnings * fix undefined behavior * move check into if, so check tools do not complain --- arangod/RocksDBEngine/RocksDBEngine.cpp | 2 ++ arangod/RocksDBEngine/RocksDBValue.h | 1 + js/client/tests/http/api-gharial-spec.js | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arangod/RocksDBEngine/RocksDBEngine.cpp b/arangod/RocksDBEngine/RocksDBEngine.cpp index 5888347a98..1b27096219 100644 --- a/arangod/RocksDBEngine/RocksDBEngine.cpp +++ b/arangod/RocksDBEngine/RocksDBEngine.cpp @@ -1428,11 +1428,13 @@ Result RocksDBEngine::dropDatabase(TRI_voc_tick_t id) { // because it will simply remain there and be ignored on subsequent starts TRI_UnlinkFile(versionFilename(id).c_str()); +#ifdef ARANGODB_ENABLE_MAINTAINER_MODE if (numDocsLeft > 0) { std::string errorMsg("deletion check in drop database failed - not all documents have been deleted. remaining: "); errorMsg.append(std::to_string(numDocsLeft)); THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, errorMsg); } +#endif return res; } diff --git a/arangod/RocksDBEngine/RocksDBValue.h b/arangod/RocksDBEngine/RocksDBValue.h index a5889faa6c..2283c5d940 100644 --- a/arangod/RocksDBEngine/RocksDBValue.h +++ b/arangod/RocksDBEngine/RocksDBValue.h @@ -120,6 +120,7 @@ class RocksDBValue { RocksDBValue& operator=(RocksDBValue&& other) noexcept { TRI_ASSERT(_type == other._type); _buffer = std::move(other._buffer); + return *this; } private: diff --git a/js/client/tests/http/api-gharial-spec.js b/js/client/tests/http/api-gharial-spec.js index 341048b6d2..29a21a58d5 100644 --- a/js/client/tests/http/api-gharial-spec.js +++ b/js/client/tests/http/api-gharial-spec.js @@ -89,7 +89,7 @@ describe('_api/gharial', () => { do { wait(0.1); req = request.get(url + "/" + graphName); - } while (req.statusCode != 200); + } while (req.statusCode !== 200); expect(db._collection(eColName)).to.not.be.null; expect(db._collection(vColName)).to.not.be.null; @@ -123,7 +123,7 @@ describe('_api/gharial', () => { do { wait(0.1); req = request.get(url + "/" + graphName); - } while (req.statusCode != 200); + } while (req.statusCode !== 200); expect(db._collection(eColName)).to.not.be.null; expect(db._collection(vColName)).to.not.be.null;