Hi Dave:
     It seems odd to me too. Do you have any case to show the cursor did not 
find the desire row and some other row instead?


Thanks, 
Lily

On Jun 19, 2011, at 12:57 AM, Dave Brosius <[email protected]> wrote:

> 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;
>         }

Reply via email to