db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1533682 - in /db/derby/code/branches/10.5: ./ java/ java/engine/org/apache/derby/impl/store/raw/data/ java/testing/org/apache/derbyTesting/functionTests/tests/store/
Date Sat, 19 Oct 2013 03:12:47 GMT
Author: kmarsden
Date: Sat Oct 19 03:12:46 2013
New Revision: 1533682

URL: http://svn.apache.org/r1533682
Log:
DERBY-6382 fter Inplace compress: java.sql.SQLException: Page Page(10219,Container(0, 1136))
could not be read from disk caused by Caused by: java.io.EOFException: Reached end of file
while attempting to read a whole page.

This is a partial fix for DERBY-5234. Merged revision 1337258 from 10.8
Contributed by Rick Hillegas


Added:
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby5234Test.java
      - copied unchanged from r1533412, db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby5234Test.java
Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/   (props changed)
    db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
    db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
  Reverse-merged /db/derby/code/branches/10.9:r1491566
  Reverse-merged /db/derby/code/trunk:r1092067,1239898,1309244,1333305,1334919,1354015,1364690,1371041,1378206,1394883
  Reverse-merged /db/derby/code/branches/10.8:r1092649,1240258,1359059,1386677
  Merged /db/derby/code/branches/10.7:r1533412
  Merged /db/derby/code/trunk:r1335570,1335677
  Merged /db/derby/code/branches/10.8:r1337258

Propchange: db/derby/code/branches/10.5/java/
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.7/java:r1533412

Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java?rev=1533682&r1=1533681&r2=1533682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
(original)
+++ db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
Sat Oct 19 03:12:46 2013
@@ -207,7 +207,6 @@ public class AllocExtent implements Exte
 							"length " + length + " > maxlength " + maxlength);
 		}
 
-
 		this.extentOffset = offset;
 		this.extentStart = start;
 		this.extentEnd = start+maxlength-1;
@@ -575,7 +574,7 @@ public class AllocExtent implements Exte
             }
         }
 
-        if (new_highest_page >= 0)
+        if (new_highest_page + 1 >= 0)
         {
             freePages.shrink(new_highest_page + 1);
             unFilledPages.shrink(new_highest_page + 1);

Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java?rev=1533682&r1=1533681&r2=1533682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
(original)
+++ db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
Sat Oct 19 03:12:46 2013
@@ -1069,15 +1069,15 @@ public class AllocPage extends StoredPag
 			SanityManager.ASSERT(isLatched(), "page is not latched");
         }
 
-        int last_valid_page = extent.compress(owner, ntt, this);
+        int last_valid_page_bit = extent.compress(owner, ntt, this);
 
-        if (last_valid_page >= 0)
+        if (last_valid_page_bit >= 0)
         {
             // a non-negative return means that pages can be returned to
             // the operating system.
-            myContainer.truncatePages(extent.getPagenum(last_valid_page));
+            myContainer.truncatePages(extent.getPagenum(last_valid_page_bit));
 
-            if (last_valid_page == this.getPageNumber())
+            if (last_valid_page_bit == 0)
             {
                 // all pages of the extent have been returned to OS.
                 all_pages_compressed = true;

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java?rev=1533682&r1=1533681&r2=1533682&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
Sat Oct 19 03:12:46 2013
@@ -65,6 +65,7 @@ public class _Suite extends BaseTestCase
         suite.addTest(LiveLockTest.suite());
         suite.addTest(ClobReclamationTest.suite());
         suite.addTest(IndexSplitDeadlockTest.suite());
+        suite.addTest(Derby5234Test.suite());
 
         // Encryption only supported for Derby in J2SE/J2EE environments.
         // J2ME (JSR169) does not support encryption.



Mime
View raw message