Fossil SCM
Update the version of SQLite used to 3.6.6.2.
Commit
f84bfc31bfa09aa7d4dcec01bddefe531b693549
Parent
adefb6c8dba4364…
2 files changed
+17
-30
+1
-1
+17
-30
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | -** version 3.6.6.1. By combining all the individual C code files into this | |
| 3 | +** version 3.6.6.2. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a one translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% are more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| @@ -15,11 +15,11 @@ | ||
| 15 | 15 | ** needed if you want a wrapper to interface SQLite with your choice of |
| 16 | 16 | ** programming language. The code for the "sqlite3" command-line shell |
| 17 | 17 | ** is also in a separate file. This file contains only code for the core |
| 18 | 18 | ** SQLite library. |
| 19 | 19 | ** |
| 20 | -** This amalgamation was generated on 2008-11-22 14:31:32 UTC. | |
| 20 | +** This amalgamation was generated on 2008-11-27 02:28:55 UTC. | |
| 21 | 21 | */ |
| 22 | 22 | #define SQLITE_CORE 1 |
| 23 | 23 | #define SQLITE_AMALGAMATION 1 |
| 24 | 24 | #ifndef SQLITE_PRIVATE |
| 25 | 25 | # define SQLITE_PRIVATE static |
| @@ -562,11 +562,11 @@ | ||
| 562 | 562 | ** |
| 563 | 563 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 564 | 564 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 565 | 565 | ** are the major version, minor version, and release number. |
| 566 | 566 | */ |
| 567 | -#define SQLITE_VERSION "3.6.6.1" | |
| 567 | +#define SQLITE_VERSION "3.6.6.2" | |
| 568 | 568 | #define SQLITE_VERSION_NUMBER 3006006 |
| 569 | 569 | |
| 570 | 570 | /* |
| 571 | 571 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 572 | 572 | ** KEYWORDS: sqlite3_version |
| @@ -28745,11 +28745,11 @@ | ||
| 28745 | 28745 | ** is separate from the database file. The pager also implements file |
| 28746 | 28746 | ** locking to prevent two processes from writing the same database |
| 28747 | 28747 | ** file simultaneously, or one process from reading the database while |
| 28748 | 28748 | ** another is writing. |
| 28749 | 28749 | ** |
| 28750 | -** @(#) $Id: pager.c,v 1.506 2008/11/19 18:30:29 drh Exp $ | |
| 28750 | +** @(#) $Id: pager.c,v 1.506.2.1 2008/11/26 14:55:02 drh Exp $ | |
| 28751 | 28751 | */ |
| 28752 | 28752 | #ifndef SQLITE_OMIT_DISKIO |
| 28753 | 28753 | |
| 28754 | 28754 | /* |
| 28755 | 28755 | ** Macros for troubleshooting. Normally turned off |
| @@ -29787,13 +29787,10 @@ | ||
| 29787 | 29787 | i -= 200; |
| 29788 | 29788 | } |
| 29789 | 29789 | return cksum; |
| 29790 | 29790 | } |
| 29791 | 29791 | |
| 29792 | -/* Forward declaration */ | |
| 29793 | -static void makeClean(PgHdr*); | |
| 29794 | - | |
| 29795 | 29792 | /* |
| 29796 | 29793 | ** Read a single page from the journal file opened on file descriptor |
| 29797 | 29794 | ** jfd. Playback this one page. |
| 29798 | 29795 | ** |
| 29799 | 29796 | ** The isMainJrnl flag is true if this is the main rollback journal and |
| @@ -29899,11 +29896,13 @@ | ||
| 29899 | 29896 | pData = pPg->pData; |
| 29900 | 29897 | memcpy(pData, aData, pPager->pageSize); |
| 29901 | 29898 | if( pPager->xReiniter ){ |
| 29902 | 29899 | pPager->xReiniter(pPg); |
| 29903 | 29900 | } |
| 29904 | - if( isMainJrnl ) makeClean(pPg); | |
| 29901 | + if( isMainJrnl ){ | |
| 29902 | + sqlite3PcacheMakeClean(pPg); | |
| 29903 | + } | |
| 29905 | 29904 | #ifdef SQLITE_CHECK_PAGES |
| 29906 | 29905 | pPg->pageHash = pager_pagehash(pPg); |
| 29907 | 29906 | #endif |
| 29908 | 29907 | /* If this was page 1, then restore the value of Pager.dbFileVers. |
| 29909 | 29908 | ** Do this before any decoding. */ |
| @@ -31819,27 +31818,10 @@ | ||
| 31819 | 31818 | } |
| 31820 | 31819 | } |
| 31821 | 31820 | assert( !pPager->journalOpen || pPager->journalOff>0 || rc!=SQLITE_OK ); |
| 31822 | 31821 | return rc; |
| 31823 | 31822 | } |
| 31824 | - | |
| 31825 | -/* | |
| 31826 | -** Make a page dirty. Set its dirty flag and add it to the dirty | |
| 31827 | -** page list. | |
| 31828 | -*/ | |
| 31829 | -static void makeDirty(PgHdr *pPg){ | |
| 31830 | - sqlite3PcacheMakeDirty(pPg); | |
| 31831 | -} | |
| 31832 | - | |
| 31833 | -/* | |
| 31834 | -** Make a page clean. Clear its dirty bit and remove it from the | |
| 31835 | -** dirty page list. | |
| 31836 | -*/ | |
| 31837 | -static void makeClean(PgHdr *pPg){ | |
| 31838 | - sqlite3PcacheMakeClean(pPg); | |
| 31839 | -} | |
| 31840 | - | |
| 31841 | 31823 | |
| 31842 | 31824 | /* |
| 31843 | 31825 | ** Mark a data page as writeable. The page is written into the journal |
| 31844 | 31826 | ** if it is not there already. This routine must be called before making |
| 31845 | 31827 | ** changes to a page. |
| @@ -31888,11 +31870,11 @@ | ||
| 31888 | 31870 | } |
| 31889 | 31871 | |
| 31890 | 31872 | /* Mark the page as dirty. If the page has already been written |
| 31891 | 31873 | ** to the journal then we can return right away. |
| 31892 | 31874 | */ |
| 31893 | - makeDirty(pPg); | |
| 31875 | + sqlite3PcacheMakeDirty(pPg); | |
| 31894 | 31876 | if( pageInJournal(pPg) && (pageInStatement(pPg) || pPager->stmtInUse==0) ){ |
| 31895 | 31877 | pPager->dirtyCache = 1; |
| 31896 | 31878 | pPager->dbModified = 1; |
| 31897 | 31879 | }else{ |
| 31898 | 31880 | |
| @@ -32795,11 +32777,11 @@ | ||
| 32795 | 32777 | ** the journal needs to be sync()ed before database page pPg->pgno |
| 32796 | 32778 | ** can be written to. The caller has already promised not to write to it. |
| 32797 | 32779 | */ |
| 32798 | 32780 | if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){ |
| 32799 | 32781 | needSyncPgno = pPg->pgno; |
| 32800 | - assert( pageInJournal(pPg) || pgno>pPager->origDbSize ); | |
| 32782 | + assert( pageInJournal(pPg) || pPg->pgno>pPager->origDbSize ); | |
| 32801 | 32783 | assert( pPg->flags&PGHDR_DIRTY ); |
| 32802 | 32784 | assert( pPager->needSync ); |
| 32803 | 32785 | } |
| 32804 | 32786 | |
| 32805 | 32787 | /* If the cache contains a page with page-number pgno, remove it |
| @@ -32817,11 +32799,11 @@ | ||
| 32817 | 32799 | sqlite3PcacheMove(pPg, pgno); |
| 32818 | 32800 | if( pPgOld ){ |
| 32819 | 32801 | sqlite3PcacheDrop(pPgOld); |
| 32820 | 32802 | } |
| 32821 | 32803 | |
| 32822 | - makeDirty(pPg); | |
| 32804 | + sqlite3PcacheMakeDirty(pPg); | |
| 32823 | 32805 | pPager->dirtyCache = 1; |
| 32824 | 32806 | pPager->dbModified = 1; |
| 32825 | 32807 | |
| 32826 | 32808 | if( needSyncPgno ){ |
| 32827 | 32809 | /* If needSyncPgno is non-zero, then the journal file needs to be |
| @@ -32852,11 +32834,11 @@ | ||
| 32852 | 32834 | return rc; |
| 32853 | 32835 | } |
| 32854 | 32836 | pPager->needSync = 1; |
| 32855 | 32837 | assert( pPager->noSync==0 && !MEMDB ); |
| 32856 | 32838 | pPgHdr->flags |= PGHDR_NEED_SYNC; |
| 32857 | - makeDirty(pPgHdr); | |
| 32839 | + sqlite3PcacheMakeDirty(pPgHdr); | |
| 32858 | 32840 | sqlite3PagerUnref(pPgHdr); |
| 32859 | 32841 | } |
| 32860 | 32842 | |
| 32861 | 32843 | return SQLITE_OK; |
| 32862 | 32844 | } |
| @@ -33911,11 +33893,11 @@ | ||
| 33911 | 33893 | ** May you do good and not evil. |
| 33912 | 33894 | ** May you find forgiveness for yourself and forgive others. |
| 33913 | 33895 | ** May you share freely, never taking more than you give. |
| 33914 | 33896 | ** |
| 33915 | 33897 | ************************************************************************* |
| 33916 | -** $Id: btree.c,v 1.539.2.1 2008/11/22 14:07:49 drh Exp $ | |
| 33898 | +** $Id: btree.c,v 1.539.2.2 2008/11/26 14:55:02 drh Exp $ | |
| 33917 | 33899 | ** |
| 33918 | 33900 | ** This file implements a external (disk-based) database using BTrees. |
| 33919 | 33901 | ** See the header comment on "btreeInt.h" for additional information. |
| 33920 | 33902 | ** Including a description of file format and an overview of operation. |
| 33921 | 33903 | */ |
| @@ -36828,10 +36810,11 @@ | ||
| 36828 | 36810 | pTempCur->pNext = 0; |
| 36829 | 36811 | pTempCur->pPrev = 0; |
| 36830 | 36812 | for(i=0; i<=pTempCur->iPage; i++){ |
| 36831 | 36813 | sqlite3PagerRef(pTempCur->apPage[i]->pDbPage); |
| 36832 | 36814 | } |
| 36815 | + assert( pTempCur->pKey==0 ); | |
| 36833 | 36816 | } |
| 36834 | 36817 | |
| 36835 | 36818 | /* |
| 36836 | 36819 | ** Delete a temporary cursor such as was made by the CreateTemporaryCursor() |
| 36837 | 36820 | ** function above. |
| @@ -36840,10 +36823,11 @@ | ||
| 36840 | 36823 | int i; |
| 36841 | 36824 | assert( cursorHoldsMutex(pCur) ); |
| 36842 | 36825 | for(i=0; i<=pCur->iPage; i++){ |
| 36843 | 36826 | sqlite3PagerUnref(pCur->apPage[i]->pDbPage); |
| 36844 | 36827 | } |
| 36828 | + sqlite3_free(pCur->pKey); | |
| 36845 | 36829 | } |
| 36846 | 36830 | |
| 36847 | 36831 | /* |
| 36848 | 36832 | ** Make sure the BtCursor* given in the argument has a valid |
| 36849 | 36833 | ** BtCursor.info structure. If it is not already valid, call |
| @@ -39959,10 +39943,13 @@ | ||
| 39959 | 39943 | pLeafPage = leafCur.apPage[leafCur.iPage]; |
| 39960 | 39944 | assert( pLeafPage->pgno==leafPgno ); |
| 39961 | 39945 | assert( leafCur.aiIdx[leafCur.iPage]==0 ); |
| 39962 | 39946 | } |
| 39963 | 39947 | |
| 39948 | + if( rc==SQLITE_OK ){ | |
| 39949 | + rc = sqlite3PagerWrite(pLeafPage->pDbPage); | |
| 39950 | + } | |
| 39964 | 39951 | if( rc==SQLITE_OK ){ |
| 39965 | 39952 | dropCell(pLeafPage, 0, szNext); |
| 39966 | 39953 | VVA_ONLY( leafCur.pagesShuffled = 0 ); |
| 39967 | 39954 | rc = balance(&leafCur, 0); |
| 39968 | 39955 | assert( leafCursorInvalid || !leafCur.pagesShuffled |
| 39969 | 39956 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.6.6.1. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a one translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% are more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -15,11 +15,11 @@ | |
| 15 | ** needed if you want a wrapper to interface SQLite with your choice of |
| 16 | ** programming language. The code for the "sqlite3" command-line shell |
| 17 | ** is also in a separate file. This file contains only code for the core |
| 18 | ** SQLite library. |
| 19 | ** |
| 20 | ** This amalgamation was generated on 2008-11-22 14:31:32 UTC. |
| 21 | */ |
| 22 | #define SQLITE_CORE 1 |
| 23 | #define SQLITE_AMALGAMATION 1 |
| 24 | #ifndef SQLITE_PRIVATE |
| 25 | # define SQLITE_PRIVATE static |
| @@ -562,11 +562,11 @@ | |
| 562 | ** |
| 563 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 564 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 565 | ** are the major version, minor version, and release number. |
| 566 | */ |
| 567 | #define SQLITE_VERSION "3.6.6.1" |
| 568 | #define SQLITE_VERSION_NUMBER 3006006 |
| 569 | |
| 570 | /* |
| 571 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 572 | ** KEYWORDS: sqlite3_version |
| @@ -28745,11 +28745,11 @@ | |
| 28745 | ** is separate from the database file. The pager also implements file |
| 28746 | ** locking to prevent two processes from writing the same database |
| 28747 | ** file simultaneously, or one process from reading the database while |
| 28748 | ** another is writing. |
| 28749 | ** |
| 28750 | ** @(#) $Id: pager.c,v 1.506 2008/11/19 18:30:29 drh Exp $ |
| 28751 | */ |
| 28752 | #ifndef SQLITE_OMIT_DISKIO |
| 28753 | |
| 28754 | /* |
| 28755 | ** Macros for troubleshooting. Normally turned off |
| @@ -29787,13 +29787,10 @@ | |
| 29787 | i -= 200; |
| 29788 | } |
| 29789 | return cksum; |
| 29790 | } |
| 29791 | |
| 29792 | /* Forward declaration */ |
| 29793 | static void makeClean(PgHdr*); |
| 29794 | |
| 29795 | /* |
| 29796 | ** Read a single page from the journal file opened on file descriptor |
| 29797 | ** jfd. Playback this one page. |
| 29798 | ** |
| 29799 | ** The isMainJrnl flag is true if this is the main rollback journal and |
| @@ -29899,11 +29896,13 @@ | |
| 29899 | pData = pPg->pData; |
| 29900 | memcpy(pData, aData, pPager->pageSize); |
| 29901 | if( pPager->xReiniter ){ |
| 29902 | pPager->xReiniter(pPg); |
| 29903 | } |
| 29904 | if( isMainJrnl ) makeClean(pPg); |
| 29905 | #ifdef SQLITE_CHECK_PAGES |
| 29906 | pPg->pageHash = pager_pagehash(pPg); |
| 29907 | #endif |
| 29908 | /* If this was page 1, then restore the value of Pager.dbFileVers. |
| 29909 | ** Do this before any decoding. */ |
| @@ -31819,27 +31818,10 @@ | |
| 31819 | } |
| 31820 | } |
| 31821 | assert( !pPager->journalOpen || pPager->journalOff>0 || rc!=SQLITE_OK ); |
| 31822 | return rc; |
| 31823 | } |
| 31824 | |
| 31825 | /* |
| 31826 | ** Make a page dirty. Set its dirty flag and add it to the dirty |
| 31827 | ** page list. |
| 31828 | */ |
| 31829 | static void makeDirty(PgHdr *pPg){ |
| 31830 | sqlite3PcacheMakeDirty(pPg); |
| 31831 | } |
| 31832 | |
| 31833 | /* |
| 31834 | ** Make a page clean. Clear its dirty bit and remove it from the |
| 31835 | ** dirty page list. |
| 31836 | */ |
| 31837 | static void makeClean(PgHdr *pPg){ |
| 31838 | sqlite3PcacheMakeClean(pPg); |
| 31839 | } |
| 31840 | |
| 31841 | |
| 31842 | /* |
| 31843 | ** Mark a data page as writeable. The page is written into the journal |
| 31844 | ** if it is not there already. This routine must be called before making |
| 31845 | ** changes to a page. |
| @@ -31888,11 +31870,11 @@ | |
| 31888 | } |
| 31889 | |
| 31890 | /* Mark the page as dirty. If the page has already been written |
| 31891 | ** to the journal then we can return right away. |
| 31892 | */ |
| 31893 | makeDirty(pPg); |
| 31894 | if( pageInJournal(pPg) && (pageInStatement(pPg) || pPager->stmtInUse==0) ){ |
| 31895 | pPager->dirtyCache = 1; |
| 31896 | pPager->dbModified = 1; |
| 31897 | }else{ |
| 31898 | |
| @@ -32795,11 +32777,11 @@ | |
| 32795 | ** the journal needs to be sync()ed before database page pPg->pgno |
| 32796 | ** can be written to. The caller has already promised not to write to it. |
| 32797 | */ |
| 32798 | if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){ |
| 32799 | needSyncPgno = pPg->pgno; |
| 32800 | assert( pageInJournal(pPg) || pgno>pPager->origDbSize ); |
| 32801 | assert( pPg->flags&PGHDR_DIRTY ); |
| 32802 | assert( pPager->needSync ); |
| 32803 | } |
| 32804 | |
| 32805 | /* If the cache contains a page with page-number pgno, remove it |
| @@ -32817,11 +32799,11 @@ | |
| 32817 | sqlite3PcacheMove(pPg, pgno); |
| 32818 | if( pPgOld ){ |
| 32819 | sqlite3PcacheDrop(pPgOld); |
| 32820 | } |
| 32821 | |
| 32822 | makeDirty(pPg); |
| 32823 | pPager->dirtyCache = 1; |
| 32824 | pPager->dbModified = 1; |
| 32825 | |
| 32826 | if( needSyncPgno ){ |
| 32827 | /* If needSyncPgno is non-zero, then the journal file needs to be |
| @@ -32852,11 +32834,11 @@ | |
| 32852 | return rc; |
| 32853 | } |
| 32854 | pPager->needSync = 1; |
| 32855 | assert( pPager->noSync==0 && !MEMDB ); |
| 32856 | pPgHdr->flags |= PGHDR_NEED_SYNC; |
| 32857 | makeDirty(pPgHdr); |
| 32858 | sqlite3PagerUnref(pPgHdr); |
| 32859 | } |
| 32860 | |
| 32861 | return SQLITE_OK; |
| 32862 | } |
| @@ -33911,11 +33893,11 @@ | |
| 33911 | ** May you do good and not evil. |
| 33912 | ** May you find forgiveness for yourself and forgive others. |
| 33913 | ** May you share freely, never taking more than you give. |
| 33914 | ** |
| 33915 | ************************************************************************* |
| 33916 | ** $Id: btree.c,v 1.539.2.1 2008/11/22 14:07:49 drh Exp $ |
| 33917 | ** |
| 33918 | ** This file implements a external (disk-based) database using BTrees. |
| 33919 | ** See the header comment on "btreeInt.h" for additional information. |
| 33920 | ** Including a description of file format and an overview of operation. |
| 33921 | */ |
| @@ -36828,10 +36810,11 @@ | |
| 36828 | pTempCur->pNext = 0; |
| 36829 | pTempCur->pPrev = 0; |
| 36830 | for(i=0; i<=pTempCur->iPage; i++){ |
| 36831 | sqlite3PagerRef(pTempCur->apPage[i]->pDbPage); |
| 36832 | } |
| 36833 | } |
| 36834 | |
| 36835 | /* |
| 36836 | ** Delete a temporary cursor such as was made by the CreateTemporaryCursor() |
| 36837 | ** function above. |
| @@ -36840,10 +36823,11 @@ | |
| 36840 | int i; |
| 36841 | assert( cursorHoldsMutex(pCur) ); |
| 36842 | for(i=0; i<=pCur->iPage; i++){ |
| 36843 | sqlite3PagerUnref(pCur->apPage[i]->pDbPage); |
| 36844 | } |
| 36845 | } |
| 36846 | |
| 36847 | /* |
| 36848 | ** Make sure the BtCursor* given in the argument has a valid |
| 36849 | ** BtCursor.info structure. If it is not already valid, call |
| @@ -39959,10 +39943,13 @@ | |
| 39959 | pLeafPage = leafCur.apPage[leafCur.iPage]; |
| 39960 | assert( pLeafPage->pgno==leafPgno ); |
| 39961 | assert( leafCur.aiIdx[leafCur.iPage]==0 ); |
| 39962 | } |
| 39963 | |
| 39964 | if( rc==SQLITE_OK ){ |
| 39965 | dropCell(pLeafPage, 0, szNext); |
| 39966 | VVA_ONLY( leafCur.pagesShuffled = 0 ); |
| 39967 | rc = balance(&leafCur, 0); |
| 39968 | assert( leafCursorInvalid || !leafCur.pagesShuffled |
| 39969 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.6.6.2. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a one translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% are more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -15,11 +15,11 @@ | |
| 15 | ** needed if you want a wrapper to interface SQLite with your choice of |
| 16 | ** programming language. The code for the "sqlite3" command-line shell |
| 17 | ** is also in a separate file. This file contains only code for the core |
| 18 | ** SQLite library. |
| 19 | ** |
| 20 | ** This amalgamation was generated on 2008-11-27 02:28:55 UTC. |
| 21 | */ |
| 22 | #define SQLITE_CORE 1 |
| 23 | #define SQLITE_AMALGAMATION 1 |
| 24 | #ifndef SQLITE_PRIVATE |
| 25 | # define SQLITE_PRIVATE static |
| @@ -562,11 +562,11 @@ | |
| 562 | ** |
| 563 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 564 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 565 | ** are the major version, minor version, and release number. |
| 566 | */ |
| 567 | #define SQLITE_VERSION "3.6.6.2" |
| 568 | #define SQLITE_VERSION_NUMBER 3006006 |
| 569 | |
| 570 | /* |
| 571 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 572 | ** KEYWORDS: sqlite3_version |
| @@ -28745,11 +28745,11 @@ | |
| 28745 | ** is separate from the database file. The pager also implements file |
| 28746 | ** locking to prevent two processes from writing the same database |
| 28747 | ** file simultaneously, or one process from reading the database while |
| 28748 | ** another is writing. |
| 28749 | ** |
| 28750 | ** @(#) $Id: pager.c,v 1.506.2.1 2008/11/26 14:55:02 drh Exp $ |
| 28751 | */ |
| 28752 | #ifndef SQLITE_OMIT_DISKIO |
| 28753 | |
| 28754 | /* |
| 28755 | ** Macros for troubleshooting. Normally turned off |
| @@ -29787,13 +29787,10 @@ | |
| 29787 | i -= 200; |
| 29788 | } |
| 29789 | return cksum; |
| 29790 | } |
| 29791 | |
| 29792 | /* |
| 29793 | ** Read a single page from the journal file opened on file descriptor |
| 29794 | ** jfd. Playback this one page. |
| 29795 | ** |
| 29796 | ** The isMainJrnl flag is true if this is the main rollback journal and |
| @@ -29899,11 +29896,13 @@ | |
| 29896 | pData = pPg->pData; |
| 29897 | memcpy(pData, aData, pPager->pageSize); |
| 29898 | if( pPager->xReiniter ){ |
| 29899 | pPager->xReiniter(pPg); |
| 29900 | } |
| 29901 | if( isMainJrnl ){ |
| 29902 | sqlite3PcacheMakeClean(pPg); |
| 29903 | } |
| 29904 | #ifdef SQLITE_CHECK_PAGES |
| 29905 | pPg->pageHash = pager_pagehash(pPg); |
| 29906 | #endif |
| 29907 | /* If this was page 1, then restore the value of Pager.dbFileVers. |
| 29908 | ** Do this before any decoding. */ |
| @@ -31819,27 +31818,10 @@ | |
| 31818 | } |
| 31819 | } |
| 31820 | assert( !pPager->journalOpen || pPager->journalOff>0 || rc!=SQLITE_OK ); |
| 31821 | return rc; |
| 31822 | } |
| 31823 | |
| 31824 | /* |
| 31825 | ** Mark a data page as writeable. The page is written into the journal |
| 31826 | ** if it is not there already. This routine must be called before making |
| 31827 | ** changes to a page. |
| @@ -31888,11 +31870,11 @@ | |
| 31870 | } |
| 31871 | |
| 31872 | /* Mark the page as dirty. If the page has already been written |
| 31873 | ** to the journal then we can return right away. |
| 31874 | */ |
| 31875 | sqlite3PcacheMakeDirty(pPg); |
| 31876 | if( pageInJournal(pPg) && (pageInStatement(pPg) || pPager->stmtInUse==0) ){ |
| 31877 | pPager->dirtyCache = 1; |
| 31878 | pPager->dbModified = 1; |
| 31879 | }else{ |
| 31880 | |
| @@ -32795,11 +32777,11 @@ | |
| 32777 | ** the journal needs to be sync()ed before database page pPg->pgno |
| 32778 | ** can be written to. The caller has already promised not to write to it. |
| 32779 | */ |
| 32780 | if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){ |
| 32781 | needSyncPgno = pPg->pgno; |
| 32782 | assert( pageInJournal(pPg) || pPg->pgno>pPager->origDbSize ); |
| 32783 | assert( pPg->flags&PGHDR_DIRTY ); |
| 32784 | assert( pPager->needSync ); |
| 32785 | } |
| 32786 | |
| 32787 | /* If the cache contains a page with page-number pgno, remove it |
| @@ -32817,11 +32799,11 @@ | |
| 32799 | sqlite3PcacheMove(pPg, pgno); |
| 32800 | if( pPgOld ){ |
| 32801 | sqlite3PcacheDrop(pPgOld); |
| 32802 | } |
| 32803 | |
| 32804 | sqlite3PcacheMakeDirty(pPg); |
| 32805 | pPager->dirtyCache = 1; |
| 32806 | pPager->dbModified = 1; |
| 32807 | |
| 32808 | if( needSyncPgno ){ |
| 32809 | /* If needSyncPgno is non-zero, then the journal file needs to be |
| @@ -32852,11 +32834,11 @@ | |
| 32834 | return rc; |
| 32835 | } |
| 32836 | pPager->needSync = 1; |
| 32837 | assert( pPager->noSync==0 && !MEMDB ); |
| 32838 | pPgHdr->flags |= PGHDR_NEED_SYNC; |
| 32839 | sqlite3PcacheMakeDirty(pPgHdr); |
| 32840 | sqlite3PagerUnref(pPgHdr); |
| 32841 | } |
| 32842 | |
| 32843 | return SQLITE_OK; |
| 32844 | } |
| @@ -33911,11 +33893,11 @@ | |
| 33893 | ** May you do good and not evil. |
| 33894 | ** May you find forgiveness for yourself and forgive others. |
| 33895 | ** May you share freely, never taking more than you give. |
| 33896 | ** |
| 33897 | ************************************************************************* |
| 33898 | ** $Id: btree.c,v 1.539.2.2 2008/11/26 14:55:02 drh Exp $ |
| 33899 | ** |
| 33900 | ** This file implements a external (disk-based) database using BTrees. |
| 33901 | ** See the header comment on "btreeInt.h" for additional information. |
| 33902 | ** Including a description of file format and an overview of operation. |
| 33903 | */ |
| @@ -36828,10 +36810,11 @@ | |
| 36810 | pTempCur->pNext = 0; |
| 36811 | pTempCur->pPrev = 0; |
| 36812 | for(i=0; i<=pTempCur->iPage; i++){ |
| 36813 | sqlite3PagerRef(pTempCur->apPage[i]->pDbPage); |
| 36814 | } |
| 36815 | assert( pTempCur->pKey==0 ); |
| 36816 | } |
| 36817 | |
| 36818 | /* |
| 36819 | ** Delete a temporary cursor such as was made by the CreateTemporaryCursor() |
| 36820 | ** function above. |
| @@ -36840,10 +36823,11 @@ | |
| 36823 | int i; |
| 36824 | assert( cursorHoldsMutex(pCur) ); |
| 36825 | for(i=0; i<=pCur->iPage; i++){ |
| 36826 | sqlite3PagerUnref(pCur->apPage[i]->pDbPage); |
| 36827 | } |
| 36828 | sqlite3_free(pCur->pKey); |
| 36829 | } |
| 36830 | |
| 36831 | /* |
| 36832 | ** Make sure the BtCursor* given in the argument has a valid |
| 36833 | ** BtCursor.info structure. If it is not already valid, call |
| @@ -39959,10 +39943,13 @@ | |
| 39943 | pLeafPage = leafCur.apPage[leafCur.iPage]; |
| 39944 | assert( pLeafPage->pgno==leafPgno ); |
| 39945 | assert( leafCur.aiIdx[leafCur.iPage]==0 ); |
| 39946 | } |
| 39947 | |
| 39948 | if( rc==SQLITE_OK ){ |
| 39949 | rc = sqlite3PagerWrite(pLeafPage->pDbPage); |
| 39950 | } |
| 39951 | if( rc==SQLITE_OK ){ |
| 39952 | dropCell(pLeafPage, 0, szNext); |
| 39953 | VVA_ONLY( leafCur.pagesShuffled = 0 ); |
| 39954 | rc = balance(&leafCur, 0); |
| 39955 | assert( leafCursorInvalid || !leafCur.pagesShuffled |
| 39956 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -105,11 +105,11 @@ | ||
| 105 | 105 | ** |
| 106 | 106 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 107 | 107 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 108 | 108 | ** are the major version, minor version, and release number. |
| 109 | 109 | */ |
| 110 | -#define SQLITE_VERSION "3.6.6.1" | |
| 110 | +#define SQLITE_VERSION "3.6.6.2" | |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3006006 |
| 112 | 112 | |
| 113 | 113 | /* |
| 114 | 114 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 115 | 115 | ** KEYWORDS: sqlite3_version |
| 116 | 116 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,11 +105,11 @@ | |
| 105 | ** |
| 106 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 107 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 108 | ** are the major version, minor version, and release number. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.6.6.1" |
| 111 | #define SQLITE_VERSION_NUMBER 3006006 |
| 112 | |
| 113 | /* |
| 114 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 115 | ** KEYWORDS: sqlite3_version |
| 116 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,11 +105,11 @@ | |
| 105 | ** |
| 106 | ** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer |
| 107 | ** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z |
| 108 | ** are the major version, minor version, and release number. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.6.6.2" |
| 111 | #define SQLITE_VERSION_NUMBER 3006006 |
| 112 | |
| 113 | /* |
| 114 | ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100> |
| 115 | ** KEYWORDS: sqlite3_version |
| 116 |