summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2007-03-13 21:03:34 +0100
committerunknown <jonas@perch.ndb.mysql.com>2007-03-13 21:03:34 +0100
commit2e1aac8a3990a7e152a652720649a12dd91c03f9 (patch)
tree98e6976893a734e72ae2b6dc51ce5b6ae3e3fe1f /storage
parent10f55b029e694dd0fa633ff971c73ff80ceb424d (diff)
downloadmariadb-git-2e1aac8a3990a7e152a652720649a12dd91c03f9.tar.gz
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 storage/ndb/src/kernel/blocks/lgman.cpp: Make sure head after undo execute does not point to last page of file As this will confuse next write to group
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/kernel/blocks/lgman.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp
index d61dc422556..59b95f4e97f 100644
--- a/storage/ndb/src/kernel/blocks/lgman.cpp
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp
@@ -2924,6 +2924,25 @@ Lgman::stop_run_undo_log(Signal* signal)
ptr.p->m_file_pos[TAIL] = tail;
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 *
(Uint64)compute_free_file_pages(ptr);
ptr.p->m_next_reply_ptr_i = ptr.p->m_file_pos[HEAD].m_ptr_i;