System.Data.SQLite
Check-in [70655cda1a]
Not logged in

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

Overview
Comment:Prevent calls to the native sqlite3_step() and sqlite3_interrupt() methods from being interrupted via a ThreadAbortException. Also, remove a superfluous native function declaration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 70655cda1a7aa9cfa38bee4a3ee97515d58330a5
User & Date: mistachkin 2015-05-15 17:45:22
Context
2015-05-16
02:26
Stop using the specific version for the EF6 Nuget package. Fix for [abf2be8a23]. check-in: a58c97761a user: mistachkin tags: trunk
2015-05-15
17:45
Prevent calls to the native sqlite3_step() and sqlite3_interrupt() methods from being interrupted via a ThreadAbortException. Also, remove a superfluous native function declaration. check-in: 70655cda1a user: mistachkin tags: trunk
2015-05-13
03:47
Also prevent the sqlite3_interrupt() call from being interrupted. Closed-Leaf check-in: 7f1111a6fd user: mistachkin tags: stepNoThreadAbort
2015-05-09
17:42
Update SQLite core library to the 3.8.10.1 release. check-in: da24877dcb user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Doc/Extra/Provider/version.html.

48
49
50
51
52
53
54

55
56
57
58
59
60
61
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_10_1.html">SQLite 3.8.10.1</a>.</li>
      <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>

    </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>







>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
      <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_10_1.html">SQLite 3.8.10.1</a>.</li>
      <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>
    </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 System.Data.SQLite/SQLite3.cs.

265
266
267
268
269
270
271






272

273
274
275
276
277
278
279
...
797
798
799
800
801
802
803






804

805
806
807
808
809
810
811

    /// <summary>
    /// Attempts to interrupt the query currently executing on the associated
    /// native database connection.
    /// </summary>
    internal override void Cancel()
    {






      UnsafeNativeMethods.sqlite3_interrupt(_sql);

    }

    /// <summary>
    /// This function binds a user-defined function to the connection.
    /// </summary>
    /// <param name="functionAttribute">
    /// The <see cref="SQLiteFunctionAttribute"/> object instance containing
................................................................................
      SQLiteErrorCode n;
      Random rnd = null;
      uint starttick = (uint)Environment.TickCount;
      uint timeout = (uint)(stmt._command._commandTimeout * 1000);

      while (true)
      {






        n = UnsafeNativeMethods.sqlite3_step(stmt._sqlite_stmt);


        if (n == SQLiteErrorCode.Row) return true;
        if (n == SQLiteErrorCode.Done) return false;

        if (n != SQLiteErrorCode.Ok)
        {
          SQLiteErrorCode r;







>
>
>
>
>
>
|
>







 







>
>
>
>
>
>
|
>







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
...
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825

    /// <summary>
    /// Attempts to interrupt the query currently executing on the associated
    /// native database connection.
    /// </summary>
    internal override void Cancel()
    {
      try
      {
        // do nothing.
      }
      finally /* NOTE: Thread.Abort() protection. */
      {
        UnsafeNativeMethods.sqlite3_interrupt(_sql);
      }
    }

    /// <summary>
    /// This function binds a user-defined function to the connection.
    /// </summary>
    /// <param name="functionAttribute">
    /// The <see cref="SQLiteFunctionAttribute"/> object instance containing
................................................................................
      SQLiteErrorCode n;
      Random rnd = null;
      uint starttick = (uint)Environment.TickCount;
      uint timeout = (uint)(stmt._command._commandTimeout * 1000);

      while (true)
      {
        try
        {
            // do nothing.
        }
        finally /* NOTE: Thread.Abort() protection. */
        {
          n = UnsafeNativeMethods.sqlite3_step(stmt._sqlite_stmt);
        }

        if (n == SQLiteErrorCode.Row) return true;
        if (n == SQLiteErrorCode.Done) return false;

        if (n != SQLiteErrorCode.Ok)
        {
          SQLiteErrorCode r;

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602

    [DllImport(SQLITE_DLL)]
    internal static extern SQLiteErrorCode sqlite3_cursor_rowid_interop(IntPtr stmt, int cursor, ref long rowid);

    [DllImport(SQLITE_DLL)]
    internal static extern SQLiteErrorCode sqlite3_index_column_info_interop(IntPtr db, byte[] catalog, byte[] IndexName, byte[] ColumnName, ref int sortOrder, ref int onError, ref IntPtr Collation, ref int colllen);

    [DllImport(SQLITE_DLL)]
    internal static extern void sqlite3_resetall_interop(IntPtr db);

    [DllImport(SQLITE_DLL)]
    internal static extern int sqlite3_table_cursor_interop(IntPtr stmt, int db, int tableRootPage);

#endif
// !SQLITE_STANDARD

    #endregion







<
<
<







1586
1587
1588
1589
1590
1591
1592



1593
1594
1595
1596
1597
1598
1599

    [DllImport(SQLITE_DLL)]
    internal static extern SQLiteErrorCode sqlite3_cursor_rowid_interop(IntPtr stmt, int cursor, ref long rowid);

    [DllImport(SQLITE_DLL)]
    internal static extern SQLiteErrorCode sqlite3_index_column_info_interop(IntPtr db, byte[] catalog, byte[] IndexName, byte[] ColumnName, ref int sortOrder, ref int onError, ref IntPtr Collation, ref int colllen);




    [DllImport(SQLITE_DLL)]
    internal static extern int sqlite3_table_cursor_interop(IntPtr stmt, int db, int tableRootPage);

#endif
// !SQLITE_STANDARD

    #endregion

Changes to readme.htm.

215
216
217
218
219
220
221

222
223
224
225
226
227
228
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_10_1.html">SQLite 3.8.10.1</a>.</li>
    <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>

</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>







>







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    <li>Updated to <a href="https://www.sqlite.org/releaselog/3_8_10_1.html">SQLite 3.8.10.1</a>.</li>
    <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>
</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.

9
10
11
12
13
14
15

16
17
18
19
20
21
22
    <li>Updated to [https://www.sqlite.org/releaselog/3_8_10_1.html|SQLite 3.8.10.1].</li>
    <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>

</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>







>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    <li>Updated to [https://www.sqlite.org/releaselog/3_8_10_1.html|SQLite 3.8.10.1].</li>
    <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>
</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>