System.Data.SQLite

Check-in [1222609485]
Login

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

Overview
Comment:Add test of rolling back to a nested savepoint.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1222609485d42b3d2eece2a18bfec4d1a9be6ea6
User & Date: mistachkin 2012-09-17 09:19:13.620
Context
2012-09-17
10:52
Add/fix some file header comments. check-in: 83553a13b0 user: mistachkin tags: trunk
09:19
Add test of rolling back to a nested savepoint. check-in: 1222609485 user: mistachkin tags: trunk
08:45
Grammar fix on the download page. check-in: 4bdb712c35 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/basic.eagle.
1858
1859
1860
1861
1862
1863
1864






























1865
1866
1867
1868
1869
1870
1871
  unset -nocomplain error result db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
-match regexp -result {^1 \{System\.Data\.SQLite\.SQLiteException\
\(0x80004005\): file is encrypted or is not a database.*?\} 1\
\{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
not a database.*?\} 0 1$}}































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

unset -nocomplain systemDataSQLiteDllFile systemDataSQLiteLinqDllFile \
    testExeFile testLinqExeFile northwindEfDbFile testLinqOutFile

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







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
  unset -nocomplain error result db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} \
-match regexp -result {^1 \{System\.Data\.SQLite\.SQLiteException\
\(0x80004005\): file is encrypted or is not a database.*?\} 1\
\{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
not a database.*?\} 0 1$}}

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

runTest {test data-1.37 {rollback to nested savepoint} -setup {
  setupDb [set fileName data-1.37.db]
} -body {
  sql execute $db "BEGIN IMMEDIATE TRANSACTION;"
  sql execute $db "SAVEPOINT one;"

  sql execute $db "CREATE TABLE t1(x);"
  sql execute $db "SAVEPOINT two;"

  sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  lappend result [sql execute -execute scalar $db "SELECT COUNT(*) FROM t1;"]
  sql execute $db "SAVEPOINT three;"

  sql execute $db "INSERT INTO t1 (x) VALUES(2);"
  lappend result [sql execute -execute scalar $db "SELECT COUNT(*) FROM t1;"]

  sql execute $db "ROLLBACK TRANSACTION TO SAVEPOINT three;"
  lappend result [sql execute -execute scalar $db "SELECT COUNT(*) FROM t1;"]

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
{1 2 1}}

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

unset -nocomplain systemDataSQLiteDllFile systemDataSQLiteLinqDllFile \
    testExeFile testLinqExeFile northwindEfDbFile testLinqOutFile

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