System.Data.SQLite

Check-in [68d2140bad]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Formal attempt to reproduce the issue in ticket [e30b820248].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tkt-e30b820248
Files: files | file ages | folders
SHA1: 68d2140bad90a38a70fae51fede91bba2d1681bb
User & Date: mistachkin 2011-11-13 21:27:13.312
References
2011-11-17
00:49 Ticket [e30b820248] API called with finalized prepared statement status still Open with 1 other change artifact: 297db459dc user: mistachkin
2011-11-13
21:30 Ticket [e30b820248]: 1 change artifact: 02c559962e user: mistachkin
Context
2011-11-13
22:16
Merge updates from trunk. check-in: 8f3314a825 user: mistachkin tags: tkt-e30b820248
21:27
Formal attempt to reproduce the issue in ticket [e30b820248]. check-in: 68d2140bad user: mistachkin tags: tkt-e30b820248
08:59
Add MemoryUsed property to the SQLiteConnection class. Also, report memory in use by the core SQLite library when running the unit test suite. check-in: dd01ee7c55 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added Tests/tkt-e30b820248.eagle.






















































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
###############################################################################
#
# tkt-e30b820248.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

package require Eagle
package require EagleLibrary
package require EagleTest

runTestPrologue

###############################################################################

package require System.Data.SQLite.Test
runSQLiteTestPrologue

###############################################################################

runTest {test tkt-e30b820248-1.1 {statement disposal ordering} -setup {
  setupDb [set fileName tkt-e30b820248-1.1.db]
} -body {
  set id [object invoke Interpreter.GetActive NextId]
  set dataSource [file join [getTemporaryPath] $fileName]

  set sql { \
    CREATE TABLE t1 (id1 INTEGER); \
    INSERT INTO t1 (id1) VALUES (1); \
    INSERT INTO t1 (id1) VALUES (2); \
    INSERT INTO t1 (id1) VALUES (?); \
    INSERT INTO t1 (id1) VALUES (?); \
    INSERT INTO t1 (id1) VALUES (?); \
  }

  unset -nocomplain results errors

  set code [compileCSharpWith [subst {
    using System.Data.SQLite;

    namespace _Dynamic${id}
    {
      public class Test${id}
      {
        public static void Main()
        {
          using (SQLiteConnection connection = new SQLiteConnection(
              "Data Source=${dataSource};"))
          {
            connection.Open();

            using (SQLiteTransaction transaction =
                connection.BeginTransaction())
            {
              using (SQLiteCommand command = connection.CreateCommand())
              {
                command.Transaction = transaction;
                command.CommandText = "${sql}";
                command.Parameters.AddWithValue("x", 3);
                command.Parameters.AddWithValue("y", 4);
                command.Parameters.AddWithValue("z", 5);
                command.ExecuteNonQuery();
              }

              transaction.Commit();
            }
          }
        }
      }
    }
  }] results errors System.Data.SQLite.dll]

  list $code $results \
      [expr {[info exists errors] ? $errors : ""}] \
      [expr {$code eq "Ok" ? [catch {
        object invoke _Dynamic${id}.Test${id} Main
      } result] : [set result ""]}] $result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result code results errors sql dataSource id db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue