Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch deferred-close Excluding Merge-Ins
This is equivalent to a diff from 70c419a434 to 37d9bc061d
2012-06-21
| ||
15:51 | Add the sqlite3_close_v2() interface (from the deferred-close branch) that allows close operations to happen out-of-order in bindings to garbage-collected langauges. (check-in: fb8893abee user: drh tags: trunk) | |
2012-06-15
| ||
20:42 | Fix compiler warning. (Closed-Leaf check-in: 37d9bc061d user: mistachkin tags: deferred-close) | |
2012-06-05
| ||
13:56 | Add sqlite3_quota_ferror() and sqlite3_quota_file_available() interfaces to test_quota.c. Change sqlite3_quota_fwrite() to use a const input buffer. (check-in: 61669c9585 user: drh tags: trunk) | |
2012-06-02
| ||
17:09 | Revert sqlite3_close() to legacy behavior. Create a new sqlite3_close_v2() interface that exhibits the deferred-close behavior. This minimizes the chance of breakage in legacy apps. (check-in: c4b8621125 user: drh tags: deferred-close) | |
14:32 | The sqlite3_close() interface returns SQLITE_OK even if there are outstanding sqlite3_stmt and sqlite3_backup objects. The connection becomes a zombie. Resource deallocation is deferred until the last sqlite3_stmt or sqlite3_backup object closes. This is intended to help SQLite play nicer with garbage collectors. (check-in: e276a02b7f user: drh tags: deferred-close) | |
2012-05-31
| ||
13:10 | Avoid calling fchown() if the process is not running as root. (check-in: 70c419a434 user: drh tags: trunk) | |
2012-05-29
| ||
19:25 | Link the NDEBUG macro to SQLITE_DEBUG so that when SQLITE_DEBUG is defined, NDEBUG is automatically undefined an dwhen SQLITE_DEBUG is undefined NDEBUG is automatically defined. (check-in: 07935d10d3 user: drh tags: trunk) | |
Changes to src/backup.c.
︙ | |||
539 540 541 542 543 544 545 | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - + - | } /* ** Release all resources associated with an sqlite3_backup* handle. */ int sqlite3_backup_finish(sqlite3_backup *p){ sqlite3_backup **pp; /* Ptr to head of pagers backup list */ |
︙ | |||
572 573 574 575 576 577 578 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | - + - + | /* Set the error code of the destination database handle. */ rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc; sqlite3Error(p->pDestDb, rc, 0); /* Exit the mutexes and free the backup context structure. */ if( p->pDestDb ){ |
︙ |
Changes to src/main.c.
︙ | |||
715 716 717 718 719 720 721 722 723 724 725 | 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 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 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | + + + + + + + + + + + + + + + - + - - - + - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | pDestructor->nRef--; if( pDestructor->nRef==0 ){ pDestructor->xDestroy(pDestructor->pUserData); sqlite3DbFree(db, pDestructor); } } } /* ** Return TRUE if database connection db has unfinalized prepared ** statements or unfinished sqlite3_backup objects. */ static int connectionIsBusy(sqlite3 *db){ int j; assert( sqlite3_mutex_held(db->mutex) ); if( db->pVdbe ) return 1; for(j=0; j<db->nDb; j++){ Btree *pBt = db->aDb[j].pBt; if( pBt && sqlite3BtreeIsInBackup(pBt) ) return 1; } return 0; } /* ** Close an existing SQLite database */ |
︙ | |||
841 842 843 844 845 846 847 | 891 892 893 894 895 896 897 898 899 900 901 902 903 904 | - | db->magic = SQLITE_MAGIC_CLOSED; sqlite3_mutex_free(db->mutex); assert( db->lookaside.nOut==0 ); /* Fails on a lookaside memory leak */ if( db->lookaside.bMalloced ){ sqlite3_free(db->lookaside.pStart); } sqlite3_free(db); |
︙ |
Changes to src/sqlite.h.in.
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | + - + | ** CAPI3REF: Database Connection Handle ** KEYWORDS: {database connection} {database connections} ** ** Each open SQLite database is represented by a pointer to an instance of ** the opaque structure named "sqlite3". It is useful to think of an sqlite3 ** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and ** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] ** and [sqlite3_close_v2()] are its destructors. There are many other |
︙ | |||
257 258 259 260 261 262 263 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 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 | + - - - + + + + + + + + + + + + + + + - - - + + + + - - + + + + - + - + + - - + + - + + | #ifdef SQLITE_OMIT_FLOATING_POINT # define double sqlite3_int64 #endif /* ** CAPI3REF: Closing A Database Connection ** ** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
970 971 972 973 974 975 976 977 978 979 980 981 982 983 | 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 | + | ** than being distinct from one another. */ #define SQLITE_MAGIC_OPEN 0xa029a697 /* Database is open */ #define SQLITE_MAGIC_CLOSED 0x9f3c2d33 /* Database is closed */ #define SQLITE_MAGIC_SICK 0x4b771290 /* Error and awaiting close */ #define SQLITE_MAGIC_BUSY 0xf03b7906 /* Database currently in use */ #define SQLITE_MAGIC_ERROR 0xb5357930 /* An SQLITE_MISUSE error occurred */ #define SQLITE_MAGIC_ZOMBIE 0x64cffc7f /* Close with last statement close */ /* ** Each SQL function is defined by an instance of the following ** structure. A pointer to this structure is stored in the sqlite.aFunc ** hash table. When multiple functions have the same name, the hash table ** points to a linked list of these structures. */ |
︙ | |||
2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 | 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 | + | void sqlite3CodeVerifySchema(Parse*, int); void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb); void sqlite3BeginTransaction(Parse*, int); void sqlite3CommitTransaction(Parse*); void sqlite3RollbackTransaction(Parse*); void sqlite3Savepoint(Parse*, int, Token*); void sqlite3CloseSavepoints(sqlite3 *); void sqlite3LeaveMutexAndCloseZombie(sqlite3*); int sqlite3ExprIsConstant(Expr*); int sqlite3ExprIsConstantNotJoin(Expr*); int sqlite3ExprIsConstantOrFunction(Expr*); int sqlite3ExprIsInteger(Expr*, int*); int sqlite3ExprCanBeNull(const Expr*); void sqlite3ExprCodeIsNullJump(Vdbe*, const Expr*, int, int); int sqlite3ExprNeedsNoAffinityChange(const Expr*, char); |
︙ |
Changes to src/vdbeapi.c.
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - - - - - - - + + - + | if( pStmt==0 ){ /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL ** pointer is a harmless no-op. */ rc = SQLITE_OK; }else{ Vdbe *v = (Vdbe*)pStmt; sqlite3 *db = v->db; |
︙ |
Changes to src/vdbeaux.c.
︙ | |||
2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 | 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 | + | ** Delete an entire VDBE. */ void sqlite3VdbeDelete(Vdbe *p){ sqlite3 *db; if( NEVER(p==0) ) return; db = p->db; assert( sqlite3_mutex_held(db->mutex) ); if( p->pPrev ){ p->pPrev->pNext = p->pNext; }else{ assert( db->pVdbe==p ); db->pVdbe = p->pNext; } if( p->pNext ){ |
︙ |
Changes to test/backup.test.
︙ | |||
419 420 421 422 423 424 425 | 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | - + | } {B} do_test backup-4.3.2 { db2 cache flush sqlite3_close db2 } {SQLITE_BUSY} do_test backup-4.3.3 { sqlite3_errmsg db2 |
︙ |