From da0fddd1898abaea6282fd039fae24427bd74f7f Mon Sep 17 00:00:00 2001 From: Jianmin Zhao Date: Mon, 30 Mar 2026 16:59:38 -0700 Subject: [PATCH] Revert "CBL-8070: Some Query tests crash with SQLite 3.51.3 (#288)" This reverts commit 0174011ccf7fe1cb63f89b20fada59172a65958b. --- Fleece/Core/Doc.cc | 2 +- Fleece/Core/Doc.hh | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Fleece/Core/Doc.cc b/Fleece/Core/Doc.cc index 3c8c7758..e007d743 100644 --- a/Fleece/Core/Doc.cc +++ b/Fleece/Core/Doc.cc @@ -190,7 +190,7 @@ namespace fleece { namespace impl { if (!_unregistered.test_and_set()) { // this is atomic #if DEBUG // Assert that the data hasn't been changed since I was created: - if (!_dontValidate && _data.size < 1e6 && _data.hash() != _dataHash) + if (_data.size < 1e6 && _data.hash() != _dataHash) FleeceException::_throw(InternalError, "Memory range (%p .. %p) was altered while Scope %p (sk=%p) was active. " "This usually means the Scope's data was freed/invalidated before the Scope " diff --git a/Fleece/Core/Doc.hh b/Fleece/Core/Doc.hh index d407a88b..4b705421 100644 --- a/Fleece/Core/Doc.hh +++ b/Fleece/Core/Doc.hh @@ -49,13 +49,6 @@ namespace fleece { namespace impl { slice data() const FLPURE {return _data;} alloc_slice allocedData() const FLPURE {return _alloced;} - void dontValidate() { -#if DEBUG - // c.f. FleeceCursor::resetScope where we ask to skip validation. - _dontValidate = true; -#endif - } - SharedKeys* sharedKeys() const FLPURE {return _sk;} slice externDestination() const FLPURE {return _externDestination;} @@ -85,7 +78,6 @@ namespace fleece { namespace impl { std::atomic_flag _unregistered ATOMIC_FLAG_INIT; // False if registered in sMemoryMap #if DEBUG uint32_t _dataHash; // hash of _data, for troubleshooting - bool _dontValidate{false}; // the check on the hash can be omitted #endif protected: bool _isDoc {false}; // True if I am a field of a Doc