Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 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. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tkt-e30b820248 |
Files: | files | file ages | folders |
SHA1: |
1808779aa2a28a3b0072e1aa7739ba0d |
User & Date: | mistachkin 2011-11-15 04:01:14.315 |
Context
2011-11-15
| ||
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-14
| ||
05:40 | Allow the SQLiteLog class to be used without having an open connection (i.e. and skip going through the SQLite core library to do it). check-in: 374756ec29 user: mistachkin tags: tkt-e30b820248 | |
Changes
Changes to System.Data.SQLite/SQLite3.cs.
︙ | |||
46 47 48 49 50 51 52 | 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) { |
︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 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); } |
︙ |
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/UnsafeNativeMethods.cs.
︙ | |||
353 354 355 356 357 358 359 360 361 362 363 364 365 366 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | + + + + + + + | [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); #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else |
︙ | |||
872 873 874 875 876 877 878 879 | 879 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 | + + + + - + + + + + + - + + + + + + + + + + + + + + + | { } protected override bool ReleaseHandle() { try { SQLiteBase.CloseConnection(this); #if DEBUG try { |
︙ | |||
925 926 927 928 929 930 931 932 | 955 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 | + + + + - + + + + + + - + + + + + + + + + + + + + + + | { } protected override bool ReleaseHandle() { try { SQLiteBase.FinalizeStatement(this); #if DEBUG try { |
︙ |
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. # |
︙ |
Changes to Tests/tkt-e30b820248.eagle.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | + + + + - - + + + + - + + | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### set memory_used [reportSQLiteResources $test_channel true] ############################################################################### |
︙ | |||
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 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 258 259 260 261 262 263 264 265 266 267 268 | - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } }] results errors System.Data.SQLite.dll] list $code $results \ [expr {[info exists errors] ? $errors : ""}] \ [expr {$code eq "Ok" ? [catch { object invoke _Dynamic${id}.Test${id} Main |