From 8d84a4a2c1ebb652a841879479a5904994270d74 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 1 Jul 2019 07:35:24 +0000 Subject: [PATCH] Sqlite3: REFERENCES fix git-svn-id: svn://ultimatepp.org/upp/trunk@13463 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/hheap.cpp | 3 ++- uppsrc/plugin/sqlite3/Sqlite3Schema.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/hheap.cpp b/uppsrc/Core/hheap.cpp index af5a25f56..8798f8bac 100644 --- a/uppsrc/Core/hheap.cpp +++ b/uppsrc/Core/hheap.cpp @@ -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; } diff --git a/uppsrc/plugin/sqlite3/Sqlite3Schema.h b/uppsrc/plugin/sqlite3/Sqlite3Schema.h index dafe92f83..fcbb7bc34 100644 --- a/uppsrc/plugin/sqlite3/Sqlite3Schema.h +++ b/uppsrc/plugin/sqlite3/Sqlite3Schema.h @@ -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_