ndb - bug#27102

  Make sure head after undo execute does not point to last page of file
  As this will confuse next write to group
parent 4a27e9ad
...@@ -2924,6 +2924,25 @@ Lgman::stop_run_undo_log(Signal* signal) ...@@ -2924,6 +2924,25 @@ Lgman::stop_run_undo_log(Signal* signal)
ptr.p->m_file_pos[TAIL] = tail; ptr.p->m_file_pos[TAIL] = tail;
init_logbuffer_pointers(ptr); init_logbuffer_pointers(ptr);
{
Buffer_idx head= ptr.p->m_file_pos[HEAD];
Ptr<Undofile> file;
m_file_pool.getPtr(file, head.m_ptr_i);
if (head.m_idx == file.p->m_file_size - 1)
{
Local_undofile_list files(m_file_pool, ptr.p->m_files);
if(!files.next(file))
{
jam();
files.first(file);
}
head.m_idx = 0;
head.m_ptr_i = file.i;
ptr.p->m_file_pos[HEAD] = head;
}
}
ptr.p->m_free_file_words = (Uint64)File_formats::UNDO_PAGE_WORDS * ptr.p->m_free_file_words = (Uint64)File_formats::UNDO_PAGE_WORDS *
(Uint64)compute_free_file_pages(ptr); (Uint64)compute_free_file_pages(ptr);
ptr.p->m_next_reply_ptr_i = ptr.p->m_file_pos[HEAD].m_ptr_i; ptr.p->m_next_reply_ptr_i = ptr.p->m_file_pos[HEAD].m_ptr_i;
......
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