Merge pull request #175 from benbjohnson/check-loop

Add circular dependency integrity check.
pull/34/head
Ben Johnson 2014-05-28 09:00:19 -06:00
commit 4508a00891
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ func (n *node) write(p *page) {
elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem)))
elem.ksize = uint32(len(item.key))
elem.pgid = item.pgid
_assert(elem.pgid != p.id, "write: circular dependency occurred")
}
// Write data for the element to the end of the page.