Index: Doc/Extra/version.html
==================================================================
--- Doc/Extra/version.html
+++ Doc/Extra/version.html
@@ -52,11 +52,11 @@
Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- Add ManagedVersion and ManagedSourceId properties to the SQLiteConnection class.
+ Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
1.0.88.0 - August 7, 2013
- Various fixes to managed virtual table integration infrastructure.
- Implement workaround for an incorrect PROCESSOR_ARCHITECTURE being reported. Fix for [9ac9862611].
Index: SQLite.Interop/src/win/SQLite.Interop.rc
==================================================================
--- SQLite.Interop/src/win/SQLite.Interop.rc
+++ SQLite.Interop/src/win/SQLite.Interop.rc
@@ -54,10 +54,11 @@
VALUE "InternalName", "SQLite.Interop"
VALUE "LegalCopyright", "Public Domain"
VALUE "OriginalFilename", "SQLite.Interop.dll"
VALUE "ProductName", "System.Data.SQLite"
VALUE "ProductVersion", INTEROP_VERSION
+ VALUE "SourceId", INTEROP_SOURCE_ID " " INTEROP_SOURCE_TIMESTAMP
VALUE "SQLiteCompanyName", "D. Richard Hipp, et al."
VALUE "SQLiteDescription", "SQLite Database Engine"
VALUE "SQLiteCopyright", "http://www.sqlite.org/copyright.html"
VALUE "SQLiteVersion", SQLITE_VERSION
VALUE "SQLiteSourceId", SQLITE_SOURCE_ID
Index: SQLite.Interop/src/win/interop.c
==================================================================
--- SQLite.Interop/src/win/interop.c
+++ SQLite.Interop/src/win/interop.c
@@ -20,10 +20,12 @@
#ifdef SQLITE_OS_WIN
#if defined(INTEROP_CODEC)
#include "crypt.c"
#endif
+
+#include "interop.h"
#define INTEROP_DEBUG_NONE (0x0000)
#define INTEROP_DEBUG_CLOSE (0x0001)
#define INTEROP_DEBUG_FINALIZE (0x0002)
#define INTEROP_DEBUG_BACKUP_FINISH (0x0004)
@@ -214,10 +216,20 @@
ret = SQLITE_OK;
}
return ret;
}
#endif
+
+SQLITE_API const char *sqlite3_libversion_interop(void)
+{
+ return INTEROP_VERSION;
+}
+
+SQLITE_API const char *sqlite3_sourceid_interop(void)
+{
+ return INTEROP_SOURCE_ID " " INTEROP_SOURCE_TIMESTAMP;
+}
SQLITE_API int WINAPI sqlite3_open_interop(const char *filename, int flags, sqlite3 **ppdb)
{
int ret;
Index: SQLite.Interop/src/win/interop.h
==================================================================
--- SQLite.Interop/src/win/interop.h
+++ SQLite.Interop/src/win/interop.h
@@ -4,7 +4,15 @@
* Written by Joe Mistachkin.
* Released to the public domain, use at your own risk!
*/
#ifndef INTEROP_VERSION
-#define INTEROP_VERSION "1.0.89.0"
+#define INTEROP_VERSION "1.0.89.0"
+#endif
+
+#ifndef INTEROP_SOURCE_ID
+#define INTEROP_SOURCE_ID "0000000000000000000000000000000000000000"
+#endif
+
+#ifndef INTEROP_SOURCE_TIMESTAMP
+#define INTEROP_SOURCE_TIMESTAMP "0000-00-00 00:00:00 UTC"
#endif
Index: Setup/build.bat
==================================================================
--- Setup/build.bat
+++ Setup/build.bat
@@ -246,19 +246,30 @@
SET LOGGING="/logger:FileLogger,Microsoft.Build.Engine;Logfile=%LOGDIR%\%LOGPREFIX%_%CONFIGURATION%_%PLATFORM%_%YEAR%_%LOGSUFFIX%.log;Verbosity=diagnostic"
:skip_setLogging
-IF EXIST Externals\Eagle\bin\EagleShell.exe (
- %__ECHO% Externals\Eagle\bin\EagleShell.exe -file Setup\sourceTag.eagle SourceIdMode System.Data.SQLite\SQLitePatchLevel.cs
+IF NOT DEFINED NOTAG (
+ IF EXIST Externals\Eagle\bin\EagleShell.exe (
+ %__ECHO% Externals\Eagle\bin\EagleShell.exe -file Setup\sourceTag.eagle SourceIdMode SQLite.Interop\src\win\interop.h
+
+ IF ERRORLEVEL 1 (
+ ECHO Source tagging of interop assembly failed.
+ GOTO errors
+ )
+
+ %__ECHO% Externals\Eagle\bin\EagleShell.exe -file Setup\sourceTag.eagle SourceIdMode System.Data.SQLite\SQLitePatchLevel.cs
- IF ERRORLEVEL 1 (
- ECHO Source tagging failed.
- GOTO errors
+ IF ERRORLEVEL 1 (
+ ECHO Source tagging of provider assembly failed.
+ GOTO errors
+ )
+ ) ELSE (
+ ECHO WARNING: Source tagging skipped, Eagle binaries are not available.
)
) ELSE (
- ECHO WARNING: Source tagging skipped, Eagle binaries are not available.
+ ECHO WARNING: Source tagging skipped, disabled via NOTAG environment variable.
)
%_VECHO% Logging = '%LOGGING%'
%_VECHO% MsBuildArgs = '%MSBUILD_ARGS%'
Index: Setup/sourceTag.eagle
==================================================================
--- Setup/sourceTag.eagle
+++ Setup/sourceTag.eagle
@@ -82,20 +82,20 @@
# file (this pattern is fairly strict to prevent
# false-positives).
#
set pattern1 {AssemblySourceId\(.*?\)}
set pattern2 {AssemblySourceTimeStamp\(.*?\)}
- set pattern3 {SOURCE_ID\t\t".*?"}
- set pattern4 {SOURCE_TIMESTAMP\t".*?"}
+ set pattern3 {INTEROP_SOURCE_ID\s+".*?"}
+ set pattern4 {INTEROP_SOURCE_TIMESTAMP\s+".*?"}
#
# NOTE: Build the final replacement specification string.
#
set subSpec1 [appendArgs AssemblySourceId(\" $id \" )]
set subSpec2 [appendArgs AssemblySourceTimeStamp(\" $timeStamp \" )]
- set subSpec3 [appendArgs SOURCE_ID\t\t \" $id \"]
- set subSpec4 [appendArgs SOURCE_TIMESTAMP\t \" $timeStamp \"]
+ set subSpec3 [appendArgs INTEROP_SOURCE_ID " \"" $id \"]
+ set subSpec4 [appendArgs INTEROP_SOURCE_TIMESTAMP " \"" $timeStamp \"]
#
# NOTE: Perform the replacements in the original data
# (first match only).
#
Index: System.Data.SQLite/SQLite3.cs
==================================================================
--- System.Data.SQLite/SQLite3.cs
+++ System.Data.SQLite/SQLite3.cs
@@ -362,10 +362,34 @@
get
{
return UTF8ToString(UnsafeNativeMethods.sqlite3_sourceid(), -1);
}
}
+
+ internal static string InteropVersion
+ {
+ get
+ {
+#if !SQLITE_STANDARD
+ return UTF8ToString(UnsafeNativeMethods.sqlite3_libversion_interop(), -1);
+#else
+ return null;
+#endif
+ }
+ }
+
+ internal static string InteropSourceId
+ {
+ get
+ {
+#if !SQLITE_STANDARD
+ return UTF8ToString(UnsafeNativeMethods.sqlite3_sourceid_interop(), -1);
+#else
+ return null;
+#endif
+ }
+ }
internal override bool AutoCommit
{
get
{
Index: System.Data.SQLite/SQLiteConnection.cs
==================================================================
--- System.Data.SQLite/SQLiteConnection.cs
+++ System.Data.SQLite/SQLiteConnection.cs
@@ -2459,11 +2459,11 @@
{
get { return SQLite3.DefineConstants; }
}
///
- /// Returns the version of the underlying SQLite database engine
+ /// Returns the version of the underlying SQLite core library.
///
public static string SQLiteVersion
{
get { return SQLite3.SQLiteVersion; }
}
@@ -2475,18 +2475,41 @@
///
public static string SQLiteSourceId
{
get { return SQLite3.SQLiteSourceId; }
}
+
+ ///
+ /// This method returns the version of the interop SQLite assembly
+ /// used. If the SQLite interop assembly is not in use or the
+ /// necessary information cannot be obtained for any reason, a null
+ /// value may be returned.
+ ///
+ public static string InteropVersion
+ {
+ get { return SQLite3.InteropVersion; }
+ }
+
+ ///
+ /// This method returns the string whose value contains the unique
+ /// identifier for the source checkout used to build the interop
+ /// assembly. If the SQLite interop assembly is not in use or the
+ /// necessary information cannot be obtained for any reason, a null
+ /// value may be returned.
+ ///
+ public static string InteropSourceId
+ {
+ get { return SQLite3.InteropSourceId; }
+ }
///
/// This method returns the version of the managed components used
/// to interact with the SQLite core library. If the necessary
/// information cannot be obtained for any reason, a null value may
/// be returned.
///
- public static string ManagedVersion
+ public static string ProviderVersion
{
get
{
return (_assembly != null) ?
_assembly.GetName().Version.ToString() : null;
@@ -2497,11 +2520,11 @@
/// This method returns the string whose value contains the unique
/// identifier for the source checkout used to build the managed
/// components currently executing. If the necessary information
/// cannot be obtained for any reason, a null value may be returned.
///
- public static string ManagedSourceId
+ public static string ProviderSourceId
{
get
{
if (_assembly == null)
return null;
Index: System.Data.SQLite/UnsafeNativeMethods.cs
==================================================================
--- System.Data.SQLite/UnsafeNativeMethods.cs
+++ System.Data.SQLite/UnsafeNativeMethods.cs
@@ -769,10 +769,16 @@
// get working when using the standard SQLite library.
#region interop added functionality
#if !SQLITE_STANDARD
+ [DllImport(SQLITE_DLL)]
+ internal static extern IntPtr sqlite3_libversion_interop();
+
+ [DllImport(SQLITE_DLL)]
+ internal static extern IntPtr sqlite3_sourceid_interop();
+
[DllImport(SQLITE_DLL)]
internal static extern SQLiteErrorCode sqlite3_close_interop(IntPtr db);
[DllImport(SQLITE_DLL)]
internal static extern SQLiteErrorCode sqlite3_create_function_interop(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, int needCollSeq);
Index: Tests/common.eagle
==================================================================
--- Tests/common.eagle
+++ Tests/common.eagle
@@ -740,16 +740,24 @@
}
}
}
}
- proc checkForSQLite { channel } {
- tputs $channel "---- checking for core SQLite library... "
+ proc checkForSQLiteLibrary { channel } {
+ tputs $channel "---- checking for SQLite core library... "
if {[catch {
object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
SQLiteVersion} version] == 0} then {
+ #
+ # NOTE: Check if the returned version was null. If so, make it easy
+ # to spot.
+ #
+ if {[string length $version] == 0} then {
+ set version null
+ }
+
#
# NOTE: Attempt to query the Fossil source identifier for the SQLite
# core library.
#
if {[catch {
@@ -759,14 +767,68 @@
# NOTE: We failed to query the Fossil source identifier.
#
set sourceId unknown
}
+ #
+ # NOTE: Check if the returned Fossil source identifier was null. If
+ # so, make it easy to spot.
+ #
+ if {[string length $sourceId] == 0} then {
+ set sourceId null
+ }
+
#
# NOTE: Yes, the SQLite core library appears to be available.
#
addConstraint SQLite
+
+ tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
+ } else {
+ tputs $channel no\n
+ }
+ }
+
+ proc checkForSQLiteInterop { channel } {
+ tputs $channel "---- checking for SQLite interop assembly... "
+
+ if {[catch {
+ object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
+ InteropVersion} version] == 0} then {
+ #
+ # NOTE: Check if the returned version was null. If so, make it easy
+ # to spot.
+ #
+ if {[string length $version] == 0} then {
+ set version null
+ }
+
+ #
+ # NOTE: Attempt to query the Fossil source identifier for the SQLite
+ # core library.
+ #
+ if {[catch {
+ object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \
+ InteropSourceId} sourceId]} then {
+ #
+ # NOTE: We failed to query the Fossil source identifier.
+ #
+ set sourceId unknown
+ }
+
+ #
+ # NOTE: Check if the returned Fossil source identifier was null. If
+ # so, make it easy to spot.
+ #
+ if {[string length $sourceId] == 0} then {
+ set sourceId null
+ }
+
+ #
+ # NOTE: Yes, the SQLite interop assembly appears to be available.
+ #
+ addConstraint SQLiteInterop
tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
} else {
tputs $channel no\n
}
@@ -1941,33 +2003,33 @@
}
}
catch {
tputs $::test_channel \
- "---- source version of \"System.Data.SQLite\"... "
+ "---- source version of \"System.Data.SQLite.dll\"... "
if {[catch {object invoke -flags +NonPublic \
- System.Data.SQLite.SQLiteConnection ManagedVersion} \
- sourceVersion] == 0} then {
- if {[string length $sourceVersion] == 0} then {
- set sourceVersion
+ System.Data.SQLite.SQLiteConnection ProviderVersion} \
+ version] == 0} then {
+ if {[string length $version] == 0} then {
+ set version null
}
- tputs $::test_channel [appendArgs $sourceVersion \n]
+ tputs $::test_channel [appendArgs $version \n]
} else {
tputs $::test_channel unknown\n
}
}
catch {
tputs $::test_channel \
- "---- source checkout of \"System.Data.SQLite\"... "
+ "---- source checkout of \"System.Data.SQLite.dll\"... "
if {[catch {object invoke -flags +NonPublic \
- System.Data.SQLite.SQLiteConnection ManagedSourceId} \
+ System.Data.SQLite.SQLiteConnection ProviderSourceId} \
sourceId] == 0} then {
if {[string length $sourceId] == 0} then {
- set sourceId
+ set sourceId null
}
tputs $::test_channel [appendArgs $sourceId \n]
} else {
tputs $::test_channel unknown\n
}
@@ -1983,11 +2045,16 @@
# (i.e. because the managed-only System.Data.SQLite assembly can
# load without it; however, it cannot do anything useful without
# it). If we are using the mixed-mode assembly and we already
# found it (above), this should always succeed.
#
- checkForSQLite $::test_channel
+ checkForSQLiteLibrary $::test_channel
+
+ #
+ # NOTE: Check if the SQLite interop assembly is available.
+ #
+ checkForSQLiteInterop $::test_channel
#
# NOTE: Check the SQLite database and temporary directories.
#
checkForSQLiteDirectories $::test_channel
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -197,11 +197,11 @@
- Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
- Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
- Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
- Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
- Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- - Add ManagedVersion and ManagedSourceId properties to the SQLiteConnection class.
+ - Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
1.0.88.0 - August 7, 2013
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -13,11 +13,11 @@
- Raise the static SQLiteConnection.Changed event when any SQLiteCommand, SQLiteDataReader, or CriticalHandle derived object instance is created. Fix for [aba4549801].
- Add SQLiteCommand.Execute, SQLiteCommand.ExecuteNonQuery, and SQLiteCommand.ExecuteScalar method overloads that take a CommandBehavior parameter.
- Revise how the extra object data is passed to the static SQLiteConnection.Changed event. ** Potentially Incompatible Change **
- Make sure the database cannot be changed by a query when the CommandBehavior.SchemaOnly flag is used. Fix for [f8dbab8baf]. ** Potentially Incompatible Change **
- Include the XML documentation files in the NuGet packages. Fix for [5970d5b0a6].
- - Add ManagedVersion and ManagedSourceId properties to the SQLiteConnection class.
+ - Add InteropVersion, InteropSourceId, ProviderVersion, and ProviderSourceId properties to the SQLiteConnection class.
1.0.88.0 - August 7, 2013