ndb - bug#29176 pgman: another missing stack pruning related to drop table

storage/ndb/src/kernel/blocks/pgman.cpp:
  another missing pgman stack pruning related to drop_page
This commit is contained in:
unknown 2007-06-24 22:14:09 +02:00
parent 6b25b945b1
commit 8cafb450fb

View file

@ -695,7 +695,14 @@ Pgman::lirs_reference(Ptr<Page_entry> ptr)
if (state & Page_entry::ONSTACK)
{
jam();
bool at_bottom = ! pl_stack.hasPrev(ptr);
pl_stack.remove(ptr);
if (at_bottom)
{
jam();
ndbassert(state & Page_entry::HOT);
lirs_stack_prune();
}
}
pl_stack.add(ptr);
state |= Page_entry::ONSTACK;
@ -1891,9 +1898,10 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
bool at_bottom = ! pl_stack.hasPrev(ptr);
pl_stack.remove(ptr);
state &= ~ Page_entry::ONSTACK;
if (at_bottom && (state & Page_entry::HOT))
if (at_bottom)
{
jam();
ndbassert(state & Page_entry::HOT);
lirs_stack_prune();
}
}
@ -1905,6 +1913,7 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
state &= ~ Page_entry::ONQUEUE;
}
ndbassert(ptr.p->m_real_page_i != RNIL);
if (ptr.p->m_real_page_i != RNIL)
{
jam();