System.Data.SQLite

Check-in [09c590c144]
Login

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

Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tkt-1f7bfff467
Files: files | file ages | folders
SHA1: 09c590c144a80484f78192f219dfae70c4399914
User & Date: mistachkin 2016-10-31 01:23:49.375
Context
2016-10-31
14:17
Stop using the transaction nesting level to build SAVEPOINT names. check-in: 6660801c43 user: mistachkin tags: tkt-1f7bfff467
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
02:11
Test portability and readability tweaks. check-in: 9a848acf67 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Doc/Extra/Provider/environment.html.
38
39
40
41
42
43
44









































45
46
47
48
49
50
51
            </span>
          </td>
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">









































      <p>
        These environment variables are used to control several features of
        the System.Data.SQLite library.  All of these environment variables
        are optional.  If a particular environment variable is not present,
        the XML configuration file &quot;System.Data.SQLite.dll.config&quot;
        in the directory containing the currently executing assembly (i.e.
        the one containing all the managed components for System.Data.SQLite)







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







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
92
            </span>
          </td>
        </tr>
      </table>
    </div>
    <div id="mainSection">
    <div id="mainBody">
      <p>
        The following <b>special replacement tokens</b> may be recognized and
        replaced with their associated runtime value, depending on context,
        when setting values are being read by the native library pre-loading
        subsystem.  Unless otherwise stated explicitly, all of these tokens
        are <b>case-sensitive</b> and the percent characters <b>must be
        included</b> in order for them to be recognized.
      </p>
      <table width="80%" cellpadding="0" cellspacing="0">
        <tr valign="top">
          <th>Name</th>
          <th>Description</th>
        </tr>
        <tr valign="top">
          <td>%PreLoadSQLite_AssemblyDirectory%</td>
          <td>If this token (which is <b>case-sensitive</b> and <b>must include
          the percent characters</b>) is present within a setting value being
          returned, it will be replaced with the qualified name of the
          directory containing the System.Data.SQLite assembly.  If the name of
          the directory is not available, the token will not be replaced.</td>
        </tr>
        <tr valign="top">
          <td>%PreLoadSQLite_TargetFramework%</td>
          <td>If this token (which is <b>case-sensitive</b> and <b>must include
          the percent characters</b>) is present within a setting value being
          returned, it will be replaced with an abbreviation of the target
          framework attribute value for the System.Data.SQLite assembly.  If
          the target framework attribute value is not available, the token will
          not be replaced.</td>
        </tr>
        <tr valign="top">
          <td>%PreLoadSQLite_XmlConfigDirectory%</td>
          <td>If this token (which is <b>case-sensitive</b> and <b>must include
          the percent characters</b>) is present within a setting value
          being returned, it will be replaced with the qualified name of the
          directory containing the XML configuration file.  If the name of the
          directory is not available, the token will not be replaced.
          Generally, this token may only be used within the XML configuration
          file itself.</td>
        </tr>
      </table>
      <p>
        These environment variables are used to control several features of
        the System.Data.SQLite library.  All of these environment variables
        are optional.  If a particular environment variable is not present,
        the XML configuration file &quot;System.Data.SQLite.dll.config&quot;
        in the directory containing the currently executing assembly (i.e.
        the one containing all the managed components for System.Data.SQLite)
Changes to Doc/Extra/Provider/version.html.
42
43
44
45
46
47
48

49
50
51
52
53
54
55
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.104.0 - December XX, 2016</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_15_0.html">SQLite 3.15.0</a>.</li>

      <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/5535448538">[5535448538]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Use <a href="https://www.sqlite.org/lang_savepoint.html">SAVEPOINTs</a> to properly implement nested transactions. Fix for <a href="https://system.data.sqlite.org/index.html/info/1f7bfff467">[1f7bfff467]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    </ul>
    <p><b>1.0.103.0 - September 15, 2016</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_14_2.html">SQLite 3.14.2</a>.</li>
      <li>Add preliminary support for the .NET Framework 4.6.2.</li>







>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    </div>
    <div id="mainSection">
    <div id="mainBody">
    <h1 class="heading">Version History</h1>
    <p><b>1.0.104.0 - December XX, 2016</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_15_0.html">SQLite 3.15.0</a>.</li>
      <li>Add the &quot;%PreLoadSQLite_AssemblyDirectory%&quot;, &quot;%PreLoadSQLite_TargetFramework%&quot;, and &quot;%PreLoadSQLite_XmlConfigDirectory%&quot; <a href="https://system.data.sqlite.org/index.html/artifact?ci=trunk&filename=Doc/Extra/Provider/environment.html">replacement tokens</a> for use in configuration setting values. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/d4728aecb7">[d4728aecb7]</a>.</li>
      <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to <a href="https://system.data.sqlite.org/index.html/info/5535448538">[5535448538]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Use <a href="https://www.sqlite.org/lang_savepoint.html">SAVEPOINTs</a> to properly implement nested transactions. Fix for <a href="https://system.data.sqlite.org/index.html/info/1f7bfff467">[1f7bfff467]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    </ul>
    <p><b>1.0.103.0 - September 15, 2016</b></p>
    <ul>
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_14_2.html">SQLite 3.14.2</a>.</li>
      <li>Add preliminary support for the .NET Framework 4.6.2.</li>
Changes to NuGet/SQLite.Core.Beta.nuspec.
43
44
45
46
47
48
49





50
51
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Beta.targets" />





  </files>
</package>







>
>
>
>
>


43
44
45
46
47
48
49
50
51
52
53
54
55
56
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Beta.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
  </files>
</package>
Changes to NuGet/SQLite.Core.Test.nuspec.
43
44
45
46
47
48
49





50
51
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Test.targets" />





  </files>
</package>







>
>
>
>
>


43
44
45
46
47
48
49
50
51
52
53
54
55
56
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.Test.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
  </files>
</package>
Changes to NuGet/SQLite.Core.nuspec.
43
44
45
46
47
48
49





50
51
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.targets" />





  </files>
</package>







>
>
>
>
>


43
44
45
46
47
48
49
50
51
52
53
54
55
56
    <file src="..\bin\2015\Win32\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x86" />
    <file src="..\bin\2015\x64\ReleaseNativeOnlyStatic\SQLite.Interop.dll" target="build\net46\x64" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net20\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net40\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net45\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net451\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\build\System.Data.SQLite.Core.targets" target="build\net46\System.Data.SQLite.Core.targets" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net20" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net40" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net45" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net451" />
    <file src="shared\Core\lib\System.Data.SQLite.dll.config" target="lib\net46" />
  </files>
</package>
Added NuGet/shared/Core/lib/System.Data.SQLite.dll.config.








































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0"?>
<!--
 *
 * System.Data.SQLite.dll.config -
 *
 * WARNING: This XML configuration file is intended for use within the NuGet
 *          package directories only.  Please do not copy this file to any of
 *          the build output directories because it could interfere with the
 *          native library pre-loading feature.
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<configuration>
  <appSettings>
    <add key="PreLoadSQLite_BaseDirectory"
         value="%PreLoadSQLite_AssemblyDirectory%\..\..\build\%PreLoadSQLite_TargetFramework%" />
  </appSettings>
</configuration>
Changes to Setup/data/verify.lst.
231
232
233
234
235
236
237


238
239
240
241
242
243
244
  NuGet/shared/
  NuGet/shared/Core/
  NuGet/shared/Core/build/
  NuGet/shared/Core/build/System.Data.SQLite.Core.targets
  NuGet/shared/Core/content/
  NuGet/shared/Core/content/config.install.xdt
  NuGet/shared/Core/content/config.transform


  NuGet/SQLite.Beta.nuspec
  NuGet/SQLite.Core.Beta.nuspec
  NuGet/SQLite.Core.MSIL.Beta.nuspec
  NuGet/SQLite.Core.MSIL.nuspec
  NuGet/SQLite.Core.MSIL.Test.nuspec
  NuGet/SQLite.Core.nuspec
  NuGet/SQLite.Core.Test.nuspec







>
>







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
  NuGet/shared/
  NuGet/shared/Core/
  NuGet/shared/Core/build/
  NuGet/shared/Core/build/System.Data.SQLite.Core.targets
  NuGet/shared/Core/content/
  NuGet/shared/Core/content/config.install.xdt
  NuGet/shared/Core/content/config.transform
  NuGet/shared/Core/lib/
  NuGet/shared/Core/lib/System.Data.SQLite.dll.config
  NuGet/SQLite.Beta.nuspec
  NuGet/SQLite.Core.Beta.nuspec
  NuGet/SQLite.Core.MSIL.Beta.nuspec
  NuGet/SQLite.Core.MSIL.nuspec
  NuGet/SQLite.Core.MSIL.Test.nuspec
  NuGet/SQLite.Core.nuspec
  NuGet/SQLite.Core.Test.nuspec
842
843
844
845
846
847
848

849
850
851
852
853
854
855
  Tests/tkt-ac47dd230a.eagle
  Tests/tkt-ae5267b863.eagle
  Tests/tkt-b4a7ddc83f.eagle
  Tests/tkt-bb4b04d457.eagle
  Tests/tkt-c010fa6584.eagle
  Tests/tkt-c28d7fe915.eagle
  Tests/tkt-ccfa69fc32.eagle

  Tests/tkt-da685c0bac.eagle
  Tests/tkt-da9f18d039.eagle
  Tests/tkt-daeaf3150a.eagle
  Tests/tkt-dbd65441a5.eagle
  Tests/tkt-e06c4caff3.eagle
  Tests/tkt-e1b2e0f769.eagle
  Tests/tkt-e30b820248.eagle







>







844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
  Tests/tkt-ac47dd230a.eagle
  Tests/tkt-ae5267b863.eagle
  Tests/tkt-b4a7ddc83f.eagle
  Tests/tkt-bb4b04d457.eagle
  Tests/tkt-c010fa6584.eagle
  Tests/tkt-c28d7fe915.eagle
  Tests/tkt-ccfa69fc32.eagle
  Tests/tkt-d4728aecb7.eagle
  Tests/tkt-da685c0bac.eagle
  Tests/tkt-da9f18d039.eagle
  Tests/tkt-daeaf3150a.eagle
  Tests/tkt-dbd65441a5.eagle
  Tests/tkt-e06c4caff3.eagle
  Tests/tkt-e1b2e0f769.eagle
  Tests/tkt-e30b820248.eagle
Changes to Setup/run-mono-tests-debug.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Debug; set build_directory {bin/2013/Debug/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle
popd











|

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Debug; set test_year 2013; set build_directory {bin/2013/Debug/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle
popd
Changes to Setup/run-mono-tests-release.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Release; set build_directory {bin/2013/Release/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle
popd











|

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Release; set test_year 2013; set build_directory {bin/2013/Release/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle
popd
Changes to System.Data.SQLite/Configurations/System.Data.SQLite.dll.config.
1
2
3
4
5
6
7
8
9
10
11





































12
13
14
15
16
17
18
<?xml version="1.0"?>
<!--
 *
 * System.Data.SQLite.dll.config -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<configuration>
  <appSettings>





































    <!--
        NOTE: If this environment variable is set [to anything], it will be
              used by the System.Data.SQLite.Linq.SQLiteProviderManifest class
              (and the System.Data.SQLite.EF6.SQLiteProviderManifest class) to
              modify future provider manifest tokens by appending the value of
              the environment variable to the existing provider manifest token,
              if any.  Typically, in order for the constructed provider











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







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
<?xml version="1.0"?>
<!--
 *
 * System.Data.SQLite.dll.config -
 *
 * Written by Joe Mistachkin.
 * Released to the public domain, use at your own risk!
 *
-->
<configuration>
  <appSettings>
    <!--
    ****************************************************************************
    **                       Special Replacement Tokens                       **
    ****************************************************************************
    -->

    <!--
        NOTE: %PreLoadSQLite_AssemblyDirectory% - If this token (which is
              case-sensitive and must include the percent characters) is
              present within a setting value being returned, it will be
              replaced with the qualified name of the directory containing the
              System.Data.SQLite assembly.  If the name of the directory is not
              available, the token will not be replaced.

        NOTE: %PreLoadSQLite_TargetFramework% - If this token (which is
              case-sensitive and must include the percent characters) is
              present within a setting value being returned, it will be
              replaced with an abbreviation of the target framework attribute
              value for the System.Data.SQLite assembly.  If the target
              framework attribute value is not available, the token will not be
              replaced.

        NOTE: %PreLoadSQLite_XmlConfigDirectory% - If this token (which is
              case-sensitive and must include the percent characters) is
              present within a setting value being returned, it will be
              replaced with the qualified name of the directory containing the
              XML configuration file.  If the name of the directory is not
              available, the token will not be replaced.  Generally, this token
              may only be used within the XML configuration file itself.
    -->

    <!--
    ****************************************************************************
    **                         Configuration Settings                         **
    ****************************************************************************
    -->

    <!--
        NOTE: If this environment variable is set [to anything], it will be
              used by the System.Data.SQLite.Linq.SQLiteProviderManifest class
              (and the System.Data.SQLite.EF6.SQLiteProviderManifest class) to
              modify future provider manifest tokens by appending the value of
              the environment variable to the existing provider manifest token,
              if any.  Typically, in order for the constructed provider
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
19
20
21
22
23
24
25




26
27
28
29
30
31
32
  using System.Reflection;

#if !PLATFORM_COMPACTFRAMEWORK
  using System.Security;
#endif

  using System.Runtime.InteropServices;





#if !PLATFORM_COMPACTFRAMEWORK
  using System.Text;
#endif

#if !PLATFORM_COMPACTFRAMEWORK || COUNT_HANDLE
  using System.Threading;







>
>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  using System.Reflection;

#if !PLATFORM_COMPACTFRAMEWORK
  using System.Security;
#endif

  using System.Runtime.InteropServices;

#if (NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462) && !PLATFORM_COMPACTFRAMEWORK
  using System.Runtime.Versioning;
#endif

#if !PLATFORM_COMPACTFRAMEWORK
  using System.Text;
#endif

#if !PLATFORM_COMPACTFRAMEWORK || COUNT_HANDLE
  using System.Threading;
577
578
579
580
581
582
583































584
585
586
587
588
589
590
      /// <summary>
      /// This is the name of the XML configuration file specific to the
      /// System.Data.SQLite assembly.
      /// </summary>
      private static readonly string XmlConfigFileName =
          typeof(UnsafeNativeMethods).Namespace + DllFileExtension +
          ConfigFileExtension;































      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Private Data
      /// <summary>
      /// This lock is used to protect the static _SQLiteNativeModuleFileName,







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







581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
      /// <summary>
      /// This is the name of the XML configuration file specific to the
      /// System.Data.SQLite assembly.
      /// </summary>
      private static readonly string XmlConfigFileName =
          typeof(UnsafeNativeMethods).Namespace + DllFileExtension +
          ConfigFileExtension;

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the XML configuratrion file token that will be replaced with
      /// the qualified path to the directory containing the XML configuration
      /// file.
      /// </summary>
      private static readonly string XmlConfigDirectoryToken =
          "%PreLoadSQLite_XmlConfigDirectory%";
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Private Constants (Desktop Framework Only)
#if !PLATFORM_COMPACTFRAMEWORK
      /// <summary>
      /// This is the environment variable token that will be replaced with
      /// the qualified path to the directory containing this assembly.
      /// </summary>
      private static readonly string AssemblyDirectoryToken =
          "%PreLoadSQLite_AssemblyDirectory%";

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This is the environment variable token that will be replaced with an
      /// abbreviation of the target framework attribute value associated with
      /// this assembly.
      /// </summary>
      private static readonly string TargetFrameworkToken =
          "%PreLoadSQLite_TargetFramework%";
#endif
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Private Data
      /// <summary>
      /// This lock is used to protect the static _SQLiteNativeModuleFileName,
764
765
766
767
768
769
770































































771
772
773
774
775
776
777
              return fileName;

          return null;
      }

      /////////////////////////////////////////////////////////////////////////
































































      /// <summary>
      /// Queries and returns the value of the specified setting, using the
      /// specified XML configuration file.
      /// </summary>
      /// <param name="fileName">
      /// The name of the XML configuration file to read.
      /// </param>







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







799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
              return fileName;

          return null;
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// If necessary, replaces all supported XML configuration file tokens
      /// with their associated values.
      /// </summary>
      /// <param name="fileName">
      /// The name of the XML configuration file being read.
      /// </param>
      /// <param name="value">
      /// A setting value read from the XML configuration file.
      /// </param>
      /// <returns>
      /// The value of the <paramref name="value" /> will all supported XML
      /// configuration file tokens replaced.  No return value is reserved
      /// to indicate an error.  This method cannot fail.
      /// </returns>
      private static string ReplaceXmlConfigFileTokens(
          string fileName,
          string value
          )
      {
          if (!String.IsNullOrEmpty(value))
          {
              if (!String.IsNullOrEmpty(fileName))
              {
                  try
                  {
                      string directory = Path.GetDirectoryName(fileName);

                      if (!String.IsNullOrEmpty(directory))
                      {
                          value = value.Replace(
                              XmlConfigDirectoryToken, directory);
                      }
                  }
#if !NET_COMPACT_20 && TRACE_SHARED
                  catch (Exception e)
#else
                  catch (Exception)
#endif
                  {
#if !NET_COMPACT_20 && TRACE_SHARED
                      try
                      {
                          Trace.WriteLine(HelperMethods.StringFormat(
                              CultureInfo.CurrentCulture, "Native library " +
                              "pre-loader failed to replace XML " +
                              "configuration file \"{0}\" tokens: {1}",
                              fileName, e)); /* throw */
                      }
                      catch
                      {
                          // do nothing.
                      }
#endif
                  }
              }
          }

          return value;
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Queries and returns the value of the specified setting, using the
      /// specified XML configuration file.
      /// </summary>
      /// <param name="fileName">
      /// The name of the XML configuration file to read.
      /// </param>
816
817
818
819
820
821
822


823
824
825


826



827
828
829
830
831
832
833
              if (element != null)
              {
                  string value = null;

                  if (element.HasAttribute("value"))
                      value = element.GetAttribute("value");



#if !PLATFORM_COMPACTFRAMEWORK
                  if (expand && !String.IsNullOrEmpty(value))
                      value = Environment.ExpandEnvironmentVariables(value);


#endif




                  if (value != null)
                      return value;
              }
          }
#if !NET_COMPACT_20 && TRACE_SHARED
          catch (Exception e)







>
>

|
|
>
>

>
>
>







914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
              if (element != null)
              {
                  string value = null;

                  if (element.HasAttribute("value"))
                      value = element.GetAttribute("value");

                  if (!String.IsNullOrEmpty(value))
                  {
#if !PLATFORM_COMPACTFRAMEWORK
                      if (expand)
                          value = Environment.ExpandEnvironmentVariables(value);

                      value = ReplaceEnvironmentVariableTokens(value);
#endif

                      value = ReplaceXmlConfigFileTokens(fileName, value);
                  }

                  if (value != null)
                      return value;
              }
          }
#if !NET_COMPACT_20 && TRACE_SHARED
          catch (Exception e)
849
850
851
852
853
854
855


































































































































































































856
857
858
859
860
861
862
                  // do nothing.
              }
#endif
          }

          return @default;
      }



































































































































































































      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// Queries and returns the value of the specified setting, using the XML
      /// configuration file and/or the environment variables for the current
      /// process and/or the current system, when available.
      /// </summary>







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







954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
                  // do nothing.
              }
#endif
          }

          return @default;
      }

      /////////////////////////////////////////////////////////////////////////

#if !PLATFORM_COMPACTFRAMEWORK
      /// <summary>
      /// Attempts to determine the target framework attribute value that is
      /// associated with the specified managed assembly, if applicable.
      /// </summary>
      /// <param name="assembly">
      /// The managed assembly to read the target framework attribute value
      /// from.
      /// </param>
      /// <returns>
      /// The value of the target framework attribute value for the specified
      /// managed assembly -OR- null if it cannot be determined.  If this
      /// assembly was compiled with a version of the .NET Framework prior to
      /// version 4.0, the value returned MAY reflect that version of the .NET
      /// Framework instead of the one associated with the specified managed
      /// assembly.
      /// </returns>
      private static string GetAssemblyTargetFramework(
          Assembly assembly
          )
      {
          if (assembly != null)
          {
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462
              try
              {
                  if (assembly.IsDefined(
                          typeof(TargetFrameworkAttribute), false))
                  {
                      TargetFrameworkAttribute targetFramework =
                          (TargetFrameworkAttribute)
                          assembly.GetCustomAttributes(
                              typeof(TargetFrameworkAttribute), false)[0];

                      return targetFramework.FrameworkName;
                  }
              }
              catch
              {
                  // do nothing.
              }
#elif NET_35
              return ".NETFramework,Version=v3.5";
#elif NET_20
              return ".NETFramework,Version=v2.0";
#endif
          }

          return null;
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Accepts a long target framework attribute value and makes it into a
      /// much shorter version, suitable for use with NuGet packages.
      /// </summary>
      /// <param name="value">
      /// The long target framework attribute value to convert.
      /// </param>
      /// <returns>
      /// The short target framework attribute value -OR- null if it cannot
      /// be determined or converted.
      /// </returns>
      private static string AbbreviateTargetFramework(
          string value
          )
      {
          if (String.IsNullOrEmpty(value))
              return value;

          value = value.Replace(".NETFramework,Version=v", "net");
          value = value.Replace(".", String.Empty);

          return value;
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// If necessary, replaces all supported environment variable tokens
      /// with their associated values.
      /// </summary>
      /// <param name="value">
      /// A setting value read from an environment variable.
      /// </param>
      /// <returns>
      /// The value of the <paramref name="value" /> will all supported
      /// environment variable tokens replaced.  No return value is reserved
      /// to indicate an error.  This method cannot fail.
      /// </returns>
      private static string ReplaceEnvironmentVariableTokens(
          string value
          )
      {
          if (!String.IsNullOrEmpty(value))
          {
              string directory = GetAssemblyDirectory();

              if (!String.IsNullOrEmpty(directory))
              {
                  try
                  {
                      value = value.Replace(
                          AssemblyDirectoryToken, directory);
                  }
#if !NET_COMPACT_20 && TRACE_SHARED
                  catch (Exception e)
#else
                  catch (Exception)
#endif
                  {
#if !NET_COMPACT_20 && TRACE_SHARED
                      try
                      {
                          Trace.WriteLine(HelperMethods.StringFormat(
                              CultureInfo.CurrentCulture, "Native library " +
                              "pre-loader failed to replace assembly " +
                              "directory token: {0}", e)); /* throw */
                      }
                      catch
                      {
                          // do nothing.
                      }
#endif
                  }
              }

              Assembly assembly = null;

              try
              {
                  assembly = Assembly.GetExecutingAssembly();
              }
#if !NET_COMPACT_20 && TRACE_SHARED
              catch (Exception e)
#else
              catch (Exception)
#endif
              {
#if !NET_COMPACT_20 && TRACE_SHARED
                  try
                  {
                      Trace.WriteLine(HelperMethods.StringFormat(
                          CultureInfo.CurrentCulture, "Native library " +
                          "pre-loader failed to obtain executing " +
                          "assembly: {0}", e)); /* throw */
                  }
                  catch
                  {
                      // do nothing.
                  }
#endif
              }

              string targetFramework = AbbreviateTargetFramework(
                  GetAssemblyTargetFramework(assembly));

              if (!String.IsNullOrEmpty(targetFramework))
              {
                  try
                  {
                      value = value.Replace(
                          TargetFrameworkToken, targetFramework);
                  }
#if !NET_COMPACT_20 && TRACE_SHARED
                  catch (Exception e)
#else
                  catch (Exception)
#endif
                  {
#if !NET_COMPACT_20 && TRACE_SHARED
                      try
                      {
                          Trace.WriteLine(HelperMethods.StringFormat(
                              CultureInfo.CurrentCulture, "Native library " +
                              "pre-loader failed to replace target " +
                              "framework token: {0}", e)); /* throw */
                      }
                      catch
                      {
                          // do nothing.
                      }
#endif
                  }
              }
          }

          return value;
      }
#endif

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// Queries and returns the value of the specified setting, using the XML
      /// configuration file and/or the environment variables for the current
      /// process and/or the current system, when available.
      /// </summary>
930
931
932
933
934
935
936
937


938



939
940
941
942
943
944
945
                  "No_Expand_{0}", name)) != null)
          {
              expand = false;
          }

          value = Environment.GetEnvironmentVariable(name);

          if (expand && !String.IsNullOrEmpty(value))


              value = Environment.ExpandEnvironmentVariables(value);




          if (value != null)
              return value;

          //
          // NOTE: If the "No_SQLiteXmlConfigFile" environment variable is
          //       set [to anything], this method will NEVER read from the







|
>
>
|
>
>
>







1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
                  "No_Expand_{0}", name)) != null)
          {
              expand = false;
          }

          value = Environment.GetEnvironmentVariable(name);

          if (!String.IsNullOrEmpty(value))
          {
              if (expand)
                  value = Environment.ExpandEnvironmentVariables(value);

              value = ReplaceEnvironmentVariableTokens(value);
          }

          if (value != null)
              return value;

          //
          // NOTE: If the "No_SQLiteXmlConfigFile" environment variable is
          //       set [to anything], this method will NEVER read from the
Changes to Tests/basic.eagle.
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
      BuildTempSchema $connection
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain providerServices connection db fileName
} -constraints {eagle monoToDo command.object SQLite System.Data.SQLite\
System.Data.SQLite.Linq} -result {}}

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

runTest {test data-1.30 {EF6 ISQLiteSchemaExtensions.BuildTempSchema} -setup {
  setupDb [set fileName data-1.30.db]
} -body {







|







1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
      BuildTempSchema $connection
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain providerServices connection db fileName
} -constraints {eagle command.object monoToDo SQLite System.Data.SQLite\
System.Data.SQLite.Linq} -result {}}

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

runTest {test data-1.30 {EF6 ISQLiteSchemaExtensions.BuildTempSchema} -setup {
  setupDb [set fileName data-1.30.db]
} -body {
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
      BuildTempSchema $connection
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain providerServices connection db fileName
} -constraints {eagle monoToDo command.object SQLite System.Data.SQLite\
System.Data.SQLite.EF6} -result {}}

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

runTest {test data-1.31 {VARCHAR / NVARCHAR types with spaces} -body {
  list [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
      TypeNameToDbType null VARCHAR None] \







|







1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
      BuildTempSchema $connection
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain providerServices connection db fileName
} -constraints {eagle command.object monoToDo SQLite System.Data.SQLite\
System.Data.SQLite.EF6} -result {}}

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

runTest {test data-1.31 {VARCHAR / NVARCHAR types with spaces} -body {
  list [object invoke -flags +NonPublic System.Data.SQLite.SQLiteConvert \
      TypeNameToDbType null VARCHAR None] \
Changes to Tests/memory.eagle.
121
122
123
124
125
126
127
128
129
130

131
132
133
134
135
136
137
  freeDbConnection

  unset -nocomplain dataReader connection

  cleanupDb $fileName db true false false

  unset -nocomplain working sql counter db fileName
} -constraints {eagle fossil_repository_file variable_test_repository_file\
command.object windows monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {}}


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

#
# NOTE: Report after test.
#
checkForSQLiteDirectories $test_channel







|
|
|
>







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
  freeDbConnection

  unset -nocomplain dataReader connection

  cleanupDb $fileName db true false false

  unset -nocomplain working sql counter db fileName
} -constraints \
{eagle command.object windows monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite fossil_repository_file variable_test_repository_file} \
-result {}}

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

#
# NOTE: Report after test.
#
checkForSQLiteDirectories $test_channel
Added Tests/tkt-d4728aecb7.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
###############################################################################
#
# tkt-d4728aecb7.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

package require Eagle
package require Eagle.Library
package require Eagle.Test

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

moveSystemDataSQLiteDllConfig false

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

set d472_binary_directory [string map [list \\ /] [getBinaryDirectory]]
set d472_target_framework [string map [list Fx ""] [getBuildNetFx]]

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

runTest {test tkt-d4728aecb7-1.1 {tokens in environment variable} -setup \
    [getAppDomainPreamble] -body {
  package require Eagle.Library
  package require Eagle.Test
  package require System.Data.SQLite.Test

  saveEnvironmentVariables [list d472_1 d472_2 d472_3] savedEnv

  set env(d472_1) {prfx1/%PreLoadSQLite_AssemblyDirectory%/sufx1}
  set env(d472_2) {prfx2/%PreLoadSQLite_TargetFramework%/sufx2}
  set env(d472_3) {prfx3/%PreLoadSQLite_XmlConfigDirectory%/sufx3}

  object load -loadtype File [file join \
      [getBinaryDirectory] System.Data.SQLite.dll]

  set result [list]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_1 null]]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_2 null]]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_3 null]]

  set result
} -cleanup {
  restoreEnvironmentVariables [list d472_1 d472_2 d472_3] savedEnv

  unset -nocomplain result
} -isolationLevel AppDomain -constraints {eagle command.object\
compile.ISOLATED_INTERPRETERS System.Data.SQLite\
defineConstant.System.Data.SQLite.USE_INTEROP_DLL} -result [list [appendArgs \
prfx1/ $d472_binary_directory /sufx1] [appendArgs prfx2/ \
$d472_target_framework /sufx2] prfx3/%PreLoadSQLite_XmlConfigDirectory%/sufx3]}

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

#
# HACK: This test relies (indirectly) upon the CodeBase property being set on
#       the assembly loaded via its bytes to the Eagle core library assembly
#       file name (i.e. because it is the calling assembly).  This appears to
#       be non-portable and will not work on Mono.
#
runTest {test tkt-d4728aecb7-1.2 {tokens in XML configuration file} -setup \
    [getAppDomainPreamble] -body {
  package require Eagle.Library
  package require Eagle.Test
  package require System.Data.SQLite.Test

  moveSystemDataSQLiteDllConfig false

  set fileName [file join \
      [getBinaryDirectory] System.Data.SQLite.dll.config]

  writeFile $fileName [string trim {
    <?xml version="1.0"?>
    <configuration>
      <appSettings>
        <add key="d472_1"
             value="prfx1/%PreLoadSQLite_AssemblyDirectory%/sufx1" />
        <add key="d472_2"
             value="prfx2/%PreLoadSQLite_TargetFramework%/sufx2" />
        <add key="d472_3"
             value="prfx3/%PreLoadSQLite_XmlConfigDirectory%/sufx3" />
      </appSettings>
    </configuration>
  }]

  object load -loadtype Bytes [base64 encode [readFile [file join \
      [getBinaryDirectory] System.Data.SQLite.dll]]]

  set result [list]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_1 null]]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_2 null]]

  lappend result [string map [list \\ /] [object invoke -flags +NonPublic \
      System.Data.SQLite.UnsafeNativeMethods GetSettingValue d472_3 null]]

  set result
} -cleanup {
  catch {file delete $fileName}

  unset -nocomplain result fileName

  moveSystemDataSQLiteDllConfig true
} -isolationLevel AppDomain -constraints {eagle command.object dotNet\
compile.ISOLATED_INTERPRETERS System.Data.SQLite\
defineConstant.System.Data.SQLite.USE_INTEROP_DLL} -result [list [appendArgs \
prfx1/ $d472_binary_directory /sufx1] [appendArgs prfx2/ \
$d472_target_framework /sufx2] [appendArgs prfx3/ $d472_binary_directory \
/sufx3]]}

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

unset -nocomplain d472_target_framework d472_binary_directory

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

moveSystemDataSQLiteDllConfig true

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

runSQLiteTestEpilogue
runTestEpilogue
Changes to lib/System.Data.SQLite/common.eagle.
1076
1077
1078
1079
1080
1081
1082




1083
1084
1085
1086
1087
1088
1089
        #
        # NOTE: By default, there is no SQL to execute during the connection
        #       setup procedure (i.e. for every test database connection).
        #
        return ""
      }
    }





    proc getTestOverridesPreamble { {extraVarNames ""} } {
      set varNames [list]

      #
      # NOTE: If available, start with the master list of test override
      #       variables.







>
>
>
>







1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
        #
        # NOTE: By default, there is no SQL to execute during the connection
        #       setup procedure (i.e. for every test database connection).
        #
        return ""
      }
    }

    proc getStringMapForTclEscape {} {
      return [list \\ \\\\ \[ \\\[ \] \\\] \$ \\\$]
    }

    proc getTestOverridesPreamble { {extraVarNames ""} } {
      set varNames [list]

      #
      # NOTE: If available, start with the master list of test override
      #       variables.
1118
1119
1120
1121
1122
1123
1124
1125

1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
        # NOTE: Does the variable exist in this interpreter context?
        #
        if {[info exists $fullVarName]} then {
          #
          # NOTE: Append a script fragment to the result that will correctly
          #       copy any contained value to another interpreter context.
          #
          append result \n "set " $fullVarName " \{" [set $fullVarName] \}

        }
      }

      #
      # NOTE: If the result contains one or more script fragments, append a
      #       newline.
      #
      if {[string length $result] > 0} then {
        append result \n
      }

      return $result
    }

    proc moveSystemDataSQLiteDllConfig { {restore false} {verbose true} } {
      set directory [object invoke AppDomain CurrentDomain.BaseDirectory]

      if {[string length $directory] == 0} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped moving \"System.Data.SQLite.dll.config\", " \
              "no base directory\n"]
        }

        return
      }

      set fileName(1) [file normalize \
          [file join $directory System.Data.SQLite.dll.config]]







|
>















|





|







1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
        # NOTE: Does the variable exist in this interpreter context?
        #
        if {[info exists $fullVarName]} then {
          #
          # NOTE: Append a script fragment to the result that will correctly
          #       copy any contained value to another interpreter context.
          #
          append result \n "set " $fullVarName " \{" [string map \
              [getStringMapForTclEscape] [set $fullVarName]] \}
        }
      }

      #
      # NOTE: If the result contains one or more script fragments, append a
      #       newline.
      #
      if {[string length $result] > 0} then {
        append result \n
      }

      return $result
    }

    proc moveSystemDataSQLiteDllConfig { {restore false} {verbose true} } {
      set directory [getBinaryDirectory]

      if {[string length $directory] == 0} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped moving \"System.Data.SQLite.dll.config\", " \
              "no binary directory\n"]
        }

        return
      }

      set fileName(1) [file normalize \
          [file join $directory System.Data.SQLite.dll.config]]
Changes to readme.htm.
209
210
211
212
213
214
215

216
217
218
219
220
221
222
<h2><b>Version History</b></h2>

<p>
    <b>1.0.104.0 - December XX, 2016</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_15_0.html">SQLite 3.15.0</a>.</li>

    <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to [5535448538].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Use <a href="https://www.sqlite.org/lang_savepoint.html">SAVEPOINTs</a> to properly implement nested transactions. Fix for [1f7bfff467].&nbsp;<b>** Potentially Incompatible Change **</b></li>
</ul>
<p>
    <b>1.0.103.0 - September 15, 2016</b>
</p>
<ul>







>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<h2><b>Version History</b></h2>

<p>
    <b>1.0.104.0 - December XX, 2016</b>
</p>
<ul>
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_15_0.html">SQLite 3.15.0</a>.</li>
    <li>Add the &quot;%PreLoadSQLite_AssemblyDirectory%&quot;, &quot;%PreLoadSQLite_TargetFramework%&quot;, and &quot;%PreLoadSQLite_XmlConfigDirectory%&quot; <a href="https://system.data.sqlite.org/index.html/artifact?ci=trunk&filename=Doc/Extra/Provider/environment.html">replacement tokens</a> for use in configuration setting values. Pursuant to [d4728aecb7].</li>
    <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to [5535448538].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Use <a href="https://www.sqlite.org/lang_savepoint.html">SAVEPOINTs</a> to properly implement nested transactions. Fix for [1f7bfff467].&nbsp;<b>** Potentially Incompatible Change **</b></li>
</ul>
<p>
    <b>1.0.103.0 - September 15, 2016</b>
</p>
<ul>
Changes to www/news.wiki.
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
<title>News</title>

<b>Version History</b>

<p>
    <b>1.0.104.0 - December XX, 2016</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_15_0.html|SQLite 3.15.0].</li>

    <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to [5535448538].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Use [https://www.sqlite.org/lang_savepoint.html|SAVEPOINTs] to properly implement nested transactions. Fix for [1f7bfff467].&nbsp;<b>** Potentially Incompatible Change **</b></li>
</ul>
<p>
    <b>1.0.103.0 - September 15, 2016</b>
</p>
<ul>









>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<title>News</title>

<b>Version History</b>

<p>
    <b>1.0.104.0 - December XX, 2016</b>
</p>
<ul>
    <li>Updated to [https://www.sqlite.org/releaselog/3_15_0.html|SQLite 3.15.0].</li>
    <li>Add the &quot;%PreLoadSQLite_AssemblyDirectory%&quot;, &quot;%PreLoadSQLite_TargetFramework%&quot;, and &quot;%PreLoadSQLite_XmlConfigDirectory%&quot; [https://system.data.sqlite.org/index.html/artifact?ci=trunk&filename=Doc/Extra/Provider/environment.html|replacement tokens] for use in configuration setting values. Pursuant to [d4728aecb7].</li>
    <li>Prevent the GetByte, GetChar, and GetInt16 methods of the SQLiteDataReader class from throwing exceptions for large integer values. Pursuant to [5535448538].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Use [https://www.sqlite.org/lang_savepoint.html|SAVEPOINTs] to properly implement nested transactions. Fix for [1f7bfff467].&nbsp;<b>** Potentially Incompatible Change **</b></li>
</ul>
<p>
    <b>1.0.103.0 - September 15, 2016</b>
</p>
<ul>