Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tkt-e30b820248 Excluding Merge-Ins
This is equivalent to a diff from f0a39e8e34 to 10d400ebd0
2011-11-15
| ||
05:14 | Merge all diagnostic enhancements and fixes related to ticket [e30b820248] to trunk. check-in: c64aaed9f4 user: mistachkin tags: trunk | |
05:02 | Plug memory leak in the sqlite3_close_interop function when a statement cannot be finalized. Have the vendor-specific initialization file for Eagle automatically set the TestPath of the interpreter. Closed-Leaf check-in: 10d400ebd0 user: mistachkin tags: tkt-e30b820248 | |
04:01 | Add SQLiteSourceId property to the SQLiteConnection class to return the SQLite core library source identifier. Enhance and revising Trace output (in DEBUG only) to be more accurate and to report resource cleanup exceptions. More work on unit testing infrastructure and the test case for ticket [e30b820248]. The SQLite3 class should always attempt to dispose the contained SQLiteConnectionHandle, even when called via the finalizer. check-in: 1808779aa2 user: mistachkin tags: tkt-e30b820248 | |
2011-11-13
| ||
22:16 | Merge updates from trunk. check-in: 8f3314a825 user: mistachkin tags: tkt-e30b820248 | |
22:03 | More updates to docs for release 77. check-in: f0a39e8e34 user: mistachkin tags: trunk | |
21:47 | Add MemoryHighwater property to the SQLiteConnection class. Also, enhance unit test infrastructure to report it. check-in: 6959d8f05a user: mistachkin tags: trunk | |
Changes to Externals/Eagle/lib/Eagle1.0/init.eagle.
︙ | |||
764 765 766 767 768 769 770 771 772 773 774 775 776 777 | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | System.CodeDom.Compiler.CompilerParameters] # # NOTE: By default, we do not want to persist the generated assembly # to disk. # $parameters GenerateInMemory true # # NOTE: Make sure that the "standard" preprocessor defines match those # for the platform (i.e. the ones used to compile the Eagle core # library assembly). # set platformOptions [expr { \ [info exists ::eagle_platform(compileOptions)] ? \ $::eagle_platform(compileOptions) : [list]}] if {[llength $platformOptions] > 0} then { # # NOTE: Grab the existing compiler options, if any. # set compilerOptions [$parameters CompilerOptions] if {"DEBUG" in $platformOptions} then { append compilerOptions " /define:DEBUG" } if {"TRACE" in $platformOptions} then { append compilerOptions " /define:TRACE" } # # NOTE: Reset the compiler options to the pre-existing ones plus the # extra defines we may have added (above). # $parameters CompilerOptions $compilerOptions } # # NOTE: Process any extra compiler settings the caller may have # provided. # foreach {name value} $args { $parameters -nocase $name $value |
︙ |
Changes to Externals/Eagle/lib/Eagle1.0/vendor.eagle.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + | # # NOTE: Use our own namespace here because even though we do not directly # support namespaces ourselves, we do not want to pollute the global # namespace if this script actually ends up being evaluated in Tcl. # namespace eval ::Eagle { if {[isEagle]} then { proc checkForTestOverrides { channel varNames quiet } { set result 0 |
︙ | |||
117 118 119 120 121 122 123 | 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 | - + - - + - - - - - - - + + + + - - - - + + + + + + + + + + + - + + + + + + + + + + | # # NOTE: Directory not found, return failure. # return false } |
Changes to SQLite.Interop/src/win/interop.c.
︙ | |||
79 80 81 82 83 84 85 86 87 88 89 90 91 92 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + + + + + + | db->pVdbe = p; ret = sqlite3_finalize((sqlite3_stmt *)p); // This will also free the copy's memory if (ret) { // finalize failed -- so we must put back anything we munged CopyMemory(po, p, sizeof(Vdbe)); db->pVdbe = po; // // NOTE: Ok, we must free this block that *we* allocated (above) since // finalize did not do so. // sqlite3DbFree_interop(db, p); break; } else { ZeroMemory(po, sizeof(Vdbe)); po->magic = VDBE_MAGIC_DEAD; } |
︙ |
Changes to System.Data.SQLite/SQLite3.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + + | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; #if DEBUG using System.Diagnostics; #endif using System.Runtime.InteropServices; #if !PLATFORM_COMPACTFRAMEWORK [UnmanagedFunctionPointer(CallingConvention.Cdecl)] #endif internal delegate void SQLiteLogCallback(IntPtr puser, int err_code, IntPtr message); |
︙ | |||
43 44 45 46 47 48 49 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - - + | internal SQLite3(SQLiteDateFormats fmt, DateTimeKind kind) : base(fmt, kind) { } protected override void Dispose(bool bDisposing) { |
︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + + + + + + + + | internal static string SQLiteVersion { get { return UTF8ToString(UnsafeNativeMethods.sqlite3_libversion(), -1); } } internal static string SQLiteSourceId { get { return UTF8ToString(UnsafeNativeMethods.sqlite3_sourceid(), -1); } } internal override bool AutoCommit { get { return IsAutocommit(_sql); } |
︙ | |||
164 165 166 167 168 169 170 171 172 173 174 175 176 177 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | + + + + + | IntPtr db; #if !SQLITE_STANDARD int n = UnsafeNativeMethods.sqlite3_open_interop(ToUTF8(strFilename), (int)flags, out db); #else int n = UnsafeNativeMethods.sqlite3_open_v2(ToUTF8(strFilename), out db, (int)flags, IntPtr.Zero); #endif #if DEBUG Trace.WriteLine(String.Format("Open: {0}", db)); #endif if (n > 0) throw new SQLiteException(n, null); _sql = db; } // Bind functions to this connection. If any previous functions of the same name // were already bound, then the new bindings replace the old. _functionsArray = SQLiteFunction.BindFunctions(this); |
︙ | |||
319 320 321 322 323 324 325 326 327 328 329 330 331 332 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | + + + + | { #if !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_prepare_interop(_sql, psql, b.Length - 1, out stmt, out ptr, out len); #else n = UnsafeNativeMethods.sqlite3_prepare(_sql, psql, b.Length - 1, out stmt, out ptr); len = -1; #endif #if DEBUG Trace.WriteLine(String.Format("Prepare: {0}", stmt)); #endif if (n == 17) retries++; else if (n == 1) { if (String.Compare(SQLiteLastError(), "near \"TYPES\": syntax error", StringComparison.OrdinalIgnoreCase) == 0) { |
︙ |
Changes to System.Data.SQLite/SQLite3_UTF16.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + + | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; #if DEBUG using System.Diagnostics; #endif using System.Runtime.InteropServices; /// <summary> /// Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode) /// </summary> internal class SQLite3_UTF16 : SQLite3 { |
︙ | |||
60 61 62 63 64 65 66 67 68 69 70 71 72 73 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | + + + + + | int n = UnsafeNativeMethods.sqlite3_open16_interop(ToUTF8(strFilename), (int)flags, out db); #else if ((flags & SQLiteOpenFlagsEnum.Create) == 0 && System.IO.File.Exists(strFilename) == false) throw new SQLiteException((int)SQLiteErrorCode.CantOpen, strFilename); int n = UnsafeNativeMethods.sqlite3_open16(strFilename, out db); #endif #if DEBUG Trace.WriteLine(String.Format("Open: {0}", db)); #endif if (n > 0) throw new SQLiteException(n, null); _sql = db; } _functionsArray = SQLiteFunction.BindFunctions(this); } |
︙ |
Changes to System.Data.SQLite/SQLiteCommand.cs.
︙ | |||
217 218 219 220 221 222 223 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | + + - - + + - - - - - - + + + + + + + + - + - - - + + + + - + | /// </summary> internal SQLiteStatement BuildNextCommand() { SQLiteStatement stmt = null; try { if ((_cnn != null) && (_cnn._sql != null)) { |
︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | |||
483 484 485 486 487 488 489 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | - - + + | _sql = null; _enlistment = null; } #endif if (_sql != null) { _sql.Close(); |
︙ | |||
1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | + + + + + + + + + + | /// <summary> /// Returns the version of the underlying SQLite database engine /// </summary> public static string SQLiteVersion { get { return SQLite3.SQLiteVersion; } } /// <summary> /// This method returns the string whose value is the same as the /// SQLITE_SOURCE_ID C preprocessor macro used when compiling the /// SQLite core library. /// </summary> public static string SQLiteSourceId { get { return SQLite3.SQLiteSourceId; } } /// <summary> /// Returns the state of the connection. /// </summary> #if !PLATFORM_COMPACTFRAMEWORK [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] #endif |
︙ |
Changes to System.Data.SQLite/SQLiteLog.cs.
︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 | 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | + + + + + + + + + + + + + + + + + + + + + + + + + | /// disabled. When logging is disabled, no logging events will fire. /// </summary> public static bool Enabled { get { lock (syncRoot) { return _enabled; } } set { lock (syncRoot) { _enabled = value; } } } /// <summary> /// Log a message to all the registered log event handlers without going /// through the SQLite library. /// </summary> /// <param name="errorCode">The error code or zero for success.</param> /// <param name="message">The message to be logged.</param> public static void LogMessage( int errorCode, string message ) { bool enabled; SQLiteLogEventHandler handlers; lock (syncRoot) { enabled = _enabled; handlers = _handlers; } if (enabled && (handlers != null)) handlers(null, new LogEventArgs( IntPtr.Zero, errorCode, message, null)); } /// <summary> /// Creates and initializes the default log event handler. /// </summary> private static void InitializeDefaultHandler() { lock (syncRoot) |
︙ | |||
353 354 355 356 357 358 359 360 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | + + + + + + - - - - - + + + + + + + + + | { if (e == null) return; string message = e.Message; if (message == null) { message = "<null>"; } else { message = message.Trim(); |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + + | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; #if DEBUG using System.Diagnostics; #endif #if !PLATFORM_COMPACTFRAMEWORK && !DEBUG using System.Security; #endif using System.Runtime.InteropServices; |
︙ | |||
347 348 349 350 351 352 353 354 355 356 357 358 359 360 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | + + + + + + + | #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_libversion(); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern IntPtr sqlite3_sourceid(); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else [DllImport(SQLITE_DLL)] #endif internal static extern void sqlite3_interrupt(IntPtr db); |
︙ | |||
870 871 872 873 874 875 876 | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 | - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + | } protected override bool ReleaseHandle() { try { SQLiteBase.CloseConnection(this); |
︙ | |||
912 913 914 915 916 917 918 | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 | - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + | } protected override bool ReleaseHandle() { try { SQLiteBase.FinalizeStatement(this); |
Changes to Tests/common.eagle.
︙ | |||
300 301 302 303 304 305 306 307 308 309 310 311 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | + + + + + + + + + + + + - + | } proc checkForSQLite { channel } { tputs $channel "---- checking for core SQLite library... " if {[catch {object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \ SQLiteVersion} version] == 0} then { # # NOTE: Attempt to query the Fossil source identifier for the SQLite # core library. # if {[catch {object invoke -flags +NonPublic System.Data.SQLite.SQLite3 \ SQLiteSourceId} sourceId]} then { # # NOTE: We failed to query the Fossil source identifier. # set sourceId unknown } # # NOTE: Yes, the SQLite core library appears to be available. # addConstraint SQLite |
︙ | |||
398 399 400 401 402 403 404 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - + - - + + + + + + + + + | # the temporary directory. Each database used by a test should be # cleaned up by that test using the "cleanupDb" procedure, below. # set fileName [file join [getTemporaryPath] [file tail $fileName]] # # NOTE: By default, delete any pre-existing database with the same file |
︙ | |||
466 467 468 469 470 471 472 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | - - - - - + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + - + + + + + - - - - + + + + + + + + + + - + + + + + - - + + + + + + + | # upvar 1 $varName db # # NOTE: Close the connection to the database now. This should allow us to # delete the underlying database file. # |
︙ |
Added Tests/tkt-e30b820248.eagle.