System.Data.SQLite
Check-in [416990bc16]
Not logged in

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

Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core312
Files: files | file ages | folders
SHA1: 416990bc16a68b6fb13b2d0fdf83b94cf2c9dc2c
User & Date: mistachkin 2016-03-24 20:45:46
Context
2016-03-24
21:36
Update SQLite core library to the latest trunk code. check-in: 25e5432a14 user: mistachkin tags: trunk
20:45
Merge updates from trunk. Closed-Leaf check-in: 416990bc16 user: mistachkin tags: core312
20:43
Fix a couple build configuration test constraints. check-in: 81ccaf438c user: mistachkin tags: trunk
20:41
Update SQLite core library to the latest trunk code. check-in: 25ecf63c82 user: mistachkin tags: core312
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/lib/Test1.0/epilogue.eagle.

   123    123           $operationCount \n]
   124    124   
   125    125       unset operationCount
   126    126   
   127    127       #
   128    128       # NOTE: Show the current state of the memory.
   129    129       #
   130         -    catch {debug memory} memory
          130  +    set memory(0) [catch {debug memory} memory(1)]
   131    131   
   132    132       tputs $test_channel [appendArgs "---- ending memory: " \
   133         -        [formatListAsDict $memory <none>] \n]
          133  +        [formatListAsDict [expr {$memory(0) == 0 ? $memory(1) : ""}] \
          134  +        <none>] \n]
   134    135   
   135    136       unset memory
   136    137   
   137    138       #
   138    139       # NOTE: Show the current state of the native stack.
   139    140       #
   140         -    catch {debug stack true} stack
          141  +    set stack(0) [catch {debug stack true} stack(1)]
   141    142   
   142    143       tputs $test_channel [appendArgs "---- ending stack: " \
   143         -        [formatListAsDict $stack <none>] \n]
          144  +        [formatListAsDict [expr {$stack(0) == 0 ? $stack(1) : ""}] \
          145  +        <none>] \n]
   144    146   
   145    147       unset stack
   146    148   
   147    149       #
   148    150       # NOTE: Check for and display any duplicate test names that we found.  In
   149    151       #       theory, this checking may produce false positives if a test file
   150    152       #       (or the entire test suite) is run multiple times without resetting

Changes to Externals/Eagle/lib/Test1.0/prologue.eagle.

   767    767       tputs $test_channel [appendArgs "---- threadId: " \
   768    768           [info tid] \n]
   769    769   
   770    770       tputs $test_channel [appendArgs "---- processors: " \
   771    771           [info processors] \n]
   772    772   
   773    773       if {[llength [info commands object]] > 0} then {
   774         -      catch {object invoke Console.InputEncoding WebName} encoding
          774  +      set encoding(0) [catch {
          775  +        object invoke Console.InputEncoding WebName
          776  +      } encoding(1)]
   775    777       } else {
   776         -      set encoding unavailable
          778  +      set encoding(0) 0; set encoding(1) unavailable
   777    779       }
   778    780   
   779    781       tputs $test_channel [appendArgs "---- input encoding: " \
   780         -        $encoding \n]
          782  +        [expr {$encoding(0) == 0 ? $encoding(1) : "<none>"}] \n]
   781    783   
   782    784       if {[llength [info commands object]] > 0} then {
   783         -      catch {object invoke Console.OutputEncoding WebName} encoding
          785  +      set encoding(0) [catch {
          786  +        object invoke Console.OutputEncoding WebName
          787  +      } encoding(1)]
   784    788       } else {
   785         -      set encoding unavailable
          789  +      set encoding(0) 0; set encoding(1) unavailable
   786    790       }
   787    791   
   788    792       tputs $test_channel [appendArgs "---- output encoding: " \
   789         -        $encoding \n]
          793  +        [expr {$encoding(0) == 0 ? $encoding(1) : "<none>"}] \n]
   790    794   
   791    795       unset encoding
   792         -    catch {host query} host
          796  +    set host(0) [catch {host query} host(1)]
   793    797   
   794    798       tputs $test_channel [appendArgs "---- host query: " \
   795         -        [formatListAsDict $host <none>] \n]
          799  +        [formatListAsDict [expr {$host(0) == 0 ? $host(1) : ""}] \
          800  +        <none>] \n]
   796    801   
   797    802       unset host
   798         -    catch {debug memory} memory
          803  +    set memory(0) [catch {debug memory} memory(1)]
   799    804   
   800    805       tputs $test_channel [appendArgs "---- starting memory: " \
   801         -        [formatListAsDict $memory <none>] \n]
          806  +        [formatListAsDict [expr {$memory(0) == 0 ? $memory(1) : ""}] \
          807  +        <none>] \n]
   802    808   
   803    809       unset memory
   804         -    catch {debug stack true} stack
          810  +    set stack(0) [catch {debug stack true} stack(1)]
   805    811   
   806    812       tputs $test_channel [appendArgs "---- starting stack: " \
   807         -        [formatListAsDict $stack <none>] \n]
          813  +        [formatListAsDict [expr {$stack(0) == 0 ? $stack(1) : ""}] \
          814  +        <none>] \n]
   808    815   
   809    816       unset stack
   810         -    catch {file drive} drive
          817  +    set drive(0) [catch {file drive} drive(1)]
   811    818   
   812    819       tputs $test_channel [appendArgs "---- system drive: " \
   813         -        [formatListAsDict $drive <none>] \n]
          820  +        [formatListAsDict [expr {$drive(0) == 0 ? $drive(1) : ""}] \
          821  +        <none>] \n]
   814    822   
   815    823       unset drive
   816    824     }
   817    825   
   818    826     tputs $test_channel [appendArgs "---- executable: \"" \
   819    827         $bin_file \"\n]
   820    828   

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

   791    791           SQLiteErrorCode rc = SQLiteErrorCode.Ok;
   792    792   
   793    793           int nFreeLocal = UnsafeNativeMethods.sqlite3_release_memory(nBytes);
   794    794           uint nLargestLocal = 0;
   795    795           bool resetOkLocal = false;
   796    796   
   797    797   #if !DEBUG && WINDOWS // NOTE: Should be "WIN32HEAP && !MEMDEBUG && WINDOWS"
   798         -        if ((rc == SQLiteErrorCode.Ok) && reset)
          798  +        if (HelperMethods.IsWindows())
   799    799           {
   800         -            rc = UnsafeNativeMethods.sqlite3_win32_reset_heap();
          800  +            if ((rc == SQLiteErrorCode.Ok) && reset)
          801  +            {
          802  +                rc = UnsafeNativeMethods.sqlite3_win32_reset_heap();
   801    803   
   802         -            if (rc == SQLiteErrorCode.Ok)
   803         -                resetOkLocal = true;
          804  +                if (rc == SQLiteErrorCode.Ok)
          805  +                    resetOkLocal = true;
          806  +            }
          807  +
          808  +            if ((rc == SQLiteErrorCode.Ok) && compact)
          809  +                rc = UnsafeNativeMethods.sqlite3_win32_compact_heap(ref nLargestLocal);
   804    810           }
   805         -
   806         -        if ((rc == SQLiteErrorCode.Ok) && compact)
   807         -            rc = UnsafeNativeMethods.sqlite3_win32_compact_heap(ref nLargestLocal);
   808         -#else
          811  +        else
          812  +#endif
   809    813           if (reset || compact)
          814  +        {
   810    815               rc = SQLiteErrorCode.NotFound;
   811         -#endif
          816  +        }
   812    817   
   813    818           nFree = nFreeLocal;
   814    819           nLargest = nLargestLocal;
   815    820           resetOk = resetOkLocal;
   816    821   
   817    822           return rc;
   818    823       }
................................................................................
   842    847           )
   843    848       {
   844    849           SQLiteErrorCode rc = SQLiteErrorCode.Ok;
   845    850   
   846    851           if (directories)
   847    852           {
   848    853   #if WINDOWS
   849         -            if (rc == SQLiteErrorCode.Ok)
   850         -                rc = UnsafeNativeMethods.sqlite3_win32_set_directory(1, null);
          854  +            if (HelperMethods.IsWindows())
          855  +            {
          856  +                if (rc == SQLiteErrorCode.Ok)
          857  +                    rc = UnsafeNativeMethods.sqlite3_win32_set_directory(1, null);
   851    858   
   852         -            if (rc == SQLiteErrorCode.Ok)
   853         -                rc = UnsafeNativeMethods.sqlite3_win32_set_directory(2, null);
   854         -#else
          859  +                if (rc == SQLiteErrorCode.Ok)
          860  +                    rc = UnsafeNativeMethods.sqlite3_win32_set_directory(2, null);
          861  +            }
          862  +            else
          863  +#endif
          864  +            {
   855    865   #if !NET_COMPACT_20 && TRACE_CONNECTION
   856         -            Trace.WriteLine(
   857         -                "Shutdown: Cannot reset directories on this platform.");
          866  +                Trace.WriteLine(
          867  +                    "Shutdown: Cannot reset directories on this platform.");
   858    868   #endif
   859         -#endif
          869  +            }
   860    870           }
   861    871   
   862    872           if (rc == SQLiteErrorCode.Ok)
   863    873               rc = UnsafeNativeMethods.sqlite3_shutdown();
   864    874   
   865    875           return rc;
   866    876       }

Changes to Tests/basic.eagle.

  2787   2787         "---- largest free SQLite heap block... " $nLargest " bytes\n"]
  2788   2788   
  2789   2789     lappend result [list $code $nFree $resetOk $nLargest]
  2790   2790   } -cleanup {
  2791   2791     cleanupDb $fileName
  2792   2792   
  2793   2793     unset -nocomplain nLargest resetOk nFree code result db fileName
  2794         -} -constraints {eagle command.object windows monoBug28 configuration.Release\
  2795         -command.sql compile.DATA SQLite System.Data.SQLite} -match regexp -result \
         2794  +} -constraints {eagle command.object windows monoBug28 command.sql compile.DATA\
         2795  +SQLite System.Data.SQLite buildConfiguration.Release} -match regexp -result \
  2796   2796   {^\{Busy 0 False 0\} \{Busy \d+ False 0\} \{Ok 0 True \d+\}$}}
  2797   2797   
  2798   2798   ###############################################################################
  2799   2799   
  2800   2800   runTest {test data-1.59 {percentile extension} -setup {
  2801   2801     setupDb [set fileName data-1.59.db]
  2802   2802   } -body {

Changes to Tests/tkt-72905c9a77.eagle.

   278    278         } result] : [set result ""]}] [string map [list \r\n \n] $result]
   279    279   } -cleanup {
   280    280     cleanupDb $fileName
   281    281   
   282    282     unset -nocomplain result code results errors dataSource fileName
   283    283   } -constraints \
   284    284   [fixConstraints {fail.false eagle command.object monoBug28\
   285         -configuration.Release !defineConstant.System.Data.SQLite.INTEROP_LOG\
          285  +buildConfiguration.Release !defineConstant.System.Data.SQLite.INTEROP_LOG\
   286    286   command.sql compile.DATA SQLite System.Data.SQLite compileCSharp}] -match \
   287    287   regexp -result [appendArgs \
   288    288   "^Ok System#CodeDom#Compiler#CompilerResults#\\d+ \\{\\} 0 \\{" \
   289    289   [string repeat "SQLite message \\(0\\): TEST $id\\n" \
   290    290   [expr {min(4 * [info processors], 16)}]] "\\}\$"]}
   291    291   
   292    292   ###############################################################################