System.Data.SQLite

Check-in [04d60edbdf]
Login

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

Overview
Comment:Fixes to the new SQLiteLog initialization handling and associated test suite infrastructure updates.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 04d60edbdf689fe4f0f865dcc5ce336c929bbb71
User & Date: mistachkin 2018-07-26 07:24:50.928
Context
2018-07-26
07:56
More reform to the logging subsystem. Move interop log callback into the SQLiteLog class. check-in: 4a9980ac1d user: mistachkin tags: trunk
07:24
Fixes to the new SQLiteLog initialization handling and associated test suite infrastructure updates. check-in: 04d60edbdf user: mistachkin tags: trunk
06:54
Add configuration suffix support to the test suite infrastructure. check-in: 7ffb245069 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteLog.cs.
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
            //       taken, including calling a P/Invoke (interop) method;
            //       therefore, by default, attempt to perform these steps
            //       once.
            //
            if (UnsafeNativeMethods.GetSettingValue(
                    "Initialize_SQLiteLog", null) == null)
            {
                try
                {
                    if (Interlocked.Increment(ref _attemptedInitialize) > 0)
                    {
                        return;
                    }
                }
                finally
                {
                    Interlocked.Decrement(ref _attemptedInitialize);

                }
            }

            //
            // BUFXIX: We cannot initialize the logging interface if the SQLite
            //         core library has already been initialized anywhere in
            //         the process (see ticket [2ce0870fad]).







<
<
|
|
<
<
<
<
<

>







149
150
151
152
153
154
155


156
157





158
159
160
161
162
163
164
165
166
            //       taken, including calling a P/Invoke (interop) method;
            //       therefore, by default, attempt to perform these steps
            //       once.
            //
            if (UnsafeNativeMethods.GetSettingValue(
                    "Initialize_SQLiteLog", null) == null)
            {


                if (Interlocked.Increment(ref _attemptedInitialize) > 1)
                {





                    Interlocked.Decrement(ref _attemptedInitialize);
                    return;
                }
            }

            //
            // BUFXIX: We cannot initialize the logging interface if the SQLite
            //         core library has already been initialized anywhere in
            //         the process (see ticket [2ce0870fad]).
Changes to lib/System.Data.SQLite/common.eagle.
4469
4470
4471
4472
4473
4474
4475













4476
4477
4478
4479
4480
4481
4482

    proc runSQLiteTestPrologue {} {
      #
      # NOTE: Skip running our custom prologue if the main one has been
      #       skipped.
      #
      if {![info exists ::no(prologue.eagle)]} then {













        #
        # NOTE: Load the "before-constraints" custom per-user and/or per-host
        #       test settings now.
        #
        uplevel 1 [list loadSQLiteTestSettings $::test_channel .before]

        #







>
>
>
>
>
>
>
>
>
>
>
>
>







4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495

    proc runSQLiteTestPrologue {} {
      #
      # NOTE: Skip running our custom prologue if the main one has been
      #       skipped.
      #
      if {![info exists ::no(prologue.eagle)]} then {
        #
        # NOTE: Save the environment variables that we intend to change for
        #       the test suite.
        #
        saveEnvironmentVariables \
            [list Initialize_SQLiteLog] ::testSuiteSavedEnv

        #
        # NOTE: Force the managed logging subsystem to attempt to initialize
        #       itself more than once.
        #
        set ::env(Initialize_SQLiteLog) 1

        #
        # NOTE: Load the "before-constraints" custom per-user and/or per-host
        #       test settings now.
        #
        uplevel 1 [list loadSQLiteTestSettings $::test_channel .before]

        #
5681
5682
5683
5684
5685
5686
5687







5688
5689
5690
5691
5692
5693
5694

        #
        # NOTE: If necessary, disable shared-cache mode now.
        #
        if {[hasRuntimeOption sharedCache]} then {
          enableSharedCache $::test_channel false
        }







      }
    }

    ###########################################################################
    ############################# END Eagle ONLY ##############################
    ###########################################################################
  }







>
>
>
>
>
>
>







5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714

        #
        # NOTE: If necessary, disable shared-cache mode now.
        #
        if {[hasRuntimeOption sharedCache]} then {
          enableSharedCache $::test_channel false
        }

        #
        # NOTE: Restore the previously saved environment variables that we
        #       changed for the test suite.
        #
        restoreEnvironmentVariables \
            [list Initialize_SQLiteLog] ::testSuiteSavedEnv
      }
    }

    ###########################################################################
    ############################# END Eagle ONLY ##############################
    ###########################################################################
  }