System.Data.SQLite
Check-in [61908b2901]
Not logged in

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

Overview
Comment:Revise logging callback integration with the interop assembly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | netStandard20
Files: files | file ages | folders
SHA1:61908b2901c8f76e1a6609ec732a03695b89586f
User & Date: mistachkin 2018-04-07 10:04:56
Context
2018-04-07
10:42
Experimental enhancement to the native library pre-loader on POSIX. check-in: f04b575ad8 user: mistachkin tags: netStandard20
10:04
Revise logging callback integration with the interop assembly. check-in: 61908b2901 user: mistachkin tags: netStandard20
09:49
Fix minor typo in the test change from the previous check-in. check-in: 4c012df0e7 user: mistachkin tags: netStandard20
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SQLite.Interop/src/generic/interop.c.

367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
    ret = sqlite3_config(SQLITE_CONFIG_LOG, sqlite3InteropLogCallback, 0);
    if( ret==SQLITE_OK ){
      logConfigured = 1;
    }else{
      sqlite3InteropDebug("sqlite3_config_log_interop(): sqlite3_config(SQLITE_CONFIG_LOG) returned %d.\n", ret);
    }
  }else{
    ret = SQLITE_OK;
  }
  return ret;
}
#endif

SQLITE_API const char *WINAPI interop_libversion(void)
{







|







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
    ret = sqlite3_config(SQLITE_CONFIG_LOG, sqlite3InteropLogCallback, 0);
    if( ret==SQLITE_OK ){
      logConfigured = 1;
    }else{
      sqlite3InteropDebug("sqlite3_config_log_interop(): sqlite3_config(SQLITE_CONFIG_LOG) returned %d.\n", ret);
    }
  }else{
    ret = SQLITE_DONE;
  }
  return ret;
}
#endif

SQLITE_API const char *WINAPI interop_libversion(void)
{

Changes to System.Data.SQLite/LINQ/SQLiteFactory_Linq.cs.

40
41
42
43
44
45
46
47
48


49
50
51
52
53
54
55
56
57
    static SQLiteFactory()
    {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

#if USE_INTEROP_DLL && INTEROP_LOG
        if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok)
        {


            UnsafeNativeMethods.sqlite3_log(
                SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized."));
        }
#endif

        SQLiteLog.Initialize();

        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471







|
|
>
>

|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    static SQLiteFactory()
    {
#if (SQLITE_STANDARD || USE_INTEROP_DLL || PLATFORM_COMPACTFRAMEWORK) && PRELOAD_NATIVE_LIBRARY
        UnsafeNativeMethods.Initialize();
#endif

#if USE_INTEROP_DLL && INTEROP_LOG
        SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_config_log_interop();

        if (rc == SQLiteErrorCode.Ok)
        {
            UnsafeNativeMethods.sqlite3_log(
                rc, SQLiteConvert.ToUTF8("logging initialized via SQLiteFactory."));
        }
#endif

        SQLiteLog.Initialize();

        string version =
#if NET_40 || NET_45 || NET_451 || NET_452 || NET_46 || NET_461 || NET_462 || NET_47 || NET_471

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

1789
1790
1791
1792
1793
1794
1795
1796
1797


1798
1799
1800
1801
1802
1803
1804
1805
1806
              if (_versionNumber >= 3007014)
                  SQLiteConnectionHandle.closeConnection = SQLiteBase.CloseConnectionV2;
          }
      }
#endif

#if USE_INTEROP_DLL && INTEROP_LOG
      if (UnsafeNativeMethods.sqlite3_config_log_interop() == SQLiteErrorCode.Ok)
      {


          UnsafeNativeMethods.sqlite3_log(
              SQLiteErrorCode.Ok, SQLiteConvert.ToUTF8("logging initialized."));
      }
#endif

      _cachedSettings = new Dictionary<string, object>(
          new TypeNameStringComparer());

      _typeNames = new SQLiteDbTypeMap();







|
|
>
>

|







1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
              if (_versionNumber >= 3007014)
                  SQLiteConnectionHandle.closeConnection = SQLiteBase.CloseConnectionV2;
          }
      }
#endif

#if USE_INTEROP_DLL && INTEROP_LOG
      SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_config_log_interop();

      if (rc == SQLiteErrorCode.Ok)
      {
          UnsafeNativeMethods.sqlite3_log(
              rc, SQLiteConvert.ToUTF8("logging initialized via SQLiteConnection."));
      }
#endif

      _cachedSettings = new Dictionary<string, object>(
          new TypeNameStringComparer());

      _typeNames = new SQLiteDbTypeMap();