db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r901162 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
Date Wed, 20 Jan 2010 12:27:40 GMT
Author: kahatlen
Date: Wed Jan 20 12:27:40 2010
New Revision: 901162

URL: http://svn.apache.org/viewvc?rev=901162&view=rev
Log:
DERBY-3092 (partial) Add back optimization that was mistakenly removed
by the previous patch

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java?rev=901162&r1=901161&r2=901162&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
Wed Jan 20 12:27:40 2010
@@ -438,14 +438,17 @@
 				CompressedNumber.writeInt(out, count);
 
 				// now write them out
-				for (Iterator it = trans.values().iterator(); it.hasNext(); )
+				if (count > 0)
 				{
-					TransactionTableEntry ent =
-							(TransactionTableEntry) it.next();
-					if (ent != null && ent.isUpdate())
+					for (Iterator it = trans.values().iterator(); it.hasNext();)
 					{
-						// only writes out update transaction
-						out.writeObject(ent);
+						TransactionTableEntry ent =
+								(TransactionTableEntry) it.next();
+						if (ent != null && ent.isUpdate())
+						{
+							// only write out update transactions
+							out.writeObject(ent);
+						}
 					}
 				}
 			}



Mime
View raw message