Skip to content

Commit cb19261

Browse files
committed
Fixed drop GTT in classic server
1 parent f2367d8 commit cb19261

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/jrd/CacheVector.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ class CacheElement : public ElementBase, public P
881881
void reset(thread_db* tdbb, bool erase) override
882882
{
883883
storeObject(tdbb, nullptr, erase ? CacheFlag::ERASED : 0);
884+
P::reloadAst(tdbb, erase);
884885
}
885886

886887
public:

src/jrd/CharSetContainer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class CharSetContainer : public Firebird::PermanentStorage
5555

5656
static bool destroy(thread_db* tdbb, CharSetContainer* container);
5757
static CharSetContainer* create(thread_db* tdbb, MetaId id);
58-
void releaseLock(thread_db*) { }
58+
void releaseLock(thread_db* tdbb) { }
59+
void reloadAst(thread_db* tdbb, bool erase) { }
5960

6061
Firebird::CharSet* getCharSet()
6162
{

src/jrd/Relation.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ class DbTriggersHeader : public Firebird::PermanentStorage
206206
const QualifiedName& getName() const noexcept;
207207

208208
static bool destroy(thread_db* tdbb, DbTriggersHeader* trigs);
209-
void releaseLock(thread_db*) { }
209+
void releaseLock(thread_db* tdbb) { }
210+
void reloadAst(thread_db* tdbb, bool erase) { }
210211

211212
private:
212213
MetaId type;
@@ -480,7 +481,8 @@ class IndexPermanent : public Firebird::PermanentStorage
480481
return idp_id;
481482
}
482483

483-
void releaseLock(thread_db*) { }
484+
void releaseLock(thread_db* tdbb) { }
485+
void reloadAst(thread_db* tdbb, bool erase) { }
484486

485487
RelationPermanent* getRelation() noexcept
486488
{
@@ -835,6 +837,12 @@ class RelationPermanent : public Firebird::PermanentStorage
835837
~RelationPermanent();
836838
static bool destroy(thread_db* tdbb, RelationPermanent* rel);
837839

840+
void reloadAst(thread_db* tdbb, bool erase)
841+
{
842+
if (erase)
843+
dropTempPages(tdbb);
844+
}
845+
838846
void makeLocks(thread_db* tdbb, Cached::Relation* relation);
839847
static constexpr USHORT getRelLockKeyLength() noexcept;
840848
Lock* createLock(thread_db* tdbb, lck_t, bool);

src/jrd/Routine.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ namespace Jrd
6464
}
6565

6666
static bool destroy(thread_db* tdbb, RoutinePermanent* routine);
67-
void releaseLock(thread_db*) { }
67+
void reloadAst(thread_db* tdbb, bool erase) { }
68+
void releaseLock(thread_db* tdbb) { }
6869

6970
const QualifiedName& getName() const noexcept { return name; }
7071
void setName(const QualifiedName& value) { name = value; }

0 commit comments

Comments
 (0)