db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <dbros...@apache.org>
Subject Is this ok?
Date Sun, 19 Jun 2011 07:57:53 GMT
Perhaps this ok, but seems odd to me, just double checking...

ScrollInsensitiveResultSet around line 321

If the row hasn't been seen yet, if scans rows till it finds the row 
which is fine,
then once found, if the result is *found*, it looks it up again in the 
hashtable which seems odd


         if (row > 0)
         {
             // position is from the start of the result set
             if (row <= positionInSource)
             {
                 // We've already seen the row before
                 return getRowFromHashTable(row);
             }

             /* We haven't seen the row yet, scan until we find
              * it or we get to the end.
              */
             int diff = row - positionInSource;
             ExecRow result = null;
             while (diff > 0)
             {
                 if ((result = getNextRowFromSource()) != null)
                 {
                     diff--;
                 }
                 else
                 {
                     break;
                 }
             }
*if (result != null) {
                 result = getRowFromHashTable(row);
             }*
             currentRow = result;
             return result;
         }

Mime
View raw message