google-code-export / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 1 forks source link

scoped cursor getRowCount() with advances cursor to eof #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. within a read transaction, create a cursor using table.scope() on an index
2. call cursor.getRowCount()
3. call cursor.eof()

What is the expected output? What do you see instead?

eof() returns true despite the row count being positive.  Expect cursor to keep 
position and not return eof.  (Without the call to getRowCount(), eof() returns 
false and can iterate successfully through rows.)

What version of the product are you using? On what operating system?

1.0.4.b986

Please provide any additional information below.

No bug with simple table.open() cursor.  eof() returns false for that.

This is a problem because it is very natural to open a cursor then use 
getRowCount() to determine how much space to reserve for results.

If getRowCount() as a stateless operation is not supported, that should be 
specified in the documentation.

Original issue reported on code.google.com by cdemarc...@gmail.com on 24 Mar 2011 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by kit...@gmail.com on 25 Mar 2011 at 1:44

GoogleCodeExporter commented 9 years ago
Fix is available since SqlJet 1.0.4.b1007 and you may get binaries at our build 
server at 
https://teamcity.svnkit.com/viewLog.html?buildId=13716&tab=artifacts&buildTypeId
=bt31

Thank you for reporting this issue!

Original comment by kit...@gmail.com on 29 Mar 2011 at 1:45