You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2007/01/03 01:42:11 UTC
svn commit: r491991 -
/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java
Author: mikem
Date: Tue Jan 2 16:42:10 2007
New Revision: 491991
URL: http://svn.apache.org/viewvc?view=rev&rev=491991
Log:
DERBY-2093
backporting fix from trunk to 10.2.
Fixed error in initSlotTable() to print the right page info in case
of error during initialization of page from disk into cache.
Modified:
db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java
Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java?view=diff&rev=491991&r1=491990&r2=491991
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java Tue Jan 2 16:42:10 2007
@@ -807,7 +807,7 @@
try
{
readPageHeader();
- initSlotTable();
+ initSlotTable(newIdentity);
}
catch (IOException ioe)
{
@@ -2177,10 +2177,15 @@
* BasePage. Go through all the records on the page and set the
* freeSpace and firstFreeByte on page.
* <p>
+ * @param newIdentity The identity of the page we are trying to
+ * initialize, since we are in the middle of trying
+ * to build the page existing info in the class is
+ * not set up yet (like getIdentity()).
*
* @exception StandardException Standard exception policy.
**/
- private void initSlotTable()
+ private void initSlotTable(
+ PageKey newIdentity)
throws StandardException
{
int localSlotsInUse = slotsInUse;
@@ -2224,7 +2229,7 @@
{
throw dataFactory.markCorrupt(
StandardException.newException(
- SQLState.DATA_CORRUPT_PAGE, getPageId()));
+ SQLState.DATA_CORRUPT_PAGE, newIdentity));
}
if (recordOffset > lastRecordOffset)
@@ -2288,7 +2293,7 @@
// i/o methods on the byte array have thrown an IOException
throw dataFactory.markCorrupt(
StandardException.newException(
- SQLState.DATA_CORRUPT_PAGE, ioe, getPageId()));
+ SQLState.DATA_CORRUPT_PAGE, ioe, newIdentity));
}
}