db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1533412 - in /db/derby/code/branches/10.7: ./ java/engine/org/apache/derby/impl/store/raw/data/ java/testing/org/apache/derbyTesting/functionTests/tests/store/
Date Fri, 18 Oct 2013 12:12:45 GMT
Author: kmarsden
Date: Fri Oct 18 12:12:45 2013
New Revision: 1533412

URL: http://svn.apache.org/r1533412
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.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby5234Test.java
      - copied unchanged from r1337258, db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby5234Test.java
Modified:
    db/derby/code/branches/10.7/   (props changed)
    db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
    db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
    db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java

Propchange: db/derby/code/branches/10.7/
------------------------------------------------------------------------------
  Reverse-merged /db/derby/code/branches/10.9:r1491566
  Reverse-merged /db/derby/code/trunk:r1092067,1228332,1228777,1229266,1230873,1231296,1239898,1245143,1245226,1290888,1290919,1291057,1292108,1292941,1293467,1294275,1309244,1333305,1334919,1341204,1341266,1354015,1364690,1371041,1378206,1394883,1399306,1430291,1430417
  Reverse-merged /db/derby/code/branches/10.8:r1092649,1240258,1359059,1384638,1386677
  Merged /db/derby/code/trunk:r1335570,1335677
  Merged /db/derby/code/branches/10.8:r1337258

Modified: db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java?rev=1533412&r1=1533411&r2=1533412&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocExtent.java
Fri Oct 18 12:12:45 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.7/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java?rev=1533412&r1=1533411&r2=1533412&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
(original)
+++ db/derby/code/branches/10.7/java/engine/org/apache/derby/impl/store/raw/data/AllocPage.java
Fri Oct 18 12:12:45 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.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java?rev=1533412&r1=1533411&r2=1533412&view=diff
==============================================================================
--- db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
(original)
+++ db/derby/code/branches/10.7/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
Fri Oct 18 12:12:45 2013
@@ -70,7 +70,8 @@ public class _Suite extends BaseTestCase
         suite.addTest(IndexSplitDeadlockTest.suite());
         suite.addTest(HoldCursorJDBC30Test.suite());
         suite.addTest(AccessTest.suite());
-        
+         suite.addTest(Derby5234Test.suite());
+
         /* Tests that only run in sane builds */
         if (SanityManager.DEBUG) {
             suite.addTest(HoldCursorExternalSortJDBC30Test.suite());



Mime
View raw message