db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1242656 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree: BTreeController.java BranchControlRow.java LeafControlRow.java
Date Fri, 10 Feb 2012 03:44:49 GMT
Author: dag
Date: Fri Feb 10 03:44:49 2012
New Revision: 1242656

URL: http://svn.apache.org/viewvc?rev=1242656&view=rev
Log:
DERBY-5604 access static constants with static references

Patch 'use_static_reference' makes this change to simplify code and reflect
member status correctly in the access pattern.

Patch provided by dbrosius at apache dot org. 

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/LeafControlRow.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java?rev=1242656&r1=1242655&r2=1242656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java
Fri Feb 10 03:44:49 2012
@@ -914,8 +914,7 @@ public class BTreeController extends Ope
                     }
                 }
             }
-            else if (targetleaf.page.recordCount() - 1 < 
-                    this.getConglomerate().maxRowsPerPage)
+            else if (targetleaf.page.recordCount() - 1 < BTree.maxRowsPerPage)
             {
                 // The row wasn't there, so try to insert it
                 // on the page returned by the search.
@@ -1073,7 +1072,7 @@ public class BTreeController extends Ope
             this.isIndexableRowConsistent(rowToInsert);
         }
 
-        if (num_rows_on_page < this.getConglomerate().maxRowsPerPage)
+        if (num_rows_on_page < BTree.maxRowsPerPage)
         {
             // By default maxRowsPerPage is set to MAXINT, some tests
             // set it small to cause splitting to happen quicker with

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java?rev=1242656&r1=1242655&r2=1242656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java
Fri Feb 10 03:44:49 2012
@@ -601,8 +601,7 @@ public class BranchControlRow extends Co
                 "page is not latched:");
         }
 
-        if ((this.page.recordCount() - 1 >=
-                open_btree.getConglomerate().maxRowsPerPage) ||
+        if ((this.page.recordCount() - 1 >= BTree.maxRowsPerPage) ||
             (!this.page.spaceForInsert(splitrow, (FormatableBitSet) null,
 				AccessFactoryGlobals.BTREE_OVERFLOW_THRESHOLD)))
         {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/LeafControlRow.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/LeafControlRow.java?rev=1242656&r1=1242655&r2=1242656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/LeafControlRow.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/LeafControlRow.java
Fri Feb 10 03:44:49 2012
@@ -530,8 +530,7 @@ public class LeafControlRow extends Cont
         }
 
         // See if this page has space.
-        if ((this.page.recordCount() - 1 < 
-                open_btree.getConglomerate().maxRowsPerPage) &&
+        if ((this.page.recordCount() - 1 < BTree.maxRowsPerPage) &&
             (this.page.spaceForInsert(splitrow, (FormatableBitSet) null,
 				AccessFactoryGlobals.BTREE_OVERFLOW_THRESHOLD)))
         {



Mime
View raw message