Index: Doc/Extra/version.html
==================================================================
--- Doc/Extra/version.html
+++ Doc/Extra/version.html
@@ -49,10 +49,11 @@
Skip checking loaded assemblies for types tagged with the SQLiteFunction attribute when the No_SQLiteFunctions environment variable is set. Pursuant to [e4c8121f7b].
Add static Execute method to the SQLiteCommand class.
Add public constructor to the SQLiteDataAdapter class that allows passing the parseViaFramework parameter to the SQLiteConnection constructor.
When built with the CHECK_STATE compile-time option, skip throwing exceptions from the SQLiteDataReader class when the object is being disposed.
Support automatic value conversions for columns with a declared type of BIGUINT, INTEGER8, INTEGER16, INTEGER32, INTEGER64, SMALLUINT, TINYSINT, UNSIGNEDINTEGER, UNSIGNEDINTEGER8, UNSIGNEDINTEGER16, UNSIGNEDINTEGER32, UNSIGNEDINTEGER64, INT8, INT16, INT32, INT64, UINT, UINT8, UINT16, UINT32, UINT64, or ULONG.
+ Add BindUInt32AsInt64 connection flag to force binding of UInt32 values as Int64 instead.
Remove AUTOINCREMENT from the column type name map. ** Potentially Incompatible Change **
Avoid throwing overflow exceptions from the SQLite3.GetValue method for integral column types. Fix for [c010fa6584]. ** Potentially Incompatible Change **
1.0.84.0 - January 9, 2013
Index: System.Data.SQLite/SQLite3.cs
==================================================================
--- System.Data.SQLite/SQLite3.cs
+++ System.Data.SQLite/SQLite3.cs
@@ -771,11 +771,26 @@
{
LogBind(handle, index, value);
}
#endif
- SQLiteErrorCode n = UnsafeNativeMethods.sqlite3_bind_uint(handle, index, value);
+ SQLiteErrorCode n;
+
+ if ((flags & SQLiteConnectionFlags.BindUInt32AsInt64) == SQLiteConnectionFlags.BindUInt32AsInt64)
+ {
+ long value2 = value;
+
+#if !PLATFORM_COMPACTFRAMEWORK
+ n = UnsafeNativeMethods.sqlite3_bind_int64(handle, index, value2);
+#else
+ n = UnsafeNativeMethods.sqlite3_bind_int64_interop(handle, index, ref value2);
+#endif
+ }
+ else
+ {
+ n = UnsafeNativeMethods.sqlite3_bind_uint(handle, index, value);
+ }
if (n != SQLiteErrorCode.Ok) throw new SQLiteException(n, GetLastError());
}
internal override void Bind_Int64(SQLiteStatement stmt, SQLiteConnectionFlags flags, int index, long value)
{
Index: System.Data.SQLite/SQLiteBase.cs
==================================================================
--- System.Data.SQLite/SQLiteBase.cs
+++ System.Data.SQLite/SQLiteBase.cs
@@ -780,10 +780,17 @@
/// Skip adding the extension functions provided by the native
/// interop assembly.
///
NoExtensionFunctions = 0x20,
+ ///
+ /// When binding parameter values with the
+ /// type, use the interop method that accepts an
+ /// value.
+ ///
+ BindUInt32AsInt64 = 0x40,
+
///
/// Enable all logging.
///
LogAll = LogPrepare | LogPreBind | LogBind |
LogCallbackException | LogBackup,
Index: Tests/tkt-c010fa6584.eagle
==================================================================
--- Tests/tkt-c010fa6584.eagle
+++ Tests/tkt-c010fa6584.eagle
@@ -503,14 +503,52 @@
9223372036854775808} {a32 25 False 18446744073709551615 0 9223372036854775808}\
{a32 26 False 18446744073709551616 0 9223372036854775808}}}
###############################################################################
-runTest {test tkt-c010fa6584-1.2 {UInt32 parameter binding} -setup {
+runTest {test tkt-c010fa6584-1.2 {UInt32 parameter} -setup {
setupDb [set fileName tkt-c010fa6584-1.2.db]
} -body {
sql execute $db "CREATE TABLE t1(x UINT32);"
+
+ sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
+ [list param1 UInt32 0xFFFFFFFF]
+
+ sql execute -execute scalar $db "SELECT x FROM t1;"
+} -cleanup {
+ cleanupDb $fileName
+
+ unset -nocomplain db fileName
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
+{4294967295}}
+
+###############################################################################
+
+runTest {test tkt-c010fa6584-1.3 {UInt32 parameter (Int64)} -setup {
+ setupDb [set fileName tkt-c010fa6584-1.3.db]
+} -body {
+ sql execute $db "CREATE TABLE t1(x INTEGER);"
+
+ sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
+ [list param1 UInt32 0xFFFFFFFF]
+
+ sql execute -execute scalar $db "SELECT x FROM t1;"
+} -cleanup {
+ cleanupDb $fileName
+
+ unset -nocomplain db fileName
+} -constraints \
+{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
+{-1}}
+
+###############################################################################
+
+runTest {test tkt-c010fa6584-1.4 {UInt32 parameter (Int64) w/flag} -setup {
+ setupDb [set fileName tkt-c010fa6584-1.4.db] "" "" "" BindUInt32AsInt64
+} -body {
+ sql execute $db "CREATE TABLE t1(x INTEGER);"
sql execute $db "INSERT INTO t1 (x) VALUES(?);" \
[list param1 UInt32 0xFFFFFFFF]
sql execute -execute scalar $db "SELECT x FROM t1;"
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -194,10 +194,11 @@
- Skip checking loaded assemblies for types tagged with the SQLiteFunction attribute when the No_SQLiteFunctions environment variable is set. Pursuant to [e4c8121f7b].
- Add static Execute method to the SQLiteCommand class.
- Add public constructor to the SQLiteDataAdapter class that allows passing the parseViaFramework parameter to the SQLiteConnection constructor.
- When built with the CHECK_STATE compile-time option, skip throwing exceptions from the SQLiteDataReader class when the object is being disposed.
- Support automatic value conversions for columns with a declared type of BIGUINT, INTEGER8, INTEGER16, INTEGER32, INTEGER64, SMALLUINT, TINYSINT, UNSIGNEDINTEGER, UNSIGNEDINTEGER8, UNSIGNEDINTEGER16, UNSIGNEDINTEGER32, UNSIGNEDINTEGER64, INT8, INT16, INT32, INT64, UINT, UINT8, UINT16, UINT32, UINT64, or ULONG.
+ - Add BindUInt32AsInt64 connection flag to force binding of UInt32 values as Int64 instead.
- Remove AUTOINCREMENT from the column type name map. ** Potentially Incompatible Change **
- Avoid throwing overflow exceptions from the SQLite3.GetValue method for integral column types. Fix for [c010fa6584]. ** Potentially Incompatible Change **
1.0.84.0 - January 9, 2013
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -10,10 +10,11 @@
Skip checking loaded assemblies for types tagged with the SQLiteFunction attribute when the No_SQLiteFunctions environment variable is set. Pursuant to [e4c8121f7b].
Add static Execute method to the SQLiteCommand class.
Add public constructor to the SQLiteDataAdapter class that allows passing the parseViaFramework parameter to the SQLiteConnection constructor.
When built with the CHECK_STATE compile-time option, skip throwing exceptions from the SQLiteDataReader class when the object is being disposed.
Support automatic value conversions for columns with a declared type of BIGUINT, INTEGER8, INTEGER16, INTEGER32, INTEGER64, SMALLUINT, TINYSINT, UNSIGNEDINTEGER, UNSIGNEDINTEGER8, UNSIGNEDINTEGER16, UNSIGNEDINTEGER32, UNSIGNEDINTEGER64, INT8, INT16, INT32, INT64, UINT, UINT8, UINT16, UINT32, UINT64, or ULONG.
+ Add BindUInt32AsInt64 connection flag to force binding of UInt32 values as Int64 instead.
Remove AUTOINCREMENT from the column type name map. ** Potentially Incompatible Change **
Avoid throwing overflow exceptions from the SQLite3.GetValue method for integral column types. Fix for [c010fa6584]. ** Potentially Incompatible Change **
1.0.84.0 - January 9, 2013