vijirams / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

textfixture fails running eval.test #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open testfixture project, set to the DEBUG build
2. In test/^testscripts.txt setup the following test:
source $testdir/eval.test
3. Start running in DEBUG mode

fails with the following error:

eval-3.1...
Expected: [1 {} 102 2 {} 103 3 {} 104 4 {} 105]
     Got: [1 {} 2 2 {} 3 3 {} 4 4 {} 5]

This test modifies a row while it is being read.  Since it fails, it shows
that the shared pager cache is not working properly.  I feel this is
serious and there may be a conceptual problem with the C# port

Need to determine the root cause of this error

Original issue reported on code.google.com by noah.hart@gmail.com on 8 Aug 2009 at 2:37

GoogleCodeExporter commented 9 years ago
I've started looking.... everything seems fine, I cannot understand clearly 
when the 
native code invalidates the VdbeCursor yet.
I plan to run and debug the native code soon.

Original comment by enzinol@gmail.com on 5 Sep 2009 at 3:35

GoogleCodeExporter commented 9 years ago
Found it.
The culprit is static byte[] fetchPayload(...)
The semantic of native C code is to return a pointer to the data while in C# 
the data
is getting copied. So even if the cursor points to the right cell, when 
returning
from test_eval stale data is used to continue the evaluation.
Next: thinking about a fix.

Original comment by enzinol@gmail.com on 5 Sep 2009 at 5:52

GoogleCodeExporter commented 9 years ago
Attaching the fix (updated at 1.00PM PDT)

Original comment by enzinol@gmail.com on 9 Sep 2009 at 12:12

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed with 9/13 checkin

Original comment by noah.hart@gmail.com on 13 Sep 2009 at 2:16