System.Data.SQLite
Check-in [68cea6be99]
Not logged in

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

Overview
Comment:More tests for the EF6 assembly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ef6
Files: files | file ages | folders
SHA1: 68cea6be99730ae4c469ea76f9d3594739f2900b
User & Date: mistachkin 2014-01-12 10:53:12
Context
2014-01-13
00:45
Modify configuration files to include the new explicit (legacy) LINQ provider. check-in: 909afd1140 user: mistachkin tags: ef6
2014-01-12
10:53
More tests for the EF6 assembly. check-in: 68cea6be99 user: mistachkin tags: ef6
10:34
Merge in all namespace name, resource name, packaging, and testing changes. check-in: 9fb39bee99 user: mistachkin tags: ef6
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

  1379   1379                  TABLE_NAME,
  1380   1380                  FKEY_FROM_COLUMN
  1381   1381           FROM TEMP.SCHEMAFOREIGNKEYS;
  1382   1382       }}
  1383   1383   
  1384   1384   ###############################################################################
  1385   1385   
  1386         -runTest {test data-1.25 {LINQ SQL_CONSTRAINTS resource} -body {
         1386  +runTest {test data-1.25 {EF6 SQL_CONSTRAINTCOLUMNS resource} -body {
         1387  +  object invoke -flags +NonPublic \
         1388  +      System.Data.SQLite.EF6.Properties.Resources SQL_CONSTRAINTCOLUMNS
         1389  +} -constraints {eagle System.Data.SQLite System.Data.SQLite.EF6} -result {
         1390  +      CREATE TEMP VIEW SCHEMACONSTRAINTCOLUMNS AS
         1391  +        SELECT CONSTRAINT_CATALOG,
         1392  +               NULL AS CONSTRAINT_SCHEMA,
         1393  +               CONSTRAINT_NAME,
         1394  +               TABLE_CATALOG,
         1395  +               NULL AS TABLE_SCHEMA,
         1396  +               TABLE_NAME,
         1397  +               COLUMN_NAME
         1398  +        FROM TEMP.SCHEMAINDEXCOLUMNS
         1399  +        UNION
         1400  +        SELECT CONSTRAINT_CATALOG,
         1401  +               NULL,
         1402  +               CONSTRAINT_NAME,
         1403  +               TABLE_CATALOG,
         1404  +               NULL,
         1405  +               TABLE_NAME,
         1406  +               FKEY_FROM_COLUMN
         1407  +        FROM TEMP.SCHEMAFOREIGNKEYS;
         1408  +    }}
         1409  +
         1410  +###############################################################################
         1411  +
         1412  +runTest {test data-1.26 {LINQ SQL_CONSTRAINTS resource} -body {
  1387   1413     object invoke -flags +NonPublic \
  1388   1414         System.Data.SQLite.Linq.Properties.Resources SQL_CONSTRAINTS
  1389   1415   } -constraints {eagle System.Data.SQLite System.Data.SQLite.Linq} -result {
  1390   1416         CREATE TEMP VIEW SCHEMACONSTRAINTS AS
  1391   1417           SELECT INDEX_CATALOG AS CONSTRAINT_CATALOG,
  1392   1418                  NULL AS CONSTRAINT_SCHEMA,
  1393   1419                  INDEX_NAME AS CONSTRAINT_NAME,
................................................................................
  1425   1451                  INITIALLY_DEFERRED,
  1426   1452                  NULL
  1427   1453           FROM TEMP.SCHEMAFOREIGNKEYS;
  1428   1454       }}
  1429   1455   
  1430   1456   ###############################################################################
  1431   1457   
  1432         -runTest {test data-1.26 {SQLiteDataReader GetValues w/collection} -setup {
  1433         -  setupDb [set fileName data-1.26.db]
         1458  +runTest {test data-1.27 {EF6 SQL_CONSTRAINTS resource} -body {
         1459  +  object invoke -flags +NonPublic \
         1460  +      System.Data.SQLite.EF6.Properties.Resources SQL_CONSTRAINTS
         1461  +} -constraints {eagle System.Data.SQLite System.Data.SQLite.EF6} -result {
         1462  +      CREATE TEMP VIEW SCHEMACONSTRAINTS AS
         1463  +        SELECT INDEX_CATALOG AS CONSTRAINT_CATALOG,
         1464  +               NULL AS CONSTRAINT_SCHEMA,
         1465  +               INDEX_NAME AS CONSTRAINT_NAME,
         1466  +               TABLE_CATALOG,
         1467  +               NULL AS TABLE_SCHEMA,
         1468  +               TABLE_NAME,
         1469  +               'PRIMARY KEY' AS CONSTRAINT_TYPE,
         1470  +               0 AS IS_DEFERRABLE,
         1471  +               0 AS INITIALLY_DEFERRED,
         1472  +               NULL AS CHECK_CLAUSE
         1473  +        FROM TEMP.SCHEMAINDEXES
         1474  +        WHERE PRIMARY_KEY = 1
         1475  +        UNION
         1476  +        SELECT INDEX_CATALOG,
         1477  +               NULL,
         1478  +               INDEX_NAME,
         1479  +               TABLE_CATALOG,
         1480  +               NULL,
         1481  +               TABLE_NAME,
         1482  +               'UNIQUE',
         1483  +               0,
         1484  +               0,
         1485  +               NULL
         1486  +        FROM TEMP.SCHEMAINDEXES
         1487  +        WHERE PRIMARY_KEY = 0 AND [UNIQUE] = 1
         1488  +        UNION
         1489  +        SELECT CONSTRAINT_CATALOG,
         1490  +               NULL,
         1491  +               CONSTRAINT_NAME,
         1492  +               TABLE_CATALOG,
         1493  +               NULL,
         1494  +               TABLE_NAME,
         1495  +               CONSTRAINT_TYPE,
         1496  +               IS_DEFERRABLE,
         1497  +               INITIALLY_DEFERRED,
         1498  +               NULL
         1499  +        FROM TEMP.SCHEMAFOREIGNKEYS;
         1500  +    }}
         1501  +
         1502  +###############################################################################
         1503  +
         1504  +runTest {test data-1.28 {SQLiteDataReader GetValues w/collection} -setup {
         1505  +  setupDb [set fileName data-1.28.db]
  1434   1506   } -body {
  1435   1507     sql execute $db {
  1436   1508       CREATE TABLE t1(x INTEGER PRIMARY KEY ASC, y TEXT);
  1437   1509       INSERT INTO t1 (x, y) VALUES(1, 'aardvark');
  1438   1510       INSERT INTO t1 (x, y) VALUES(2, 'bear');
  1439   1511       INSERT INTO t1 (x, y) VALUES(3, 'chicken');
  1440   1512       INSERT INTO t1 (x, y) VALUES(4, 'duck');
................................................................................
  1486   1558     unset -nocomplain db fileName
  1487   1559   } -constraints \
  1488   1560   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  1489   1561   {{26 26} {zebra zebra}}}
  1490   1562   
  1491   1563   ###############################################################################
  1492   1564   
  1493         -runTest {test data-1.27 {LINQ ISQLiteSchemaExtensions.BuildTempSchema} -setup {
  1494         -  setupDb [set fileName data-1.27.db]
         1565  +runTest {test data-1.29 {LINQ ISQLiteSchemaExtensions.BuildTempSchema} -setup {
         1566  +  setupDb [set fileName data-1.29.db]
  1495   1567   } -body {
  1496   1568     set connection [getDbConnection]
  1497   1569   
  1498   1570     set providerServices [object invoke -flags +NonPublic \
  1499   1571         System.Data.SQLite.Linq.SQLiteProviderServices Instance]
  1500   1572   
  1501   1573     object invoke -flags +NonPublic -type \
................................................................................
  1508   1580   
  1509   1581     unset -nocomplain providerServices connection db fileName
  1510   1582   } -constraints {eagle SQLite System.Data.SQLite System.Data.SQLite.Linq} \
  1511   1583   -result {}}
  1512   1584   
  1513   1585   ###############################################################################
  1514   1586   
  1515         -runTest {test data-1.28 {VARCHAR / NVARCHAR types with spaces} -body {
         1587  +runTest {test data-1.30 {EF6 ISQLiteSchemaExtensions.BuildTempSchema} -setup {
         1588  +  setupDb [set fileName data-1.30.db]
         1589  +} -body {
         1590  +  set connection [getDbConnection]
         1591  +
         1592  +  set providerServices [object invoke -flags +NonPublic \
         1593  +      System.Data.SQLite.EF6.SQLiteProviderServices Instance]
         1594  +
         1595  +  object invoke -flags +NonPublic -type \
         1596  +      System.Data.SQLite.ISQLiteSchemaExtensions $providerServices \
         1597  +      BuildTempSchema $connection
         1598  +} -cleanup {
         1599  +  cleanupDb $fileName
         1600  +
         1601  +  freeDbConnection
         1602  +
         1603  +  unset -nocomplain providerServices connection db fileName
         1604  +} -constraints {eagle SQLite System.Data.SQLite System.Data.SQLite.EF6} \
         1605  +-result {}}
         1606  +
         1607  +###############################################################################
         1608  +
         1609  +runTest {test data-1.31 {VARCHAR / NVARCHAR types with spaces} -body {
  1516   1610     list [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
  1517   1611         TypeNameToDbType VARCHAR None] \
  1518   1612         [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
  1519   1613         TypeNameToDbType NVARCHAR None] \
  1520   1614         [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
  1521   1615         TypeNameToDbType VARCHAR(1) None] \
  1522   1616         [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
................................................................................
  1526   1620         [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
  1527   1621         TypeNameToDbType "NVARCHAR (1)" None] \
  1528   1622   } -constraints {eagle System.Data.SQLite} -result \
  1529   1623   {AnsiString String AnsiString String AnsiString String}}
  1530   1624   
  1531   1625   ###############################################################################
  1532   1626   
  1533         -runTest {test data-1.29 {SetMemoryStatus method} -setup {
         1627  +runTest {test data-1.32 {SetMemoryStatus method} -setup {
  1534   1628     #
  1535   1629     # NOTE: Make sure that SQLite core library is completely shutdown prior to
  1536   1630     #       starting this test.
  1537   1631     #
  1538   1632     shutdownSQLite $test_channel
  1539   1633   
  1540   1634     #
................................................................................
  1614   1708   } -constraints \
  1615   1709   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
  1616   1710   regexp -result {^Ok Misuse Ok Ok System#IntPtr#\d+ System#IntPtr#\d+ \d+ \d+\
  1617   1711   \d+ \d+ \d+ True True True True True True$}}
  1618   1712   
  1619   1713   ###############################################################################
  1620   1714   
  1621         -runTest {test data-1.30 {SQLiteConnection.Open with SetDefaults=False} -setup {
  1622         -  setupDb [set fileName data-1.30.db] "" "" "" "" SetDefaults=False
         1715  +runTest {test data-1.33 {SQLiteConnection.Open with SetDefaults=False} -setup {
         1716  +  setupDb [set fileName data-1.33.db] "" "" "" "" SetDefaults=False
  1623   1717   } -body {
  1624   1718     set result [list]
  1625   1719   
  1626   1720     lappend result [sql execute -execute scalar $db "PRAGMA page_size;"]
  1627   1721     lappend result [sql execute -execute scalar $db "PRAGMA max_page_count;"]
  1628   1722     lappend result [sql execute -execute scalar $db "PRAGMA legacy_file_format;"]
  1629   1723     lappend result [sql execute -execute scalar $db "PRAGMA synchronous;"]
................................................................................
  1638   1732     unset -nocomplain result db fileName
  1639   1733   } -constraints \
  1640   1734   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  1641   1735   {1024 1073741823 0 2 2000 delete 0}}
  1642   1736   
  1643   1737   ###############################################################################
  1644   1738   
  1645         -runTest {test data-1.31 {SQLiteConnection.Open with SetDefaults=True} -setup {
  1646         -  setupDb [set fileName data-1.31.db] "" "" "" "" SetDefaults=True
         1739  +runTest {test data-1.34 {SQLiteConnection.Open with SetDefaults=True} -setup {
         1740  +  setupDb [set fileName data-1.34.db] "" "" "" "" SetDefaults=True
  1647   1741   } -body {
  1648   1742     set result [list]
  1649   1743   
  1650   1744     lappend result [sql execute -execute scalar $db "PRAGMA page_size;"]
  1651   1745     lappend result [sql execute -execute scalar $db "PRAGMA max_page_count;"]
  1652   1746     lappend result [sql execute -execute scalar $db "PRAGMA legacy_file_format;"]
  1653   1747     lappend result [sql execute -execute scalar $db "PRAGMA synchronous;"]
................................................................................
  1662   1756     unset -nocomplain result db fileName
  1663   1757   } -constraints \
  1664   1758   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  1665   1759   {1024 1073741823 0 2 2000 delete 0}}
  1666   1760   
  1667   1761   ###############################################################################
  1668   1762   
  1669         -runTest {test data-1.32 {SQLiteConnection.Open without SetDefaults} -setup {
  1670         -  setupDb [set fileName data-1.32.db]
         1763  +runTest {test data-1.35 {SQLiteConnection.Open without SetDefaults} -setup {
         1764  +  setupDb [set fileName data-1.35.db]
  1671   1765   } -body {
  1672   1766     set result [list]
  1673   1767   
  1674   1768     lappend result [sql execute -execute scalar $db "PRAGMA page_size;"]
  1675   1769     lappend result [sql execute -execute scalar $db "PRAGMA max_page_count;"]
  1676   1770     lappend result [sql execute -execute scalar $db "PRAGMA legacy_file_format;"]
  1677   1771     lappend result [sql execute -execute scalar $db "PRAGMA synchronous;"]
................................................................................
  1686   1780     unset -nocomplain result db fileName
  1687   1781   } -constraints \
  1688   1782   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  1689   1783   {1024 1073741823 0 2 2000 delete 0}}
  1690   1784   
  1691   1785   ###############################################################################
  1692   1786   
  1693         -runTest {test data-1.33 {SQLiteConnection.Open with PRAGMA overrides} -setup {
         1787  +runTest {test data-1.36 {SQLiteConnection.Open with PRAGMA overrides} -setup {
  1694   1788     #
  1695   1789     # NOTE: Attempt to open a connection with all available PRAGMA settings
  1696   1790     #       set to non-default values in the connection string.
  1697   1791     #
  1698         -  setupDb [set fileName data-1.33.db] "" "" "" "" [join [list \
         1792  +  setupDb [set fileName data-1.36.db] "" "" "" "" [join [list \
  1699   1793         "Page Size=4096" "Max Page Count=2048" "Legacy Format=True" \
  1700   1794         Synchronous=Normal "Cache Size=4096" "Journal Mode=Wal" \
  1701   1795         "Foreign Keys=True"] \;]
  1702   1796   } -body {
  1703   1797     set result [list]
  1704   1798   
  1705   1799     lappend result [sql execute -execute scalar $db "PRAGMA page_size;"]
................................................................................
  1717   1811     unset -nocomplain result db fileName
  1718   1812   } -constraints \
  1719   1813   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  1720   1814   {4096 2048 1 1 4096 wal 1}}
  1721   1815   
  1722   1816   ###############################################################################
  1723   1817   
  1724         -runTest {test data-1.34 {sqlite3_win32_set_directory function} -setup {
         1818  +runTest {test data-1.37 {sqlite3_win32_set_directory function} -setup {
  1725   1819     set directory(base) [getDatabaseDirectory]
  1726   1820   
  1727   1821     if {[string length $directory(base)] == 0 || \
  1728   1822         ![file exists $directory(base)] || \
  1729   1823         ![file isdirectory $directory(base)]} then {
  1730   1824       error [appendArgs "base directory \"" $directory(base) "\" is invalid"]
  1731   1825     }
................................................................................
  1769   1863         System.Data.SQLite.UnsafeNativeMethods sqlite3_win32_set_directory 1 \
  1770   1864         $directory(data)]
  1771   1865   
  1772   1866     lappend result [object invoke -flags +NonPublic \
  1773   1867         System.Data.SQLite.UnsafeNativeMethods sqlite3_win32_set_directory 2 \
  1774   1868         $directory(temp)]
  1775   1869   
  1776         -  setupDb [set fileName data-1.34.db] "" "" "" "" "" false false false false
         1870  +  setupDb [set fileName data-1.37.db] "" "" "" "" "" false false false false
  1777   1871   
  1778   1872     sql execute $db "CREATE TABLE t1(x NOT NULL);"
  1779   1873   
  1780   1874     for {set i 1} {$i < 100} {incr i} {
  1781   1875       sql execute $db "INSERT INTO t1 (x) VALUES(?);" [list param1 String $i]
  1782   1876     }
  1783   1877   
................................................................................
  1858   1952   
  1859   1953     rename threadStart ""
  1860   1954   } -constraints {eagle windows monoBug28 command.sql compile.DATA SQLite\
  1861   1955   System.Data.SQLite sqlite3_win32_set_directory} -result {Ok Ok True True}}
  1862   1956   
  1863   1957   ###############################################################################
  1864   1958   
  1865         -runTest {test data-1.35 {serialization of SQLiteException} -body {
         1959  +runTest {test data-1.38 {serialization of SQLiteException} -body {
  1866   1960     set serializer [object create -alias \
  1867   1961         System.Runtime.Serialization.Formatters.Binary.BinaryFormatter]
  1868   1962   
  1869   1963     set stream [object create -alias System.IO.MemoryStream]
  1870   1964   
  1871   1965     set exception(1) [object create -alias \
  1872   1966         System.Data.SQLite.SQLiteException 14 "this is a test"]; # CantOpen
................................................................................
  1886   1980   } -constraints {eagle SQLite System.Data.SQLite} -result \
  1887   1981   [string map [list \n \r\n] {CantOpen {unable to open database file
  1888   1982   this is a test} CantOpen {unable to open database file
  1889   1983   this is a test} True True}]}
  1890   1984   
  1891   1985   ###############################################################################
  1892   1986   
  1893         -runTest {test data-1.36 {unencrypted database, with password} -setup {
  1894         -  setupDb [set fileName data-1.36.db]
         1987  +runTest {test data-1.39 {unencrypted database, with password} -setup {
         1988  +  setupDb [set fileName data-1.39.db]
  1895   1989   } -body {
  1896   1990     sql execute $db "CREATE TABLE t1(x);"
  1897   1991     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  1898   1992   
  1899   1993     cleanupDb $fileName db true false false
  1900   1994     setupDb $fileName "" "" "" "" "Password=12345;" true false
  1901   1995   
................................................................................
  1925   2019   command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result {^1\
  1926   2020   \{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
  1927   2021   not a database.*?\} 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
  1928   2022   file is encrypted or is not a database.*?\} 0 1 0 2$}}
  1929   2023   
  1930   2024   ###############################################################################
  1931   2025   
  1932         -runTest {test data-1.37 {encrypted database, wrong password} -setup {
  1933         -  setupDb [set fileName data-1.37.db] "" "" "" "" "Password=12345;"
         2026  +runTest {test data-1.40 {encrypted database, wrong password} -setup {
         2027  +  setupDb [set fileName data-1.40.db] "" "" "" "" "Password=12345;"
  1934   2028   } -body {
  1935   2029     sql execute $db "CREATE TABLE t1(x);"
  1936   2030     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  1937   2031   
  1938   2032     cleanupDb $fileName db true false false
  1939   2033     setupDb $fileName "" "" "" "" "Password=12346;" true false
  1940   2034   
................................................................................
  1964   2058   command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result {^1\
  1965   2059   \{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
  1966   2060   not a database.*?\} 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
  1967   2061   file is encrypted or is not a database.*?\} 0 1 0 2$}}
  1968   2062   
  1969   2063   ###############################################################################
  1970   2064   
  1971         -runTest {test data-1.38 {encrypted database, password w/start-space} -setup {
  1972         -  setupDb [set fileName data-1.38.db] "" "" "" "" "Password= 1234;"
         2065  +runTest {test data-1.41 {encrypted database, password w/start-space} -setup {
         2066  +  setupDb [set fileName data-1.41.db] "" "" "" "" "Password= 1234;"
  1973   2067   } -body {
  1974   2068     sql execute $db "CREATE TABLE t1(x);"
  1975   2069     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  1976   2070   
  1977   2071     cleanupDb $fileName db true false false
  1978   2072     setupDb $fileName "" "" "" "" "Password=1234;" true false
  1979   2073   
................................................................................
  2000   2094   
  2001   2095     unset -nocomplain error result db fileName
  2002   2096   } -constraints {eagle defineConstant.System.Data.SQLite.INTEROP_CODEC monoBug28\
  2003   2097   command.sql compile.DATA SQLite System.Data.SQLite} -result {0 1 0 1 0 1 0 3}}
  2004   2098   
  2005   2099   ###############################################################################
  2006   2100   
  2007         -runTest {test data-1.39 {encrypted database, w/quoted-start-space} -setup {
  2008         -  setupDb [set fileName data-1.39.db] "" "" "" "" "Password=\" 1234\";"
         2101  +runTest {test data-1.42 {encrypted database, w/quoted-start-space} -setup {
         2102  +  setupDb [set fileName data-1.42.db] "" "" "" "" "Password=\" 1234\";"
  2009   2103   } -body {
  2010   2104     sql execute $db "CREATE TABLE t1(x);"
  2011   2105     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  2012   2106   
  2013   2107     cleanupDb $fileName db true false false
  2014   2108     setupDb $fileName "" "" "" "" "Password=1234;" true false
  2015   2109   
................................................................................
  2039   2133   command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result {^1\
  2040   2134   \{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
  2041   2135   not a database.*?\} 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
  2042   2136   file is encrypted or is not a database.*?\} 0 1 0 2$}}
  2043   2137   
  2044   2138   ###############################################################################
  2045   2139   
  2046         -runTest {test data-1.40 {encrypted database, password w/mid-space} -setup {
  2047         -  setupDb [set fileName data-1.40.db] "" "" "" "" "Password=12 45;"
         2140  +runTest {test data-1.43 {encrypted database, password w/mid-space} -setup {
         2141  +  setupDb [set fileName data-1.43.db] "" "" "" "" "Password=12 45;"
  2048   2142   } -body {
  2049   2143     sql execute $db "CREATE TABLE t1(x);"
  2050   2144     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  2051   2145   
  2052   2146     cleanupDb $fileName db true false false
  2053   2147     setupDb $fileName "" "" "" "" "Password=1245;" true false
  2054   2148   
................................................................................
  2078   2172   command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result {^1\
  2079   2173   \{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
  2080   2174   not a database.*?\} 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
  2081   2175   file is encrypted or is not a database.*?\} 0 1 0 2$}}
  2082   2176   
  2083   2177   ###############################################################################
  2084   2178   
  2085         -runTest {test data-1.41 {encrypted database, password w/end-space} -setup {
  2086         -  setupDb [set fileName data-1.41.db] "" "" "" "" "Password=1234 ;"
         2179  +runTest {test data-1.44 {encrypted database, password w/end-space} -setup {
         2180  +  setupDb [set fileName data-1.44.db] "" "" "" "" "Password=1234 ;"
  2087   2181   } -body {
  2088   2182     sql execute $db "CREATE TABLE t1(x);"
  2089   2183     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  2090   2184   
  2091   2185     cleanupDb $fileName db true false false
  2092   2186     setupDb $fileName "" "" "" "" "Password=1234;" true false
  2093   2187   
................................................................................
  2114   2208   
  2115   2209     unset -nocomplain error result db fileName
  2116   2210   } -constraints {eagle defineConstant.System.Data.SQLite.INTEROP_CODEC monoBug28\
  2117   2211   command.sql compile.DATA SQLite System.Data.SQLite} -result {0 1 0 1 0 1 0 3}}
  2118   2212   
  2119   2213   ###############################################################################
  2120   2214   
  2121         -runTest {test data-1.42 {encrypted database, w/quoted-end-space} -setup {
  2122         -  setupDb [set fileName data-1.42.db] "" "" "" "" "Password=\"1234 \";"
         2215  +runTest {test data-1.45 {encrypted database, w/quoted-end-space} -setup {
         2216  +  setupDb [set fileName data-1.45.db] "" "" "" "" "Password=\"1234 \";"
  2123   2217   } -body {
  2124   2218     sql execute $db "CREATE TABLE t1(x);"
  2125   2219     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  2126   2220   
  2127   2221     cleanupDb $fileName db true false false
  2128   2222     setupDb $fileName "" "" "" "" "Password=1234;" true false
  2129   2223   
................................................................................
  2153   2247   command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result {^1\
  2154   2248   \{System\.Data\.SQLite\.SQLiteException \(0x80004005\): file is encrypted or is\
  2155   2249   not a database.*?\} 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\
  2156   2250   file is encrypted or is not a database.*?\} 0 1 0 2$}}
  2157   2251   
  2158   2252   ###############################################################################
  2159   2253   
  2160         -runTest {test data-1.43 {encrypted database, password via builder} -setup {
  2161         -  setupDb [set fileName data-1.43.db] "" "" "" "" "Password=67 89;"
         2254  +runTest {test data-1.46 {encrypted database, password via builder} -setup {
         2255  +  setupDb [set fileName data-1.46.db] "" "" "" "" "Password=67 89;"
  2162   2256   } -body {
  2163   2257     sql execute $db "CREATE TABLE t1(x);"
  2164   2258     sql execute $db "INSERT INTO t1 (x) VALUES(1);"
  2165   2259   
  2166   2260     cleanupDb $fileName db true false false
  2167   2261   
  2168   2262     set connectionStringBuilder [object create -alias \
................................................................................
  2204   2298   
  2205   2299     unset -nocomplain connectionStringBuilder error result db fileName
  2206   2300   } -constraints {eagle defineConstant.System.Data.SQLite.INTEROP_CODEC monoBug28\
  2207   2301   command.sql compile.DATA SQLite System.Data.SQLite} -result {0 1 0 1 0 1 0 3}}
  2208   2302   
  2209   2303   ###############################################################################
  2210   2304   
  2211         -runTest {test data-1.44 {quoted connection string properties} -setup {
         2305  +runTest {test data-1.47 {quoted connection string properties} -setup {
  2212   2306     unset -nocomplain result list pair strings string
  2213   2307   } -body {
  2214   2308     set result [list]
  2215   2309   
  2216   2310     set strings [list \
  2217   2311         "OneTwo=ThreeFour" "\"OneTwo\"=\"ThreeFour\"" \
  2218   2312         "One Two=Three Four" "\"One Two\"=\"Three Four\"" \
................................................................................
  2233   2327     unset -nocomplain result list pair strings string
  2234   2328   } -constraints {eagle System.Data.SQLite} -result {{OneTwo ThreeFour} {OneTwo\
  2235   2329   ThreeFour} {{One Two} {Three Four}} {{One Two} {Three Four}} {OneTwo ThreeFour}\
  2236   2330   {OneTwo ThreeFour} {{One Two} {Three Four}} {{One Two} {Three Four}}}}
  2237   2331   
  2238   2332   ###############################################################################
  2239   2333   
  2240         -runTest {test data-1.45 {rollback to nested savepoint} -setup {
  2241         -  setupDb [set fileName data-1.45.db]
         2334  +runTest {test data-1.48 {rollback to nested savepoint} -setup {
         2335  +  setupDb [set fileName data-1.48.db]
  2242   2336   } -body {
  2243   2337     sql execute $db "BEGIN IMMEDIATE TRANSACTION;"
  2244   2338     sql execute $db "SAVEPOINT one;"
  2245   2339   
  2246   2340     sql execute $db "CREATE TABLE t1(x);"
  2247   2341     sql execute $db "SAVEPOINT two;"
  2248   2342   
................................................................................
  2263   2357     unset -nocomplain result db fileName
  2264   2358   } -constraints \
  2265   2359   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  2266   2360   {1 2 1}}
  2267   2361   
  2268   2362   ###############################################################################
  2269   2363   
  2270         -runTest {test data-1.46 {NoExtensionFunctions connection flag} -setup {
  2271         -  setupDb [set fileName data-1.46.db]
         2364  +runTest {test data-1.49 {NoExtensionFunctions connection flag} -setup {
         2365  +  setupDb [set fileName data-1.49.db]
  2272   2366   } -body {
  2273   2367     set result [list]
  2274   2368   
  2275   2369     lappend result [catch {sql execute -execute scalar $db \
  2276   2370         "SELECT replicate('1234', 2);"} output] $output
  2277   2371   
  2278   2372     cleanupDb $fileName
................................................................................
  2295   2389   } -constraints \
  2296   2390   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
  2297   2391   regexp -result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException\
  2298   2392   \(0x80004005\): SQL logic error or missing database.*?\} 0 1234123412341234$}}
  2299   2393   
  2300   2394   ###############################################################################
  2301   2395   
  2302         -runTest {test data-1.47 {column name and index lookup} -setup {
  2303         -  setupDb [set fileName data-1.47.db]
         2396  +runTest {test data-1.50 {column name and index lookup} -setup {
         2397  +  setupDb [set fileName data-1.50.db]
  2304   2398   } -body {
  2305   2399     sql execute $db {
  2306   2400       CREATE TABLE t1(x, y, z);
  2307   2401       INSERT INTO t1 (x, y, z) VALUES(1, 'foo', 1234);
  2308   2402     }
  2309   2403   
  2310   2404     set dataReader [sql execute -execute reader -format datareader \
................................................................................
  2331   2425     unset -nocomplain result db fileName
  2332   2426   } -constraints \
  2333   2427   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  2334   2428   {{x 0 1} {y 1 foo} {z 2 1234}}}
  2335   2429   
  2336   2430   ###############################################################################
  2337   2431   
  2338         -runTest {test data-1.48 {nullable value types} -setup {
  2339         -  setupDb [set fileName data-1.48.db]
         2432  +runTest {test data-1.51 {nullable value types} -setup {
         2433  +  setupDb [set fileName data-1.51.db]
  2340   2434   } -body {
  2341   2435     sql execute $db {
  2342   2436       CREATE TABLE t1(x INTEGER);
  2343   2437       INSERT INTO t1 (x) VALUES(NULL);
  2344   2438       INSERT INTO t1 (x) VALUES(1);
  2345   2439     }
  2346   2440   
................................................................................
  2373   2467   regexp -result {^\{0 x System#DBNull#\d+ 1\
  2374   2468   \{System\.Reflection\.TargetInvocationException: Exception has been thrown by\
  2375   2469   the target of an invocation\. ---> System\.InvalidCastException:.*\}\
  2376   2470   System#DBNull#\d+\} \{0 x 1 0 1 1\}$}}
  2377   2471   
  2378   2472   ###############################################################################
  2379   2473   
  2380         -runTest {test data-1.49 {static SQLiteCommand.Execute method} -setup {
         2474  +runTest {test data-1.52 {static SQLiteCommand.Execute method} -setup {
  2381   2475     unset -nocomplain result sql
  2382   2476   } -body {
  2383   2477     set sql(1) { \
  2384   2478       CREATE TABLE t1(x); \
  2385   2479       INSERT INTO t1 (x) VALUES (NULL); \
  2386   2480       SELECT x FROM t1 ORDER BY x; \
  2387   2481     }
................................................................................
  2422   2516     unset -nocomplain result sql
  2423   2517   } -constraints {eagle monoBug28 SQLite System.Data.SQLite} -match regexp \
  2424   2518   -result {^\{\} 1 System#DBNull#\d+ System#Data#SQLite#SQLiteDataReader#\d+ \{\}\
  2425   2519   1 1 System#Data#SQLite#SQLiteDataReader#\d+$}}
  2426   2520   
  2427   2521   ###############################################################################
  2428   2522   
  2429         -runTest {test data-1.50 {BindAllAsText w/DateTime} -setup {
  2430         -  setupDb [set fileName data-1.50.db] "" Ticks Utc BindAllAsText
         2523  +runTest {test data-1.53 {BindAllAsText w/DateTime} -setup {
         2524  +  setupDb [set fileName data-1.53.db] "" Ticks Utc BindAllAsText
  2431   2525   } -body {
  2432   2526     sql execute $db "CREATE TABLE t1(x);"
  2433   2527   
  2434   2528     list [sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
  2435   2529         [list param1 DateTime [set dateTime [object invoke DateTime Parse \
  2436   2530         "2000.02.29 13:59:58.1234567Z"]]]] [sql execute -execute reader \
  2437   2531         -format list $db "SELECT x FROM t1;"]
................................................................................
  2441   2535     unset -nocomplain dateTime db fileName
  2442   2536   } -constraints \
  2443   2537   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  2444   2538   {1 630874007980000000}}
  2445   2539   
  2446   2540   ###############################################################################
  2447   2541   
  2448         -runTest {test data-1.51 {bind SQLiteFunction to one SQLiteConnection} -setup {
  2449         -  set fileName data-1.51.db
         2542  +runTest {test data-1.54 {bind SQLiteFunction to one SQLiteConnection} -setup {
         2543  +  set fileName data-1.54.db
  2450   2544   } -body {
  2451   2545     set id [object invoke Interpreter.GetActive NextId]
  2452   2546     set dataSource [file join [getDatabaseDirectory] $fileName]
  2453   2547   
  2454   2548     set sql { \
  2455   2549       SELECT MyRandom(); \
  2456   2550     }
................................................................................
  2541   2635   \{System\.Reflection\.TargetInvocationException: Exception has been thrown by\
  2542   2636   the target of an invocation\. ---> System\.Data\.SQLite\.SQLiteException: SQL\
  2543   2637   logic error or missing database
  2544   2638   no such function: MyRandom.*\}$}]}
  2545   2639   
  2546   2640   ###############################################################################
  2547   2641   
  2548         -runTest {test data-1.52 {SQLiteConvert TypeNameToDbType} -setup {
         2642  +runTest {test data-1.55 {SQLiteConvert TypeNameToDbType} -setup {
  2549   2643     unset -nocomplain result typeName
  2550   2644   } -body {
  2551   2645     foreach typeName [list \
  2552   2646         BIGINT BIGUINT BINARY BIT BLOB BOOL BOOLEAN CHAR CLOB COUNTER CURRENCY \
  2553   2647         DATE DATETIME DECIMAL DOUBLE FLOAT GENERAL GUID IDENTITY IMAGE INT INT8 \
  2554   2648         INT16 INT32 INT64 INTEGER INTEGER8 INTEGER16 INTEGER32 INTEGER64 \
  2555   2649         LOGICAL LONG LONGCHAR LONGTEXT LONGVARCHAR MEMO MONEY NCHAR NOTE NTEXT \
................................................................................
  2581   2675   {UNIQUEIDENTIFIER Guid} {UNSIGNEDINTEGER UInt64} {UNSIGNEDINTEGER8 Byte}\
  2582   2676   {UNSIGNEDINTEGER16 UInt16} {UNSIGNEDINTEGER32 UInt32} {UNSIGNEDINTEGER64\
  2583   2677   UInt64} {VARBINARY Binary} {VARCHAR AnsiString} {VARCHAR2 AnsiString} {YESNO\
  2584   2678   Boolean}}}
  2585   2679   
  2586   2680   ###############################################################################
  2587   2681   
  2588         -runTest {test data-1.53 {totype extension} -setup {
  2589         -  setupDb [set fileName data-1.53.db]
         2682  +runTest {test data-1.56 {totype extension} -setup {
         2683  +  setupDb [set fileName data-1.56.db]
  2590   2684   } -body {
  2591   2685     set connection [getDbConnection]
  2592   2686     set result [list]
  2593   2687   
  2594   2688     $connection EnableExtensions true
  2595   2689     $connection LoadExtension [getCoreBinaryFileName] sqlite3_totype_init
  2596   2690   
................................................................................
  2610   2704     unset -nocomplain db fileName
  2611   2705   } -constraints \
  2612   2706   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  2613   2707   {1 {} 1.01 {}}}
  2614   2708   
  2615   2709   ###############################################################################
  2616   2710   
  2617         -runTest {test data-1.54 {regexp extension} -setup {
  2618         -  setupDb [set fileName data-1.54.db]
         2711  +runTest {test data-1.57 {regexp extension} -setup {
         2712  +  setupDb [set fileName data-1.57.db]
  2619   2713   } -body {
  2620   2714     unset -nocomplain pattern result
  2621   2715   
  2622   2716     set connection [getDbConnection]
  2623   2717     set result(1) [list]
  2624   2718   
  2625   2719     $connection EnableExtensions true
................................................................................
  2676   2770   
  2677   2771   ###############################################################################
  2678   2772   
  2679   2773   reportSQLiteResources $test_channel
  2680   2774   
  2681   2775   ###############################################################################
  2682   2776   
  2683         -runTest {test data-1.55 {SQLiteConnection.ReleaseMemory method} -setup {
  2684         -  setupDb [set fileName data-1.55.db]
         2777  +runTest {test data-1.58 {SQLiteConnection.ReleaseMemory method} -setup {
         2778  +  setupDb [set fileName data-1.58.db]
  2685   2779   } -body {
  2686   2780     set result [list]
  2687   2781   
  2688   2782     set nFree 0; set resetOk false; set nLargest 0
  2689   2783     set code [object invoke \
  2690   2784         System.Data.SQLite.SQLiteConnection ReleaseMemory \
  2691   2785         -1 true true nFree resetOk nLargest]
................................................................................
  2723   2817     unset -nocomplain nLargest resetOk nFree code result db fileName
  2724   2818   } -constraints {eagle monoBug28 configuration.Release command.sql compile.DATA\
  2725   2819   SQLite System.Data.SQLite} -match regexp -result {^\{Busy 0 False 0\} \{Busy\
  2726   2820   \d+ False 0\} \{Ok 0 True \d+\}$}}
  2727   2821   
  2728   2822   ###############################################################################
  2729   2823   
  2730         -runTest {test data-1.56 {percentile extension} -setup {
  2731         -  setupDb [set fileName data-1.56.db]
         2824  +runTest {test data-1.59 {percentile extension} -setup {
         2825  +  setupDb [set fileName data-1.59.db]
  2732   2826   } -body {
  2733   2827     set connection [getDbConnection]
  2734   2828     set result [list]
  2735   2829   
  2736   2830     $connection EnableExtensions true
  2737   2831     $connection LoadExtension [getCoreBinaryFileName] sqlite3_percentile_init
  2738   2832