Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add another test. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tkt-1f7bfff467 |
Files: | files | file ages | folders |
SHA1: |
cda90ad6d160a74809bea7a518d4066d |
User & Date: | mistachkin 2016-10-30 20:38:43.371 |
Context
2016-10-31
| ||
01:23 | Merge updates from trunk. check-in: 09c590c144 user: mistachkin tags: tkt-1f7bfff467 | |
2016-10-30
| ||
20:38 | Add another test. check-in: cda90ad6d1 user: mistachkin tags: tkt-1f7bfff467 | |
20:31 | Fix commit of nested transactions that are out-of-order. Use a sequence number to construct SAVEPOINT names, not a random number. check-in: 0898ed0bbf user: mistachkin tags: tkt-1f7bfff467 | |
Changes
Changes to Tests/tkt-1f7bfff467.eagle.
︙ | ︙ | |||
148 149 150 151 152 153 154 155 156 157 158 159 | } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} \{1 2 3\}$}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} \{1 2 3\}$}} ############################################################################### runTest {test tkt-1f7bfff467-1.3 {rollback outer transaction} -setup { setupDb [set fileName tkt-1f7bfff467-1.3.db] } -body { sql execute $db { CREATE TABLE t1(x); INSERT INTO t1(x) VALUES(1); } set sql(1) { \ INSERT INTO t1(x) VALUES(2); \ } set sql(2) { \ INSERT INTO t1(x) VALUES(3); \ } set id [object invoke Interpreter.GetActive NextId] set dataSource [file join [getDatabaseDirectory] $fileName] unset -nocomplain results errors set code [compileCSharpWith [subst { using System.Data.SQLite; namespace _Dynamic${id} { public static class Test${id} { public static void Main() { using (SQLiteConnection connection = new SQLiteConnection( "Data Source=${dataSource};[getFlagsProperty]")) { connection.Open(); using (SQLiteTransaction transaction1 = connection.BeginTransaction()) { using (SQLiteCommand command1 = new SQLiteCommand("${sql(1)}", connection)) { command1.Transaction = transaction1; command1.ExecuteNonQuery(); } using (SQLiteTransaction transaction2 = connection.BeginTransaction()) { using (SQLiteCommand command2 = new SQLiteCommand("${sql(2)}", connection)) { command2.Transaction = transaction2; command2.ExecuteNonQuery(); transaction1.Rollback(); } } } } } } } }] true true true 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 \ [sql execute -execute reader -format list $db \ "SELECT x FROM t1 ORDER BY x;"] } -cleanup { cleanupDb $fileName unset -nocomplain result results errors code sql dataSource id db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite compileCSharp} -match regexp -result {^Ok\ System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} 1$}} ############################################################################### runSQLiteTestEpilogue runTestEpilogue |