ndb dd - fix newly introduced bug in drop table

parent 7fb21680
...@@ -915,13 +915,17 @@ Dbtup::drop_fragment_unmap_pages(Signal *signal, ...@@ -915,13 +915,17 @@ Dbtup::drop_fragment_unmap_pages(Signal *signal,
return; return;
} }
Uint32 page_id = alloc_info.m_dirty_pages[pos].firstItem; Ptr<Page> pagePtr;
Ptr<GlobalPage> page; ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
m_global_page_pool.getPtr(page, page_id); {
LocalDLList<Page> list(*pool, alloc_info.m_dirty_pages[pos]);
list.first(pagePtr);
list.remove(pagePtr);
}
Page_cache_client::Request req; Page_cache_client::Request req;
req.m_page.m_page_no = ((Page*)page.p)->m_page_no; req.m_page.m_page_no = pagePtr.p->m_page_no;
req.m_page.m_file_no = ((Page*)page.p)->m_file_no; req.m_page.m_file_no = pagePtr.p->m_file_no;
req.m_callback.m_callbackData= pos; req.m_callback.m_callbackData= pos;
req.m_callback.m_callbackFunction = req.m_callback.m_callbackFunction =
...@@ -935,7 +939,7 @@ Dbtup::drop_fragment_unmap_pages(Signal *signal, ...@@ -935,7 +939,7 @@ Dbtup::drop_fragment_unmap_pages(Signal *signal,
case -1: case -1:
break; break;
default: default:
ndbrequire(res == page_id); ndbrequire(res == pagePtr.i);
drop_fragment_unmap_page_callback(signal, pos, res); drop_fragment_unmap_page_callback(signal, pos, res);
} }
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment