From: drh Date: Tue, 1 Sep 2015 17:48:54 +0000 (+0000) Subject: Fixes so that it builds without warnings both with and without X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3f531da5648e7f774d44562cfb855f0322423004;p=thirdparty%2Fsqlite.git Fixes so that it builds without warnings both with and without SQLITE_ENABLE_CONCURRENT. FossilOrigin-Name: 5ed2a445a164f0f0c2669c6681ea76618e639961 --- diff --git a/manifest b/manifest index 98f9a5d524..9d924de776 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\slatest\strunk\schanges\swith\sthis\sbranch. -D 2015-08-28T09:27:51.910 +C Fixes\sso\sthat\sit\sbuilds\swithout\swarnings\sboth\swith\sand\swithout\nSQLITE_ENABLE_CONCURRENT. +D 2015-09-01T17:48:54.487 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in e2218eb228374422969de7b1680eda6864affcef F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -279,7 +279,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240 F src/backup.c 4d9134dc988a87838c06056c89c0e8c4700a0452 F src/bitvec.c d1f21d7d91690747881f03940584f4cc548c9d3d F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 -F src/btree.c 88ff0f5bdcd200e4b8cdc2f49a89369112a592d7 +F src/btree.c ca6c7e4bbbf91b6c91d0278942b917e81d3fc18d F src/btree.h 00d4cdb747c4172a5566faf037116985dbbc377e F src/btreeInt.h 171864bcd81635583dab7b8a04b19b454b18ef80 F src/build.c bb9335e06a6f308c595e0507ce97daf791735a6e @@ -324,8 +324,8 @@ F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa F src/os_unix.c 388c023582b17890f10c980b30ec1922b471753b F src/os_win.c 40b3af7a47eb1107d0d69e592bec345a3b7b798a F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca -F src/pager.c 4343baff2f7e35f11988deb9c213870432ded1b1 -F src/pager.h f00930ca3bfc0f3298b08a69ed7b920e89b531de +F src/pager.c 284edd20ae51f1f52a539685ce42c7a1e61ac716 +F src/pager.h 174fd2cd7091c87418616c62582a5c00cb8da2ac F src/parse.y 1e645cacb93979c59f2a510ee2c100e769bd5e3c F src/pcache.c cde06aa50962595e412d497e22fd2e07878ba1f0 F src/pcache.h 9968603796240cdf83da7e7bef76edf90619cea9 @@ -411,8 +411,8 @@ F src/vdbesort.c f5009e7a35e3065635d8918b9a31f498a499976b F src/vdbetrace.c 8befe829faff6d9e6f6e4dee5a7d3f85cc85f1a0 F src/vtab.c d31174e4c8f592febab3fa7f69e18320b4fd657a F src/vxworks.h c18586c8edc1bddbc15c004fa16aeb1e1342b4fb -F src/wal.c 44ec009f7742a660d3558845e47e870af4542689 -F src/wal.h 903ef67e17f8b466dc7cfc4186fc23e80be10ff8 +F src/wal.c d632ee33340554888a7848a253a580167a031cdb +F src/wal.h ec78c303882bc04b3d0b86f0ddbc87309401595a F src/walker.c 2e14d17f592d176b6dc879c33fbdec4fbccaa2ba F src/where.c 91e73ffc699c140a59baa03a6b7b060db02bed81 F src/whereInt.h 901c17c1e3c82745ad9b85b4471543fa59c980e9 @@ -1383,7 +1383,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 437c7e219d3240767a28f73487bc26c3be3044b3 64abb65d4df11e5b3bcc4afc8e7c18e907c6080a -R d1f878aab8d7c75cbf15e5d6b4c78c00 -U dan -Z 64a6a9bedfd1c579ad90113faf74b29f +P 57bc0194f41dbcd2c343e665e7af475cd4dd7328 +R 3e87a7400b2863c0ecf368784d9e77cc +U drh +Z 6775a99654ddab524e15a28b9025b05e diff --git a/manifest.uuid b/manifest.uuid index dabc379273..407c9dbaa4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -57bc0194f41dbcd2c343e665e7af475cd4dd7328 \ No newline at end of file +5ed2a445a164f0f0c2669c6681ea76618e639961 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 9986c95325..d2b6cdd4ab 100644 --- a/src/btree.c +++ b/src/btree.c @@ -4009,7 +4009,9 @@ static int btreeFixUnlocked(Btree *p){ return rc; } -#endif +#else +# define btreeFixUnlocked(X) SQLITE_OK +#endif /* ENABLE_CONCURRENT */ /* ** This routine does the first phase of a two-phase commit. This routine diff --git a/src/pager.c b/src/pager.c index 2b20603379..5b1788ef4f 100644 --- a/src/pager.c +++ b/src/pager.c @@ -906,7 +906,9 @@ static int assert_pager_state(Pager *p){ if( !pagerUseWal(pPager) ){ assert( p->eLock>=RESERVED_LOCK ); } +#ifdef SQLITE_ENABLE_CONCURRENT assert( pPager->dbSize==pPager->dbOrigSize || pPager->pAllRead ); +#endif assert( pPager->dbOrigSize==pPager->dbFileSize ); assert( pPager->dbOrigSize==pPager->dbHintSize ); assert( pPager->setMaster==0 ); diff --git a/src/pager.h b/src/pager.h index 1df91bbca0..538a611cf9 100644 --- a/src/pager.h +++ b/src/pager.h @@ -200,6 +200,7 @@ int sqlite3PagerBeginConcurrent(Pager*); void sqlite3PagerDropExclusiveLock(Pager*); int sqlite3PagerUpgradeSnapshot(Pager *pPager, DbPage*); void sqlite3PagerSetDbsize(Pager *pPager, Pgno); +int sqlite3PagerIsWal(Pager*); #else # define sqlite3PagerEndConcurrent(x) #endif diff --git a/src/wal.c b/src/wal.c index 445d084628..fbc92238bb 100644 --- a/src/wal.c +++ b/src/wal.c @@ -2489,7 +2489,7 @@ int sqlite3WalFindFrame( #endif *piRead = iRead; - return SQLITE_OK; + return rc; } /* diff --git a/src/wal.h b/src/wal.h index 35ffe4d38c..4d9e1b0816 100644 --- a/src/wal.h +++ b/src/wal.h @@ -126,8 +126,14 @@ int sqlite3WalExclusiveMode(Wal *pWal, int op); */ int sqlite3WalHeapMemory(Wal *pWal); +#ifdef SQLITE_ENABLE_CONCURRENT +/* Tell the wal layer that we want to commit a concurrent transaction */ int sqlite3WalLockForCommit(Wal *pWal, PgHdr *pPg, Bitvec *pRead); + +/* Upgrade the state of the client to take into account changes written +** by other connections */ int sqlite3WalUpgradeSnapshot(Wal *pWal); +#endif #ifdef SQLITE_ENABLE_ZIPVFS /* If the WAL file is not empty, return the number of bytes of content