System.Data.SQLite

Check-in [749d5af8d3]
Login

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

Overview
Comment:Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 749d5af8d3197c944346c685009588044dfca1e0
User & Date: mistachkin 2015-05-19 18:24:27.045
Context
2015-05-19
21:30
Add the NuGet XDT transform file to the solution files. check-in: 9c07ab2010 user: mistachkin tags: trunk
18:24
Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e]. check-in: 749d5af8d3 user: mistachkin tags: trunk
2015-05-16
03:33
Improve documentation for the 'restrictionValues' parameter to SQLiteConnetion.GetSchema. check-in: 4be7ad3120 user: mistachkin tags: trunk
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to Doc/Extra/Provider/version.html.
49
50
51
52
53
54
55

56
57
58
59
60
61
62
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63







+







      <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.1.3">Entity Framework 6.1.3</a>.</li>
      <li>Improve ADO.NET conformance of the SQLiteDataReader.RecordsAffected property. Fix for <a href="https://system.data.sqlite.org/index.html/info/74542e702e">[74542e702e]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Prevent the IDataReader.GetDataTypeName method from throwing &quot;No current row&quot; exceptions. Fix for <a href="https://system.data.sqlite.org/index.html/info/94252b9059">[94252b9059]</a>.</li>
      <li>When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for <a href="https://system.data.sqlite.org/index.html/info/a4d9c7ee94">[a4d9c7ee94]</a>.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>The IDataReader.GetDataTypeName method should always return the declared type name.&nbsp;<b>** Potentially Incompatible Change **</b></li>
      <li>Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.</li>
      <li>Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.</li>
      <li>Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for <a href="https://system.data.sqlite.org/index.html/info/7c151a2f0e">[7c151a2f0e]</a>.</li>
    </ul>
    <p><b>1.0.96.0 - March 5, 2015</b></p>
    <ul>
      <li>Prevent the IDataReader.GetOrdinal method from throwing &quot;No current row&quot; exceptions. Fix for <a href="https://system.data.sqlite.org/index.html/info/2be4298631">[2be4298631]</a>, <a href="https://system.data.sqlite.org/index.html/info/abad7c577d">[abad7c577d]</a>, and <a href="https://system.data.sqlite.org/index.html/info/c28d7fe915">[c28d7fe915]</a>.</li>
      <li>When counting the number of tables in the GetSchemaTable method, do not include those that have a null or empty name. Fix for <a href="https://system.data.sqlite.org/index.html/info/92dbf1229a">[92dbf1229a]</a>.</li>
    </ul>
    <p><b>1.0.95.0 - March 2, 2015</b></p>
Changes to SQLite.Interop/src/win/interop.c.
390
391
392
393
394
395
396

397








398
399
400
401
402
403
404
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413







+

+
+
+
+
+
+
+
+







  ret = sqlite3_open_interop(filename, flags, ppdb);

#if defined(INTEROP_DEBUG) && (INTEROP_DEBUG & INTEROP_DEBUG_OPEN16)
  sqlite3InteropDebug("sqlite3_open16_interop(): sqlite3_open_interop(\"%s\", %d, %p) returned %d.\n", filename, flags, ppdb, ret);
#endif

  if ((ret == SQLITE_OK) && ppdb && !DbHasProperty(*ppdb, 0, DB_SchemaLoaded))
  {
    ENC(*ppdb) = SQLITE_UTF16NATIVE;

#if SQLITE_VERSION_NUMBER >= 3008008
    //
    // BUGFIX: See ticket [7c151a2f0e22804c].
    //
    SCHEMA_ENC(*ppdb) = SQLITE_UTF16NATIVE;
#endif
  }

  return ret;
}

SQLITE_API const char *WINAPI sqlite3_errmsg_interop(sqlite3 *db, int *plen)
{
  const char *pval = sqlite3_errmsg(db);
Added Tests/tkt-7c151a2f0e.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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
###############################################################################
#
# tkt-7c151a2f0e.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

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

set character \UDDFDD83D; # NOTE: This is little-endian.

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

runTest {test tkt-7c151a2f0e-1.1 {Open with UseUTF16Encoding=False} -setup {
  set fileName tkt-7c151a2f0e-1.1.db
  setupDb $fileName "" "" "" "" UseUTF16Encoding=False
} -body {
  sql execute $db "CREATE TABLE t1(x TEXT);"

  sql execute $db [appendArgs "INSERT INTO t1 (x) VALUES(?);"] \
      [list param1 String $character]

  list [sql execute -execute scalar $db "PRAGMA encoding;"] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result [appendArgs "UTF-8 " $character]}

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

runTest {test tkt-7c151a2f0e-1.2 {Open with UseUTF16Encoding=True} -setup {
  set fileName tkt-7c151a2f0e-1.2.db
  setupDb $fileName "" "" "" "" UseUTF16Encoding=True
} -body {
  sql execute $db "CREATE TABLE t1(x TEXT);"

  sql execute $db [appendArgs "INSERT INTO t1 (x) VALUES(?);"] \
      [list param1 String $character]

  list [sql execute -execute scalar $db "PRAGMA encoding;"] \
      [sql execute -execute scalar $db "SELECT x FROM t1;"]
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result [appendArgs "UTF-16le " $character]}

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

unset -nocomplain character

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

runSQLiteTestEpilogue
runTestEpilogue
Changes to readme.htm.
216
217
218
219
220
221
222

223
224
225
226
227
228
229
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230







+







    <li>Updated to <a href="https://www.nuget.org/packages/EntityFramework/6.1.3">Entity Framework 6.1.3</a>.</li>
    <li>Improve ADO.NET conformance of the SQLiteDataReader.RecordsAffected property. Fix for [74542e702e].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Prevent the IDataReader.GetDataTypeName method from throwing &quot;No current row&quot; exceptions. Fix for [94252b9059].</li>
    <li>When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for [a4d9c7ee94].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>The IDataReader.GetDataTypeName method should always return the declared type name.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.</li>
    <li>Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.</li>
    <li>Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].</li>
</ul>
<p>
    <b>1.0.96.0 - March 5, 2015</b>
</p>
<ul>
    <li>Prevent the IDataReader.GetOrdinal method from throwing &quot;No current row&quot; exceptions. Fix for [c28d7fe915].</li>
    <li>When counting the number of tables in the GetSchemaTable method, do not include those that have a null or empty name. Fix for [92dbf1229a].</li>
Changes to www/news.wiki.
10
11
12
13
14
15
16

17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24







+







    <li>Updated to [https://www.nuget.org/packages/EntityFramework/6.1.3|Entity Framework 6.1.3].</li>
    <li>Improve ADO.NET conformance of the SQLiteDataReader.RecordsAffected property. Fix for [74542e702e].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Prevent the IDataReader.GetDataTypeName method from throwing &quot;No current row&quot; exceptions. Fix for [94252b9059].</li>
    <li>When BinaryGUID handling is off, transform the LINQ parameter types as well. Fix for [a4d9c7ee94].&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>The IDataReader.GetDataTypeName method should always return the declared type name.&nbsp;<b>** Potentially Incompatible Change **</b></li>
    <li>Add DefaultFlags_SQLiteConnection environment variable to enable customization of the default connection flags.</li>
    <li>Prevent calls to sqlite3_step() and sqlite3_interrupt() from being interrupted via ThreadAbortException.</li>
    <li>Make sure enabling UseUTF16Encoding sets the schema encoding to UTF-16. Fix for [7c151a2f0e].</li>
</ul>
<p>
    <b>1.0.96.0 - March 5, 2015</b>
</p>
<ul>
    <li>Prevent the IDataReader.GetOrdinal method from throwing &quot;No current row&quot; exceptions. Fix for [c28d7fe915].</li>
    <li>When counting the number of tables in the GetSchemaTable method, do not include those that have a null or empty name. Fix for [92dbf1229a].</li>