summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2008-04-03 02:56:44 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2008-04-03 02:56:44 +0000
commitea664f7a7de7255a6a2abec707eddad54312780d (patch)
tree214620cfa63bedd36c6b83f53d829174636f3035
parent1830cdea4f5b20f251aebc3ab08db404cb56002d (diff)
downloadjackcess-ea664f7a7de7255a6a2abec707eddad54312780d.tar.gz
jackcess-ea664f7a7de7255a6a2abec707eddad54312780d.zip
clear nextPageNumber for held dataPage
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@307 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/SimpleIndex.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/SimpleIndex.java b/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
index 80fa917..fea96e8 100644
--- a/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
+++ b/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
@@ -93,15 +93,18 @@ public class SimpleIndex extends Index {
// save the first leaf page
_dataPage = indexPage;
+ nextPageNumber = indexPage.getNextPageNumber();
+ _dataPage.setNextPageNumber(INVALID_INDEX_PAGE_NUMBER);
+ indexPage = null;
// read all leaf pages.
- while(indexPage.getNextPageNumber() != INVALID_INDEX_PAGE_NUMBER) {
+ while(nextPageNumber != INVALID_INDEX_PAGE_NUMBER) {
// FIXME we can't modify this index at this point in time
setReadOnly();
// found another one
- indexPage = new SimpleDataPage(indexPage.getNextPageNumber());
+ indexPage = new SimpleDataPage(nextPageNumber);
readDataPage(indexPage);
// since we read all the entries in sort order, we can insert them
@@ -110,6 +113,7 @@ public class SimpleIndex extends Index {
int totalSize = (_dataPage.getTotalEntrySize() +
indexPage.getTotalEntrySize());
_dataPage.setTotalEntrySize(totalSize);
+ nextPageNumber = indexPage.getNextPageNumber();
}
// check the entry order, just to be safe