Sqlite3: REFERENCES fix

git-svn-id: svn://ultimatepp.org/upp/trunk@13463 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-07-01 07:35:24 +00:00
parent ddb46b8ab4
commit 8d84a4a2c1
2 changed files with 4 additions and 3 deletions

View file

@ -152,7 +152,7 @@ int Heap::HugeFree(void *ptr)
huge_4KB_count -= h->GetSize();
h = BlkHeap::Free(h);
int sz = h->GetSize();
if(h->IsFirst() && h->IsLast())
if(h->IsFirst() && h->IsLast()) {
if(free_hpages >= max_free_hpages) { // we have enough pages in the reserve, return to the system
LTIMING("Free Huge Page");
h->UnlinkFree();
@ -171,6 +171,7 @@ int Heap::HugeFree(void *ptr)
}
else
free_hpages++;
}
return sz;
}

View file

@ -52,11 +52,11 @@
"drop index IDX_@x;")
#ifndef REFERENCES
#define REFERENCES(n, x) INLINE_ATTRIBUTE("REFERENCES " #n)
#define REFERENCES(n) INLINE_ATTRIBUTE("REFERENCES " #n)
#endif
#ifndef REFERENCES_CASCADE
#define REFERENCES_CASCADE(n, x) INLINE_ATTRIBUTE("REFERENCES " #n " ON DELETE CASCADE")
#define REFERENCES_CASCADE(n) INLINE_ATTRIBUTE("REFERENCES " #n " ON DELETE CASCADE")
#endif
#ifndef REFERENCES_