System.Data.SQLite

Check-in [9221073c65]
Login

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

Overview
Comment:Fixes and enhancements to the internal debugging interfaces.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9221073c65d002066ba3eeb14f74c351762b80e7
User & Date: mistachkin 2018-01-25 21:43:05.914
Context
2018-01-25
23:52
Further fixes to the internal debugging interfaces, primarily focused on thread-safety. check-in: 29690b4981 user: mistachkin tags: trunk
21:44
Merge updates from trunk. check-in: a363e907fe user: mistachkin tags: tkt-5cee5409f8
21:43
Fixes and enhancements to the internal debugging interfaces. check-in: 9221073c65 user: mistachkin tags: trunk
2018-01-24
19:53
Additions and corrections to the DbType mapping related lookup tables. Pursuant to ticket [a799e3978f]. check-in: 939cc5db59 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
135
136
137
138
139
140
141





































142
143
144
145
146
147
148
              if (otherCounts == null)
                  otherCounts = new Dictionary<string, int>();
          }
      }

      /////////////////////////////////////////////////////////////////////////






































      /// <summary>
      /// Increments the read count for the specified runtime configuration
      /// setting.  These numbers are used for debugging and testing purposes
      /// only.
      /// </summary>
      /// <param name="name">
      /// The name of the setting being read.







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







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
              if (otherCounts == null)
                  otherCounts = new Dictionary<string, int>();
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Queries the read counts for the runtime configuration settings.
      /// These numbers are used for debugging and testing purposes only.
      /// </summary>
      /// <param name="viaFile">
      /// Non-zero if the specified setting is being read from the XML
      /// configuration file.
      /// </param>
      /// <returns>
      /// A copy of the statistics for the specified runtime configuration
      /// settings -OR- null if they are not available.
      /// </returns>
      public static object GetSettingReadCounts(
          bool viaFile
          )
      {
          lock (staticSyncRoot)
          {
              if (viaFile)
              {
                  if (settingFileReadCounts == null)
                      return null;

                  return new Dictionary<string, int>(settingFileReadCounts);
              }
              else
              {
                  if (settingReadCounts == null)
                      return null;

                  return new Dictionary<string, int>(settingReadCounts);
              }
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Increments the read count for the specified runtime configuration
      /// setting.  These numbers are used for debugging and testing purposes
      /// only.
      /// </summary>
      /// <param name="name">
      /// The name of the setting being read.
329
330
331
332
333
334
335














336
337
338
339
340
341
342
          return false;
      }
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Internal Methods














      /// <summary>
      /// If the "PreLoadSQLite_BreakIntoDebugger" configuration setting is
      /// present (e.g. via the environment), give the interactive user an
      /// opportunity to attach a debugger to the current process; otherwise,
      /// do nothing.
      /// </summary>
      internal static void MaybeBreakIntoDebugger()







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







366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
          return false;
      }
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Internal Methods
      /// <summary>
      /// Resets the cached value for the "PreLoadSQLite_BreakIntoDebugger"
      /// configuration setting.
      /// </summary>
      internal static void ResetBreakIntoDebugger()
      {
          lock (staticSyncRoot)
          {
              debuggerBreak = null;
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// If the "PreLoadSQLite_BreakIntoDebugger" configuration setting is
      /// present (e.g. via the environment), give the interactive user an
      /// opportunity to attach a debugger to the current process; otherwise,
      /// do nothing.
      /// </summary>
      internal static void MaybeBreakIntoDebugger()
408
409
410
411
412
413
414













415
416
417
418
419
420
421
                  {
                      debuggerBreak = false;
                  }

                  throw;
              }
          }













      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Determines if preparing a query should be logged.
      /// </summary>







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







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
                  {
                      debuggerBreak = false;
                  }

                  throw;
              }
          }
          else
          {
              //
              // BUGFIX: There is (almost) no point in checking for the
              //         associated configuration setting repeatedly.
              //         Prevent that here by setting the cached value
              //         to false.
              //
              lock (staticSyncRoot)
              {
                  debuggerBreak = false;
              }
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// Determines if preparing a query should be logged.
      /// </summary>