Compare commits

...

361 Commits

Author SHA1 Message Date
drh 154e36ab54 Merge recent trunk changes into the apple-osx branch.
FossilOrigin-Name: d6fda470fe3e2932ab3065211413cc7e9f035635d9cfa23eeeff81463dcc17eb
2020-04-09 18:51:29 +00:00
drh dbbb9343eb Fix a problem in sqlite3CodecQueryParameters() that was introduced by the
query parameter encoding changes for the 3.31.1 release.

FossilOrigin-Name: 1240ee4f6f612080d1805be6bc96c26e84d3420b5158a966d2eb2e518c249e8f
2020-02-01 14:29:18 +00:00
numist 3408cf8d0e Merge version 3.31.1
FossilOrigin-Name: d250d085fa4bd6509ab074d15f1c11fcc15d0cc150e5e429b191eb5a92e0ac1e
2020-02-01 00:08:28 +00:00
drh 961efab0ef Merge version 3.31.0
FossilOrigin-Name: 0eae87ad11107f420b00958fa5a9b8037b775f0586e9fb1e2d5f6c04d7ae4afc
2020-01-22 20:36:33 +00:00
drh 2f263a1fce Merge all recent enhancements and fixes from trunk into the apple-osx branch.
FossilOrigin-Name: dadedf41c7cced0cea5c69584ff11405c2fc53518c7ddbea2e4e51cc44b4cd0a
2020-01-15 12:49:49 +00:00
drh abbc53b5b0 Do not allow shadow tables to be dropped in defensive mode.
FossilOrigin-Name: 0a988ce3405f2fdfe8d80db2893bf675a41ba6ef5c6e29f6a80cfc307d83bfab
2019-11-16 18:36:12 +00:00
drh 701e374353 Modify three test cases so that they work even with unusual versions of the
library printf().

FossilOrigin-Name: c25289075a6898ad0b6b7a2e9a50fb25527aaa11c436e9b9a0a0c224b6b2716a
2019-11-16 18:30:37 +00:00
drh ca113937cd Merge the version 3.30.1 changes into the apple-osx branch.
FossilOrigin-Name: 2c8af3520632b1a072df47420ee388c4746b2544835ee2a9d13d26e2f368dd90
2019-11-15 02:52:22 +00:00
drh 25e9591209 Version 3.30.1
FossilOrigin-Name: 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b
2019-10-10 20:19:45 +00:00
drh 6e90771db2 Avoid assuming that an expression that contains the sub-expression (? IS FALSE) or (? IS TRUE) may only be true if ? is non-null. Fix for [a976c487].
FossilOrigin-Name: c6cc2390e91097a32992d11c74af8e77a6a42862ec8a936b549e156250629407
2019-10-10 16:21:57 +00:00
drh 95d398eb12 Fix a problem with running ALTER TABLE ADD COLUMN statements within a transaction that writes to one or more virtual tables. Fix for [8fe768e9].
FossilOrigin-Name: a4974a0f957648afe93a1a2128d32188082e7df69fb65ac7f8f436098dcc69d1
2019-10-10 16:10:32 +00:00
drh 1a41ff05da Fix the OP_SeekRowid opcode so that it works correctly with a Real argument
without damaging the value in the register that is the argument.
Ticket [b2d4edaffdc156cc].  Test cases in TH3.

FossilOrigin-Name: b02630fe6ef666abaf07bffcae8696ce2c0047b2efef3f7d95622dd6df555ea6
2019-10-10 15:57:44 +00:00
drh 2281a15191 Be sure to rewrite column references inside FILTER clauses and window frame definitions when flattening queries. Fix for [1079ad19].
FossilOrigin-Name: df2060f34fcb2a38c016df92079df5b64017fa31c97b2eef51eab7a9b5b940bf
2019-10-10 15:48:16 +00:00
drh e9c3e3f788 Version number to 3.30.1.
FossilOrigin-Name: 12e28cc7d92036fee7cfef29247f15fc5c7b49858cbe9044e983713f0de3dfc6
2019-10-10 15:42:57 +00:00
drh e1cd8cc207 Bring the apple-osx branch up-to-date with the 3.30.0 release.
FossilOrigin-Name: 76b26acaba3a4169b358079fdd95526505902ee003d2505fdea111120d48169b
2019-10-04 15:41:17 +00:00
drh 381214dd2d Merge the 3.30.0 beta 1 changes from trunk.
FossilOrigin-Name: 9ce4c79171fd92b6d9c7accdfa11966529e96437cf044a2bbbf6f2738ce4be91
2019-09-30 16:13:32 +00:00
drh 4f2d5f0bf2 Merge the latest changes from trunk into the apple-osx branch.
FossilOrigin-Name: a95191deab88cb8a56060d785a5245dccc191564e8d3f7529988f82f8387d516
2019-09-16 12:02:51 +00:00
drh b03c95662d Merge the 3.29.0 release into the apple-osx branch.
FossilOrigin-Name: 87aa1d7051438a941c83967cfe35cb71df2cf2a2045ecfe43ce3bdb817774619
2019-07-10 17:58:29 +00:00
drh 12cd678adf Merge recent enhancements from trunk into apple-osx.
FossilOrigin-Name: de88ed862e95d89b2887d106761d507afc35dbd787785fd5af539d33c9b17812
2019-07-08 20:59:23 +00:00
drh 370605e117 Merge recent enhancements from trunk into apple-osx.
FossilOrigin-Name: 40362d5181c8cd0167628a414573d4e23c5a7cc211f8ecddb747cb0966a1d579
2019-05-14 19:39:42 +00:00
drh a8df3bd604 Bring in the latest enhancements from trunk.
FossilOrigin-Name: 378230ae7f4b721c8b8d83c8ceb891449685cd23b1702a57841f1be40b5db63e
2019-04-15 14:49:49 +00:00
drh 0f8d2b3cb0 Merge all the latest changes and enhancements from trunk.
FossilOrigin-Name: 521d5186b8258794b21aa63f81883475846cb7d26b3a1ae3c7c47cbb9602b426
2019-04-04 21:40:51 +00:00
drh 431aa43bec Merge fixes from trunk.
FossilOrigin-Name: 20372906cb236fde1cad0779217db408682a1f787d43ec7d2d3a5cc7d9f91ea3
2019-04-02 01:00:48 +00:00
drh 0e3e65a895 Merge enhancements from trunk.
FossilOrigin-Name: 0b35aebbb316fb2849c3a6bb93ffa6300187d1dccbb162bdd00fde53eb61356e
2019-04-02 00:34:14 +00:00
drh 09201ce1c9 Merge recent enhancements from trunk.
FossilOrigin-Name: dc3c0b8b2815c0658bc4ca7c045102d627229dedf098801a554c06eb6dbe97b2
2019-03-26 12:37:09 +00:00
drh cd11c202e8 Merge recent enhancements from trunk.
FossilOrigin-Name: 000f4398db2753e2d6432735421e43b296cd4f9da8b9b51324e75eaa6616189c
2019-03-19 20:48:10 +00:00
drh 22587cfd9e Merge recent changes from trunk.
FossilOrigin-Name: f270245a7b7b7d21a5f8d2a07eef0e5a56d15fb0c69024c666b047c3f3eb0eb9
2019-03-01 21:37:52 +00:00
drh 7b4d1ee233 Merge the latest enhancements from trunk.
FossilOrigin-Name: e64ded7b0478e96645ac7d8f36494244c972f85b12bb98b9db2655f142d1dc45
2019-03-01 18:27:38 +00:00
drh 742e345999 Merge the latest performance enhancements and fixes from trunk.
FossilOrigin-Name: be71d1e24c9cbfbfa60df8159571929d85b1f281e32e6230b044c952eae91a92
2019-02-20 13:23:13 +00:00
drh f253b08749 Merge the fix for ticket [4e8e4857d32d401f], so that this branch now contains
release 3.27.1 plus the extra patch to preserve ROWID values on VACUUM.

FossilOrigin-Name: 0cdae60ed7920f29e4a092c07d0aab7a33db16e7d308fb5b0becb6bbe57e49ff
2019-02-08 14:59:03 +00:00
drh a8adc14437 Pull in the change that causes VACUUM to preserve rowid values.
FossilOrigin-Name: c9af2f71bf1bc92a006d9053b0107a529b45e5a0b7f6e442a8e4db96678b53ac
2019-02-07 19:28:27 +00:00
drh f7ecc79c61 Merge the offical 3.27.0 release.
FossilOrigin-Name: 628291641f6a9a825b2d7344036813cd50452a2b970d2cd035a3323275a9dab1
2019-02-07 18:49:41 +00:00
drh 17328dc085 Merge enhancements from trunk.
FossilOrigin-Name: 31efcc3775608efd7509e7178abf65b180cfb44d9166b39d13d066c75ed6eb5a
2019-01-29 19:17:47 +00:00
drh 560d69f981 Sync up with the latest enhancements on trunk.
FossilOrigin-Name: 475a179a276df37262435b5c5dcb6ab890ef086e218ebc2dd9157e5a4550f2f0
2019-01-17 15:47:01 +00:00
drh 8fddec430b Merge enhancements from trunk.
FossilOrigin-Name: b1bbc718c757026dcd3766a7f817124d2c04776d330bcd9ff9eedf08a1e8c270
2018-12-10 02:00:36 +00:00
drh 7dac193897 Merge enhancements and the ALTER TABLE bug fix from trunk.
FossilOrigin-Name: edfc2acfcd161d962996e2b4c74c6c6e6db1473d9e98ae8f533e26583d346248
2018-12-05 18:28:17 +00:00
drh 314810802e Merge the pre-3.26.0 fixes from trunk.
FossilOrigin-Name: 2c76ce4f42c486c7c2ead64a602ae02eaefcb1438ed1d401221a2e0ff6c9cf23
2018-11-30 18:22:49 +00:00
drh ea9672e1db Merge recent enhancements from trunk.
FossilOrigin-Name: e8c20a88c14d496fc79dddcac5db0a47aa037598b3b65a07e4422f7df75cce2c
2018-11-26 23:35:13 +00:00
drh fbec671aa0 Merge the read-only shadow table and defensive mode enhancments from trunk.
FossilOrigin-Name: 977fc44e65f831d4c6184073f44708567081f358904dd76e8df5a82a17977469
2018-11-10 20:07:51 +00:00
drh 5e7f6800ac Merge fixes from trunk.
FossilOrigin-Name: e3e9b85eadd6f1b40998ada906eaddba0001df02357f24e6766ecfcec14c9d85
2018-11-09 23:45:56 +00:00
drh 65e5551f8c Merge recent trunk enhancements.
FossilOrigin-Name: 62acf7a09e5ef4adbd64fb3f6cfa1eb440f12b6f8c2d81a077e2941e5128981a
2018-11-05 13:53:46 +00:00
drh 1713a4ee7f Merge fixes from trunk, especially rebustness against corrupt
database files.

FossilOrigin-Name: 4b370c74ae0f25157c161592588eb3357513d139c5a0d2fee3e0f988add1d9fc
2018-10-31 01:26:24 +00:00
drh e95c2a145e Merge bug fixes from trunk.
FossilOrigin-Name: 1e973f65e8340a34eef9b9c4e064f69fc9c3995bd15e5c25777ab803160b73b4
2018-10-25 16:58:27 +00:00
drh 75c13ed1f5 Fix the SQLITE_ENABLE_APPLE_SPI compile-time option.
FossilOrigin-Name: 6cb537bdce85e08810ac952b753ecd97b656cc0885cfda443b810b9242bf9c79
2018-10-12 22:02:27 +00:00
drh 6b2d6f8353 Fix issues with the new textkey pragma from the previous check-in.
FossilOrigin-Name: d1008b07280b51354dfcdebbb5b0c68e276d1ac206df46edbade0838dc27b273
2018-10-11 18:45:16 +00:00
drh b497cf52c3 Add the textkey and textrekey pragmas.
FossilOrigin-Name: f829099d2558011d2f19ed3e91778b97e4ce0bdaa4a7cd6b0009f705554398ca
2018-10-11 18:28:08 +00:00
drh 800b601f74 Merge compiler warning fixes and the codec enhancement from trunk.
FossilOrigin-Name: f9fa58e1d115546dffec48190beb1cde2c127f35f062baa0f2f1b5dac4925e9e
2018-10-11 17:05:27 +00:00
drh f4b7f7c887 Fix a merge problem in main.mk
FossilOrigin-Name: 9a54935917e6e2a5f4b2537f48b7da4bc4efd6167b1ab39e6a56cb89002e9d2d
2018-10-11 16:28:44 +00:00
drh 4e2118c496 Remove surplus code in geopoly.c that seems to have come from a bad merge.
FossilOrigin-Name: c486a63c33fd2e05d20c689c6557f597e1215488230ef2dc5c2dc766faa7eaf9
2018-10-11 14:07:38 +00:00
drh c3e94ed54a Merge enhancements from trunk.
FossilOrigin-Name: 9e10d88bcb06d561fac085e9a881a55f7c3c56c0b483f3b4027667c9264d85e9
2018-10-11 13:57:56 +00:00
drh cb1d3cbbd3 Fix the build for Macs.
FossilOrigin-Name: 6a1d937d66851ae5f781371def6bedccf90a726e588ab811913a9dca170bc409
2018-10-10 01:01:25 +00:00
drh 0e26ef6e36 Merge enhancements from trunk.
FossilOrigin-Name: 1b60e7a981add8e8b328d20cdf368257d91ed2c97bd21448e04238dc7934fd96
2018-10-09 22:58:07 +00:00
drh 93569b5ca3 Merge changes for the 3.25.0 release.
FossilOrigin-Name: ddf6a54ef3838e6f78d132da96a330efd541fe5401e1f849f36925f01bc28d45
2018-10-09 22:50:26 +00:00
drh 55cb77270b Merge changes from trunk.
FossilOrigin-Name: 95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cb0839
2018-06-04 14:10:15 +00:00
drh e7106be82c Merge changes from trunk, especially the activation of the cell-overwrite
optimization for indexes and WITHOUT ROWID tables.

FossilOrigin-Name: a016144b0e0c41b89157ea7349aad376f34888edf9558f8fd0d529516c5d18fd
2018-05-08 13:32:02 +00:00
drh 08964c4dec Merge enhancements from trunk, and especially the cell-overwrite
optimization.

FossilOrigin-Name: cb3aa77802d45e9515e9c631af86f492fcd962c3302c79ba6f69213745fb0bb5
2018-05-07 13:01:46 +00:00
drh 02a6eb2ebc Bring the code that changes the owner of WAL and rollback files when running
as root into alignment with trunk.

FossilOrigin-Name: 180516bf7bd5a61c11b1eef2c8c13ac63c7b00f821bb89393fc68d39852202de
2018-05-04 20:00:13 +00:00
drh 01b37173f7 Merge recent enhancements from trunk.
FossilOrigin-Name: e17bca2cdb5f31a802e1a1870deb6bf17e332117ab272537f26351f1145de690
2018-05-04 19:33:34 +00:00
drh f60f004961 Merge all version 3.23.1 changes and enhancements from trunk.
FossilOrigin-Name: e20fcb5159f2a74ea60ac6a0287165d114fc71d7510a6d9068962f239dde619f
2018-04-10 18:05:07 +00:00
drh ff98097280 Merge the latest enhancements from trunk.
FossilOrigin-Name: a658f80c8f3babb6f992f3c5a5b2f87d995239fb24a00f258bd615d39bfda0fa
2018-03-14 17:17:43 +00:00
drh 56d4b9f7eb Merge all version-3.22.0 changes.
FossilOrigin-Name: 27e20d699872b2b84575ca63864163e4ae8b65ecfc33f042dbecde323ccff7c2
2018-01-22 19:04:37 +00:00
drh fe6f4be4dd Merge the enhancements associated with the first 3.22.0 beta.
FossilOrigin-Name: c9d2ec51c873c451b22a476b37b1b09c7f3f8c51e41144d544e7fc677ebf126b
2018-01-15 21:59:56 +00:00
dan fa12e8ffa1 Merge latest trunk changes, including the compilation fix for builds that
define both SQLITE_ENABLE_MULTITHREADED_CHECKS and SQLITE_ENABLE_API_ARMOUR.

FossilOrigin-Name: 2cb5d2a92f6ae4f5eac32cc4af4ccd8dd28b990dcf753d7b9c95811dfcc5d0b3
2017-12-05 15:00:17 +00:00
dan 58eb59420b Merge latest trunk changes, including the fixes for test file
walprotocol.test.

FossilOrigin-Name: b425b99811b331d3eb531251a1fb4c883648cb56d7e0fec8eb1870ab3b123d50
2017-11-30 07:56:43 +00:00
dan 48141a43f8 Merge the snapshots-always-lock-the-wal-file change into this branch.
FossilOrigin-Name: 3ec976e01550d7fb4fb76cc4896c13c86f66a141060f5fe59319434dc6119116
2017-11-28 13:48:42 +00:00
dan 1f7b590a8f Merge latest trunk changes, including the SQLITE_ENABLE_MULTITHREADED_CHECKS
feature, into this branch.

FossilOrigin-Name: 1fd1034935b932e9e0a29b26931f7ccf9fb0bda916c4fa8b741bf6f48f124dda
2017-11-28 08:08:40 +00:00
dan 3041053558 Add missing entry for SQLITE_IOERR_VNODE to the switch statement in
sqlite3ErrName().

FossilOrigin-Name: e2b3e33537384633a1c160f1fc9c78d515684c942c2446eb339f375d10a42000
2017-11-17 20:22:11 +00:00
dan d82c89d70c Add an 'extern "C"' wrapper to sqlite3_private.h.
FossilOrigin-Name: 97ab1efe4ef2c368949d07dd77af3982523685d6ae3837befb0dd442b30190a2
2017-11-17 20:16:58 +00:00
dan 17ec759c86 Merge test script fixes from trunk into this branch.
FossilOrigin-Name: 32f5f4613985283498162f2eaaba04316ee2f9ac6ce14bf238d36ebd16d55fa0
2017-11-17 20:10:12 +00:00
dan 9c69a80d2f Merge latest changes from trunk, including the temporary db/ATTACH/master-journal fix.
FossilOrigin-Name: 162c7543654c79138b94c3f631d0e4fa6cc77360574a5bb44695bf3333a0eaa0
2017-11-17 13:23:44 +00:00
drh 6d60b7393e Merge the latest changes, and the stmtvtab1.test fix, from trunk.
FossilOrigin-Name: 85247880a68ab5b7b296a71661b4326250d6ecaa58982e7f8197da52c66dde0a
2017-11-16 19:17:45 +00:00
drh 9febfd6cb0 Fix a typo that prevented successful builds on macs.
FossilOrigin-Name: adf83060a658aadb935b9315244ce5628ba00a6b6c795e39a8f727e6cec9cbc0
2017-11-14 21:06:38 +00:00
drh 4864f3e0fb Merge the patch that enables reading a read-only WAL-mode database, without
any special query parameters, as long as the -shm and -wal files are on disk.

FossilOrigin-Name: 8c2a769c4ac331c20134eb3d0e96f6af21c8ac7529a5eaea4843cce7cf7c936a
2017-11-14 20:36:33 +00:00
drh c5baaab4c6 Merge all changes from trunk prior to the read-only WAL enhancement.
FossilOrigin-Name: 1754faefccba39900a89bad3d6ba6670a504a1f229621ce3a16eca03ae062e36
2017-11-14 20:00:51 +00:00
drh 7922183250 Merge all enhancements and fixes from the 3.21.0 release.
FossilOrigin-Name: 13be3a441dc8d856a9d372aaf695fe346727cfcaa0ed763a7b8537a5ffbb5a80
2017-10-24 19:12:33 +00:00
drh af9861af87 Merge trunk enhancements
FossilOrigin-Name: 6a0b9d9d4ed3e712bbbd3591c9b138f92b93c39e94234297aa182334bcba876f
2017-09-09 06:10:15 +00:00
drh 2019026983 Merge all the latest fixes and enhancements from trunk.
FossilOrigin-Name: e181225dc7873f6ddfc49393d76becba7040823365326558447dbc6d177ccc2e
2017-07-17 20:21:24 +00:00
drh 0ef6378073 Merge in all the latest trunk enhancements.
FossilOrigin-Name: 7f48f6ab2af071ec20204105ed703c60e9fa92602558b910d14b09cc634bed7d
2017-07-07 22:58:12 +00:00
drh 08ce79c5af Fix test cases in wal2.test due to the fact that Darwin checks to see if
the SHM file is writable before attempting to open in read/write.

FossilOrigin-Name: 6b618b18f7bac4c62d9907240f938cd8655d2b37056a6aaaf4012d62ded041d5
2017-07-07 22:39:28 +00:00
drh 0404fa55d4 Avoid even trying to open a SHM file read/write in WAL mode if we know that
the file is read-only.  This avoids scare security log messages.

FossilOrigin-Name: d9d927814019f6c562eca198aca10f407aae423ea0a9f82c789298b77be8c187
2017-07-07 20:33:36 +00:00
dan 9db600f3c7 Merge latest trunk changes with this branch.
FossilOrigin-Name: 2b0954060fe10d6de6d479287dd88890f1bef6cc1beca11bc6cdb79f72e2377b
2017-06-27 16:48:08 +00:00
drh 9519ac75c6 Merge all recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 53b14a388838439087f92282bdaa3f706e9e197a7ed93f8c73e8844cffca8126
2017-06-23 21:05:45 +00:00
drh 09a729c785 Merge the auto_vacuum bug fix and all other changes from the 3.19.3 release.
FossilOrigin-Name: 93f32dd2dd572bd601215cc431318fd4da4bb897d8cf555d35d3b1ad60c4afe3
2017-06-08 14:41:05 +00:00
drh d6396e9b16 Version 3.19.3
FossilOrigin-Name: 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b
2017-06-08 14:26:16 +00:00
drh d4d01a689d Fix an issue with OPT_FEATURE_FLAGS in configure.ac.
FossilOrigin-Name: 97b5c4a53d0af3792c5ae5ceafdb02245f841c2bd4d79bcfd0ffdf6c5ff27c9e
2017-06-08 11:32:19 +00:00
drh a096fcc73c Increase the version number to 3.19.3.
FossilOrigin-Name: 903fff53b3f02cbc011c4cd47d841f45a447746fdf3bcb01202e27c3f2b57589
2017-06-08 11:27:05 +00:00
drh 50179f91f3 Ensure pointer map entries are always added when a row that does use overflow
pages replaces one that does not in an auto-vacuum database. Fix for
[fda22108].

FossilOrigin-Name: 9478106ca963e3ae5cfe59da40301c5a0a07494d03e656b5eb10ab45e441b870
2017-06-08 11:26:13 +00:00
drh 39440626e7 Merge all fixes from the 3.19.2 release.
FossilOrigin-Name: 12964240f1e497e6f02e4a87bf3eff75c807020108c3de83977264cc66188b8d
2017-05-25 17:36:33 +00:00
drh 53d9fc4fc9 Pull in all changes from the 3.19.0 release.
FossilOrigin-Name: bbd2d0e1400984c9fabb4df015981c09ad172139ffa33db5132951d4f1f6fc96
2017-05-22 19:24:01 +00:00
drh c606f289c4 Merge recent enhancements from trunk.
FossilOrigin-Name: b55c0f14c3250cdd0b38193d9f4c4ad3da977d280d7509d0c8db8552176b2e10
2017-05-11 18:49:57 +00:00
drh d87442b4c0 Bring in all the latest enhancements from trunk.
FossilOrigin-Name: 031feebc94b0cfe1b0ae96ede1684fe54cd79c1d340b8b35cca1ef885f82dde4
2017-04-24 16:14:58 +00:00
drh 660e7677ab Merge all recent changes from trunk.
FossilOrigin-Name: c23ef5e231908450da7461233bc3f4a38ab11ff351ae0c34d91e82c61ad13b3c
2017-04-08 18:24:57 +00:00
drh 88d139d590 Merge the latest trunk changes.
FossilOrigin-Name: dd16439ea12b0384abcb0cab3768a5933dabb0cf77706c6ec9797209794b04ab
2017-04-08 00:25:38 +00:00
drh 76ea5d121e Merge all changes from the 3.18.0 release.
FossilOrigin-Name: ed28f15e052b34f6642c68711fa3ed765c396262327fd3dd9c520b346a4deb81
2017-03-30 20:26:06 +00:00
drh fe329a7370 Version 3.18.0 Release Candidate
FossilOrigin-Name: 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37
2017-03-28 18:48:43 +00:00
drh cc0f95f93a Merge all recent changes from trunk.
FossilOrigin-Name: 3d04b2cd7a68cf58ae739a5c6813562130e5c50c800c208c82769f76037f8f66
2017-03-13 18:31:14 +00:00
drh bfb2c9aedd Merge recent enhancements from trunk, including the --preserve-rowids option
to .dump and the .sha3sum commands of the CLI.

FossilOrigin-Name: 9b43917380ed60f11ebd8210bb7b9e444e1b9b0c
2017-03-08 18:37:57 +00:00
drh 99be78d34b Merge all pending 3.18 enhancements from trunk.
FossilOrigin-Name: 1650c3f468e6fc9bfed3dac469b32ae9f501f64e
2017-03-06 20:00:04 +00:00
drh ae47a1accf Merge all changes up through the 3.17.0 release.
FossilOrigin-Name: 1913a7581024719ea31b7343b2a42a4b60c1c8eb
2017-02-13 16:17:04 +00:00
drh 64b7a31a0c Version 3.17.0
FossilOrigin-Name: ada05cfa86ad7f5645450ac7a2a21c9aa6e57d2c
2017-02-13 16:02:40 +00:00
drh 86aac2020e Fix typos in using the MSVC_VERSION macro.
FossilOrigin-Name: 25ebadd096ce98fd0f9fab809969d34b958794f6
2017-02-13 11:35:38 +00:00
drh cefca47ab5 Ensure that indexed expressions with collating sequences are handled
correctly.  Fix for ticket [eb703ba7b50c1a5] backported from trunk.

FossilOrigin-Name: b2e49ae36bfd00a1d0b70a9de9d23d2e16d1c7ca
2017-02-11 15:02:23 +00:00
drh 191bc61af2 Version 3.17.0 release candidate
FossilOrigin-Name: ad867e8701a5ee17a98a5444da8be6fb1ef7247a
2017-02-10 17:38:00 +00:00
drh 91fba13a2c Merge the 3.17.0beta changes from trunk.
FossilOrigin-Name: 92dbd8753eb399f8e377ecd1f0805b606ee6fce9
2017-02-08 16:55:29 +00:00
drh b60ba6bda7 Merge recent trunk enhancements.
FossilOrigin-Name: 6c3f09028f070b2612c00466ec3f01e2098b818d
2017-02-04 15:29:05 +00:00
drh 4a570cc680 Merge all recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 0e14fe1b986abf1449d727fbe04c6a939ed209a2
2017-01-27 16:39:38 +00:00
drh 4a9cb72882 Merge the changes for version 3.16.2.
FossilOrigin-Name: c59c8880238dffd7b8a6da789aa7112fef333bd6
2017-01-06 17:01:53 +00:00
drh 10d5cc5f83 Version 3.16.2
FossilOrigin-Name: a65a62893ca8319e89e48b8a38cf8a59c69a8209
2017-01-06 16:32:41 +00:00
dan 872a0e5658 Clarify the documentation on sqlite3_column_count().
FossilOrigin-Name: 01b4cb26762f42064311445f65304388d6fdcfb5
2017-01-06 13:53:37 +00:00
dan d951e90805 Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the
number of output columns to 0 (as they are statements that return no data).

FossilOrigin-Name: 4a97ba4ee0d3295569ca01aaea7df74fd481eb3b
2017-01-06 13:52:58 +00:00
dan cd3aa28dd6 Improve handling of corrupt databases in fts5.
FossilOrigin-Name: b07269413d2d9bcc1b08327a925bc28ac1438381
2017-01-06 11:56:22 +00:00
dan 570e9f6bff Ensure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
PRAGMA statements that do not return a value in that case (e.g. page_size,
cache_size, auto_vacuum).

FossilOrigin-Name: e745da6b146db10d2073b090c6567c2953566286
2017-01-05 20:01:29 +00:00
drh ae0c1cc387 Version 3.16.2 second release candidate
FossilOrigin-Name: 285c5a54dd4f872ba98c5cd1bd3d61ae1360930f
2017-01-05 17:27:12 +00:00
dan 00334f2bbc Fix handling the case where a sub-query in a FROM clause is itself a UNION
ALL, and one side of that UNION ALL is a query on a view that includes an
ORDER BY. Fix for ticket [190c2507].

FossilOrigin-Name: ec1e85a657a6fad77102c440326cfa0c788da12d
2017-01-05 17:25:53 +00:00
drh f0dc2aa431 Version 3.16.2 release candidate
FossilOrigin-Name: 9d8ffe13bdf4d5d48f1a5f733158c59ea93d8f72
2017-01-05 15:50:26 +00:00
drh fe6f2a3ca4 Increase the version number to 3.16.2
FossilOrigin-Name: 9592cbcf351296613a340c6ff5a627ebf9e0abc0
2017-01-05 14:05:28 +00:00
drh 578a1a40bc Fix problems in trigger and foreign key handling when doing REPLACE on a
WITHOUT ROWID table that has no secondary indexes.
Fix for ticket [30027b613b4].

FossilOrigin-Name: 8a788594e2097ab5f3fe32f1d6b58caef2887d20
2017-01-05 13:56:17 +00:00
drh 0ef5f800b3 Ensure that the sqlite3_value_text() interface returns a buffer that is long
enough to hold the complete string plus the zero terminator even when the
input is a zeroblob.  Fix for a problem detected by OSS-Fuzz.

FossilOrigin-Name: ca185808ade195875918b5bad1762bcd8ec39457
2017-01-05 13:52:54 +00:00
drh ed0a24a237 Merge changes from the 3.16.1 release
FossilOrigin-Name: dcbec226ca250fb9711edee41c2fafc883707808
2017-01-03 20:20:30 +00:00
drh 756234695f Version 3.16.1
FossilOrigin-Name: 979f04392853b8053817a3eea2fc679947b437fd
2017-01-03 18:27:03 +00:00
drh 6db6a466b0 Bump the version number up to 3.16.1.
FossilOrigin-Name: a60b60d6b6ba3e3b17b7bb7d7e19ea0e6b40fa68
2017-01-03 16:03:22 +00:00
drh 7414036899 Defer size checking on row-value assignments for when the RHS is a SELECT
until after the "*" wildcards have been expanded.

FossilOrigin-Name: 5c892938a567a7b35e165819b3bff7691220ac63
2017-01-03 15:59:29 +00:00
drh 755980ace0 Fix the row-values in UPDATE statements within TRIGGER problem identified
by ticket [8c9458e7].

FossilOrigin-Name: bf984e980c14c9adc54ad010d3a7d199dd53edd6
2017-01-03 15:57:18 +00:00
drh 320edfac1b Merge recent enhancements from trunk, and especially the pragma-as-vtab
change.

FossilOrigin-Name: 4b1e780433fe72611b065962e419965c6644f430
2016-12-16 21:29:42 +00:00
drh 25f042bae8 Merge all the latest performance enhancements from trunk.
FossilOrigin-Name: a24f805b5eb22452a22b937d372abba4426ae771
2016-12-12 16:15:40 +00:00
drh 2793c269bb Merge all recent trunk changes, and especially the new
sqlite3_snapshot_recover() interface.

FossilOrigin-Name: 41a3af5443d8c97ba75cac7f082f06b508f77c24
2016-11-26 20:44:52 +00:00
drh e5c66e42db Update test case for opening SHM files read/write on a read-only connection
so that they are only attempted on Darwin with SQLITE_ENABLE_PRESIST_WAL.

FossilOrigin-Name: d6a7bf80cfb0cdca2bd684adfaba2c3e8053f8a4
2016-11-26 20:12:40 +00:00
dan cf178fc37e When opening the *-shm file for a readonly database, try to open it in read-write mode before falling back to readonly. This is in case some other read/write connection within the same process uses the same file descriptor.
FossilOrigin-Name: a07c581e88aa4d9835f6144c0fd5e58ef42f14ac
2016-11-17 14:02:50 +00:00
drh 16ad651054 Merge updates for version 3.15.1.
FossilOrigin-Name: 0e5ffd9123d6d2d2b8f3701e8a73cc98a3a7ff5f
2016-11-04 19:09:39 +00:00
drh 54f681e52f Merge recent enhancements from trunk.
FossilOrigin-Name: 06014163475051b7f3b3570e8af434362bbc5b87
2016-09-28 16:15:20 +00:00
drh 429c123b59 Merge recent changes from trunk.
FossilOrigin-Name: e3d9efa2770cd789ece3f4db4941b901c8b805ad
2016-09-16 17:50:57 +00:00
drh 4c12ada23d Merge recent enhancements from trunk.
FossilOrigin-Name: 00759af053e0ea9bd73dba2cf6cad83598ea393b
2016-09-07 18:20:09 +00:00
drh 43bbfc5d82 Merge all changes from the 3.14 release.
FossilOrigin-Name: c3cd543f3380475509d7bab9bb6c7858a8402457
2016-08-08 14:21:10 +00:00
drh 7e1accd0e7 Merge all recent enhancements from trunk.
FossilOrigin-Name: dacfff514034602361cd5325deba8d9b9691f865
2016-08-04 13:39:44 +00:00
drh 56e70d0539 Add the experimental SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option.
When enabled, the "unknown function" error is suppressed for EXPLAIN and
a no-op function named "unknown()" is substituted.  This facilitiates using
the command-line shell to analyze queries from applications that contain
many application-defined functions that are not normally available to the
shell.

FossilOrigin-Name: e22ca3cdd02483b68595a59ccb7a1fcb3580ab04
2016-08-04 12:33:10 +00:00
drh e00d2c4f3c Merge the ORDER BY LIMIT fix, and other enhancements, from trunk.
FossilOrigin-Name: bf5a9542d0600062651aedc6d2543ce72dd21744
2016-08-04 09:13:42 +00:00
drh 8eebf02f53 Merge recent trunk fixes.
FossilOrigin-Name: 97657445860363f5bd62c37e6a565e782e7eb908
2016-07-28 18:42:21 +00:00
drh 1563c7a4d5 Merge fixes to sqlite3_scrub_backup() from trunk.
FossilOrigin-Name: 91e811f51e611a37372875e96a4c51bbed2dfdea
2016-07-26 15:17:14 +00:00
drh 6f7087211c Merge the cache_spill VACUUM fix from trunk.
FossilOrigin-Name: cc6bfdf814d5701591b69ba2d399d4a1f6f6cc98
2016-07-26 04:54:54 +00:00
drh 68cd37c10f Make sure affinity is applied correctly on lower-bound range constraints
in the min() optimization.  Fix for ticket [a0bac8b3c3d1bb].

FossilOrigin-Name: 0e9f534fef72ca142a4296ab5285c82aada38ba7
2016-07-26 04:23:55 +00:00
drh 9e89b957ef Merge the VACCUM cache_size adjustment from trunk.
FossilOrigin-Name: cdb7efd01ed7a8f11681b277098bb3eb12ca39d2
2016-07-25 22:46:06 +00:00
drh 114f5744d4 Add the experimental SQLITE_VACUUM_CACHE_SIZE macro.
FossilOrigin-Name: 68ecd8e042bd14b8ede69219bd4ed175bf097d0b
2016-07-25 18:50:08 +00:00
drh ebbee40a8f Merge 3.14 alpha changes from trunk.
FossilOrigin-Name: e98cefb17d03ca146d0ff42bdd4dd6a8f3ba6735
2016-07-25 17:31:24 +00:00
drh 9d32b7b042 Merge changes from trunk.
FossilOrigin-Name: 0f707d1532d6c8277cf0f70821a83e0af621ce9b
2016-06-15 10:21:06 +00:00
drh 74a7ef79f7 Merge changes from trunk.
FossilOrigin-Name: 815cc2bb48db713a0166b82a55ae931ac43783d1
2016-05-23 02:57:33 +00:00
drh 469077596f Merge the 3.13.0 release changes.
FossilOrigin-Name: e2e9b98556f45ed2d6fb34db67957539932bd2c5
2016-05-18 20:53:37 +00:00
drh 88b69f3fb5 Merge recent fixes from trunk.
FossilOrigin-Name: 0d9b82afeadf3d8d8ca2aacd3620717e773ebe30
2016-05-16 13:37:45 +00:00
drh 04600b249f Fix the build when SQLITE_ENABLE_DATA_PROTECTION is defined.
FossilOrigin-Name: 8f05e1402d0d26684bd15ffdb638d0a55abdce7f
2016-05-03 02:43:50 +00:00
drh adb9636887 Merge enhancements and bug fixes from trunk.
FossilOrigin-Name: f52765ee7bddf047ce32d7448ee0c409e27d349a
2016-05-02 15:00:23 +00:00
drh 9fc3d1cfa7 Fix the nolock VFS so that it supports shared memory.
FossilOrigin-Name: ce11f8e8a38b36fd78c104ba7b6900f77d7b586b
2016-04-29 17:07:39 +00:00
drh 2b78c0d38b Merge enhancements from trunk, and in particular the TEMP file deferred I/O
enhancements.

FossilOrigin-Name: 81b76901e63d670c0f2302f56f1aeafcc7ff9922
2016-04-29 15:52:58 +00:00
drh cb9e7a56af Merge all recent enhancements from trunk.
FossilOrigin-Name: a15c49aed09a6f431022bc73aa98b04165649192
2016-04-21 15:35:21 +00:00
drh 101f557a23 Merge 3.12.0 changes.
FossilOrigin-Name: eef557449cf665aa8deb85674b7db167b389776a
2016-03-29 10:30:24 +00:00
drh e5a060474a Merge the sqlite3_system_errno() change from trunk.
FossilOrigin-Name: 063f1b3705625b2f115af8e909d86705b892b529
2016-03-21 14:52:04 +00:00
drh a14dfe465c Fix a VDBE register allocation bug exposed by recent enhancements to
PRAGMA integrity_check.

FossilOrigin-Name: c73b5b9ccf3dcf48f403c866423bebbdc45d2b28
2016-03-19 00:40:06 +00:00
drh ce08336c43 Test case tweaks to better support the Apple configuration options.
FossilOrigin-Name: cb0ffe844c9c3e84cba8c4df90d4d0f2e9f61586
2016-03-18 11:03:15 +00:00
drh 72f0d40ac4 Merge recent enhancements from trunk.
FossilOrigin-Name: ec052b4f14a8a7019bfc1bbe474020abafa557f3
2016-03-18 00:58:39 +00:00
drh 0ecefeb10b Merge the SQLITE_OMIT_CODEC_FROM_TCL compile-time option from trunk.
FossilOrigin-Name: 161d91e485059efb36b7bc74d091f9721b76dcbf
2016-03-16 01:09:07 +00:00
drh 2a73755f4e Merge updates from trunk - FTS5 fixes and enhancemenets to the tests scripts
so that they work with SEE.

FossilOrigin-Name: f41a7361a1c59d0d681f2a81c2f70c1a9bbf7aee
2016-03-15 12:45:43 +00:00
drh 7991137311 Merge changes from trunk, especially the SQLITE_DEFAULT_SYNCHRONOUS
enhancements.

FossilOrigin-Name: 29741941238643dc0e41660d98b176d81f9fd6f1
2016-03-08 16:35:17 +00:00
drh 3db53ff77b Merge coverage improvements and comment fixes from trunk.
FossilOrigin-Name: 58023bfccce40c611791c1963d47b620ffb9447a
2016-03-08 14:01:52 +00:00
drh 04393bb585 Fix a typo and remove an unused variable from test logic.
FossilOrigin-Name: 9f31516c5dd4a3578fb66d00425fb3e44d792716
2016-03-07 21:28:41 +00:00
drh 2911e6c570 Merge recent enhancements from trunk.
FossilOrigin-Name: 84f09f00f8731b1b3e057bc629ec14103a44b81d
2016-03-07 20:48:49 +00:00
drh 07a6166f23 Merge recent enhancements from trunk, and especially the changes that
reduce the heap-memory footprint of schemas, and defer opening and writing
to statement journals.

FossilOrigin-Name: 2f0c195ccc3c9550f0664223fc355b1c27063eba
2016-03-04 14:57:51 +00:00
drh 93e52b35cc Merge all recent enhancements from trunk, and in particular the
SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER change.

FossilOrigin-Name: 4fb4aee83da5cd1d75627f96ab431132628aeef4
2016-02-26 16:14:59 +00:00
drh 4f25847dbd Merge the master-journal optimization and other recent changes from trunk.
FossilOrigin-Name: 18c3ab4784a4efab2cc583ef712c4db9d127418a
2016-02-22 16:32:39 +00:00
drh 62c831d829 Merge the tokenizer buffer overrun bug-fix from trunk.
FossilOrigin-Name: 82e7e31b09097b24876f69df56cdd8f4c1aad1f1
2016-02-18 14:53:52 +00:00
drh 241014c3f1 Merge recent performance enhancements and the enhanced API_ARMOR from trunk.
FossilOrigin-Name: b7fa0fb3399ad2bf1e6bc4c92d43278a40f19ec4
2016-02-18 01:36:47 +00:00
drh 264b78a7b0 Memory leak associated with SQLITE_WRITE_WALFRAME_PREBUFFERED
FossilOrigin-Name: 7bcd3ab5f0519cb9ac8f7b98827600b9eff8db85
2016-02-18 01:22:53 +00:00
drh 7aecd9ac20 Merge 3.11.0 changes.
FossilOrigin-Name: 5cecc509d05eb3d6ebf0bb736da23725827bc8b3
2016-02-15 17:40:37 +00:00
drh d774536f52 Merge changes from the 3.11.0 release candidate.
FossilOrigin-Name: d198a6db2e49d0205420f8ed08cfffd75ee93e1e
2016-02-13 17:35:48 +00:00
drh 1158cd750f Merge recent fixes and enhancements from trunk.
FossilOrigin-Name: f073401792c0a093d4324fc2636170f108656976
2016-02-09 15:50:33 +00:00
drh 81ab26904b Merge OOM handling optimizations and PRAGMA synchronous=EXTRA as well as
other enhancements from trunk.

FossilOrigin-Name: 201fcbeef35d3d06d71ef5770fb72152840fcc2e
2016-02-05 14:29:18 +00:00
drh 26bb3b2148 Merge recent enhancements from trunk.
FossilOrigin-Name: e6a4a16312bf71ed5f277cdcd326003eb2580e72
2016-02-02 02:30:01 +00:00
drh e2fe1a59b7 Merge all recent enhancements from trunk.
FossilOrigin-Name: 3ed49691a12455e8583d8b8394ab005124442e89
2016-01-20 11:40:31 +00:00
drh afd6cf1041 Merge the latest enhancements and fixes from trunk.
FossilOrigin-Name: d85774e0dcb6cb1958ecd85891ef785e4692f67b
2016-01-14 15:03:12 +00:00
drh f45491a09c Import the version number change to 3.11.0.
FossilOrigin-Name: 132772d1c415c63fa5bdcc298ad9a3746bfb56bb
2016-01-11 13:03:34 +00:00
drh a0fafa1dee Merge enhancements from trunk, and in particular the WAL overwrite feature.
FossilOrigin-Name: 79125ec9d2cdb96d65ceeb19c2862665f9267d4e
2016-01-11 12:49:55 +00:00
drh 6a09a46b10 Merge all version 3.10.0 updates.
FossilOrigin-Name: 77c28c2b2dc601e67a88f55afff53b6cb9a24833
2016-01-06 14:35:15 +00:00
drh 4a42d8faf2 Merge all recent trunk enhancements.
FossilOrigin-Name: 5b700f313d753a308d2c6b5e5a5ee42af2e6d180
2016-01-01 13:31:36 +00:00
drh 68b203fe4e Merge recent trunk enhancements, and in particular the snapshot interface.
FossilOrigin-Name: 7e7b24064510001ca4a0c8295fa7d0138bde8dae
2015-12-11 12:53:26 +00:00
drh 59158c25cb Merge all recent trunk enhancements, especially the unix VFS changes.
FossilOrigin-Name: e1fb33c7d2bfd8ea115e667d7671a7529cd116aa
2015-12-02 20:22:38 +00:00
drh b8a08d1237 Merge the latest enhancements from trunk.
FossilOrigin-Name: 2c9e5436bd9146f0d76eb58e75cb76109d074ff7
2015-11-19 19:48:24 +00:00
drh 9beb8702e8 Merge fixes from trunk.
FossilOrigin-Name: f9060b2a9860b09ea0e268f6c135a2c78bc8d12d
2015-11-13 02:13:18 +00:00
drh 6684c44a4c Import the test_sqllog.c enhancements from trunk.
FossilOrigin-Name: 178da33909ff8e524cdefeede40fa5bd908efb37
2015-11-12 21:55:02 +00:00
drh bee873abcc Merge the latest enhancements from trunk, and in particular the
"PRAGMA cache_spill=N" change.

FossilOrigin-Name: e72331c719375dcfcfaba160f00d26e5460e9230
2015-11-12 16:51:43 +00:00
drh 961c98618d Merge recent enhancements and fixes from trunk.
FossilOrigin-Name: 5429f99b98ea1e2ecf5f50dade52009adc431a12
2015-11-07 01:57:44 +00:00
dan 738394c069 Merge latest trunk changes, including the follow-symlinks functionality and 3.9.2 bugfixes, into this branch.
FossilOrigin-Name: 447521d747d94fa3028348bc48b897592fd8021c
2015-11-02 15:10:48 +00:00
drh 51b021eb64 Merge the 3.10.0 version number update from trunk.
FossilOrigin-Name: 980d6207431abf8549bf8dd82d65d707872a2a31
2015-10-30 16:37:44 +00:00
dan 00c43a4a3b Merge latest trunk changes, including sqlite3_db_cacheflush(), with this branch.
FossilOrigin-Name: 6e4306efaf5c0d34a1aead8ad1fe5aa836b61ca1
2015-10-30 16:23:03 +00:00
dan a297dbb897 Merge latest trunk changes, including the SQLITE_IOERR_AUTH error code, with this branch.
FossilOrigin-Name: bc195e1cd9dc1c7b97bd05cd7d0664fbc599a890
2015-10-26 20:50:15 +00:00
drh 8e11f8aec5 Merge the 3.9.1 changes.
FossilOrigin-Name: dd07688d3a478bead1174cf243fd5a667ccdda8d
2015-10-16 20:52:35 +00:00
drh f035e3ce68 Merge 3.9.0 prerelease changes into the apple-osx branch.
FossilOrigin-Name: 1900ce011c7e0c10d670d86833ac701ecf4fa223
2015-10-13 17:49:19 +00:00
drh 532676f142 Merge all changes through the first 3.9.0 beta from trunk.
FossilOrigin-Name: 1ccae39b8a7094c2cee2f3fea57c847d0063fa81
2015-10-09 17:28:56 +00:00
drh 7c5113fc3b Merge recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 4dd06d8ba1548552a4fc781207efda810cf34e55
2015-09-24 14:43:42 +00:00
drh 9827122af5 Merge trunk enhancements into the apple-osx branch.
FossilOrigin-Name: f12b8a0f7958260cb8e6b9be1aaa583cf383b39c
2015-09-15 17:20:41 +00:00
drh 7712ac43e8 Merge enhancements from trunk.
FossilOrigin-Name: d01658adf8680f3d128bb42ea8cc2f1acf46a569
2015-09-03 14:31:00 +00:00
drh 99a9edc64a Merge the latest trunk enhancements.
FossilOrigin-Name: 4af79477fd1c156bc31c397117a85ae72c286fe2
2015-09-01 18:40:52 +00:00
drh 36813e51a6 Fix a potential segfault in the VFS logic that checks for fail renames out
from under SQLite.

FossilOrigin-Name: 650111f66721c33015f89cda4f5afcb6e0dc1643
2015-08-28 15:35:30 +00:00
drh cbce710443 Disable the read-only WAL-mode database tests on the apple-osx branch because
read-only WAL-mode databases are specifically disallowed by Apple-specific
changes.

FossilOrigin-Name: bd911496cb2343d9640c131d905c9f0bee8fc428
2015-08-28 13:27:00 +00:00
drh 5be04de862 Merge trunk enhancements into the apple-osx branch. Most tests works, but
there are yet a few issues to be resolved.

FossilOrigin-Name: da8646582a9a8c800ff2962d40ca215381d846dc
2015-08-28 02:12:45 +00:00
drh 296145ff14 Fix the retry mechanism on file locks.
FossilOrigin-Name: 600df309fc547db3dc21cfc41609eb3dcaa67273
2015-08-11 18:18:24 +00:00
drh 3fa3114310 Merge all recent trunk enhancements and fixes into the apple-osx branch.
FossilOrigin-Name: 74b7bf17446bc21a73fa5b75c2942b5660b0ad7e
2015-04-20 01:25:56 +00:00
drh e8c1a641b1 Merge recent trunk fixes and enhancements into the apple-osx branch.
FossilOrigin-Name: bfc7142ad295c4b04078f9c01030bdbd15f024e8
2015-04-15 13:51:38 +00:00
drh 05a43c305f Merge all recent trunk enhances into the apple-osx branch.
FossilOrigin-Name: e709d3b4e7b91331f58ed8319f98790cfb190cb1
2015-04-13 23:11:45 +00:00
drh 557437fd51 Merge in all version 3.8.9 changes from trunk.
FossilOrigin-Name: 301218704cfb6eebac32828b7b2dbc6803c63a26
2015-04-08 12:47:26 +00:00
drh 471a717ccb Merge all recent trunk fixes and enhancements into the apple-osx branch.
FossilOrigin-Name: 71b6f507f1c5feb897b8162c468ecf2547a3d50e
2015-04-01 16:13:35 +00:00
drh b13cc88cd3 Merge the latest trunk enhancements, and especially the fix for the infinite
loop on a DROP TABLE in a corrupt database, into the apple-osx branch.

FossilOrigin-Name: 4d42bf5e18485be302cf5a3f81d900d7921b4315
2015-03-30 23:52:57 +00:00
drh 2f1fbb5a88 Merge the latest trunk enhancements into the apple-osx branch.
FossilOrigin-Name: a2bd81e575321e23f08d8dc56d4682adb44a513b
2015-03-24 18:49:59 +00:00
drh fa95fecd1a Merge all recent trunk enhancements and especially the blocking WAL-lock fix
into the apple-osx branch.

FossilOrigin-Name: 9f1f8b331e05d88052e6fb6556a88591efaa44bf
2015-03-21 17:00:06 +00:00
drh aefbdc97bd Merge all recent trunk changes, and in particular the blocking WAL lock change,
into the apple-osx branch.

FossilOrigin-Name: 8abbeadbc028524c4a59c1af6c10f724ccb91d0a
2015-03-17 18:35:40 +00:00
drh 5817b2a18e Merge recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 5e04eec88e4f5cb9d57577ee2d9e3569de930fbb
2015-03-09 13:18:22 +00:00
drh 4feacdeb25 Merge the latest trunk fixes and enhancements into the apple-osx branch.
FossilOrigin-Name: ba8294e2f76a0cfcf48200634e6076a8995024f0
2015-02-25 14:09:23 +00:00
drh 201959c95d Merge trunk changes into the apple-osx branch.
FossilOrigin-Name: 3896e23373d41371fc6839168a97a669106486af
2015-02-21 01:03:48 +00:00
drh 0a175660d2 Incremental merge to prevent a huge pileup of merge conflicts resulting
from editing the same code in two different branches.

FossilOrigin-Name: 82c4c4e248bfca38bc3285d5a8414f7180c2eab5
2015-02-19 15:56:27 +00:00
drh 03f275ea83 Move the os_unix.c file closer to trunk.
FossilOrigin-Name: 57d7024007c2a71bf6cb875b1f1daf26924d188e
2015-02-19 02:43:19 +00:00
drh f6aade2b1e Enhancements to SQLITE_ENABLE_API_ARMOR merged from trunk.
FossilOrigin-Name: 5147b94ae6dc3e1bae5c506563347880c3a302b1
2015-02-13 16:42:49 +00:00
drh b8963868c9 Merge all recent trunk fixes and enhancements into the apple-osx branch.
FossilOrigin-Name: b2449d67768f4d3d83877d9c45e5b4b17bb6a551
2015-02-13 12:13:43 +00:00
drh 3f73784941 Merge increment blob I/O fixes from trunk.
FossilOrigin-Name: 292cf68b4c934c3a666d938d3857f6bd8a484044
2015-02-07 15:30:08 +00:00
drh 77cb4f3bf5 Merge all recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 44711921fea2bb2d804d57b23872ab84156a04ba
2015-02-06 16:03:44 +00:00
drh a3b2856ca5 Merge the 3.8.8 release changes from trunk.
FossilOrigin-Name: 518621f8dcd6c0cc107110991753731a19b263f6
2015-01-16 12:24:00 +00:00
drh 11a6d52005 Merge the testing enhancements and the unlimited VALUES enhancement from trunk.
FossilOrigin-Name: cc7808427f8e9df8e2810a6681b2ddd93e578c67
2015-01-08 19:55:13 +00:00
drh e4172fa884 Merge the latest changes from trunk into the apple-osx branch.
FossilOrigin-Name: df3cdf9f0690f2724c7e4e0adb2e3bd4b1a4dd26
2015-01-02 19:17:44 +00:00
drh 79e319ef93 Merge latest fixes and enhancements from trunk into apple-osx.
FossilOrigin-Name: 2c1d8ddab23b36dbdd30ff82401925f97ffc5d76
2014-12-16 00:29:06 +00:00
drh 38f940254a Increase the default PMA size from 10 to 250 pages and provide the
SQLITE_SORTER_PMASZ compile-time option to change this default.  Add
needed mutex call when clearing the KeyInfo cache in shared-cache mode.

FossilOrigin-Name: 6e2da589ad562e0e412eb6572a8681225259b46e
2014-12-09 15:01:07 +00:00
drh 417f98ddc9 Merge the shared-cache KeyInfo fix from trunk.
FossilOrigin-Name: 8a9b43f930de9c789b230909233eee64ad1db93d
2014-12-05 20:16:52 +00:00
drh 7151722191 Import compiler warning and autoconf makefile fixes from trunk.
FossilOrigin-Name: 5437e0534a9647b449474df140a88bb8e4e42791
2014-12-05 00:49:47 +00:00
drh 1dc14f78f0 Import from trunk support for SQLITE_CHECKPOINT_TRUNCATE and fixes for
a couple of obscure bugs.

FossilOrigin-Name: 463ad971d2a427f50564b409a021a910004c1423
2014-12-04 23:42:28 +00:00
drh 6f34c36a39 Merge all recent enhancements and bug fixes from trunk into the apple-osx
branch.

FossilOrigin-Name: 43c4ba26a20ca0230d898a6431ed9ae5cfdb63d3
2014-12-02 16:38:43 +00:00
drh 5a3d6b1a39 Merge recent trunk enhancements.
FossilOrigin-Name: ccb601f6dffba68a57d82db2d046aa27f6f1b755
2014-11-18 21:27:48 +00:00
drh 5d5a49d8da Merge all recent trunk enhancements into the apple-osx branch.
FossilOrigin-Name: fef8430f1284b08b1c2af3d5639037478c58fb7e
2014-10-31 15:20:47 +00:00
drh f6f002a3bb Merge latest enhancements, including the SQLITE_ENABLE_API_ARMOR patch,
from trunk.

FossilOrigin-Name: 10aaf3b148404df7912d9604ccb6921173e7ac80
2014-10-27 18:42:03 +00:00
drh 81f89ae38c Merge the 3.8.7 changes into the apple-osx branch.
FossilOrigin-Name: aa7bbed10b63078dcd3468b7b47c30044bc8586d
2014-10-17 12:11:07 +00:00
drh 6d88f0f145 Merge from trunk recent micro-optimizations and the fix for the DESC index
GROUP BY ORDER BY bug.

FossilOrigin-Name: 880df7568add1b5825f713688dcd7a03cd895389
2014-10-14 14:17:15 +00:00
drh 4cfde6344b Record the errno on fstat() failures.
FossilOrigin-Name: 2a6a0820010268593b8edd3c630734ee5f9aa5ab
2014-10-09 11:40:35 +00:00
drh 4a92cb5619 Merge the latest trunk enhancements into the apple-osx branch.
FossilOrigin-Name: 6fc7207727d50c3039c7a0c6c9151cad6b9d25de
2014-10-09 11:27:38 +00:00
drh 52c5d76673 Merge the latest enhancements from trunk.
FossilOrigin-Name: 2078454ac998ccb5e837c4f13d8d8b2f312f4f50
2014-10-01 01:46:35 +00:00
drh dde37a1cb0 Merge in all recent changes from trunk.
FossilOrigin-Name: 3967ebe83e7cbb1dde26e4c9a6713d5c70fefe46
2014-09-21 23:08:54 +00:00
drh 9cc5985bc4 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 696dc935f78dc883faf98cf446f75ce4028e98f8
2014-09-02 15:57:35 +00:00
drh edb586616b Merge recent performance enhancements and the CAST operator enhancements
into the apple-osx branch.

FossilOrigin-Name: 5c273111058fcb3a1707ea0f3c7ac4b04525aeb0
2014-08-26 02:02:40 +00:00
drh 1c68302a1a Merge the 3.8.6 changes into the apple-osx branch.
FossilOrigin-Name: b91fcb3b1b6d383e023bd0818a2075018fd33b98
2014-08-15 16:10:41 +00:00
drh 3f45cf5900 Merge the pre-3.8.6 changes from trunk into the apple-osx branch.
FossilOrigin-Name: 08058df3af18d28c3fbd306527734f507c06f156
2014-08-14 13:39:49 +00:00
drh 72ab0c824d Merge 3.8.6 beta changes in from trunk.
FossilOrigin-Name: b2e01080cce405de2bba7a5294001f9cc463a3c4
2014-08-06 01:51:19 +00:00
drh fd855ec1e9 Merge in the CREATE UNIQUE INDEX fix of ticket [9a6daf340df99ba93c53bcf].
FossilOrigin-Name: fa7912320fd92c957034164f51d993f86220cf36
2014-07-30 14:57:00 +00:00
drh c0c290d4f6 Merge all recent trunk changes, and especially the R-Tree IN operator fix
of ticket [d2889096e7bdeac].

FossilOrigin-Name: 654c6c658ba7557eb822b03264bb4d259c216c01
2014-07-30 11:49:32 +00:00
drh 7a00b6c815 Merge recent trunk changes into the apple-osx branch.
FossilOrigin-Name: 3810dc62d2739cfd4f0dae7cea6af481cc698a0b
2014-07-24 16:43:42 +00:00
drh 31447e8b01 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: f426876fe1cc9ebcda5a52f823f417a4db358517
2014-06-30 19:57:04 +00:00
drh 59967e2d2e Merge in the 3.8.5 release changes and the FTS integrity-check fix.
FossilOrigin-Name: 2dbdfa51703bade30b66730191e4fb286edc500b
2014-06-05 12:53:41 +00:00
drh acf5e9d692 Merge trunk changes into the apple-osx branch.
FossilOrigin-Name: b9fad4490c437a2c49cf86cc1c068433d6d2866b
2014-05-29 20:36:56 +00:00
drh ef39ae556c Merge recent trunk changes into the apple-osx branch.
FossilOrigin-Name: 54b5fa77e9b2ae447fd25cbdb9abfe37f2226504
2014-05-26 20:08:23 +00:00
drh d419d42238 Merge all recent trunk changes into the apple-osx branch.
FossilOrigin-Name: 23722be49ad8ff21aed49a66174626798c428811
2014-05-20 00:27:19 +00:00
drh d6edcca767 Fix a misplaced #endif and a C99-ism in the unix VFS.
FossilOrigin-Name: c8d384d14650482ac7f311c49f8264a954b1d654
2014-05-09 14:56:16 +00:00
drh 8a9a68e2ae Fix compiler warnings. When forcing the delete of a WAL file, do not
fail if the WAL files does not exist.  All "veryquick.tcl" tests are now
passing on Linux under the standard compile-time options.

FossilOrigin-Name: eafd8aa1862fb4bbe0d2441cbd110aba1abc772c
2014-05-09 13:27:38 +00:00
drh b33a4fdffe Fix an incorrect check for API misuse.
FossilOrigin-Name: 856400dc20752e5630aaea8d17a707c502a1245b
2014-05-09 12:18:06 +00:00
drh 35d09b26e2 Bring the PRAGMA logic into closer alignment with trunk, and in the process
fix a couple of crashes.

FossilOrigin-Name: d66fe706dad000888a177c19aa217bbb68edb4d2
2014-05-09 11:45:55 +00:00
drh b9f41b4fd1 Initial attempt to merge in all trunk changes over the previous 1.5 years.
This check-in compiles but there are compiler warnings and "make test"
segfaults after only running a few test modules.

FossilOrigin-Name: 9411d7dc6fbee689730c6f74736341bccd333d9e
2014-05-08 23:01:59 +00:00
drh e1436049d8 Merge the latest trunk changes (PRAGMA busy_timeout and the ORDER BY
query planner enhancements) into the apple-osx branch.

FossilOrigin-Name: 6a5c59dd7e0de9b5a2136f1c333afe522f724a71
2012-09-28 10:57:42 +00:00
dan 4e76b64969 Merge in latest trunk changes.
FossilOrigin-Name: bc9b9cd0589c4a51ece2e4657d622a04fc203315
2012-08-31 14:10:24 +00:00
drh 78fffbf2c2 Merge all the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 6723add4f492c30b20db8de6ed818c191dedea40
2012-08-25 01:38:39 +00:00
drh 3314d12e03 Cherrypick [8c9ee1d78f] and [e416359633] from trunk:
Ensure that there is always at least one aReadMark slot usable by an unprivileged reader while a checkpoint is running. Also, if one or more transactions are recovered from a log file, initialize one of the aReadMark slots to contain mxFrame as part of the recovery process.

FossilOrigin-Name: 65035912264e3acbced5a3e16793327f0a2f17bb
2012-07-17 17:46:21 +00:00
drh b2eb39ea15 Merge the vtab1 test script fix and the FTS3 memory leak fix from trunk
into the apple-osx branch.

FossilOrigin-Name: 892d8779cc3c4037d6e21c04c39796284d811157
2012-06-08 14:11:30 +00:00
drh 1489c18b99 Merge trunk changes into the apple-osx branch.
FossilOrigin-Name: 9d1b8515625ce7fbde170180126bd1a273bb4994
2012-06-08 01:13:17 +00:00
adam 3aed0eb475 Only call fchown when running as root and supporting files mismatch the database owner & perms
FossilOrigin-Name: ed53b645cc791e2c75885866ecb668fff14f8e7e
2012-05-31 00:21:28 +00:00
drh ba1bce386c Version 3.7.12.1
FossilOrigin-Name: 972e75bb5d7349297b94cec2f19561ee105a22cf
2012-05-22 13:11:12 +00:00
drh 8f0e4e2a9c Stylistic fixes: limit source code line length to 80 characters. C89-style
comments only, not C++/C99 style.

FossilOrigin-Name: 4068abe05c3a94c9ac7cff72b77fb8e47a2b1a5d
2012-05-17 14:17:13 +00:00
adam 8a1c468c3c Improve error reporting from sqlite3_file_control, SQLITE_FCNTL_REPLACE_DATABASE shouldn't copy file security/ACL metadata, bad bit mask fixed
FossilOrigin-Name: 92e7bb907802c905f99ed4c47669f97723f63ed3
2012-05-16 22:08:18 +00:00
drh 29b2fb1c52 Version 3.7.12
FossilOrigin-Name: d9348b2a4e15873756adfd092e8128d9f1cf72b4
2012-05-14 02:05:15 +00:00
dan 8749d1c8e6 Merge trunk changes with apple-osx branch.
FossilOrigin-Name: bf57f0fb73500f384fc57cbe2501343c97dc433e
2012-05-12 14:59:45 +00:00
drh fc73c50fec Make sure the WAL file is deleted when changing to DELETE journal mode.
FossilOrigin-Name: 66708685909fb048edab7f15e4a81d5a554d88d9
2012-05-11 00:56:28 +00:00
drh 5fbe8d658f Merge in the legacy table constraint parsing fixes from trunk.
FossilOrigin-Name: e87702834ed50882fadb3dee66cafb7438f5e577
2012-05-10 12:09:34 +00:00
adam 02d2493753 Added support for SQLITE_ENABLE_PERSIST_WAL compile time macro, retrieving lastErrno from WAL file and setting last errno when writes fail due to space constraints
FossilOrigin-Name: 654792941011c96db879f6b779e99b1c65c587af
2012-05-09 22:36:25 +00:00
drh edd972a2ed Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 2a99c0074aaabb4916d82464427be079d44d65e6
2012-05-05 01:03:31 +00:00
drh 42b4259a4a Update the apple-osx branch so that it includes all of the latest trunk
changes.

FossilOrigin-Name: b72f07b4a2cf62ac1b52d432f13057d5d93a4ec4
2012-04-19 20:43:54 +00:00
dan 8343a6bf5e Cherrypick commit [1d5e744cc6] from the trunk in order to avoid leaving a file-ddescriptor open in test scripts capi3.test and capi3c.test.
FossilOrigin-Name: 86b8481be7e76cccc92d14ce762d21bfb69504af
2012-04-03 19:43:07 +00:00
adam 4678255c4e bad assert
FossilOrigin-Name: 0c0150f2a349460d685e63be1a747d2bfbe5c8c4
2012-04-02 23:42:48 +00:00
adam 0cb33b650c Merge in latest changes, autologging options, read only file system wal support, test config conditionalization, WAL frame write prebuffering
FossilOrigin-Name: d51c086e5c006821e2ab932f229649a729d914b2
2012-04-02 23:35:45 +00:00
drh 9817307d2f Merge all the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 18ec60cacd37a70d598ac1af5e50faffa73bb134
2012-03-31 02:46:20 +00:00
dan 296c8cad4d Merge latest trunk changes into apple-osx branch.
FossilOrigin-Name: f999197b75465a1f71ac1dab8f22ba2167fc0c67
2012-03-19 16:21:28 +00:00
drh 40d50d1b0f Pull in all the latest trunk changes.
FossilOrigin-Name: 504bf4908618f4dc8c9d67380934016b311ca6d0
2012-03-05 16:39:56 +00:00
drh 2f1e7b8a74 Pull the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: e248598649dd69ed4b4d3da80566d2a7a36a349a
2012-02-10 18:18:00 +00:00
drh e0ba85df8b Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 2cc414cd144cd84aad6420058c6e674c2920ba72
2012-01-14 14:13:31 +00:00
drh 39ab1aef89 Pull all the latest trunk changes over into the apple-osx branch.
FossilOrigin-Name: 8a048423f0e409d2332558cb5148e5a1d251ae30
2012-01-03 21:54:09 +00:00
drh 90defefb85 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 59e0d4f3d9af81d0c920812a6583228faa300cd6
2011-12-08 21:08:53 +00:00
drh 48249a7397 Fix a problem with sqlite3_backup_step() that resulted from a faulty merge.
FossilOrigin-Name: dacdec78d010922b6357f5319108289d087b6028
2011-10-31 19:59:09 +00:00
drh ffa0ae9924 Fix the os_unix.c source file so that it will build as part of an
amalgamation on non-apple platforms.

FossilOrigin-Name: b2f7639c8faf962239d41bb3a151448fad84e84c
2011-10-31 19:34:47 +00:00
drh 495cd6b419 Pull the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 4fa9ee794713e7a2298f53d9b517c90745b3408b
2011-10-31 14:42:31 +00:00
drh 7d59b89dc9 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: be62ef058bcee55b31127ee779f7ecbf762986f8
2011-10-21 17:18:20 +00:00
drh aa09d0503d Simplify the readonly_shm implementation so that it conforms to the
implementation on trunk.  Update the test cases to agree with the new
behavior.

FossilOrigin-Name: 9efb74cefb2b7444112e16f3da48d5645746fdfa
2011-10-11 18:38:13 +00:00
drh 3a0022dad4 Fix a locking error introduced when porting the new Apple locking code.
FossilOrigin-Name: cce1f521362a87cc46fc5bfba68b7c188e2ea34f
2011-10-11 15:03:45 +00:00
drh 0d92f761ed Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 7e2c4898224f9fabf724a6d4e1ac597845a66f73
2011-10-11 14:19:38 +00:00
drh cc40f4ceb1 Forward port the Apple-specific changes from [db5b7b778c] in the
apple-osx-377 branch.  Fix this up so that it will compile and run on Linux.

FossilOrigin-Name: 6cb43f6c6e9d8054e00acab378b8af0d82d3084c
2011-10-10 23:53:48 +00:00
adam aec336af26 Merging in cherry picked diffs for persist wal, alloc padding, wal-safe vacuum and sqlite3_file_control based lockstate checking
FossilOrigin-Name: db5b7b778c09c57501cb8266895a0ea4f2de7649
2011-10-10 22:11:44 +00:00
drh d74c576ee6 Cherrypick the sqlite_data_count() changes from [d4f95b3b6e] and
[9913996e7b] into the apple-osx branch for version 3.7.7.

FossilOrigin-Name: aef7945c423a8338374572eeda9444866c64569b
2011-10-10 18:59:05 +00:00
drh 65f0fd40d6 Merge in all trunk changes through the 3.7.8 release.
FossilOrigin-Name: ade72b1874c7672ae8d62b9ebac8e4d63fee80cc
2011-09-19 20:32:36 +00:00
drh f9ae91deed Remove a couple of comments that were causing problems for the
amalgamation generator script.

FossilOrigin-Name: ffed86bf969b98d196ac50bb5e5faddecab4fc59
2011-09-17 18:56:19 +00:00
drh 8062d660f1 Merge the latest trunk fixes into the apple-osx branch.
FossilOrigin-Name: 070bf203bb7cd59d69c10b29d7d9374e0361a47a
2011-09-16 19:36:42 +00:00
drh b19e7036cd Merge in the latest changes from trunk.
FossilOrigin-Name: 2456b4d0d2522dd2541146031347bc5e51f2036f
2011-09-14 19:05:55 +00:00
drh 253df3a264 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 55af80035f0432bbd4c4b3f4dbc9def13c5356b3
2011-08-26 19:18:50 +00:00
dan 343811ce13 Merge latest trunk changes into the apple-osx branch.
FossilOrigin-Name: c5f7977b899e93bf90bd44572db78c744ea81c14
2011-08-23 18:06:04 +00:00
drh 1b1b8325e1 Merge all the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 77376b332b4460208f837f7bdf6df8c90d5071d5
2011-08-02 18:25:20 +00:00
adam 027200ec51 Changes to make pragma synchronous sticky when SQLITE_DEFAULT_WAL_SAFETYLEVEL is used
FossilOrigin-Name: c6158b254fabd02a3d58b1a047a3c5fa979b41a8
2011-06-25 21:43:15 +00:00
dan d819aea05f Fix test cases so that they work with SQLITE_DEFAULT_WAL_SAFETYLEVEL defined.
FossilOrigin-Name: 8f8b373eed7052e6e93c1805fc1effcf1db09366
2011-06-25 16:35:41 +00:00
drh e96ab66f34 Fix the build.
FossilOrigin-Name: 97729542d53a407de1bdfeb5fa6d80bbdb4813b6
2011-06-24 21:47:39 +00:00
adam 2e4491d4b1 Merging local changes to apple-osx
FossilOrigin-Name: 34f0efa2b12e8eb09331768b1524a076baeb34ea
2011-06-24 20:47:06 +00:00
drh 1b2327c509 Pull the last-minute fixes for 3.7.7 into the apple-osx branch.
FossilOrigin-Name: 2d4458af59c697ad453996815d14442230654670
2011-06-23 17:42:45 +00:00
drh 66f6ad7b94 Pull the latest changes from trunk into the apple-osx branch.
FossilOrigin-Name: b5acda0445db39d58229d65a361d539db30f3833
2011-06-23 02:30:36 +00:00
dan b5f87f4394 Update apple-osx branch with the latest trunk changes.
FossilOrigin-Name: fb7ad09dec805ccb709b138509d6e1eb77323c2f
2011-06-22 11:24:55 +00:00
drh fbea85d6cd Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 76005fdca05d86f91e424698d86942264419c616
2011-06-21 01:30:53 +00:00
drh b09945e64c Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 4c69e827f4d65e597e125e0d6691b0c8fb5588d7
2011-06-20 11:57:58 +00:00
drh c3835e0208 Merge the latest trunk changes, including the read-only shared memory
enhancement, into the apple-osx branch.

FossilOrigin-Name: ce5f95dee6989f17a6a7af89699a02f8c5c6f787
2011-06-02 13:07:43 +00:00
drh d736884f3d Pull all the latest trunk changes, and especially the fix for WAL cache
spills causing transactions to disappear, into the apple-osx branch.

FossilOrigin-Name: 8d1a6bb002a7817fa7df932f7cab7220c1d62c0e
2011-05-19 01:51:25 +00:00
drh 283f9e7ee6 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: f9b149e53815235aaf92f722e37c4819503d72b3
2011-05-05 15:52:46 +00:00
drh fa64665a49 Update the apple-osx branch to version 3.7.6.1.
FossilOrigin-Name: 289194d68e891e4977407d07e452e48844777a36
2011-04-13 15:42:26 +00:00
drh e127a2ea9f Pull all the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: 4eaef4ad4cfda519f18922a249904d16489ee606
2011-04-09 18:13:35 +00:00
drh 5be1b1f262 Merge the latest trunk changes into the apple-osx branch.
FossilOrigin-Name: c77a767cbd22354d9f6d5cef0d81ea721be593c7
2011-04-05 22:10:50 +00:00
drh 25d2380356 Pull the latest changes from trunk (and hence from schema-parse-refactor)
into the apple-osx branch.

FossilOrigin-Name: 8e885ddea0fc5d4c4256025c127e5d41d63c47a5
2011-04-05 13:38:12 +00:00
drh 69d67f5412 Merge in the latest changes from trunk.
FossilOrigin-Name: 6d78a25ddce75f63581be60c34dbc75f34c243df
2011-04-04 13:11:07 +00:00
drh 6f7fe3ef3e This is a version of the SQLite 3.7.5 release with Apple's changes for MacOS.
FossilOrigin-Name: 55d2e55b7b0f7851a565e3a982f772afdf8d7a12
2011-02-10 01:49:18 +00:00
drh e3a4e11bcc Pull in all the changes from trunk up through the version 3.7.5
release candidate 1.

FossilOrigin-Name: 09d6c91dcff0699daec02de0cfd1cdc4e61b4f6b
2011-01-27 18:48:02 +00:00
drh 67d225da53 Merge in all changes to the trunk through version 3.7.4rc3.
FossilOrigin-Name: d2ccf7fc0673e875ff7b84cd37b89c65df4bec7f
2010-12-07 15:49:03 +00:00
drh 5a5ced7da9 Merge all the latest changes from the trunk into the apple-osx branch.
FossilOrigin-Name: c8bc057c7def6bbbebd89ee52b582bad75fb0509
2010-11-19 23:50:48 +00:00
adam 985be1bce6 Integrated proxy locking file support for WAL journal mode and double free fix
FossilOrigin-Name: fd4d38fa66de85676189ff4922fb1bf5f8cac9c4
2010-11-09 00:43:59 +00:00
adam 99f24349ea fixed memory leak in proxy lock file error handling
FossilOrigin-Name: e01c5f3eda7fe6e6afe9c3894384f09b58173da1
2010-09-10 23:16:16 +00:00
adam 890b69fb83 replaced relative lock proxy paths with absolute
FossilOrigin-Name: 782c33512ab2b677b0734c591fcecddc5a655203
2010-09-10 20:19:06 +00:00
adam f5d6f1e0c5 replaced relative lock proxy paths with absolute
FossilOrigin-Name: 6a88cd46aeef3c50c91d5aadc61dd0b0982f8a4f
2010-09-10 00:59:28 +00:00
drh 5ec0cfe070 Make sure SQLite is running with MEMSTATUS enabled at the beginning of every
test script.

FossilOrigin-Name: b6e9a4d8f7d8b683b4098270e0be149df1ef295f
2010-09-10 00:18:12 +00:00
drh 3b3b1a538d Make sure MEMSTATUS is enabled at the beginning of the memsubsys2.test
script.

FossilOrigin-Name: cf23a354975f581c2cf2299e2b2a4e00819830ad
2010-09-09 23:40:42 +00:00
drh b0fa210aa3 The merge for check-in [415c448dc4] did not do exactly write, resulting in
a subtle bug in the SQLITE_FCNTL_SIZE_HINT logic.  This check-in is the
fix.

FossilOrigin-Name: badaaa18fd4a4402add6ae1b3ecadbb79f91fe37
2010-09-09 23:31:36 +00:00
drh 801829c812 Merge in the R-tree fix from the trunk.
FossilOrigin-Name: 02ee0bd5a305e3a6cd76f2e304f8a7effacd8433
2010-08-24 01:51:07 +00:00
drh 9b3c15e860 Merge changes through release 3.7.2 into the apple-osx branch.
FossilOrigin-Name: 415c448dc45a297bd1b0bbce25c4572eeab286f0
2010-08-24 01:08:11 +00:00
drh 61d3bfb78b Merge the 3.7.1 pre-release snapshot changes as of [2010-08-18]
into the apple-osx branch.

FossilOrigin-Name: 866e9286ae4226b2bec40ef18c672a41768abf1f
2010-08-18 00:24:09 +00:00
adam 45d55a254b Updating apple-osx with minor source fixes, database truncate and replace private calls and a bunch of conditionalization for tests running in different environments
FossilOrigin-Name: 5e2ee7db0f7a2a042b182336438107e2248d7b88
2010-08-18 00:09:47 +00:00
drh 51e5db70b6 Merge in all changes up to the 3.7.0.1 release.
FossilOrigin-Name: f88c6367d2f96cc93846ba38e6b963a1a3936e8d
2010-08-07 11:46:07 +00:00
drh f219bba933 Backport fix [a6bb2108bfb56] for a typo in the OS/2 interface.
FossilOrigin-Name: 042a1abb030a0711386add7eb6e10832cc8b0f57
2010-08-04 12:31:10 +00:00
drh a0166e1873 Update the version number to 3.7.0.1.
FossilOrigin-Name: 5074b85967df8f55739ba790924347c764288a88
2010-08-04 12:19:24 +00:00
drh aff0449d8f Backport fix [267492d3a7eff7b] for the performance regression caused by
automatic indexing and reported by ticket [8011086c85c6c4040].

FossilOrigin-Name: 3f367fe00e2adf87f3cc426466db4e3088e6f175
2010-08-04 12:13:35 +00:00
drh c55e9b815f Backport the [65b8636ac6e5] fix for ticket [51ae9cad317a1] to version 3.7.0.
FossilOrigin-Name: dec70c63d052bbe41fc4a065109d2845c67d3f15
2010-08-04 11:59:06 +00:00
drh 03ba419b3c Merge in changes up to and including the 3.6.23.1 release.
FossilOrigin-Name: 21ca87f69125a9e7124c6ddc566d17f64661b0d3
2010-06-16 19:48:56 +00:00
drh c4098a3d9f Cherry-pick the SQLITE_FCNTL_SIZE_HINT patch (check-in [2b7e3b4a30d6a7c4a8]
and bump the version number to 3.6.23.2.

FossilOrigin-Name: 776679af588625f13307369770979bccae7cf03a
2010-05-19 22:09:19 +00:00
drh 21ce77989a Disable the corruptE test which SQLITE_OVERSIZE_CELL_CHECK is enabled.
This is a cherrypick merge from check-in [1dc4f9fe9b83467ba].

FossilOrigin-Name: a40d080ca3c5f152f3296caf48f20728f61317de
2010-05-19 20:30:15 +00:00
drh 91973abb4b Include shell.c and sqlite3.def in the amalgamation ZIP archive.
Ticket [e063139eb3f8]

FossilOrigin-Name: b51fcac9fb4207810ee8d33ead47886e9c46d224
2010-03-31 11:56:47 +00:00
drh 722db051c6 Update the version number to 3.6.23.1.
FossilOrigin-Name: b078b588d617e07886ad156e9f54ade6d823568e
2010-03-26 22:28:06 +00:00
drh 87dd60cd8d Pull in other fixes from the trunk: check-ins [bea9258643],
[f186b6a619], and [bb591802ff].

FossilOrigin-Name: b1f342a6643829020beef542a0700d90822e6467
2010-03-26 21:53:11 +00:00
drh 7244fdc446 Fix to the crash8.test test script.
FossilOrigin-Name: f18a129a7aab09a1e0d34155e82bcbf7479a401d
2010-03-26 21:47:59 +00:00
drh 4f7e8fcded Enhance FTS3 to take advantage of the MAX() optimization.
Cherrypick of [b7e42ae774].

FossilOrigin-Name: 4b65b4805100852a2b6a834aa6efc0bbf25b539f
2010-03-26 17:42:57 +00:00
drh 95063a5774 Correctly handle strings with zero-length tokens in the FTS3 offsets()
function.  This is a cherrypick of [d37034f7fc].

FossilOrigin-Name: ff6ae4f0e461fb5f8d08a0092488b7cd71cffb05
2010-03-26 17:40:32 +00:00
drh ad7c2a87f5 After any rollback that modifies the database file, sync the database
before deleting the rollback journal.  This is a cherry-pick merge
of check-ins [b21b911f23] and [f2326dad4e]

FossilOrigin-Name: ca0bc2a22e893062876f67e0f53cbab44b45665d
2010-03-26 17:37:12 +00:00
adam cc3ec7cb2b fix merge error and compiler warning
FossilOrigin-Name: 5c0afe70a5ee2b378896bf30426823dc5ae4e95c
2010-02-26 22:05:01 +00:00
adam 3942b4b147 More double free paranoia
FossilOrigin-Name: 62dfb44b3b66c4acb1a7a10c44cbee1022a88883
2010-02-26 20:54:10 +00:00
drh 9aa0012a08 Merge latest changes from the trunk into the apple-osx branch.
FossilOrigin-Name: 4b72e39bd00572d9375639f4b978eff1b1d9aa20
2010-02-17 19:34:11 +00:00
adam efd8e3b33d Updated open mask to include SQLITE_OPEN_AUTOPROXY
FossilOrigin-Name: 7c3bede3f21812aa78105c6685654f12f0460eea
2010-01-26 01:14:33 +00:00
drh 0b90b2209f Align the os_unix.c source file with the version found on trunk.
FossilOrigin-Name: fa0f6c140e8ff9a5eed1d8a339fb6d55ecdca688
2010-01-20 13:20:22 +00:00
drh 9782039bde Update the Apple OS-X branch to include all of the latest changes in trunk.
FossilOrigin-Name: 96499b1dd69a0954e30e4b5b4f2272ab306afcdb
2010-01-20 01:26:07 +00:00
adam 332aa832ce robustness fixes for preventing a finalized statement from being reused
FossilOrigin-Name: a7a0c8d644873764cb799f9d6aacede4a4fb531f
2010-01-19 23:50:21 +00:00
drh bf4cad1e4c Update the OS-X branch to include all trunk changes through version 3.6.22.
FossilOrigin-Name: 541e2b488e4e40706e457c6d3b5647d53da02ce9
2010-01-06 13:12:48 +00:00
drh b0c5edcd06 Fix the main.mk makefile so that the sqlrr extension is built into the
amalgamation correctly.

FossilOrigin-Name: a3204d8a217d47e5120ab16918c1b7d4be5a021e
2009-12-23 18:06:49 +00:00
drh 2250799f0c Merge the latest changes on trunk (and especially the fix for
the (xANDy)OR(z) bug) into apple-osx.

FossilOrigin-Name: 5754a3a56144ee0e073c80651bf11cb23ee7f447
2009-12-16 23:46:11 +00:00
drh ca071dfd75 Merge all changes associated with the version 3.6.21 release into the OS-X
branch.

FossilOrigin-Name: ad08794d7239bb804eb39c00170821732b60cb65
2009-12-07 23:53:51 +00:00
adam ac0c39980a Fix for lock structure sharing with AFP-style locking
FossilOrigin-Name: 62f15c0aeaec5d778addb6edba62411c698bec0f
2009-11-09 19:30:44 +00:00
drh 04d4227255 Fix an undefined variable on non-Mac builds.
FossilOrigin-Name: 9552de8fb5ec7554c989edc138c0324c5fd0a206
2009-11-05 18:31:55 +00:00
adam e6c3c72c1b Merging in OSX customizations:
A ext/sqlrr/sqlrr.[ch]
-- add sql recording/replay support (very experimental extension -- pre alpha)

M ext/rtree/rtree.c
-- fix cast compiler warning

M src/func.c
-- substring backward compatiblity <rdar://problem/6778339> 

M src/legacy.c
-- replay recorder calls

M src/main.c
-- if SQLITE_ENABLE_AUTO_PROFILE, call sqlite3_profile when env(SQLITE_AUTO_PROFILE)   
-- replay recorder calls

M src/mem1.c
-- use custom malloc zone on single core systems

M src/os_unix.c
-- hostid via gethostuuid
-- read-only file system support for proxy locking
-- improved handling of simulated shared lock on AFP/SMB on 64 bit systems
-- disable whole-file-lock NFS file locking
-- fix for downgrading from exclusive to shared lock on NFS
-- proxy lock breaking & recreating local lock files
-- support SQLITE_OPEN_AUTOPROXY flag
-- only write 1st byte into new zero-length files if fs is DOS
-- cache fs type info in unixFile struct
-- force use of fsync() even if fdatasync() is available
-- remove flock locking style support for SMB
-- replace strcpy with strlcpy

M src/prepare.c
-- replay recorder calls

M src/sqlite.h.in
-- added SQLITE_OPEN_AUTOPROXY

M src/sqliteInt.h
-- include replay recorder header

M src/vdbeapi.c
-- checking for NULL statement for <rdar://6646331> 
-- replay recorder calls

FossilOrigin-Name: 941a01eb868815f566539e9ab21f807d9e798e40
2009-11-03 22:34:35 +00:00
97 changed files with 3885 additions and 495 deletions
+22 -9
View File
@@ -64,7 +64,7 @@ LIBREADLINE = @TARGET_READLINE_LIBS@
# Should the database engine be compiled threadsafe
#
TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
#TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
# Any target libraries which libsqlite must be linked against
#
@@ -118,7 +118,7 @@ TCLSH_CMD = @TCLSH_CMD@
# Where do we want to install the tcl plugin
#
TCLLIBDIR = @TCLLIBDIR@
TCLLIBDIR = /System/Library/Tcl
# The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
#
@@ -353,6 +353,9 @@ SRC += \
$(TOP)/ext/rtree/rtree.h \
$(TOP)/ext/rtree/rtree.c \
$(TOP)/ext/rtree/geopoly.c
SRC += \
$(TOP)/ext/sqlrr/sqlrr.h \
$(TOP)/ext/sqlrr/sqlrr.c
SRC += \
$(TOP)/ext/session/sqlite3session.c \
$(TOP)/ext/session/sqlite3session.h
@@ -570,6 +573,17 @@ EXTHDR += \
$(TOP)/ext/rtree/sqlite3rtree.h
EXTHDR += \
$(TOP)/ext/userauth/sqlite3userauth.h
EXTHDR += \
$(TOP)/ext/sqlrr/sqlrr.h
# If using the amalgamation, use sqlite3.c directly to build the test
# fixture. Otherwise link against libsqlite3.la. (This distinction is
# necessary because the test fixture requires non-API symbols which are
# hidden when the library is built via the amalgamation).
#
TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
TESTFIXTURE_SRC1 = sqlite3.c
TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
# executables needed for testing
#
@@ -640,9 +654,8 @@ libsqlite3.la: $(LIBOBJ)
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-rpath "$(TCLLIBDIR)" \
-version-info "8:6:8" \
-avoid-version
-rpath "$(TCLLIBDIR)/sqlite3" \
-version-info "8:6:8"
sqlite3$(TEXE): shell.c sqlite3.c
$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
@@ -1420,10 +1433,10 @@ install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_instal
pkgIndex.tcl:
echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
$(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)/sqlite3
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/sqlite3
rm -f $(DESTDIR)$(TCLLIBDIR)/sqlite3/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/sqlite3/libtclsqlite3.a
$(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)/sqlite3
clean:
rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
-1
View File
@@ -324,4 +324,3 @@ do_execsql_test 12.3 {
} {3 4 b b}
finish_test
+1
View File
@@ -82,6 +82,7 @@ typedef unsigned int u32;
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
/* The following macro is used to suppress compiler warnings.
*/
+54
View File
@@ -0,0 +1,54 @@
sqlrr - 10/19/2009
SQL Replay Recording
SUMMARY
-------------------------------------------------------
This extension enables recording sqlite API calls that access the database so that they can be replayed or examined.
USAGE
------------------------------------------------------
Recording is enabled by compiling sqlite with symbolic constant SQLITE_ENABLE_SQLRR defined.
By default logs are written to /tmp/<databasename>_<pid>_<connection_number>.sqlrr, to choose another directory, set the environment variable SQLITE_REPLAY_RECORD_DIR to that path.
FILE FORMAT
-----------------------------------------------------
file: <header>[<sql-command>]*
header: <signature><format-version>
signature: SQLRR (5 bytes)
format-version: n (1 byte)
sql-command: <timestamp><type><arg-data>
timestamp: n (16 bytes)
type: n (1 byte)
open 0
close 1
exec 8
bind-text 16
bind-double 17
bind-int 18
bind-null 19
bind-value 20
bind-clear 21
prep 32
step 33
reset 34
finalize 35
open-arg-data: <connection><path><flags>
close-arg-data: <connection>
exec-arg-data: <connection><len><statement-text>
bind-text-arg-data: <statement-ref><index><len><data>
bind-double-arg-data: <statement-ref><index><data>
bind-int-arg-data: <statement-ref><index><data>
bind-null-arg-data: <statement-ref><index>
bind-value-arg-data: <statement-ref><index><len><data> ???
bind-clear-arg-data: <statement-ref>
prep-arg-data: <connection><len><statement-text>
step-arg-data: <statement-ref>
reset-arg-data: <statement-ref>
finalize-arg-data: <statement-ref>
NOTES
+581
View File
@@ -0,0 +1,581 @@
/*
* sqlrr.c
*/
#include "sqlrr.h"
#if defined(SQLITE_ENABLE_SQLRR)
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <sys/param.h>
#include <errno.h>
#include <pthread.h>
#include <libkern/OSAtomic.h>
#include "sqliteInt.h"
#include "vdbeInt.h"
#define LOGSUFFIXLEN 48
/*
* Data types
*/
typedef struct SRRLogRef SRRLogRef;
struct SRRLogRef {
int fd;
sqlite3 *db;
const char *dbPath;
char *logPath;
int connection;
int depth;
SRRLogRef *nextRef;
};
/*
* Globals
*/
SRRLogRef *logRefHead = NULL;
int dbLogCount = 0;
static int srr_enabled = 1;
pthread_mutex_t srr_log_mutex;
static volatile int32_t srr_initialized = 0;
/*
* Log management
*/
extern void SRRecInitialize() {
int go = OSAtomicCompareAndSwap32Barrier(0, 1, &srr_initialized);
if( go ){
pthread_mutex_init(&srr_log_mutex, NULL);
}
}
static SRRLogRef *createLog(sqlite3 *db, const char *dbPath) {
SRRLogRef *ref = NULL;
char *baseDir = getenv("SQLITE_REPLAY_RECORD_DIR");
char logPath[MAXPATHLEN] = "";
char suffix[LOGSUFFIXLEN] = "";
const char *dbName = dbPath;
int len = 0;
int index = 0;
int fd = -1;
size_t out;
unsigned char version = SRR_FILE_VERSION;
SRRecInitialize();
/* construct the path for the log file
* ${SQLITE_REPLAY_DIR}/<dbname>_<pid>_<connection_number>.sqlrr
*/
if (baseDir == NULL) {
baseDir = "/tmp"; /* getenv(TMPDIR) */
}
len = strlen(baseDir);
strlcat(logPath, baseDir, MAXPATHLEN);
if ((len>0) && (baseDir[len-1] != '/')) {
strlcat(logPath, "/", MAXPATHLEN);
}
len = strlen(dbPath);
for (index = len-2; index >= 0; index --){
if (dbPath[index] == '/') {
dbName = &dbPath[index+1];
break;
}
}
strlcat(logPath, dbName, MAXPATHLEN);
int cNum = ++dbLogCount;
snprintf(suffix, sizeof(suffix), "_%d_%d_XXXX.sqlrr", getpid(), cNum);
len = strlcat(logPath, suffix, MAXPATHLEN);
/* make it unique if we have the space */
if ((len + 1) < MAXPATHLEN) {
fd = mkstemps(logPath, 6);
} else {
fprintf(stderr, "Failed to create sqlite replay log path for %s [%s]\n", dbPath, logPath);
return NULL;
}
if (fd == -1) {
fprintf(stderr, "Failed to create sqlite replay log file for %s with path %s [%s]\n", dbPath, logPath, strerror(errno));
return NULL;
}
fprintf(stdout, "Writing sqlite replay log file %s\n", logPath);
out = write(fd, SRR_FILE_SIGNATURE, SRR_FILE_SIGNATURE_LEN);
if (out!=-1) {
out = write(fd, &version, 1);
}
if (out == -1){
fprintf(stderr, "Write failure on log [%s]: %s\n", logPath, strerror(errno));
close(fd);
return NULL;
}
len = strlen(logPath) + 1;
ref = (SRRLogRef *)malloc(sizeof(SRRLogRef));
ref->db = db;
ref->dbPath = dbPath;
ref->logPath = (char *)malloc(len * sizeof(char));
strlcpy(ref->logPath, logPath, len);
ref->fd = fd;
ref->connection = cNum;
ref->depth = 0;
pthread_mutex_lock(&srr_log_mutex);
ref->nextRef = logRefHead;
logRefHead = ref;
pthread_mutex_unlock(&srr_log_mutex);
return ref;
}
static void closeLog(sqlite3 *db) {
SRRLogRef *ref = NULL;
SRRLogRef *lastRef = NULL;
pthread_mutex_lock(&srr_log_mutex);
for (ref = logRefHead; ref != NULL; ref = ref->nextRef) {
if (ref->db == db) {
if (lastRef == NULL) {
logRefHead = ref->nextRef;
} else {
lastRef->nextRef = ref->nextRef;
}
}
}
pthread_mutex_unlock(&srr_log_mutex);
if (ref != NULL) {
fprintf(stdout, "Closing sqlite replay log file %s\n", ref->logPath);
close(ref->fd);
free(ref->logPath);
free(ref);
}
}
static SRRLogRef *getLog(sqlite3 *db) {
pthread_mutex_lock(&srr_log_mutex);
SRRLogRef *ref = logRefHead;
for (ref = logRefHead; ref != NULL; ref = ref->nextRef) {
if (ref->db == db) {
pthread_mutex_unlock(&srr_log_mutex);
return ref;
}
}
pthread_mutex_unlock(&srr_log_mutex);
return NULL;
}
/*
* SQLite recording API
*/
void SQLiteReplayRecorder(int flag) {
srr_enabled = flag;
}
// open-arg-data: <connection><len><path><flags>
void _SRRecOpen(sqlite3 *db, const char *path, int flags) {
if (!srr_enabled) return;
if (db) {
SRRLogRef *ref = createLog(db, path);
if (ref) {
SRRCommand code = SRROpen;
int len = strlen(path);
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out=write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) { out=write(ref->fd, &(ref->connection), sizeof(ref->connection)); }
if (out!=-1) { out=write(ref->fd, &len, sizeof(len)); }
if (out!=-1) { out=write(ref->fd, path, len); }
if (out!=-1) { out=write(ref->fd, &flags, sizeof(flags)); }
if (out==-1) {
fprintf(stderr, "Error writing open to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(db);
}
}
}
}
//close-arg-data: <connection>
void SRRecClose(sqlite3 *db) {
if (!srr_enabled) return;
if (db) {
SRRLogRef *ref = getLog(db);
if (ref) {
SRRCommand code = SRRClose;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) { out = write(ref->fd, &(ref->connection), sizeof(ref->connection)); }
if (out==-1) {
fprintf(stderr, "Error writing close to log file [%s]: %s\n", ref->logPath, strerror(errno));
}
closeLog(db);
}
}
}
// exec-arg-data: <connection><len><statement-text>
void SRRecExec(sqlite3 *db, const char *sql) {
if (!srr_enabled) return;
if (db) {
SRRLogRef *ref = getLog(db);
if (ref) {
if (ref->depth == 0) {
SRRCommand code = SRRExec;
int len = strlen(sql);
struct timeval tv;
size_t out;
ref->depth = 1;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) { out = write(ref->fd, &(ref->connection), sizeof(ref->connection)); }
if (out!=-1) { out = write(ref->fd, &len, sizeof(len)); }
if (out!=-1) { out = write(ref->fd, sql, len); }
if (out==-1) {
fprintf(stderr, "Error writing exec to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(db);
}
} else {
ref->depth ++;
}
}
}
}
void SRRecExecEnd(sqlite3 *db) {
if (!srr_enabled) return;
if (db) {
SRRLogRef *ref = getLog(db);
if (ref) {
ref->depth --;
}
}
}
// prep-arg-data: <connection><len><statement-text><savesql><statement-ref>
void _SRRecPrepare(sqlite3 *db, const char *sql, int nBytes, int saveSql, sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if ((db!=NULL)&&(pStmt!=NULL)) {
SRRLogRef *ref = getLog(db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRPrepare;
struct timeval tv;
size_t out;
int sqlLen = nBytes;
if (sqlLen == -1) {
sqlLen = strlen(sql);
}
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) { out = write(ref->fd, &(ref->connection), sizeof(ref->connection)); }
if (out!=-1) { out = write(ref->fd, &sqlLen, sizeof(sqlLen)); }
if (out!=-1) { out = write(ref->fd, sql, sqlLen); }
if (out!=-1) { out = write(ref->fd, &saveSql, sizeof(saveSql)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out==-1) {
fprintf(stderr, "Error writing prepare to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(db);
}
}
}
}
//step-arg-data: <statement-ref>
void SRRecStep(sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref) {
if (ref->depth == 0) {
SRRCommand code = SRRStep;
struct timeval tv;
size_t out;
ref->depth = 1;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out==-1) {
fprintf(stderr, "Error writing step to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
} else {
ref->depth ++;
}
}
}
}
void SRRecStepEnd(sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref) {
ref->depth --;
}
}
}
// reset-arg-data: <statement-ref>
void SRRecReset(sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRReset;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out==-1) {
fprintf(stderr, "Error writing reset to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// finalize-arg-data: <statement-ref>
void SRRecFinalize(sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRFinalize;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out==-1) {
fprintf(stderr, "Error writing finalize to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-text-arg-data: <statement-ref><index><len><data>
void SRRecBindText(sqlite3_stmt *pStmt, int i, const char *zData, int64_t nData) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindText;
struct timeval tv;
size_t out;
int64_t textLen = nData;
if (textLen == -1) {
textLen = strlen(zData);
}
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out!=-1) { out = write(ref->fd, &i, sizeof(i)); }
if (out!=-1) { out = write(ref->fd, &textLen, sizeof(textLen)); }
if (out!=-1) { out = write(ref->fd, zData, textLen); }
if (out==-1) {
fprintf(stderr, "Error writing bind text to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-blob-arg-data: <statement-ref><index><len>[<data>]
void SRRecBindBlob(sqlite3_stmt *pStmt, int i, const char *zData, int64_t nData) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindBlob;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out!=-1) { out = write(ref->fd, &i, sizeof(i)); }
if (zData == NULL) {
int64_t negNData = -nData;
if (out!=-1) { out = write(ref->fd, &negNData, sizeof(negNData)); }
} else {
if (out!=-1) { out = write(ref->fd, &nData, sizeof(nData)); }
if (out!=-1) { out = write(ref->fd, zData, nData); }
}
if (out==-1) {
fprintf(stderr, "Error writing bind blob to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-double-arg-data: <statement-ref><index><data>
void SRRecBindDouble(sqlite3_stmt *pStmt, int i, double value) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindDouble;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out!=-1) { out = write(ref->fd, &i, sizeof(i)); }
if (out!=-1) { out = write(ref->fd, &value, sizeof(value)); }
if (out==-1) {
fprintf(stderr, "Error writing bind double to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-int-arg-data: <statement-ref><index><data>
void SRRecBindInt64(sqlite3_stmt *pStmt, int i, int64_t value) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindInt;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out!=-1) { out = write(ref->fd, &i, sizeof(i)); }
if (out!=-1) { out = write(ref->fd, &value, sizeof(value)); }
if (out==-1) {
fprintf(stderr, "Error writing bind int to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-null-arg-data: <statement-ref><index>
void SRRecBindNull(sqlite3_stmt *pStmt, int i) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindNull;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out!=-1) { out = write(ref->fd, &i, sizeof(i)); }
if (out==-1) {
fprintf(stderr, "Error writing bind null to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
// bind-value-arg-data: <statement-ref><index><len><data> ???
void SRRecBindValue(sqlite3_stmt *pStmt, int i, const sqlite3_value *value) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
fprintf(stderr, "SRRecBindValue(sqlite3_bind_value) is not yet supported, closing [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
// bind-clear-arg-data: <statement-ref>
void SRRecClearBindings(sqlite3_stmt *pStmt) {
if (!srr_enabled) return;
if(pStmt!=NULL) {
Vdbe *v = (Vdbe *)pStmt;
SRRLogRef *ref = getLog(v->db);
if (ref && (ref->depth == 0)) {
SRRCommand code = SRRBindClear;
struct timeval tv;
size_t out;
gettimeofday(&tv, NULL);
out = write(ref->fd, &tv, sizeof(tv));
if (out!=-1) { out = write(ref->fd, &code, sizeof(SRRCommand)); }
if (out!=-1) {
int64_t stmtInt = (int64_t)((intptr_t)(pStmt));
out = write(ref->fd, &stmtInt, sizeof(int64_t));
}
if (out==-1) {
fprintf(stderr, "Error writing clear bindings to log file [%s]: %s\n", ref->logPath, strerror(errno));
closeLog(ref->db);
}
}
}
}
#endif /* SQLITE_ENABLE_SQLRR */
+61
View File
@@ -0,0 +1,61 @@
/*
* sqlrr.h
*/
#ifndef _SQLRR_H_
#define _SQLRR_H_
/*
** Header constants
*/
#define SRR_FILE_SIGNATURE "SQLRR"
#define SRR_FILE_SIGNATURE_LEN 5
#define SRR_FILE_VERSION 0x1
#define SRR_FILE_VERSION_LEN 1
#if defined(SQLITE_ENABLE_SQLRR)
#include "sqlite3.h"
#include <sys/types.h>
#define SRRecOpen(A,B,C) if(!rc){_SRRecOpen(A,B,C);}
#define SRRecPrepare(A,B,C,D,E) if(!rc){_SRRecPrepare(A,B,C,D,E);}
typedef enum {
SRROpen = 0,
SRRClose = 1,
SRRExec = 8,
SRRBindText = 16,
SRRBindBlob = 17,
SRRBindDouble = 18,
SRRBindInt = 19,
SRRBindNull = 20,
SRRBindValue = 21,
SRRBindClear = 22,
SRRPrepare = 32,
SRRStep = 33,
SRRReset = 34,
SRRFinalize = 35
} SRRCommand;
extern void SQLiteReplayRecorder(int flag);
extern void _SRRecOpen(sqlite3 *db, const char *path, int flags);
extern void SRRecClose(sqlite3 *db);
extern void SRRecExec(sqlite3 *db, const char *sql);
extern void SRRecExecEnd(sqlite3 *db);
extern void _SRRecPrepare(sqlite3 *db, const char *sql, int nBytes, int saveSql, sqlite3_stmt *stmt);
extern void SRRecStep(sqlite3_stmt *pStmt);
extern void SRRecStepEnd(sqlite3_stmt *pStmt);
extern void SRRecReset(sqlite3_stmt *pStmt);
extern void SRRecFinalize(sqlite3_stmt *pStmt);
extern void SRRecBindText(sqlite3_stmt *pStmt, int i, const char *zData, int64_t nData);
extern void SRRecBindBlob(sqlite3_stmt *pStmt, int i, const char *zData, int64_t nData);
extern void SRRecBindDouble(sqlite3_stmt *pStmt, int i, double value);
extern void SRRecBindInt64(sqlite3_stmt *pStmt, int i, int64_t value);
extern void SRRecBindNull(sqlite3_stmt *pStmt, int i);
extern void SRRecBindValue(sqlite3_stmt *pStmt, int i, const sqlite3_value *value);
extern void SRRecClearBindings(sqlite3_stmt *pStmt);
#endif /* defined(SQLITE_ENABLE_SQLRR) */
#endif /* _SQLRR_H_ */
+7 -2
View File
@@ -231,6 +231,9 @@ SRC += \
$(TOP)/ext/rtree/rtree.h \
$(TOP)/ext/rtree/rtree.c \
$(TOP)/ext/rtree/geopoly.c
SRC += \
$(TOP)/ext/sqlrr/sqlrr.h \
$(TOP)/ext/sqlrr/sqlrr.c
SRC += \
$(TOP)/ext/session/sqlite3session.c \
$(TOP)/ext/session/sqlite3session.h
@@ -478,6 +481,8 @@ EXTHDR += \
$(TOP)/ext/fts3/fts3Int.h \
$(TOP)/ext/fts3/fts3_hash.h \
$(TOP)/ext/fts3/fts3_tokenizer.h
EXTHDR += \
$(TOP)/ext/sqlrr/sqlrr.h
EXTHDR += \
$(TOP)/ext/rtree/rtree.h \
$(TOP)/ext/rtree/geopoly.c
@@ -632,10 +637,10 @@ sqlite3.o: sqlite3.c
# files are automatically generated. This target takes care of
# all that automatic generation.
#
target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c
target_source: $(SRC) $(EXTHDR) $(TOP)/tool/vdbe-compress.tcl fts5.c
rm -rf tsrc
mkdir tsrc
cp -f $(SRC) tsrc
cp -f $(SRC) $(EXTHDR) tsrc
rm tsrc/sqlite.h.in tsrc/parse.y
tclsh $(TOP)/tool/vdbe-compress.tcl $(OPTS) <tsrc/vdbe.c >vdbe.new
mv vdbe.new tsrc/vdbe.c
+101 -96
View File
@@ -1,9 +1,9 @@
C When\scompiling\sthe\sshell\sfor\sWinRT,\savoid\susing\sWin32\sAPIs\sthat\sare\sunavailable.
D 2020-04-09T15:31:22.553
C Merge\srecent\strunk\schanges\sinto\sthe\sapple-osx\sbranch.
D 2020-04-09T18:51:29.636
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F Makefile.in 9dfc7936f675785309b74d09202bb656732325e65df889e5aaa18cc8932e5b0c
F Makefile.in e10c86c00389ba54b1e0ec374246bb8ed1037b9be97de16ad6b957fc888ca14f
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
F Makefile.msc fab23c6b10cb6f06a7e9c407fc2e35cb184a6d653f1b793bda87fcee2eafa4f6
F README.md 1514a365ffca3c138e00c5cc839906108a01011a6b082bad19b09781e3aa498a
@@ -190,7 +190,7 @@ F ext/fts5/test/fts5leftjoin.test c0b4cafb9661379e576dc4405c0891d8fcc27826807405
F ext/fts5/test/fts5matchinfo.test 10c9a6f7fe61fb132299c4183c012770b10c4d5c2f2edb6df0b6607f683d737a
F ext/fts5/test/fts5merge.test e92a8db28b45931e7a9c7b1bbd36101692759d00274df74d83fd29d25d53b3a6
F ext/fts5/test/fts5merge2.test 3ebad1a59d6ad3fb66eff6523a09e95dc6367cbefb3cd73196801dea0425c8e2
F ext/fts5/test/fts5misc.test 088ac5f0f5de1ad45b0f83197ab5263bcae8130156cdc901bff2375ff2b8af86
F ext/fts5/test/fts5misc.test cc68590131a1c7fd1f4b09f95bf0d6fd46817472cfd2fd8af69f555548318c97
F ext/fts5/test/fts5multi.test a15bc91cdb717492e6e1b66fec1c356cb57386b980c7ba5af1915f97fe878581
F ext/fts5/test/fts5multiclient.test 5ff811c028d6108045ffef737f1e9f05028af2458e456c0937c1d1b8dea56d45
F ext/fts5/test/fts5near.test 211477940142d733ac04fad97cb24095513ab2507073a99c2765c3ddd2ef58bd
@@ -384,7 +384,7 @@ F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c3350
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
F ext/rtree/geopoly.c cac70b5502742bd0ba8877a1329a74e86a379c78567546a2a18cf5f9c3787f73
F ext/rtree/rtree.c 0ee39cc787b95aa03a012e09e6090b0fa452154fa812af9a379898560fd6c00f
F ext/rtree/rtree.c 7b9610783ca2dc83cf737cb538d7029ea25ecf56c2e98902c71bc2fa35d61e22
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
F ext/rtree/rtree1.test 00792b030a4e188ff1b22e8530e8aa0452bb5dd81c2b18cb004afc7dc63e040e
F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e1303d32603d
@@ -447,13 +447,16 @@ F ext/session/sessionwor.test 67b5ab91d4f93ce65ff1f58240ac5ddf73f8670facc1ffa49c
F ext/session/sqlite3session.c e25b345896fa3646ff8b6c4058b3d9e365dc7eab4afe80b110808681098551c8
F ext/session/sqlite3session.h a2db5b72b938d12c727b4b4ec632254ca493670a9c0de597af3271a7f774fc57
F ext/session/test_session.c 98797aba475a799376c9a42214f2d1debf2d0c3cb657d9c8bbf4f70bf3fb4aec
F ext/sqlrr/README.txt 4239030e73023e72a2e727808cd433577d5bf730
F ext/sqlrr/sqlrr.c 8d1e6571cd6a6beabdb5bcdfe3a0e723b914db41
F ext/sqlrr/sqlrr.h 09e4f8929ad9bc2638732c0cc0db5eef8c417824
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865f002fc80cb
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
F main.mk 7ce055f3df31a4f7d21e38f493f907c21db1f673863a573e231f55e2ab005023
F main.mk 9830bea3b216623851057514670077a706478d443681fefcbd70d509c4cd4285
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
@@ -472,9 +475,9 @@ F src/auth.c a3d5bfdba83d25abed1013a8c7a5f204e2e29b0c25242a56bc02bb0c07bf1e06
F src/backup.c 5e617c087f1c2d6005c2ec694ce80d6e16bc68d906e1b1c556d7c7c2228b636b
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
F src/btree.c 79ce96ab39fd2fc21ff00d03913587d5a08280a9eb081a08d0ffa9fa26f4f6fb
F src/btree.c bb7cf28864d713eccbb757a3990e0d46d5a13b927d6b73a763ec53c0636b9d92
F src/btree.h 6111552f19ed7a40f029cf4b33badc6fef9880314fffd80a945f0b7f43ab7471
F src/btreeInt.h dee1a1d0c621524e006bb260bd6b66d5d1867da6fe38cba9ad7b6a9bb9c0c175
F src/btreeInt.h 9aa1cacdf0dfce41b0b481e0f3ce6fa0142a1e911be42fe7cd382cb4b22ab096
F src/build.c ec6c0bda1e43ef55e5f5121a77ba19fac51fc6585f95ce2da795bcedcf6e8f36
F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
@@ -493,9 +496,9 @@ F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
F src/insert.c 8e4211d04eb460c0694d486c6ba1c068d468c6f653c3f237869a802ad82854de
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/legacy.c f69590f141eabd2dc787710264ccfa4374fac991ea1ca2120a2550c0ffe32afd
F src/loadext.c b179df50e6e8bb0c36c149e95d958d49bd8c6c7469e59c01b53d164360bc6c32
F src/main.c 2e076b6dc1f8ab69c7fc604e8af88ab138a64c0616826361e254cee55bcba4e8
F src/main.c c6ac84e79b4ce3672446fb4503c692d4ed74d5e92256659f56c7245f5855d917
F src/malloc.c cabfef0d725e04c8abfe0231a556ed8b78bf329dcc3fddbf903f6cdcd53cf4e6
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
@@ -511,37 +514,38 @@ F src/mutex_noop.c 9d4309c075ba9cc7249e19412d3d62f7f94839c4
F src/mutex_unix.c aaf9ebc3f89df28483c52208497a99a02cc3650011422fc9d4c57e4392f7fe58
F src/mutex_w32.c 7670d770c94bbfe8289bec9d7f1394c5a00a57c37f892aab6b6612d085255235
F src/notify.c 9711a7575036f0d3040ba61bc6e217f13a9888e7
F src/os.c 669cc3839cc35d20f81faf0be1ab6d4581cea35e9d8f3a9d48a98d6571f7c285
F src/os.c c862e5d629d7ad8f762b9f67e716809832acffc5bf4105839b363fb2d11d0e73
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
F src/os_unix.c 06593ba4bdfae42b30a897b3b4e59abb88a11d50dd0cad39003da955d822b8d1
F src/os_win.c 035a813cbd17f355bdcad7ab894af214a9c13a1db8aeac902365350b98cd45a7
F src/os_unix.c e96b6930709871ecc3dac6954eff6648b8549ff20252bffc59e613d7c950c539
F src/os_win.c b393ae2303d051684f4bdaec3984c9c9594f10adc629689108ed9aa5ab219d17
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c a71ffd145f55e28cbdc1bdabb5e6bef063da428a6c0de3c3a36e9a0c41d4c8c0
F src/pager.h 3b33619a90180e0874c7eca31d6f6ceb464d9322c6fb4e9a7bbb318c8a17bdb3
F src/pager.c 08200127e8e471dffcecd34e73a2636c44636bd2bd4d40d01ceade906fb4e970
F src/pager.h 3e76d741460b526ebe1b838a446ccc5912bab6d7a679e9959e490ad23346396f
F src/parse.y c8eff38606f443d5ba245263fa7abc05e4116d95656e050c4b78e9bfbf931add
F src/pcache.c 385ff064bca69789d199a98e2169445dc16e4291fa807babd61d4890c3b34177
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
F src/pcache1.c 6596e10baf3d8f84cc1585d226cf1ab26564a5f5caf85a15757a281ff977d51a
F src/pragma.c 5fd004b89c77319008ddff6d65dcc83ccca9584d3048f4f66b108b5906a20dba
F src/pcache1.c 33a0577ec7241397244369aa4874b41970fbad41190847243797a350331cb6d1
F src/pragma.c c391258898f71838ed222994c2092bee6d8de7f5c42290b7714b0cfc43955c70
F src/pragma.h 9473160d220416456b40f27323bb4b316d4e4e08ffbf8bf88c5f7045d49c38e5
F src/prepare.c 8d4d6c8aa6afefc48027c54b41cdf134b4d6bc2fc4badbe483ad7fd9e1728a28
F src/prepare.c b3d5547774f37f49aefee239488817329b4b5fec0cb7da6bb3a2eca4e4d92489
F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c d36a2b1639e1c33d7b508abfd3452a63e7fd81737f6f3940bfef085fca6f21f4
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c ab4eb1aee1bd066feea5b6eff264220ae54459019654264e9f688368a7d0c0b5
F src/shell.c.in cf7d6140c33859a86188aa52093dfa5d4e4d9ce32ecf1d588a127cb0a8f6f96f
F src/sqlite.h.in cc7d0949ac32bb68ed97acdb3e7ae91cd413a24d32d6ff049ef8308d620a4367
F src/sqlite.h.in d82d75565c76ff095b729a28772e2bad9382c395c4914ae437ef37e8594f5a04
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3_private.h aee73ebaea1963e528b61408c01ba82f49fdf3dca9cbe940f3b0f3d9cec25942
F src/sqlite3ext.h 9c5269260409eb3275324ccace6a13a96f4ad330c708415f70ca6097901ff4ee
F src/sqliteInt.h 0f3848c46310d197246003f052985b72d1cdbfc0b31e069db76cb5231062fa1d
F src/sqliteInt.h ce780f1aed03e7eaeeddcd966019ba32860ed669e2c396a2d50ffd36c1e35974
F src/sqliteLimit.h 95cb8479ca459496d9c1c6a9f76b38aee12203a56ce1092fe13e50ae2454c032
F src/status.c 9ff2210207c6c3b4d9631a8241a7d45ab1b26a0e9c84cb07a9b5ce2de9a3b278
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
F src/tclsqlite.c d0aa320416efe88c4dbb0156ed6c494f2f9958871a940e46984ee57b3e7fcc50
F src/test1.c 5e8b8cc54e8c88906ea8a084387aa79bad245e539f4cee73149e5c0527e1db16
F src/test1.c 6bef9e31107676d229c52be7690c9f5e9cf027c90c9792a16c0b9c0e1373ef85
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
F src/test3.c 61798bb0d38b915067a8c8e03f5a534b431181f802659a6616f9b4ff7d872644
F src/test4.c 405834f6a93ec395cc4c9bb8ecebf7c3d8079e7ca16ae65e82d01afd229694bb
@@ -556,7 +560,7 @@ F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0
F src/test_bestindex.c 78809f11026f18a93fcfd798d9479cba37e1201c830260bf1edc674b2fa9b857
F src/test_blob.c ae4a0620b478548afb67963095a7417cd06a4ec0a56adb453542203bfdcb31ce
F src/test_btree.c 8b2dc8b8848cf3a4db93f11578f075e82252a274
F src/test_config.c 5ea19bf0972a9d91728518b4d30e91477acce80496003ecbef3a7fb18d0bd081
F src/test_config.c c67dffdf7653716d3b7d12b29ffdc1482e221a958d42c83811b24aa3034ecb15
F src/test_delete.c e2fe07646dff6300b48d49b2fee2fe192ed389e834dd635e3b3bac0ce0bf9f8f
F src/test_demovfs.c 86142ba864d4297d54c5b2e972e74f3141ae4b30f05b3a95824184ed2d3d7f91
F src/test_devsym.c 6109b45c3db3ef7b002320947ed448c027356ab8b885156ff535fd8684d4a571
@@ -582,7 +586,7 @@ F src/test_rtree.c 671f3fae50ff116ef2e32a3bf1fe21b5615b4b7b
F src/test_schema.c f575932cb6274d12147a77e13ea4b49d52408513
F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
F src/test_sqllog.c 11e6ce7575f489155c604ac4b439f2ac1d3d5aef
F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e
F src/test_superlock.c 793bb9d43a924c21993bcd6c2e200d3db8abf34e
F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939
F src/test_tclsh.c eeafce33ad2136d57e5dec10f1e9a4347447eb72ffd504a1c7b9c6bfe2e71578
F src/test_tclvar.c 33ff42149494a39c5fbb0df3d25d6fafb2f668888e41c0688d07273dcb268dfc
@@ -603,10 +607,10 @@ F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
F src/utf.c 95fb6e03a5ca679045c5adccd05380f0addccabef5911abddcb06af069500ab7
F src/util.c 3b6cedf7a0c69bd6e1acce832873952d416212d6293b18d03064e07d7a9b5118
F src/vacuum.c 813b510ba887fee6492bcb11f2bf77d7eb58b232b83649136372e0a2fc17f4b9
F src/vdbe.c 972999395eee88702091fb5d50cf4effd07889c371807d222a7f517388e6378e
F src/vdbe.c 5eb49e06f3554d2d6c3d9e6cc7aab92f439001fd3c065b627a318b2142535d95
F src/vdbe.h 51282fbe819ee0e8eeeaab176240860d334c20a12b14f3b363e7f1a4e05d60b9
F src/vdbeInt.h 0b728ee662862a38b1912af741e2ac64f524de3c77aa86cf4306c42bdcd9de59
F src/vdbeapi.c d176ee7251d5344de7bb2a0d2dd0fe536834e5843d9bc2389e0f5cdcd5374141
F src/vdbeapi.c f6e2922a0bba0b98582890bf5f29942b854fc86be58c8e7bdaa4a44b5f32b1b7
F src/vdbeaux.c 8349559e72bf0cfa2258b1159b004ec4d1717a054d2e1829c8cc897c32da8752
F src/vdbeblob.c 253ed82894924c362a7fa3079551d3554cd1cdace39aa833da77d3bc67e7c1b1
F src/vdbemem.c 39b942ecca179f4f30a32b54579a85d74ccaefa5af2a0ad2700abe5ef0768b22
@@ -614,15 +618,15 @@ F src/vdbesort.c 2be76d26998ce2b3324cdcc9f6443728e54b6c7677c553ad909c7d7cfab587d
F src/vdbetrace.c fa3bf238002f0bbbdfb66cc8afb0cea284ff9f148d6439bc1f6f2b4c3b7143f0
F src/vtab.c 7b704a90515a239c6cdba6a66b1bb3a385e62326cceb5ecb05ec7a091d6b8515
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c ea8dad28bb0e2b85ac1ab7618968687ff5fd522af8a1a38d6960ec176ebc8ee6
F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
F src/wal.c 4e8062448fc424c75c4ea063b5ffea5888ec9b45f041137509049b21cb2b025f
F src/wal.h bc4bdd9ee970c9d62197fa4139d7782f4d96d75152d1e6d4ead4d45dd684187d
F src/walker.c 7c429c694abd12413a5c17aec9f47cfe9eba6807e6b0a32df883e8e3a14835ed
F src/where.c 9546c82056e8cdb27291f98cf1adca5d271240b399bb97b32f77fc2bea6146c9
F src/whereInt.h 6b874aa15f94e43a2cec1080be64d955b04deeafeac90ffb5d6975c0d511be3c
F src/wherecode.c 7b939de85d65cc4b4bfa197513136b9e0ae03167e3b82842ca5a0ba1055ba65d
F src/whereexpr.c 264d58971eaf8256eb5b0917bcd7fc7a1f1109fdda183a8382308a1b18a2dce7
F src/window.c ba1ffb78d73c5831433681aab7ee634230ee32f14ad508efa585044662141d5a
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/8_3_names.test 05034aadccd2253ffe6cbefb06662b8aa4600f77
F test/affinity2.test ce1aafc86e110685b324e9a763eab4f2a73f737842ec3b687bd965867de90627
F test/affinity3.test 6a101af2fc945ce2912f6fe54dd646018551710d
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -639,7 +643,7 @@ F test/altercol.test 1d6a6fe698b81e626baea4881f5717f9bc53d7d07f1cd23ee7ad1b931f1
F test/alterlegacy.test 82022721ce0de29cedc9a7af63bc9fcc078b0ee000f8283b4b6ea9c3eab2f44b
F test/altermalloc.test 167a47de41b5c638f5f5c6efb59784002b196fff70f98d9b4ed3cd74a3fb80c9
F test/altermalloc2.test fa7b1c1139ea39b8dec407cf1feb032ca8e0076bd429574969b619175ad0174b
F test/altertab.test 523ba6368e0da19f462f7c05563c569675736d946724cac1c4ae848f76783434
F test/altertab.test 935bdca186df759b6614552fcc90f663de9f27a39e7bd5a7c89c6232b2d341ee
F test/altertab2.test b0d62f323ca5dab42b0bc028c52e310ebdd13e655e8fac070fe622bad7852c2b
F test/altertab3.test 155b8dc225ce484454a7fb4c8ba745680b6fa0fc3e08919cbbc19f9309d128ff
F test/amatch1.test b5ae7065f042b7f4c1c922933f4700add50cdb9f
@@ -666,10 +670,10 @@ F test/atof1.test 1ccfc96a6888566597b83d882c81b3c04258dc39317e8c1cec89ba481eaa2f
F test/atomic.test 065a453dde33c77ff586d91ccaa6ed419829d492dbb1a5694b8a09f3f9d7d061
F test/atomic2.test b6863b4aa552543874f80b42fb3063f1c8c2e3d8e56b6562f00a3cc347b5c1da
F test/atrc.c ec92d56d8fbed9eb3e11aaf1ab98cf7dd59e69dae31f128013f1d97e54e7dfed
F test/attach.test d42862c72fef3d54367d962d41dcfb5363442a4a1bd898c22ae950cea1aa0dd3
F test/attach.test 9dda4f69b4183f47c97b76e37ef954f85007435f416680073fec4891f66992d1
F test/attach2.test 256bd240da1835fb8408dd59fb7ef71f8358c7a756c46662434d11d07ba3a0ce
F test/attach3.test c59d92791070c59272e00183b7353eeb94915976
F test/attach4.test aa05b1d8218b24eba5a7cccf4f224f514ba57ba705c9267f09d2bb63fed0eea1
F test/attach4.test 392e04bb6ff4c2998f88049da3a2e410554abc964c2ee3d9eb0c3bb8e1f48758
F test/attachmalloc.test 12c4f028e570acf9e0a4b0b7fe6f536e21f3d5ebddcece423603d0569beaf438
F test/auth.test 2154625c05bc79f0e0ea72cb2358395a8041243caa0fd7ce7617d50da4331794
F test/auth2.test 9eb7fce9f34bf1f50d3f366fb3e606be5a2000a1
@@ -707,7 +711,7 @@ F test/bigfile2.test 1b489a3a39ae90c7f027b79110d6b4e1dbc71bfc
F test/bigmmap.test 31dad31573638bd32de866cdefd11843f75685be4ba6aec1a47918f098f1899b
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
F test/bigsort.test 8299fa9298f4f1e02fc7d2712e8b77d6cd60e5a2
F test/bind.test 1e136709b306f7ed3192d349c2930d89df6ab621654ad6f1a72381d3fe76f483
F test/bind.test d9134cb9300ccef302e94dfd66008dc24f14af48595e30beabb49dccbc0ef3ca
F test/bindxfer.test efecd12c580c14df5f4ad3b3e83c667744a4f7e0
F test/bitvec.test 75894a880520164d73b1305c1c3f96882615e142
F test/blob.test e7ac6c7d3a985cc4678c64f325292529a69ae252
@@ -723,7 +727,7 @@ F test/btree01.test e08b3613540145b353f20c81cb18ead54ff12e0f
F test/btree02.test 7555a5440453d900410160a52554fe6478af4faf53098f7235f1f443d5a1d6cc
F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
F test/busy.test 510dc6daaad18bcbbc085bcc6217d6dc418def5e73f72ce1475eea0cb7834727
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
F test/cache.test 0bc2195f4a7207108af2617ed356e77daf4412f7
F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61
F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9
F test/capi2.test 34a1a9a96d543a2ec2c209696b11b164444f57253b1f2cba1c2e53fadede6c7b
@@ -809,7 +813,7 @@ F test/dbfuzz2-seed1.db e6225c6f3d7b63f9c5b6867146a5f329d997ab105bee64644dc2b3a2
F test/dbfuzz2.c c2c9cb40082a77b7e95ffb8b2da1e93322efadfb1c8c1e0001c95a0af1e156c2
F test/dbpage.test 650234ba683b9d82b899c6c51439819787e7609f17a0cc40e0080a7b6443bc38
F test/dbstatus.test 4a4221a883025ffd39696b3d1b3910b928fb097d77e671351acb35f3aed42759
F test/dbstatus2.test f5fe0afed3fa45e57cfa70d1147606c20d2ba23feac78e9a172f2fe8ab5b78ef
F test/dbstatus2.test ce94261a9e45cfd2d08195a82553c03b45c01e5ebad8a17888aeef818d9da69c
F test/default.test 9687cfb16717e4b8238c191697c98be88c0b16e568dd5368cd9284154097ef50
F test/delete.test 31832b0c45ecb51a54348c68db173be462985901e6ed7f403d6d7a8f70ab4ef0
F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
@@ -844,9 +848,9 @@ F test/e_totalchanges.test b12ee5809d3e63aeb83238dd501a7bca7fd72c10
F test/e_update.test f46c2554d915c9197548681e8d8c33a267e84528
F test/e_uri.test 47eeb2960e74613f0f8722b2f13aef08fde69daa16e5380ac93df84dac8b1f72
F test/e_vacuum.test 0d8832a2ce92350db0d0cff47b419465fd9772562e1f77ff7d9478c07a4980d2
F test/e_wal.test ae9a593207a77d711443ee69ffe081fda9243625
F test/e_wal.test 95c21e45eefe4cc31e820f998b14f92d1cb3a1bf
F test/e_walauto.test 248af31e73c98df23476a22bdb815524c9dc3ba8
F test/e_walckpt.test 28c371a6bb5e5fe7f31679c1df1763a19d19e8a0
F test/e_walckpt.test 9f20ab843538484c57069074b126699266ee5521
F test/e_walhook.test 01b494287ba9e60b70f6ebf3c6c62e0ffe01788e344a4846b08e5de0b344cb66
F test/emptytable.test a38110becbdfa6325cd65cb588dca658cd885f62
F test/enc.test 9a7be5479da985381d740b15f432800f65e2c87029ee57a318f42cb2eb43763a
@@ -856,7 +860,7 @@ F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
F test/eqp.test 84879b63e3110552bf8ce648a3507dc3ceb72109ecec83c2aef0db37a27f6382
F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
F test/exclusive.test 7ff63be7503990921838d5c9f77f6e33e68e48ed1a9d48cd28745bf650bf0747
F test/exclusive.test a9ee8221ee937574264c7ab068a0f52ea72d50e06e8cb2206a3eecf92b58ad9a
F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
@@ -864,10 +868,10 @@ F test/expr.test 26cd01e8485bc48c8aa6a1add598e9ce1e706b4eb4f3f554e0b0223022e8c2c
F test/expr2.test c27327ae9c017a7ff6280123f67aff496f912da74d78c888926d68b46ec75fd8
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
F test/fallocate.test 37a62e396a68eeede8f8d2ecf23573a80faceb630788d314d0a073d862616717
F test/fallocate.test 9151a4a8912fe0d873c4e02cd52bdd6b2d6eb8b57a69f42b27972c1ded4775c8
F test/filectrl.test 6e871c2d35dead1d9a88e176e8d2ca094fec6bb3
F test/filefmt.test f393e80c4b8d493b7a7f8f3809a8425bbf4292af1f5140f01cb1427798a2bbd4
F test/filter1.test 8a6f047a000ef391db2ca17b6beecc0006f4e0f9ca8bbe272b2443c7316e66b1
F test/filter1.test a348b35fceb44c17093974f429736e735564231785e2bd962ef4d889f3740810
F test/filter2.tcl 44e525497ce07382915f01bd29ffd0fa49dab3adb87253b5e5103ba8f93393e8
F test/filter2.test 485cf95d1f6d6ceee5632201ca52a71868599836f430cdee42e5f7f14666e30a
F test/filterfault.test c08fb491d698e8df6c122c98f7db1c65ffcfcad2c1ab0e07fa8a5be1b34eaa8b
@@ -1047,13 +1051,13 @@ F test/in5.test b32ce7f4a93f44c5dee94af16886d922cc16ebe33c8e1765c73d4049d0f4b40f
F test/in6.test 8562d0945195cab3cc4ab3794e9118e72cb44c43f785c2b04d48a9d06ca6b4ec
F test/incrblob.test c9b96afc292aeff43d6687bcb09b0280aa599822
F test/incrblob2.test a494c9e848560039a23974b9119cfc2cf3ad3bd15cc2694ee6367ae537ef8f1f
F test/incrblob3.test d8d036fde015d4a159cd3cbae9d29003b37227a4
F test/incrblob3.test 5fa6f2665ae37da05928bb16851d4f86515af78a
F test/incrblob4.test 21a52a6843a56cdcce968c6a86b72a7066d0e6ba
F test/incrblob_err.test 89372a28f1d98254f03fed705f9efcd34ef61a674df16d2dbb4726944a2de5e9
F test/incrblobfault.test 74dd8ac108304cea0b4a0df6df63a1567e558758
F test/incrcorrupt.test 6c567fbf870aa9e91866fe52ce6f200cd548939a
F test/incrvacuum.test 2aaee202b1f230e55779f70d155f6ba67bbdff8481d650214d256ab0f97d4a2b
F test/incrvacuum2.test 7d26cfda66c7e55898d196de54ac4ec7d86a4e3d
F test/incrvacuum2.test 1e873b6caf87ce160d4cb6d8c7a46f0570da1ddc
F test/incrvacuum3.test 75256fb1377e7c39ef2de62bfc42bbff67be295a
F test/incrvacuum_ioerr.test 6ae2f783424e47a0033304808fe27789cf93e635
F test/index.test a2e948ed949e575487b5c1d521767d4584ac42d352f2dcd8e48004638e7bc7dc
@@ -1091,7 +1095,7 @@ F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4
F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b
F test/istrue.test 75327829744e65cc8700e69340b8e6c192e10e39dfae7ccb0e970d3c4f49090a
F test/join.test bca044589e94bb466e4c1e91fb6fecdc3f3326ca6b3f590f555f1958156eb321
F test/join.test 06b2855f16ed0630afbeb51605f5b31e9d86fc2e596f5c7ada232cf99e39710c
F test/join2.test 659bc6193f5c3fe20fa444dd2c91713db8c33e376b098b860644e175e87b8dbc
F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
@@ -1099,7 +1103,7 @@ F test/join5.test 3a96dc62f0b45402d7207e22d1993fe0c2fce1c57644a11439891dd62b990e
F test/join6.test cfe6503791ceb0cbb509966740286ec423cbf10b
F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
F test/journal3.test 7c3cf23ffc77db06601c1fcfc9743de8441cb77db9d1aa931863d94f5ffa140e
F test/journal3.test 577e865befd0476f7497ccca9969ed301da3fe0fbea3ec5ed7816f1318d34a52
F test/jrnlmode.test 9b5bc01dac22223cb60ec2d5f97acf568d73820794386de5634dcadbea9e1946
F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
@@ -1124,12 +1128,13 @@ F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test 27143363eda1622f03c133efc8db808fc331afd973486cb571ea71cd717d37b8
F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38
F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
F test/lock5.test 1f1e0fd1670deef8c0a76e8f895bd5e124133ca4
F test/lock6.test 83434ae8ca1d1c5e2eaf74d4e44aa24ab62b291c
F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
F test/lock_common.tcl 2f3f7f2e9637f93ccf609df48ef5b27a50278b6b1cd752b445d52262e5841413
F test/lock_proxy.test 95be9c32d79be25cf643b4e41a0aa0e53aa21621
F test/lookaside.test 5a828e7256f1ee4da8e1bdaa03373a3ccdb0f1ff98dfa82e9b76cb41a45b1083
F test/main.test 6bbb3999fd461eb8fb335cbab97409a3d7f91bbb8da60635e8be3e4a04a77772
F test/main.test ad8fa65ab7f5d5c6cc4ac287f9d70f21d285361e3ab194fcba16ddf49b7c29d7
F test/make-where7.tcl 05c16b5d4f5d6512881dfec560cb793915932ef9
F test/malloc.test 18dd1c4188c81ca79cf123527c71b19ee0c31feb9947fdffb0dc6ceb1436816a
F test/malloc3.test 6e88bae6312854a4adb4ecc2a6a5ea8c59b4db778b724ba718e1c43fc8c3c136
@@ -1153,14 +1158,14 @@ F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
F test/mallocK.test 1f4b5efbf61715ab79b20b38739ff4b3d110ceb53f54e5db6da1f01c083707ab
F test/mallocL.test fb311ff80afddf3b1a75e52289081f4754d901dc
F test/mallocM.test 78bbe9d3da84a5c679123cdb40d7b2010b18fc46e13897e4f253c6ba6fbff134
F test/malloc_common.tcl aac62499b76be719fac31e7a3e54a7fd53272e7f
F test/malloc_common.tcl 8d368ee0b9d77c9643b174448f137c18b68e49f4
F test/malloctraceviewer.tcl b7a54595270c1d201abf1c3f3d461f27eaf24cdef623ad08a0fe5e411264c8a9
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
F test/manydb.test 3cd8e52ab3112cb8365afeedd6e8231977920577
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
F test/memdb.test c1f2a343ad14398d5d6debda6ea33e80d0dafcc7
F test/memdb.test c46019291625650d71416e770f6a54a281a1a98f
F test/memdb1.test 58d92c2bf622cc5f0f41461e1b35cf64f3f787199544c2c1dada37d88753f9d4
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
F test/memsubsys1.test 9e7555a22173b8f1c96c281ce289b338fcba2abe8b157f8798ca195bbf1d347e
F test/memsubsys1.test 21f6e0e93302665caa03f37bf832afa1e8dde768d3f5547a5c59a03655d3bfaa
F test/memsubsys2.test 3e4a8d0c05fd3e5fa92017c64666730a520c7e08
F test/minmax.test 6751e87b409fe11b02e70a306d846fa544e25a41
F test/minmax2.test 1edf66901ddfab26ae1e04165e8da834c8d3284e2b20aefb26b80ef217962eab
@@ -1182,7 +1187,7 @@ F test/mmap3.test b3c297e78e6a8520aafcc1a8f140535594c9086e
F test/mmap4.test 2e2b4e32555b58da15176e6fe750f17c9dcf7f93
F test/mmapfault.test d4c9eff9cd8c2dc14bc43e71e042f175b0a26fe3
F test/mmapwarm.test 2272005969cd17a910077bd5082f70bc1fefad9a875afec7fc9af483898ecaf3
F test/multiplex.test dc0d67b66f84b484a83cb8bbdf3f0a7f49562ccd
F test/multiplex.test 659fdd41065d4af3fc769b87052c275d0c4685fb
F test/multiplex2.test 580ca5817c7edbe4cc68fa150609c9473393003a
F test/multiplex3.test d228f59eac91839a977eac19f21d053f03e4d101
F test/multiplex4.test e8ae4c4bd70606a5727743241f13b5701990abe4
@@ -1219,25 +1224,25 @@ F test/oserror.test 1fc9746b83d778e70d115049747ba19c7fba154afce7cc165b09feb6ca6a
F test/ossfuzz.c 9636dad2092a05a32110df0ca06713038dd0c43dd89a77dabe4b8b0d71096715
F test/ossshell.c f125c5bd16e537a2549aa579b328dd1c59905e7ab1338dfc210e755bb7b69f17
F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
F test/pager1.test 1e9ee778bdeaf4f7f09997d029cdaca6a42dfc2092edafe4f5e590acbf1eab13
F test/pager1.test a309660a312ca241053c2b1253d432f868cfe64f25aac17f8e7572099b279e5c
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
F test/pager3.test 4e9a83d6ca0838d7c602c9eb93d1357562d9059c1e02ffb138a8271020838370
F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
F test/pagerfault.test 63c5da625562c66345ab4528790327ca63db2f6f9cbae2aba8cb7c51de3d1628
F test/pagerfault.test 4934ada4438c6bb3f58bbffed5147cd22208ae2dda7837b6e012cf212a3eff51
F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
F test/pageropt.test 84e4cc5cbca285357f7906e99b21be4f2bf5abc0
F test/pagesize.test 5769fc62d8c890a83a503f67d47508dfdc543305
F test/parser1.test 6ccdf5e459a5dc4673d3273dc311a7e9742ca952dd0551a6a6320d27035ce4b3
F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
F test/pcache.test 9a04fa260cb47dd4fdc5d13c5e97054e05931592
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
F test/permutations.test c83339862d72b6272f957905205f874e6eefdbad2823380452c4f0128fd3d906
F test/pg_common.tcl 222a1bad1c41c308fa366313cd7b51b3be7e9b21c8736a421b974ac941693b54
F test/pragma.test 59becdfd720b80d463ab750f69f7118fde10dfd556aa5d554f3bf6b7e5ea7533
F test/pragma.test 5e6cbd81e86b150312bbec11390b0c9066403545ad2e9cc9f53bf63b083e3882
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
F test/pragma3.test 92a46bbea12322dd94a404f49edcfbfc913a2c98115f0d030a7459bb4712ef31
F test/pragma4.test 10c624e45a83c0096a82a7579a5ff658542391d3b77355192da6572c8c17c00b
F test/pragma4.test 49ee189899bc6bcf7e93e47b372a76ae567fb95905a84b5fc0ddcc4128b585ad
F test/pragma5.test 7b33fc43e2e41abf17f35fb73f71b49671a380ea92a6c94b6ce530a25f8d9102
F test/pragmafault.test 275edaf3161771d37de60e5c2b412627ac94cef11739236bec12ed1258b240f8
F test/prefixes.test b524a1c44bffec225b9aec98bd728480352aa8532ac4c15771fb85e8beef65d9
@@ -1268,7 +1273,7 @@ F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d9
F test/rollback2.test bc868d57899dc6972e2b4483faae0e03365a0556941474eec487ae21d8d38bb6
F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
F test/round1.test 768018b04522ca420b1aba8a24bd76091d269f3bce3902af3ec6ebcee41ab21e
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
F test/rowallock.test e8c576ebc92f6b9211662f495658fd39bbcacb5b
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
F test/rowid.test bfbd7b97d9267660be3c8f28507c4ed7f205196b8877c0db42df347c2e8845e3
F test/rowvalue.test 8964f95b253d3b5cc8dc1cfd0cdb7529bce3ecc6b6259e23c5f829f80f4d51cd
@@ -1321,7 +1326,7 @@ F test/server1.test c2b00864514a68a0e6fd518659dc95d0050307a357a08969872bef027d78
F test/session.test 78fa2365e93d3663a6e933f86e7afc395adf18be
F test/sessionfuzz-data1.db 1f8d5def831f19b1c74571037f0d53a588ea49a6c4ca2a028fc0c27ef896dbcb
F test/sessionfuzz.c be9c4d4afd359ce80024d8b541b9b8a880510aef5cf263df56fc0e9b947727f1
F test/shared.test 1826673eb5eb745fb91a3bdac99a7737057742ae38dcb0fe076a384d6727578b
F test/shared.test ccc380a78e84972f5181a4f3ab02484e482f24160e496e653bede72669d2f72d
F test/shared2.test 03eb4a8d372e290107d34b6ce1809919a698e879
F test/shared3.test ab693f9b6e156b8bfb2a0ad94f29fe69602a5d38
F test/shared4.test c75f476804e76e26bf6fa0e7b421fb0ca7d07558
@@ -1344,7 +1349,7 @@ F test/shell8.test 96be02ea0c21f05b24c1883d7b711a1fa8525a68ab7b636aacf6057876941
F test/shmlock.test 3dbf017d34ab0c60abe6a44e447d3552154bd0c87b41eaf5ceacd408dd13fda5
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
F test/shrink.test 09bc6e2473321e7a4711ae7d753865daffc42f4a
F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329
F test/skipscan1.test ed524bc86f27646b3a297f45d6557b55db338977b6838f8064b196b35848b31b
F test/skipscan2.test 3eb703ce794f139e7b83567911046298bcde29606116727f9b700ce34f559d2d
@@ -1384,7 +1389,7 @@ F test/sqllimits1.test 264f4b0f941800ba139d25e33ee919c5d95fea06dfbe8ac291d6811a3
F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
F test/stat.test 423257dc36e5865fb9dd1d9051ac985763b6fba1daec134932f37772d5ed1e64
F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
F test/stmt.test 54ed2cc0764bf3e48a058331813c3dbd19fc1d0827c3d8369914a5d8f564ec75
F test/stmt.test 96bf5c903079f6966498428c953e13dd0192add53230de87a52c59bd505d060a
F test/stmtvtab1.test 6873dfb24f8e79cbb5b799b95c2e4349060eb7a3b811982749a84b359468e2d5
F test/subjournal.test 8d4e2572c0ee9a15549f0d8e40863161295107e52f07a3e8012a2e1fdd093c49
F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
@@ -1392,7 +1397,7 @@ F test/subquery2.test 90cf944b9de8204569cf656028391e4af1ccc8c0cc02d4ef38ee3be8de
F test/subselect.test 0966aa8e720224dbd6a5e769a3ec2a723e332303
F test/substr.test 18f57c4ca8a598805c4d64e304c418734d843c1a
F test/subtype1.test 7fe09496352f97053af1437150751be2d0a0cae8
F test/superlock.test ec94f0556b6488d97f71c79f9061ae08d9ab8f12
F test/superlock.test c86eacd6cead5da9c5ecd25f3d46fca30a927ef2
F test/swarmvtab.test 9a3fd5ab3e9b3c976ad1b3d7646aab725114f2ac26b59395d0778b33bab6cdaf
F test/swarmvtab2.test c948cb2fdfc5b01d85e8f6d6504854202dc1a0782ab2a0ed61538f27cbd0aa5c
F test/swarmvtab3.test 247aa38b6ebd2b99db2075847ae47e789ac34f1c2ab5c720dfcffd990004c544
@@ -1408,14 +1413,14 @@ F test/table.test eb3463b7add9f16a5bb836badf118cf391b809d09fdccd1f79684600d07ec1
F test/tableapi.test ecbcc29c4ab62c1912c3717c48ea5c5e59f7d64e4a91034e6148bd2b82f177f4
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
F test/tclsqlite.test 79a473f5797e317c08f2c4f8192edb3eea6a67329b1087453328b66a7cb31070
F test/tempdb.test 4cdaa23ddd8acb4d79cbb1b68ccdfd09b0537aaba909ca69a876157c2a2cbd08
F test/tempdb.test 8d0c2ee1cc2286629ca1d7e4e470a8ecf3951b65fb93c6bb7e27fee8ed9f8055
F test/tempdb2.test 353864e96fd3ae2f70773d0ffbf8b1fe48589b02c2ec05013b540879410c3440
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
F test/temptable2.test d2940417496e2b9548e01d09990763fbe88c316504033256d51493e1f1a5ce6a
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl fd9d134a7cc4e31b307ad028a195f51cdcf556fc620d74b680515562f0137f25
F test/tester.tcl 97d7bdb2d0c4582c8b5d8b8cf52383e912575faf07f7f77ed20bf5a86dfcd562
F test/thread001.test b61a29dd87cf669f5f6ac96124a7c97d71b0c80d9012746072055877055cf9ef
F test/thread002.test e630504f8a06c00bf8bbe68528774dd96aeb2e58
F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7
@@ -1433,10 +1438,10 @@ F test/tkt-02a8e81d44.test 6c80d9c7514e2a42d4918bf87bf6bc54f379110c
F test/tkt-18458b1a.test 6a62cb1ee50fa3c620da59e3a6f531eb38fceaf7e2166203816b724524e6f1d6
F test/tkt-26ff0c2d1e.test c15bec890c4d226c0da2f35ff30f9e84c169cfef90e73a8cb5cec11d723dfa96
F test/tkt-2a5629202f.test 0521bd25658428baa26665aa53ffed9367d33af2
F test/tkt-2d1a5c67d.test be1326f3061caec85085f4c9ee4490561ca037c0
F test/tkt-2d1a5c67d.test 58a56653795d1787f4ed661f9da7da153b0dc3f9
F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28
F test/tkt-31338dca7e.test 6fb8807851964da0d24e942f2e19c7c705b9fb58
F test/tkt-313723c356.test 4b306ad45c736cedf2f5221f6155b92143244b6d
F test/tkt-313723c356.test d78f772dd71d632f3d3f6d3d588c3105b2ab1bb3
F test/tkt-385a5b56b9.test 5204a7cba0e28c99df0acbf95af5e1af4d32965a7a14de6eccebf949607618b1
F test/tkt-38cb5df375.test f3cc8671f1eb604d4ae9cf886ed4366bec656678
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
@@ -1538,7 +1543,7 @@ F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
F test/tkt3442.test a1fc47c669e651d16494de3ff349bcb53281456f2ca02c8bc14220b6044bbfe8
F test/tkt3457.test 5651e2cbb94645b677ec663160b9e192b87b7d365aecdfb24e19f749575a6fc2
F test/tkt3457.test 0316b1541debab33d784e82bd41efa05fd26931a77018c6e762d79e15087210a
F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
F test/tkt3508.test d75704db9501625c7f7deec119fcaf1696aefb7d
@@ -1655,40 +1660,40 @@ F test/vtab_alter.test 736e66fb5ec7b4fee58229aa3ada2f27ec58bc58c00edae4836890c37
F test/vtab_err.test dcc8b7b9cb67522b3fe7a272c73856829dae4ab7fdb30399aea1b6981bda2b65
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
F test/vtabdrop.test 65d4cf6722972e5499bdaf0c0d70ee3b8133944a4e4bc31862563f32a7edca12
F test/wal.test cdf0ca6cc0447520d19ef1c83287824ebeb3e82d75af856511ba96841a79fc9b
F test/wal2.test 537f59e5c5932e3b45bf3591ae3e48a2601360c2e52821b633e222fe6ebd5b09
F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
F test/wal5.test 9c11da7aeccd83a46d79a556ad11a18d3cb15aa9
F test/wal6.test b602704e4b066199bc89d91ca9000f335dcf4572
F test/wal.test 0d42851f79b13ffda2b218fa9a237ad287c1642029a89c6517bf857e9d494926
F test/wal2.test cf6a3136845023fed62a07b7dfc433d515d7b453bde1bef71fc823867740d945
F test/wal3.test 82f70ca79e5db6829f9246f4a30d4a4751921c3b
F test/wal4.test 5755887f321baa4c55de0b91066fa7d0cafcac9d
F test/wal5.test 9304fada875d7279deb2783385b0ae1c02d96b88
F test/wal6.test 3d9b79194d15f5b4f6e4169f89f815c049edb2df
F test/wal64k.test 2a525c0f45d709bae3765c71045ccec5df7d100ccbd3a7860fdba46c9addb965
F test/wal7.test 2ae8f427d240099cc4b2dfef63cff44e2a68a1bd
F test/wal8.test d9df3fba4caad5854ed69ed673c68482514203c8
F test/wal7.test 18cf68ab8010ae0a2baaa48e5b59567a9503e63e
F test/wal8.test 82bf6e493002b2d1580823b40e47bce3e15f468a
F test/wal9.test 378e76a9ad09cd9bee06c172ad3547b0129a6750
F test/wal_common.tcl a98f17fba96206122eff624db0ab13ec377be4fe
F test/walbak.test 018d4e5a3d45c6298d11b99f09a8ef6876527946
F test/walbig.test f437473a16cfb314867c6b5d1dbcd519e73e3434
F test/wal_common.tcl 15f152fd55703975878741beca6cfa4209d5b3b3
F test/walbak.test e322af729156c121183af4847c6e2b17bc629f47
F test/walbig.test 3ca3d94751b80054eed5bda20a1339ae1f619483
F test/walblock.test be48f3a75eff0b4456209f26b3ce186c2015497d
F test/walcksum.test bb234a1bb42248b3515d992b719708015c384278
F test/walcrash.test 21038858cc552077b0522f50b0fa87e38139306a
F test/walcrash2.test a0edab4e5390f03b99a790de89aad15d6ec70b36
F test/walcrash3.test e426aa58122d20f2b9fbe9a507f9eb8cab85b8af
F test/walcksum.test add42a54d7c7d9bc72a913792022a195293bef2b
F test/walcrash.test 065a041da88f980df3830f09b7fe308337bb594a
F test/walcrash2.test 6eb6842d34cc5955726264c80566963c32a9cbea
F test/walcrash3.test 279640ffafa23f7564529ccd69bfb97849ccae9d
F test/walcrash4.test e7b6e7639a950a0cca8e210e248c8dad4d63bf20
F test/walfault.test 09b8ad7e52d2f54bce50e31aa7ea51412bb9f70ac13c74e669ddcd8b48b0d98d
F test/walfault.test 3771f7c8b159438cbf3c56fdaee07b317fa25857cd30dfd9e0d080993cfba952
F test/walfault2.test e039ac66c78d5561683cacde04097213cdad3b58e2b3f3fe1112862217bfd915
F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
F test/walmode.test cd6e7cff618eaaa5910ce57c3657aa50110397f86213886a2400afb9bfec7b7b
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
F test/walhook.test 5d2bdb04fd3e220e2f96e6b566d57e00020bdaec
F test/walmode.test edef6af21a8ef04b2acc7c14c44609e53d2a3ac4674e233673de439f258dcba4
F test/walnoshm.test 559b878f3aab838971d820329ca35f1caa7b038e
F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6
F test/walpersist.test abd956d66e2f36d2d9d05d3a969f48be6d2ddbec
F test/walprotocol.test a112aba0b79e3adeaa485fed09484b32c654e97df58e454aa8489ac2cd57bf84
F test/walprotocol2.test 7d3b6b4bf0b12f8007121b1e6ef714bc99101fb3b48e46371df1db868eebc131
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
F test/walro.test cac7fa52dffec99f15c6e266769628d711935e4064dbcd7466ce3479b5011eb5
F test/walro2.test 0e79dd15cbdb4f482c01ea248373669c732414a726b357d04846a816afafb768
F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
F test/walshared.test 04590b10c677f75318701818c50bc0dda5da64ab
F test/walslow.test 07a51cbe9d4895d0a90c7af76d14a62d363ac162
F test/walthread.test c2bc173d0ca244134ab6bcf8ccd108ee787fb2e7925dbbae973e60fcc6c74851
F test/walvfs.test ca81c9f427e0e5434076dfa948fd1d8e6d5ddd192b2fb6991635d81da5f3f5d4
F test/wapp.tcl b440cd8cf57953d3a49e7ee81e6a18f18efdaf113b69f7d8482b0710a64566ec
F test/wapptest.tcl 3cca775aede0591756a1fc0da55bbb3715d8c363873fd2cfdd4d555b0a4af57d x
@@ -1721,7 +1726,7 @@ F test/win32heap.test 10fd891266bd00af68671e702317726375e5407561d859be1aa04696f2
F test/win32lock.test fbf107c91d8f5512be5a5b87c4c42ab9fdd54972
F test/win32longpath.test 169c75a3b2e43481f4a62122510210c67b08f26d
F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc
F test/window1.test ec792f92e63ee457447c5c04de8f8d42f4a94b842b5bac1f403ac38a6d867c22
F test/window1.test b0739f481c8a47291f86f7132f455a0f18adec4f2076f2ab534bcd902b4af92f
F test/window2.tcl 492c125fa550cda1dd3555768a2303b3effbeceee215293adf8871efc25f1476
F test/window2.test e466a88bd626d66edc3d352d7d7e1d5531e0079b549ba44efb029d1fbff9fd3c
F test/window3.tcl acea6e86a4324a210fd608d06741010ca83ded9fde438341cb978c49928faf03
@@ -1798,7 +1803,7 @@ F tool/mkshellc.tcl 70a9978e363b0f3280ca9ce1c46d72563ff479c1930a12a7375e3881b732
F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b079b9
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c-noext.tcl 4f7cfef5152b0c91920355cbfc1d608a4ad242cb819f1aea07f6d0274f584a7f
F tool/mksqlite3c.tcl 5fed3d75069d8f66f202d3b5200b0cea4aa7108481acd06732a06fdd42eb83a2
F tool/mksqlite3c.tcl 202e5c968eb7f7fd0264fa74faeeb0934bf2116adce379ca631830597bcec357
F tool/mksqlite3h.tcl 080873e3856eceb9d289a08a00c4b30f875ea3feadcbece796bd509b1532792c
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
F tool/mkvsix.tcl b9e0777a213c23156b6542842c238479e496ebf5
@@ -1860,7 +1865,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 10306118e8591e727af477a1a15d136852d21170e645bd0e75f7c88346b037d7
R 979d0103f7b3acef2369409e370d6fa7
U mistachkin
Z 484824f16820465db78cbfdb9a5d496b
P 1240ee4f6f612080d1805be6bc96c26e84d3420b5158a966d2eb2e518c249e8f 85d3dc8c50d8dbb8eac1956e8976e861d3b671e03355ca9257060fa3dca51cc4
R d3226cb599b6d95cd1ecc0bc7d78a285
U drh
Z ac98160d084ab597d5e0572644ed57eb
+1 -1
View File
@@ -1 +1 @@
85d3dc8c50d8dbb8eac1956e8976e861d3b671e03355ca9257060fa3dca51cc4
d6fda470fe3e2932ab3065211413cc7e9f035635d9cfa23eeeff81463dcc17eb
+6
View File
@@ -87,8 +87,14 @@ static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
*/
int sqlite3_enable_shared_cache(int enable){
#if defined(__APPLE__) && !defined(SQLITE_TEST) && !defined(TH3_COMPATIBILITY)
/* Enable global shared cache function for debugging and unit tests,
** but not for release */
return SQLITE_MISUSE;
#else
sqlite3GlobalConfig.sharedCacheEnabled = enable;
return SQLITE_OK;
#endif
}
#endif
-16
View File
@@ -233,22 +233,6 @@ typedef struct MemPage MemPage;
typedef struct BtLock BtLock;
typedef struct CellInfo CellInfo;
/*
** This is a magic string that appears at the beginning of every
** SQLite database in order to identify the file as a real database.
**
** You can change this value at compile-time by specifying a
** -DSQLITE_FILE_HEADER="..." on the compiler command-line. The
** header must be exactly 16 bytes including the zero-terminator so
** the string itself should be 15 characters long. If you change
** the header, then your custom library will not be able to read
** databases generated by the standard tools and the standard tools
** will not be able to read databases created by your custom library.
*/
#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */
# define SQLITE_FILE_HEADER "SQLite format 3"
#endif
/*
** Page type flags. An ORed combination of these flags appear as the
** first byte of on-disk image of every BTree page.
+9 -1
View File
@@ -16,6 +16,9 @@
*/
#include "sqliteInt.h"
#ifdef SQLITE_ENABLE_SQLRR
# include "sqlrr.h"
#endif
/*
** Execute SQL code. Return one of the SQLITE_ success/failure
@@ -42,7 +45,9 @@ int sqlite3_exec(
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
if( zSql==0 ) zSql = "";
#ifdef SQLITE_ENABLE_SQLRR
SRRecExec(db, zSql);
#endif
sqlite3_mutex_enter(db->mutex);
sqlite3Error(db, SQLITE_OK);
while( rc==SQLITE_OK && zSql[0] ){
@@ -123,6 +128,9 @@ int sqlite3_exec(
exec_out:
if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);
sqlite3DbFree(db, azCols);
#ifdef SQLITE_ENABLE_SQLRR
SRRecExecEnd(db);
#endif
rc = sqlite3ApiExit(db, rc);
if( rc!=SQLITE_OK && pzErrMsg ){
+156 -2
View File
@@ -16,6 +16,9 @@
*/
#include "sqliteInt.h"
#ifdef SQLITE_ENABLE_SQLRR
# include "sqlrr.h"
#endif
#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif
@@ -1308,6 +1311,10 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
if( db->lookaside.bMalloced ){
sqlite3_free(db->lookaside.pStart);
}
#ifdef SQLITE_ENABLE_SQLRR
SRRecClose(db);
#endif
sqlite3_free(db);
}
@@ -1420,6 +1427,7 @@ const char *sqlite3ErrName(int rc){
case SQLITE_IOERR_MMAP: zName = "SQLITE_IOERR_MMAP"; break;
case SQLITE_IOERR_GETTEMPPATH: zName = "SQLITE_IOERR_GETTEMPPATH"; break;
case SQLITE_IOERR_CONVPATH: zName = "SQLITE_IOERR_CONVPATH"; break;
case SQLITE_IOERR_VNODE: zName = "SQLITE_IOERR_VNODE"; break;
case SQLITE_CORRUPT: zName = "SQLITE_CORRUPT"; break;
case SQLITE_CORRUPT_VTAB: zName = "SQLITE_CORRUPT_VTAB"; break;
case SQLITE_NOTFOUND: zName = "SQLITE_NOTFOUND"; break;
@@ -2749,6 +2757,44 @@ int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
}
return oldLimit; /* IMP: R-53341-35419 */
}
#if defined(SQLITE_ENABLE_AUTO_PROFILE)
/* stderr logging */
void _sqlite_auto_profile(void *aux, const char *sql, u64 ns);
void _sqlite_auto_trace(void *aux, const char *sql);
void _sqlite_auto_profile(void *aux, const char *sql, u64 ns) {
#pragma unused(aux)
fprintf(stderr, "Query: %s\n Execution Time: %llu ms\n", sql, ns / 1000000);
}
void _sqlite_auto_trace(void *aux, const char *sql) {
fprintf(stderr, "TraceSQL(%p): %s\n", aux, sql);
}
/* syslog logging */
#include <asl.h>
static aslclient autolog_client = NULL;
static void _close_asl_log() {
if( NULL!=autolog_client ){
asl_close(autolog_client);
autolog_client = NULL;
}
}
static void _open_asl_log() {
if( NULL==autolog_client ){
autolog_client = asl_open("SQLite", NULL, 0);
atexit(_close_asl_log);
}
}
void _sqlite_auto_profile_syslog(void *aux, const char *sql, u64 ns);
void _sqlite_auto_trace_syslog(void *aux, const char *sql);
void _sqlite_auto_profile_syslog(void *aux, const char *sql, u64 ns) {
#pragma unused(aux)
asl_log(autolog_client, NULL, ASL_LEVEL_NOTICE, "Query: %s\n Execution Time: %llu ms\n", sql, ns / 1000000);
}
void _sqlite_auto_trace_syslog(void *aux, const char *sql) {
asl_log(autolog_client, NULL, ASL_LEVEL_NOTICE, "TraceSQL(%p): %s\n", aux, sql);
}
#endif
/*
** This function is used to parse both URIs and non-URI filenames passed by the
@@ -3009,6 +3055,58 @@ int sqlite3ParseUri(
return rc;
}
#if defined(SQLITE_ENABLE_AUTO_PROFILE)
#define SQLITE_AUTOLOGGING_STDERR 1
#define SQLITE_AUTOLOGGING_SYSLOG 2
static void enableAutoLogging(
sqlite3 *db
){
char *envprofile = getenv("SQLITE_AUTO_PROFILE");
if( envprofile!=NULL ){
int where = 0;
if( !strncasecmp("1", envprofile, 1) ){
if( isatty(2) ){
where = SQLITE_AUTOLOGGING_STDERR;
}else{
where = SQLITE_AUTOLOGGING_SYSLOG;
}
} else if( !strncasecmp("stderr", envprofile, 6) ){
where = SQLITE_AUTOLOGGING_STDERR;
} else if( !strncasecmp("syslog", envprofile, 6) ){
where = SQLITE_AUTOLOGGING_SYSLOG;
}
if( where==SQLITE_AUTOLOGGING_STDERR ){
sqlite3_profile(db, _sqlite_auto_profile, db);
}else if( where==SQLITE_AUTOLOGGING_SYSLOG ){
_open_asl_log();
sqlite3_profile(db, _sqlite_auto_profile_syslog, db);
}
}
char *envtrace = getenv("SQLITE_AUTO_TRACE");
if( envtrace!=NULL ){
int where = 0;
if( !strncasecmp("1", envtrace, 1) ){
if( isatty(2) ){
where = SQLITE_AUTOLOGGING_STDERR;
}else{
where = SQLITE_AUTOLOGGING_SYSLOG;
}
} else if( !strncasecmp("stderr", envtrace, 6) ){
where = SQLITE_AUTOLOGGING_STDERR;
} else if( !strncasecmp("syslog", envtrace, 6) ){
where = SQLITE_AUTOLOGGING_SYSLOG;
}
if( where==SQLITE_AUTOLOGGING_STDERR ){
sqlite3_trace(db, _sqlite_auto_trace, db);
}else if( where==SQLITE_AUTOLOGGING_SYSLOG ){
_open_asl_log();
sqlite3_trace(db, _sqlite_auto_trace_syslog, db);
}
}
}
#endif
/*
** This routine does the core work of extracting URI parameters from a
** database filename for the sqlite3_uri_parameter() interface.
@@ -3024,8 +3122,6 @@ static const char *uriParameter(const char *zFilename, const char *zParam){
return 0;
}
/*
** This routine does the work of opening a database on behalf of
** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"
@@ -3397,7 +3493,30 @@ opendb_out:
}else if( rc!=SQLITE_OK ){
db->magic = SQLITE_MAGIC_SICK;
}
#if defined(__APPLE__) && ENABLE_FORCE_WAL
if( db && !rc ){
if ((0 == access("/var/db/enableForceWAL", R_OK))) {
#ifdef SQLITE_DEBUG
fprintf(stderr, "SQLite WAL journal_mode ENABLED by default.\n");
#endif
sqlite3_exec(db, "pragma journal_mode=wal", NULL, NULL, NULL);
#ifdef SQLITE_DEBUG
// } else {
// fprintf(stderr, "SQLite WAL journal_mode NOT ENABLED by default.\n");
#endif
}
}
#endif
#if defined(SQLITE_ENABLE_AUTO_PROFILE)
if( db && !rc ){
enableAutoLogging(db);
}
#endif
*ppDb = db;
#ifdef SQLITE_ENABLE_SQLRR
SRRecOpen(db, zFilename, flags);
#endif
#ifdef SQLITE_ENABLE_SQLLOG
if( sqlite3GlobalConfig.xSqllog ){
/* Opening a db handle. Fourth parameter is passed 0. */
@@ -3840,6 +3959,14 @@ int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
}else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
*(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
rc = SQLITE_OK;
#ifndef SQLITE_OMIT_WAL
if( (rc==SQLITE_OK)&&(op==SQLITE_FCNTL_LAST_ERRNO)&&(*(int *)pArg==0) ){
sqlite3_file *pWalFd = sqlite3PagerWalFile(pPager);
if( pWalFd&&(pWalFd->pMethods) ){
rc = sqlite3OsFileControl(pWalFd, op, pArg);
}
}
#endif
}else if( op==SQLITE_FCNTL_DATA_VERSION ){
*(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);
rc = SQLITE_OK;
@@ -3848,6 +3975,7 @@ int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
}
sqlite3BtreeLeave(pBtree);
}
sqlite3Error(db, rc);
sqlite3_mutex_leave(db->mutex);
return rc;
}
@@ -4445,6 +4573,32 @@ int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
pBt = sqlite3DbNameToBtree(db, zDbName);
return pBt ? sqlite3BtreeIsReadonly(pBt) : -1;
}
#if (SQLITE_ENABLE_APPLE_SPI>0) && defined(__APPLE__)
#include "sqlite3_private.h"
/*
** Testing a file path for sqlite locks held by a process ID.
** Returns SQLITE_LOCKSTATE_ON if locks are present on path
** that would prevent writing to the database.
*/
int _sqlite3_lockstate(const char *path, pid_t pid){
sqlite3 *db = NULL;
if( sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL) == SQLITE_OK ){
LockstatePID lockstate = {pid, -1};
sqlite3_file_control(db, NULL, SQLITE_FCNTL_LOCKSTATE_PID, &lockstate);
sqlite3_close(db);
int state = lockstate.state;
return state;
}
if( NULL!=db ){
sqlite3_close(db); /* need to close even if open returns an error */
}
return SQLITE_LOCKSTATE_ERROR;
}
#endif /* SQLITE_ENABLE_APPLE_SPI */
#ifdef SQLITE_ENABLE_SNAPSHOT
/*
+7 -1
View File
@@ -210,12 +210,18 @@ int sqlite3OsOpen(
int *pFlagsOut
){
int rc;
int openFlags;
DO_OS_MALLOC_TEST(0);
/* 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed
** down into the VFS layer. Some SQLITE_OPEN_ flags (for example,
** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
** reaching the VFS. */
rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x1087f7f, pFlagsOut);
#if SQLITE_ENABLE_DATA_PROTECTION
openFlags = flags & (0x1087f7f | SQLITE_OPEN_FILEPROTECTION_MASK);
#else
openFlags = flags & 0x1087f7f;
#endif
rc = pVfs->xOpen(pVfs, zPath, pFile, openFlags, pFlagsOut);
assert( rc==SQLITE_OK || pFile->pMethods==0 );
return rc;
}
+1273 -33
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -3544,6 +3544,15 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
case SQLITE_FCNTL_PERSIST_WAL: {
int bPersist = *(int*)pArg;
if( bPersist<0 ){
*(int*)pArg = pFile->bPersistWal;
}else{
pFile->bPersistWal = bPersist!=0;
}
return SQLITE_OK;
}
case SQLITE_FCNTL_PERSIST_WAL: {
winModeBit(pFile, WINFILE_PERSIST_WAL, (int*)pArg);
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
+55 -9
View File
@@ -2501,7 +2501,11 @@ static int pager_delmaster(Pager *pPager, const char *zMaster){
if( !pMaster ){
rc = SQLITE_NOMEM_BKPT;
}else{
const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MASTER_JOURNAL);
const int flags =
#if SQLITE_ENABLE_DATA_PROTECTION
(pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK)|
#endif
(SQLITE_OPEN_READONLY|SQLITE_OPEN_MASTER_JOURNAL);
rc = sqlite3OsOpen(pVfs, zMaster, pMaster, flags, 0);
}
if( rc!=SQLITE_OK ) goto delmaster_out;
@@ -2538,7 +2542,11 @@ static int pager_delmaster(Pager *pPager, const char *zMaster){
** so, return without deleting the master journal file.
*/
int c;
int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL);
int flags =
#if SQLITE_ENABLE_DATA_PROTECTION
(pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK)|
#endif
(SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL);
rc = sqlite3OsOpen(pVfs, zJournal, pJournal, flags, 0);
if( rc!=SQLITE_OK ){
goto delmaster_out;
@@ -3609,7 +3617,11 @@ static int pagerOpentemp(
sqlite3_opentemp_count++; /* Used for testing and analysis only */
#endif
vfsFlags |= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
vfsFlags |=
#if SQLITE_ENABLE_DATA_PROTECTION
(pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK)|
#endif
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;
rc = sqlite3OsOpen(pPager->pVfs, 0, pFile, vfsFlags, 0);
assert( rc!=SQLITE_OK || isOpen(pFile) );
@@ -5093,7 +5105,11 @@ static int hasHotJournal(Pager *pPager, int *pExists){
** it can be ignored.
*/
if( !jrnlOpen ){
int f = SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL;
int f =
#if SQLITE_ENABLE_DATA_PROTECTION
(pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK)|
#endif
SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL;
rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &f);
}
if( rc==SQLITE_OK ){
@@ -5233,7 +5249,11 @@ int sqlite3PagerSharedLock(Pager *pPager){
pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &bExists);
if( rc==SQLITE_OK && bExists ){
int fout = 0;
int f = SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_JOURNAL;
int f =
#if SQLITE_ENABLE_DATA_PROTECTION
(pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK)|
#endif
SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_JOURNAL;
assert( !pPager->tempFile );
rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout);
assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
@@ -5740,6 +5760,9 @@ static int pager_open_journal(Pager *pPager){
int flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
int nSpill;
#if SQLITE_ENABLE_DATA_PROTECTION
flags |= (pPager->vfsFlags&SQLITE_OPEN_FILEPROTECTION_MASK);
#endif
if( pPager->tempFile ){
flags |= (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL);
nSpill = sqlite3Config.nStmtSpill;
@@ -6979,6 +7002,18 @@ sqlite3_file *sqlite3PagerFile(Pager *pPager){
return pPager->fd;
}
#if !defined(SQLITE_OMIT_WAL)
/*
** Return the file handle for the WAL journal file associated
** with the pager. This might return NULL if the file has
** not yet been opened.
*/
sqlite3_file *sqlite3PagerWalFile(Pager *pPager){
return ((pPager->pWal) ? sqlite3WalFile(pPager->pWal) : (NULL));
}
#endif
#ifdef SQLITE_ENABLE_SETLK_TIMEOUT
/*
** Reset the lock timeout for pager.
@@ -7464,10 +7499,14 @@ static int pagerOpenWal(Pager *pPager){
** (e.g. due to malloc() failure), return an error code.
*/
if( rc==SQLITE_OK ){
rc = sqlite3WalOpen(pPager->pVfs,
pPager->fd, pPager->zWal, pPager->exclusiveMode,
pPager->journalSizeLimit, &pPager->pWal
);
#if SQLITE_ENABLE_DATA_PROTECTION
rc = sqlite3WalOpen(pPager->pVfs, pPager->fd, pPager->zWal, pPager->exclusiveMode,
pPager->journalSizeLimit, (pPager->vfsFlags & (SQLITE_OPEN_FILEPROTECTION_MASK | SQLITE_OPEN_READONLY)),
&pPager->pWal);
#else
rc = sqlite3WalOpen(pPager->pVfs, pPager->fd, pPager->zWal, pPager->exclusiveMode,
pPager->journalSizeLimit, (pPager->vfsFlags & SQLITE_OPEN_READONLY), &pPager->pWal);
#endif
}
pagerFixMaplimit(pPager);
@@ -7561,6 +7600,13 @@ int sqlite3PagerCloseWal(Pager *pPager, sqlite3 *db){
pPager->pageSize, (u8*)pPager->pTmpSpace);
pPager->pWal = 0;
pagerFixMaplimit(pPager);
/* Ensure that the WAL file is deleted even if the PERSIST_WAL
** hint is enabled. */
if( rc==SQLITE_OK ){
rc = sqlite3OsDelete(pPager->pVfs, pPager->zWal, 0);
if( rc==SQLITE_IOERR_DELETE_NOENT ) rc = SQLITE_OK;
}
if( rc && !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
}
}
+1
View File
@@ -203,6 +203,7 @@ int sqlite3PagerMemUsed(Pager*);
const char *sqlite3PagerFilename(const Pager*, int);
sqlite3_vfs *sqlite3PagerVfs(Pager*);
sqlite3_file *sqlite3PagerFile(Pager*);
sqlite3_file *sqlite3PagerWalFile(Pager *pPager);
sqlite3_file *sqlite3PagerJrnlFile(Pager*);
const char *sqlite3PagerJournalname(Pager*);
void *sqlite3PagerTempSpace(Pager*);
+1 -2
View File
@@ -386,8 +386,7 @@ static void pcache1Free(void *p){
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
{
int nFreed = 0;
nFreed = sqlite3MallocSize(p);
int nFreed = sqlite3MallocSize(p);
sqlite3_mutex_enter(pcache1.mutex);
sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
sqlite3_mutex_leave(pcache1.mutex);
+2 -2
View File
@@ -217,11 +217,11 @@ static void setAllPagerFlags(sqlite3 *db){
assert( SQLITE_CacheSpill==PAGER_CACHESPILL );
assert( (PAGER_FULLFSYNC | PAGER_CKPT_FULLFSYNC | PAGER_CACHESPILL)
== PAGER_FLAGS_MASK );
assert( (pDb->safety_level & PAGER_SYNCHRONOUS_MASK)==pDb->safety_level );
while( (n--) > 0 ){
if( pDb->pBt ){
sqlite3BtreeSetPagerFlags(pDb->pBt,
pDb->safety_level | (db->flags & PAGER_FLAGS_MASK) );
(pDb->safety_level & PAGER_SYNCHRONOUS_MASK)
| (db->flags & PAGER_FLAGS_MASK) );
}
pDb++;
}
+12 -1
View File
@@ -14,6 +14,9 @@
** from disk.
*/
#include "sqliteInt.h"
#ifdef SQLITE_ENABLE_SQLRR
# include "sqlrr.h"
#endif
/*
** Fill the InitData structure with an error message that indicates
@@ -778,6 +781,9 @@ int sqlite3_prepare(
){
int rc;
rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
#ifdef SQLITE_ENABLE_SQLRR
SRRecPrepare(db, zSql, nBytes, 0, *ppStmt);
#endif
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 ); /* VERIFY: F13021 */
return rc;
}
@@ -818,6 +824,9 @@ int sqlite3_prepare_v3(
rc = sqlite3LockAndPrepare(db,zSql,nBytes,
SQLITE_PREPARE_SAVESQL|(prepFlags&SQLITE_PREPARE_MASK),
0,ppStmt,pzTail);
#ifdef SQLITE_ENABLE_SQLRR
SRRecPrepare(db, zSql, nBytes, 1, *ppStmt);
#endif
assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );
return rc;
}
@@ -861,7 +870,9 @@ static int sqlite3Prepare16(
if( zSql8 ){
rc = sqlite3LockAndPrepare(db, zSql8, -1, prepFlags, 0, ppStmt, &zTail8);
}
#ifdef SQLITE_ENABLE_SQLRR
SRRecPrepare(db, zSql8, -1, 1, *ppStmt);
#endif
if( zTail8 && pzTail ){
/* If sqlite3_prepare returns a tail pointer, we calculate the
** equivalent pointer into the UTF-16 string by counting the unicode
+2 -1
View File
@@ -571,8 +571,9 @@ int sqlite3_exec(
#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */
#define SQLITE_OPEN_FILEPROTECTION_MASK \
0x00700000
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */
/* Reserved: 0x00F00000 */
/*
+80
View File
@@ -0,0 +1,80 @@
/*
* sqlite3_private.h
*/
#ifndef _SQLITE3_PRIVATE_H
#define _SQLITE3_PRIVATE_H
#ifdef __cplusplus
extern "C" {
#endif
#define SQLITE_LOCKSTATE_OFF 0
#define SQLITE_LOCKSTATE_ON 1
#define SQLITE_LOCKSTATE_NOTADB 2
#define SQLITE_LOCKSTATE_ERROR -1
#define SQLITE_LOCKSTATE_ANYPID -1
/*
** Test a file path for sqlite locks held by a process ID (-1 = any PID).
** Returns one of the following integer codes:
**
** SQLITE_LOCKSTATE_OFF no active sqlite file locks match the specified pid
** SQLITE_LOCKSTATE_ON active sqlite file locks match the specified pid
** SQLITE_LOCKSTATE_NOTADB path points to a file that is not an sqlite db file
** SQLITE_LOCKSTATE_ERROR path was not vaild or was unreadable
**
** There is no support for identifying db files encrypted via SEE encryption
** currently. Zero byte files are tested for sqlite locks, but if no sqlite
** locks are present then SQLITE_LOCKSTATE_NOTADB is returned.
*/
extern int _sqlite3_lockstate(const char *path, pid_t pid);
/*
** Test an open database connection for sqlite locks held by a process ID,
** if a process has an open database connection this will avoid trashing file
** locks by re-using open file descriptors for the database file and support
** files (-shm)
*/
#define SQLITE_FCNTL_LOCKSTATE_PID 103
/*
** Pass the SQLITE_TRUNCATE_DATABASE operation code to sqlite3_file_control()
** to truncate a database and its associated journal file to zero length. The
** SQLITE_TRUNCATE_* flags represent optional flags to safely initialize an
** empty database in the place of the truncated database, the flags are passed
** into sqlite3_file_control via the fourth argument using a pointer to an integer
** configured with the ORed flags. If the fourth argument is NULL, the default
** behavior is applied and the database file is truncated to zero bytes, a rollback
** journal (if present) is unlinked, a WAL journal (if present) is truncated to zero
** bytes and the first few bytes of the -shm file is scrambled to trigger existing
** connections to rebuild the index from the database file contents.
*/
#define SQLITE_FCNTL_TRUNCATE_DATABASE 101
#define SQLITE_TRUNCATE_DATABASE SQLITE_FCNTL_TRUNCATE_DATABASE
#define SQLITE_TRUNCATE_INITIALIZE_HEADER_MASK (0x7F<<0)
#define SQLITE_TRUNCATE_JOURNALMODE_WAL (0x1<<0)
#define SQLITE_TRUNCATE_AUTOVACUUM_MASK (0x3<<2)
#define SQLITE_TRUNCATE_AUTOVACUUM_OFF (0x1<<2)
#define SQLITE_TRUNCATE_AUTOVACUUM_FULL (0x2<<2)
#define SQLITE_TRUNCATE_AUTOVACUUM_INCREMENTAL (0x3<<2)
#define SQLITE_TRUNCATE_PAGESIZE_MASK (0x7<<4)
#define SQLITE_TRUNCATE_PAGESIZE_1024 (0x1<<4)
#define SQLITE_TRUNCATE_PAGESIZE_2048 (0x2<<4)
#define SQLITE_TRUNCATE_PAGESIZE_4096 (0x3<<4)
#define SQLITE_TRUNCATE_PAGESIZE_8192 (0x4<<4)
#define SQLITE_TRUNCATE_FORCE (0x1<<7)
/*
** Pass the SQLITE_REPLACE_DATABASE operation code to sqlite3_file_control()
** and a sqlite3 pointer to another open database file to safely copy the
** contents of that database file into the receiving database.
*/
#define SQLITE_FCNTL_REPLACE_DATABASE 102
#define SQLITE_REPLACE_DATABASE SQLITE_FCNTL_REPLACE_DATABASE
#ifdef __cplusplus
} /* End of the 'extern "C"' block */
#endif
#endif
+40
View File
@@ -346,6 +346,22 @@
# define SQLITE_SYSTEM_MALLOC 1
#endif
/*
** This is a magic string that appears at the beginning of every
** SQLite database in order to identify the file as a real database.
**
** You can change this value at compile-time by specifying a
** -DSQLITE_FILE_HEADER="..." on the compiler command-line. The
** header must be exactly 16 bytes including the zero-terminator so
** the string itself should be 15 characters long. If you change
** the header, then your custom library will not be able to read
** databases generated by the standard tools and the standard tools
** will not be able to read databases created by your custom library.
*/
#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */
# define SQLITE_FILE_HEADER "SQLite format 3"
#endif
/*
** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the
** sizes of memory allocations below this value where possible.
@@ -4922,6 +4938,30 @@ SQLITE_API SQLITE_EXTERN void (SQLITE_CDECL *sqlite3IoTrace)(const char*,...);
#define MEMTYPE_LOOKASIDE 0x02 /* Heap that might have been lookaside */
#define MEMTYPE_PCACHE 0x04 /* Page cache allocations */
#if (SQLITE_ENABLE_APPLE_SPI>0) && defined(__APPLE__)
/*
** An instance of the following structure is used to hold the process ID
** and return-by-reference lockstate value. The SQLITE_FCNTL_LOCKSTATE_PID
** requires the 4th argument to sqlite3_file_control to be a pointer to an
** instance of LockstatePID initialized with a LockstatePID.pid value equal
** to a process ID to be tested, or the special value SQLITE_LOCKSTATE_ANYPID
** The Lockstate.state value is always set to one of the following values
** when sqlite3_file_control returns:
**
** SQLITE_LOCKSTATE_OFF no active sqlite file locks match the specified pid
** SQLITE_LOCKSTATE_ON active sqlite file locks match the specified pid
** SQLITE_LOCKSTATE_NOTADB path points to a file that is not an sqlite db file
** SQLITE_LOCKSTATE_ERROR path was not vaild or was unreadable
*/
typedef struct LockstatePID LockstatePID;
struct LockstatePID {
pid_t pid; /* Process ID to test */
int state; /* The state of the lock (return value) */
};
#endif /* (SQLITE_ENABLE_APPLE_SPI>0) && defined(__APPLE__) */
/*
** Threading interface
*/
+199 -1
View File
@@ -4051,6 +4051,24 @@ static int SQLITE_TCLAPI test_clear_bindings(
return TCL_OK;
}
/*
** Usage: sqlite3_clear_bindings STMT
**
*/
static int test_clear_bindings_null(
void * clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
if( objc!=1 ){
return TCL_ERROR;
}
/* test for handling NULL <rdar://problem/6646331> */
Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_clear_bindings(0)));
return TCL_OK;
}
/*
** Usage: sqlite3_sleep MILLISECONDS
*/
@@ -5895,6 +5913,96 @@ static int SQLITE_TCLAPI file_control_data_version(
}
}
#ifdef __APPLE__
/* From sqlite3_private.h */
# ifndef SQLITE_TRUNCATE_DATABASE
# define SQLITE_TRUNCATE_DATABASE 101
# define SQLITE_TRUNCATE_JOURNALMODE_WAL (0x1<<0)
# define SQLITE_TRUNCATE_AUTOVACUUM_MASK (0x3<<2)
# define SQLITE_TRUNCATE_AUTOVACUUM_OFF (0x1<<2)
# define SQLITE_TRUNCATE_AUTOVACUUM_FULL (0x2<<2)
# define SQLITE_TRUNCATE_AUTOVACUUM_INCREMENTAL (0x3<<2)
# define SQLITE_TRUNCATE_PAGESIZE_MASK (0x7<<4)
# define SQLITE_TRUNCATE_PAGESIZE_1024 (0x1<<4)
# define SQLITE_TRUNCATE_PAGESIZE_2048 (0x2<<4)
# define SQLITE_TRUNCATE_PAGESIZE_4096 (0x3<<4)
# define SQLITE_TRUNCATE_PAGESIZE_8192 (0x4<<4)
# endif
# ifndef SQLITE_REPLACE_DATABASE
# define SQLITE_REPLACE_DATABASE 102
# endif
/*
** tclcmd: file_control_truncate_test DB
**
** This TCL command runs the sqlite3_file_control interface and
** verifies correct operation of the SQLITE_TRUNCATE_DATABASE verb.
*/
static int file_control_truncate_test(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[] /* Command arguments */
){
sqlite3 *db;
int flags;
int rc;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB FLAGS", 0);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
return TCL_ERROR;
}
if( Tcl_GetIntFromObj(interp, objv[2], &flags) ){
return TCL_ERROR;
}
rc = sqlite3_file_control(db, NULL, SQLITE_TRUNCATE_DATABASE, &flags);
if( rc ){
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_ERROR;
}
return TCL_OK;
}
/*
** tclcmd: file_control_replace_test DB
**
** This TCL command runs the sqlite3_file_control interface and
** verifies correct operation of the SQLITE_REPLACE_DATABASE verb.
*/
static int file_control_replace_test(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[] /* Command arguments */
){
sqlite3 *src_db;
sqlite3 *dst_db;
int rc;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DST_DB SRC_DB", 0);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &dst_db) ){
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[2]), &src_db) ){
return TCL_ERROR;
}
rc = sqlite3_file_control(dst_db, NULL, SQLITE_REPLACE_DATABASE, src_db);
if( rc ){
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_ERROR;
}
return TCL_OK;
}
#endif /* __APPLE__ */
/*
** tclcmd: file_control_chunksize_test DB DBNAME SIZE
**
@@ -6040,6 +6148,90 @@ static int SQLITE_TCLAPI file_control_lockproxy_test(
return TCL_OK;
}
#ifdef __APPLE__
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/errno.h>
#endif
/*
** tclcmd: path_is_local PWD
*/
static int path_is_local(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[] /* Command arguments */
){
#ifdef __APPLE__
const char *zPath;
int nPath;
struct statfs fsInfo;
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " PATH", 0);
return TCL_ERROR;
}
zPath = Tcl_GetStringFromObj(objv[1], &nPath);
if( statfs(zPath, &fsInfo) == -1 ){
int err = errno;
Tcl_AppendResult(interp, "Error calling statfs on path",
Tcl_NewIntObj(err), 0);
return TCL_ERROR;
}
if( fsInfo.f_flags&MNT_LOCAL ){
Tcl_SetObjResult(interp, Tcl_NewIntObj(1));
} else {
Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
}
#else
Tcl_SetObjResult(interp, Tcl_NewIntObj(1));
#endif
return TCL_OK;
}
/*
** tclcmd: path_is_dos PWD
*/
static int path_is_dos(
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int objc, /* Number of arguments */
Tcl_Obj *CONST objv[] /* Command arguments */
){
#ifdef __APPLE__
const char *zPath;
int nPath;
struct statfs fsInfo;
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " PATH", 0);
return TCL_ERROR;
}
zPath = Tcl_GetStringFromObj(objv[1], &nPath);
if( statfs(zPath, &fsInfo) == -1 ){
int err = errno;
Tcl_AppendResult(interp, "Error calling statfs on path",
Tcl_NewIntObj(err), 0);
return TCL_ERROR;
}
if (0 == strncmp("msdos", fsInfo.f_fstypename, 5)) {
Tcl_SetObjResult(interp, Tcl_NewIntObj(1));
} else if (0 == strncmp("exfat", fsInfo.f_fstypename, 5)) {
Tcl_SetObjResult(interp, Tcl_NewIntObj(1));
} else {
Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
}
#else
Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
#endif
return TCL_OK;
}
#if SQLITE_OS_WIN
/*
** tclcmd: file_control_win32_av_retry DB NRETRY DELAY
@@ -6173,7 +6365,6 @@ static int SQLITE_TCLAPI file_control_persist_wal(
Tcl_AppendResult(interp, z, (char*)0);
return TCL_OK;
}
/*
** tclcmd: file_control_powersafe_overwrite DB PSOW-FLAG
**
@@ -7944,6 +8135,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "sqlite3_bind_parameter_name", test_bind_parameter_name, 0},
{ "sqlite3_bind_parameter_index", test_bind_parameter_index, 0},
{ "sqlite3_clear_bindings", test_clear_bindings, 0},
{ "sqlite3_clear_bindings_null", test_clear_bindings_null, 0},
{ "sqlite3_sleep", test_sleep, 0},
{ "sqlite3_errcode", test_errcode ,0 },
{ "sqlite3_extended_errcode", test_ex_errcode ,0 },
@@ -8059,6 +8251,10 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "file_control_test", file_control_test, 0 },
{ "file_control_lasterrno_test", file_control_lasterrno_test, 0 },
{ "file_control_lockproxy_test", file_control_lockproxy_test, 0 },
#ifdef __APPLE__
{ "file_control_truncate_test", file_control_truncate_test, 0 },
{ "file_control_replace_test", file_control_replace_test, 0 },
#endif
{ "file_control_chunksize_test", file_control_chunksize_test, 0 },
{ "file_control_sizehint_test", file_control_sizehint_test, 0 },
{ "file_control_data_version", file_control_data_version, 0 },
@@ -8073,6 +8269,8 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "file_control_tempfilename", file_control_tempfilename, 0 },
{ "sqlite3_vfs_list", vfs_list, 0 },
{ "sqlite3_create_function_v2", test_create_function_v2, 0 },
{ "path_is_local", path_is_local, 0 },
{ "path_is_dos", path_is_dos, 0 },
/* Functions from os.h */
#ifndef SQLITE_OMIT_UTF16
+31 -1
View File
@@ -610,7 +610,21 @@ Tcl_SetVar2(interp, "sqlite_options", "mergesort", "1", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp,"sqlite_options","prefer_proxy_locking","0",TCL_GLOBAL_ONLY);
#endif
#if defined(SQLITE_ENABLE_PURGEABLE_PCACHE) && defined(__APPLE__)
Tcl_SetVar2(interp,"sqlite_options","enable_purgeable_pcache","1",TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp,"sqlite_options","enable_purgeable_pcache","0",TCL_GLOBAL_ONLY);
#endif
#if SQLITE_DEFAULT_CKPTFULLFSYNC
Tcl_SetVar2(interp,"sqlite_options","default_ckptfullfsync","1",TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp,"sqlite_options","default_ckptfullfsync","0",TCL_GLOBAL_ONLY);
#endif
#if SQLITE_ENABLE_PERSIST_WAL
Tcl_SetVar2(interp,"sqlite_options","enable_persist_wal","1",TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp,"sqlite_options","enable_persist_wal","0",TCL_GLOBAL_ONLY);
#endif
#ifdef SQLITE_OMIT_SHARED_CACHE
Tcl_SetVar2(interp, "sqlite_options", "shared_cache", "0", TCL_GLOBAL_ONLY);
@@ -746,6 +760,22 @@ Tcl_SetVar2(interp, "sqlite_options", "mergesort", "1", TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "sqlite_options", "sqllog", "0", TCL_GLOBAL_ONLY);
#endif
#ifdef __APPLE__
# if defined(__ppc__)
Tcl_SetVar2(interp, "os_options", "arch", "ppc", TCL_GLOBAL_ONLY);
# elif defined(__i386__)
Tcl_SetVar2(interp, "os_options", "arch", "i386", TCL_GLOBAL_ONLY);
# elif defined(__x86_64__)
Tcl_SetVar2(interp, "os_options", "arch", "x86_64", TCL_GLOBAL_ONLY);
# elif defined(__arm__)
Tcl_SetVar2(interp, "os_options", "arch", "arm", TCL_GLOBAL_ONLY);
# else
# error Unrecognized architecture for exec_options
# endif
#else
Tcl_SetVar2(interp, "os_options", "arch", "unknown", TCL_GLOBAL_ONLY);
#endif
#ifdef SQLITE_ENABLE_URI_00_ERROR
Tcl_SetVar2(interp, "sqlite_options", "uri_00_error", "1", TCL_GLOBAL_ONLY);
#else
+5 -4
View File
@@ -148,7 +148,7 @@ static int superlockWalLock(
** this function must have been obtained from a successful call to
** sqlite3demo_superlock().
*/
void sqlite3demo_superunlock(void *pLock){
static void sqlite3demo_superunlock(void *pLock){
Superlock *p = (Superlock *)pLock;
if( p->bWal ){
int rc; /* Return code */
@@ -179,9 +179,10 @@ void sqlite3demo_superunlock(void *pLock){
** until either the lock can be obtained or the busy-handler function returns
** 0 (indicating "give up").
*/
int sqlite3demo_superlock(
static int sqlite3demo_superlock(
const char *zPath, /* Path to database file to lock */
const char *zVfs, /* VFS to use to access database file */
int flags, /* Additional flags to pass to sqlite3_open_v2 */
int (*xBusy)(void*,int), /* Busy handler callback */
void *pBusyArg, /* Context arg for busy handler */
void **ppLock /* OUT: Context to pass to superunlock() */
@@ -196,7 +197,7 @@ int sqlite3demo_superlock(
/* Open a database handle on the file to superlock. */
rc = sqlite3_open_v2(
zPath, &pLock->db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, zVfs
zPath, &pLock->db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|flags, zVfs
);
/* Install a busy-handler and execute a BEGIN EXCLUSIVE. If this is not
@@ -338,7 +339,7 @@ static int SQLITE_TCLAPI superlock_cmd(
xBusy = superlock_busy;
}
rc = sqlite3demo_superlock(zPath, zVfs, xBusy, &busy, &pLock);
rc = sqlite3demo_superlock(zPath, zVfs, 0, xBusy, &busy, &pLock);
assert( rc==SQLITE_OK || pLock==0 );
assert( rc!=SQLITE_OK || pLock!=0 );
+2 -1
View File
@@ -701,7 +701,8 @@ int sqlite3VdbeExec(
** sqlite3_column_text16() failed. */
goto no_mem;
}
assert( p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY );
assert( p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY
|| (p->rc&0xFF)==SQLITE_LOCKED );
assert( p->bIsReader || p->readOnly!=0 );
p->iCurrentTime = 0;
assert( p->explain==0 );
+44 -1
View File
@@ -15,6 +15,9 @@
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
#ifdef SQLITE_ENABLE_SQLRR
# include "sqlrr.h"
#endif
#ifndef SQLITE_OMIT_DEPRECATED
/*
@@ -104,6 +107,9 @@ int sqlite3_finalize(sqlite3_stmt *pStmt){
rc = SQLITE_OK;
}else{
Vdbe *v = (Vdbe*)pStmt;
#ifdef SQLITE_ENABLE_SQLRR
SRRecFinalize(pStmt);
#endif
sqlite3 *db = v->db;
if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
sqlite3_mutex_enter(db->mutex);
@@ -130,6 +136,9 @@ int sqlite3_reset(sqlite3_stmt *pStmt){
}else{
Vdbe *v = (Vdbe*)pStmt;
sqlite3 *db = v->db;
#ifdef SQLITE_ENABLE_SQLRR
SRRecReset(pStmt);
#endif
sqlite3_mutex_enter(db->mutex);
checkProfileCallback(db, v);
rc = sqlite3VdbeReset(v);
@@ -149,7 +158,14 @@ int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
int rc = SQLITE_OK;
Vdbe *p = (Vdbe*)pStmt;
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
sqlite3_mutex *mutex=NULL;
#endif
if( NULL==pStmt ){ return SQLITE_OK; } /* <rdar://problem/6646331> */
#ifdef SQLITE_ENABLE_SQLRR
SRRecClearBindings(pStmt);
#endif
#if SQLITE_THREADSAFE
mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
sqlite3_mutex_enter(mutex);
for(i=0; i<p->nVar; i++){
@@ -1414,6 +1430,9 @@ int sqlite3_bind_blob(
int nData,
void (*xDel)(void*)
){
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindBlob(pStmt, i, zData, nData);
#endif
#ifdef SQLITE_ENABLE_API_ARMOR
if( nData<0 ) return SQLITE_MISUSE_BKPT;
#endif
@@ -1436,6 +1455,9 @@ int sqlite3_bind_blob64(
int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
int rc;
Vdbe *p = (Vdbe *)pStmt;
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindDouble(pStmt, i, rValue);
#endif
rc = vdbeUnbind(p, i);
if( rc==SQLITE_OK ){
sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
@@ -1444,11 +1466,17 @@ int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
return rc;
}
int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindInt64(p, i, (i64)iValue);
#endif
return sqlite3_bind_int64(p, i, (i64)iValue);
}
int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
int rc;
Vdbe *p = (Vdbe *)pStmt;
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindInt64(pStmt, i, iValue);
#endif
rc = vdbeUnbind(p, i);
if( rc==SQLITE_OK ){
sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
@@ -1459,6 +1487,9 @@ int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
int rc;
Vdbe *p = (Vdbe*)pStmt;
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindNull(pStmt, i);
#endif
rc = vdbeUnbind(p, i);
if( rc==SQLITE_OK ){
sqlite3_mutex_leave(p->db->mutex);
@@ -1490,6 +1521,9 @@ int sqlite3_bind_text(
int nData,
void (*xDel)(void*)
){
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindText(pStmt, i, zData, nData);
#endif
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
}
int sqlite3_bind_text64(
@@ -1516,6 +1550,9 @@ int sqlite3_bind_text16(
int nData,
void (*xDel)(void*)
){
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindText(pStmt, i, zData, nData);
#endif
return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
}
#endif /* SQLITE_OMIT_UTF16 */
@@ -1539,6 +1576,9 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
break;
}
case SQLITE_TEXT: {
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindText(pStmt, i, pValue->z, pValue->n);
#endif
rc = bindText(pStmt,i, pValue->z, pValue->n, SQLITE_TRANSIENT,
pValue->enc);
break;
@@ -1553,6 +1593,9 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
int rc;
Vdbe *p = (Vdbe *)pStmt;
#ifdef SQLITE_ENABLE_SQLRR
SRRecBindBlob(pStmt, i, NULL, n);
#endif
rc = vdbeUnbind(p, i);
if( rc==SQLITE_OK ){
sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
+50 -7
View File
@@ -1334,11 +1334,12 @@ int sqlite3WalOpen(
const char *zWalName, /* Name of the WAL file */
int bNoShm, /* True to run in heap-memory mode */
i64 mxWalSize, /* Truncate WAL to this size on reset */
int flags, /* VFS file protection flags */
Wal **ppWal /* OUT: Allocated Wal handle */
){
int rc; /* Return Code */
Wal *pRet; /* Object to allocate and return */
int flags; /* Flags passed to OsOpen() */
int vfsFlags; /* Flags passed to OsOpen() */
assert( zWalName && zWalName[0] );
assert( pDbFd );
@@ -1377,9 +1378,13 @@ int sqlite3WalOpen(
pRet->exclusiveMode = (bNoShm ? WAL_HEAPMEMORY_MODE: WAL_NORMAL_MODE);
/* Open file handle on the write-ahead log file. */
flags = (SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_WAL);
rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, flags, &flags);
if( rc==SQLITE_OK && flags&SQLITE_OPEN_READONLY ){
if( flags&SQLITE_OPEN_READONLY ){
vfsFlags = flags | SQLITE_OPEN_WAL;
} else {
vfsFlags = flags | (SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_WAL);
}
rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, vfsFlags, &vfsFlags);
if( rc==SQLITE_OK && vfsFlags&SQLITE_OPEN_READONLY ){
pRet->readOnly = WAL_RDONLY;
}
@@ -2089,6 +2094,9 @@ static int walIndexTryHdr(Wal *pWal, int *pChanged){
** reordering the reads and writes.
*/
aHdr = walIndexHdr(pWal);
if( aHdr==NULL ){
return 1; /* Shouldn't be getting NULL from walIndexHdr, but we are */
}
memcpy(&h1, (void *)&aHdr[0], sizeof(h1));
walShmBarrier(pWal);
memcpy(&h2, (void *)&aHdr[1], sizeof(h2));
@@ -3004,7 +3012,6 @@ Pgno sqlite3WalDbsize(Wal *pWal){
return 0;
}
/*
** This function starts a write transaction on the WAL.
**
@@ -3222,6 +3229,10 @@ typedef struct WalWriter {
sqlite3_int64 iSyncPoint; /* Fsync at this offset */
int syncFlags; /* Flags for the fsync */
int szPage; /* Size of one page */
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
void *aFrameBuf; /* Frame buffer */
size_t szFrameBuf; /* Size of frame buffer */
#endif
} WalWriter;
/*
@@ -3265,13 +3276,25 @@ static int walWriteOneFrame(
){
int rc; /* Result code from subfunctions */
void *pData; /* Data actually written */
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
u8 *aFrame = p->aFrameBuf;
#else
u8 aFrame[WAL_FRAME_HDRSIZE]; /* Buffer to assemble frame-header in */
#endif
pData = pPage->pData;
walEncodeFrame(p->pWal, pPage->pgno, nTruncate, pData, aFrame);
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
memcpy(&aFrame[WAL_FRAME_HDRSIZE], pData, p->szPage);
rc = walWriteToLog(p, aFrame, (p->szPage + WAL_FRAME_HDRSIZE), iOffset);
#else
rc = walWriteToLog(p, aFrame, sizeof(aFrame), iOffset);
if( rc ) return rc;
/* Write the page data */
rc = walWriteToLog(p, pData, p->szPage, iOffset+sizeof(aFrame));
#endif
return rc;
}
@@ -3430,6 +3453,13 @@ int sqlite3WalFrames(
w.szPage = szPage;
iOffset = walFrameOffset(iFrame+1, szPage);
szFrame = szPage + WAL_FRAME_HDRSIZE;
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
w.aFrameBuf = (void *)malloc(szFrame);
if( NULL==w.aFrameBuf ){
return SQLITE_NOMEM;
}
#endif
/* Write all frames into the log file exactly once */
for(p=pList; p; p=p->pDirty){
@@ -3461,7 +3491,12 @@ int sqlite3WalFrames(
assert( iOffset==walFrameOffset(iFrame, szPage) );
nDbSize = (isCommit && p->pDirty==0) ? nTruncate : 0;
rc = walWriteOneFrame(&w, p, nDbSize, iOffset);
if( rc ) return rc;
if( rc ) {
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
free(w.aFrameBuf);
#endif
return rc;
}
pLast = p;
iOffset += szFrame;
p->flags |= PGHDR_WAL_APPEND;
@@ -3496,7 +3531,12 @@ int sqlite3WalFrames(
testcase( bSync );
while( iOffset<w.iSyncPoint ){
rc = walWriteOneFrame(&w, pLast, nTruncate, iOffset);
if( rc ) return rc;
if( rc ) {
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
free(w.aFrameBuf);
#endif
return rc;
}
iOffset += szFrame;
nExtra++;
assert( pLast!=0 );
@@ -3508,6 +3548,9 @@ int sqlite3WalFrames(
}
}
#if defined(SQLITE_WRITE_WALFRAME_PREBUFFERED)
free(w.aFrameBuf);
#endif
/* If this frame set completes the first transaction in the WAL and
** if PRAGMA journal_size_limit is set, then truncate the WAL to the
** journal size limit, if possible.
+4 -1
View File
@@ -55,7 +55,7 @@
typedef struct Wal Wal;
/* Open and close a connection to a write-ahead log. */
int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**);
int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, int, Wal**);
int sqlite3WalClose(Wal *pWal, sqlite3*, int sync_flags, int, u8 *);
/* Set the limiting size of a WAL file. */
@@ -78,6 +78,9 @@ int sqlite3WalReadFrame(Wal *, u32, int, u8 *);
/* If the WAL is not empty, return the size of the database. */
Pgno sqlite3WalDbsize(Wal *pWal);
/* If a WAL journal file has been created, return it */
sqlite3_file *sqlite3WalFile(Wal *pWal);
/* Obtain or release the WRITER lock. */
int sqlite3WalBeginWriteTransaction(Wal *pWal);
int sqlite3WalEndWriteTransaction(Wal *pWal);
+2
View File
@@ -146,6 +146,8 @@ ifcapable !wal {
finish_test
return
}
if ![wal_is_ok] { finish_test; return }
db close
forcedelete test.db
do_test 8_3_names-5.0 {
+5 -1
View File
@@ -550,7 +550,7 @@ ifcapable fts3 {
DROP TABLE y1_segments;
} {1 {table y1_segments may not be dropped}}
do_catchsql_test 16.20 {
do_catchsql_test 16.21 {
ALTER TABLE y1_segments RENAME TO abc;
} {1 {table y1_segments may not be altered}}
sqlite3_db_config db DEFENSIVE 0
@@ -570,6 +570,10 @@ ifcapable fts3 {
} {0 {}}
sqlite3_db_config db DEFENSIVE 1
do_catchsql_test 16.21 {
DROP TABLE y1_segments;
} {1 {table y1_segments may not be dropped}}
do_execsql_test 16.30 {
ALTER TABLE y1 RENAME TO z1;
}
+18 -17
View File
@@ -760,23 +760,24 @@ do_test attach-6.1 {
}
} {0 {}}
if {$tcl_platform(platform)=="unix"} {
do_test attach-6.2 {
sqlite3 dbx cannot-read
dbx eval {CREATE TABLE t1(a,b,c)}
dbx close
file attributes cannot-read -permission 0000
if {[file writable cannot-read]} {
puts "\n**** Tests do not work when run as root ****"
forcedelete cannot-read
exit 1
}
catchsql {
ATTACH DATABASE 'cannot-read' AS noread;
}
} {1 {unable to open database: cannot-read}}
do_test attach-6.2.2 {
db errorcode
} {14}
sqlite3 dbx cannot-read
dbx eval {CREATE TABLE t1(a,b,c)}
dbx close
file attributes cannot-read -permission 0000
if {[file writable cannot-read]} {
#puts "\n**** Tests do not work when run as root ****"
forcedelete cannot-read
#exit 1
} else {
do_test attach-6.2 {
catchsql {
ATTACH DATABASE 'cannot-read' AS noread;
}
} {1 {unable to open database: cannot-read}}
do_test attach-6.2.2 {
db errorcode
} {14}
}
forcedelete cannot-read
}
+1
View File
@@ -80,6 +80,7 @@ foreach {name f} $files {
set mode wal
}
ifcapable !wal { set mode delete }
if ![wal_is_ok] { set mode delete }
lappend L $mode
append S "
PRAGMA $name.journal_mode = WAL;
+3
View File
@@ -656,6 +656,9 @@ do_test bind-13.4 {
[sqlite3_column_type $VM 2]
} {NULL NULL NULL}
sqlite3_finalize $VM
do_test bind-13.5 {
sqlite3_clear_bindings_null
} {0}
#--------------------------------------------------------------------
# These tests attempt to reproduce bug #3463.
+16 -5
View File
@@ -107,12 +107,17 @@ do_execsql_test cache-2.3.3 {
} {main exclusive temp closed}
do_test cache-2.3.4 { pager_cache_size db } 2
do_execsql_test cache-2.3.5 COMMIT
do_test cache-2.3.6 { pager_cache_size db } 1
if !$::sqlite_options(enable_purgeable_pcache) {
# purgeable pcache doesn't share cache between connections
do_test cache-2.3.6 { pager_cache_size db } 1
}
do_execsql_test cache-2.3.7 {
SELECT * FROM t1 UNION SELECT * FROM t2;
} {1 2 i j x y}
do_test cache-2.3.8 { pager_cache_size db } 1
if !$::sqlite_options(enable_purgeable_pcache) {
# purgeable pcache doesn't share cache between connections
do_test cache-2.3.8 { pager_cache_size db } 1
}
# Tests for cache_size = 0.
#
@@ -130,11 +135,17 @@ do_execsql_test cache-2.4.3 {
do_test cache-2.4.4 { pager_cache_size db } 2
do_execsql_test cache-2.4.5 COMMIT
do_test cache-2.4.6 { pager_cache_size db } 0
if !$::sqlite_options(enable_purgeable_pcache) {
# purgeable pcache doesn't share cache between connections
do_test cache-2.4.6 { pager_cache_size db } 0
}
do_execsql_test cache-2.4.7 {
SELECT * FROM t1 UNION SELECT * FROM t2;
} {1 2 i j x y}
do_test cache-2.4.8 { pager_cache_size db } 0
if !$::sqlite_options(enable_purgeable_pcache) {
# purgeable pcache doesn't share cache between connections
do_test cache-2.4.8 { pager_cache_size db } 0
}
sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit)
finish_test
+3
View File
@@ -42,6 +42,9 @@ proc db_spill {db {reset 0}} {
}
do_test 1.1 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
sqlite3 db test.db
execsql { PRAGMA mmap_size = 0 }
+2 -1
View File
@@ -33,7 +33,8 @@ testvfs oldvfs -iversion 1
#
# All three done with VFS "oldvfs", which has iVersion==1 and so does
# not support shared memory.
#
#
forcedelete test.db-shm
sqlite3 db test.db -vfs oldvfs
do_execsql_test 1.1.1 {
PRAGMA journal_mode = WAL;
+1
View File
@@ -440,6 +440,7 @@ foreach {tn script} {
# It's not. Test case "$tp.6".
#
do_test $tp.4 {
forcedelete abc.db-shm abc.db-wal
forcecopy test.db abc.db
sqlite3 db4 abc.db
db4 eval { SELECT * FROM t1 UNION ALL SELECT * FROM t2 }
+1 -5
View File
@@ -404,12 +404,8 @@ sqlite3 db test.db
# if we're using proxy locks, we use 3 filedescriptors for a db
# that is open but NOT writing changes, normally
# sqlite uses 1 (proxy locking adds the conch and the local lock)
set using_proxy 0
foreach {name value} [array get env SQLITE_FORCE_PROXY_LOCKING] {
set using_proxy $value
}
set extrafds 0
if {$using_proxy!=0} {
if {[forced_proxy_locking]} {
set extrafds 2
}
+12 -1
View File
@@ -88,13 +88,24 @@ set skipwaltests [expr {
[permutation]=="journaltest" || [permutation]=="inmemory_journal"
}]
ifcapable !wal { set skipwaltests 1 }
if {![wal_is_ok]} { set skipwaltests 1 }
if {!$skipwaltests} {
db close
forcedelete test.db
ifcapable enable_persist_wal {
forcedelete test.db-journal
forcedelete test.db-wal
forcedelete test.db-shm
}
if {[forced_proxy_locking]} {
forcedelete .test.db-conch
}
sqlite3 db test.db
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
file_control_chunksize_test db main [expr 32*1024]
do_test fallocate-2.1 {
execsql {
PRAGMA page_size = 1024;
+20
View File
@@ -184,6 +184,26 @@ do_execsql_test 5.3 {
SELECT count(*) FILTER (WHERE b>2) OVER (ORDER BY b) FROM (SELECT * FROM t1)
} {0 1}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 5.0 {
CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES(1, 2);
INSERT INTO t1 VALUES(1, 3);
}
do_execsql_test 5.1 {
SELECT count(*) FILTER (WHERE b>2) FROM (SELECT * FROM t1)
} {1}
do_execsql_test 5.2 {
SELECT count(*) FILTER (WHERE b>2) OVER () FROM (SELECT * FROM t1)
} {1 1}
do_execsql_test 5.3 {
SELECT count(*) FILTER (WHERE b>2) OVER (ORDER BY b) FROM (SELECT * FROM t1)
} {0 1}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 6.0 {
+11 -6
View File
@@ -260,12 +260,17 @@ proc access_method {args} {
return ""
}
do_test incrblob3-7.2 {
sqlite3 db test.db
sqlite3_db_config_lookaside db 0 0 0
list [catch {db incrblob blobs v 1} msg] $msg
} {1 {database schema has changed}}
db close
#set sqlite_os_trace 1
# AFP asserts because the "db incrblob blobs v 1" clears the file locks and the unlock fails (HFS doesn't care about a failed unlock)
if {[path_is_local "."]} {
do_test incrblob3-7.2 {
sqlite3 db test.db
sqlite3_db_config_lookaside db 0 0 0
list [catch {db incrblob blobs v 1} msg] $msg
} {1 {database schema has changed}}
db close
}
tvfs delete
finish_test
+3
View File
@@ -15,6 +15,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/wal_common.tcl
# If this build of the library does not support auto-vacuum, omit this
# whole file.
@@ -134,6 +135,8 @@ do_test incrvacuum2-3.2 {
integrity_check incrvacuum2-3.3
if ![wal_is_ok] { finish_test; return }
if {[wal_is_capable]} {
# At one point, when a specific page was being extracted from the b-tree
# free-list (e.g. during an incremental-vacuum), all trunk pages that
+21
View File
@@ -905,6 +905,27 @@ do_execsql_test join-18.4 {
SELECT NOT(v0.a IS FALSE) FROM v0
} {1}
#-------------------------------------------------------------------------
reset_db
do_execsql_test join-18.1 {
CREATE TABLE t0(a);
CREATE TABLE t1(b);
CREATE VIEW v0 AS SELECT a FROM t1 LEFT JOIN t0;
INSERT INTO t1 VALUES (1);
} {}
do_execsql_test join-18.2 {
SELECT * FROM v0 WHERE NOT(v0.a IS FALSE);
} {{}}
do_execsql_test join-18.3 {
SELECT * FROM t1 LEFT JOIN t0 WHERE NOT(a IS FALSE);
} {1 {}}
do_execsql_test join-18.4 {
SELECT NOT(v0.a IS FALSE) FROM v0
} {1}
#-------------------------------------------------------------------------
reset_db
do_execsql_test join-19.0 {
+1 -1
View File
@@ -20,7 +20,7 @@ source $testdir/malloc_common.tcl
# If a connection is required to create a journal file, it creates it with
# the same file-system permissions as the database file itself. Test this.
#
if {$::tcl_platform(platform) == "unix"
if {$::tcl_platform(platform) == "unix" && ![path_is_dos "."]
&& [atomic_batch_write test.db]==0
} {
+74 -68
View File
@@ -106,88 +106,94 @@ if {[catch {sqlite3 db test.db -vfs unix-flock} msg]} {
return
}
do_test lock5-flock.1 {
sqlite3 db test.db -vfs unix-flock
execsql {
CREATE TABLE t1(a, b);
BEGIN;
INSERT INTO t1 VALUES(1, 2);
}
} {}
# Only run the flock tests on a local file system
if { [path_is_local "."] } {
# Make sure we are not accidentally using the dotfile locking scheme.
do_test lock5-flock.2 {
file exists test.db.lock
} {0}
do_test lock5-flock.1 {
sqlite3 db test.db -vfs unix-flock
execsql {
CREATE TABLE t1(a, b);
BEGIN;
INSERT INTO t1 VALUES(1, 2);
}
} {}
do_test lock5-flock.3 {
catch { sqlite3 db2 test.db -vfs unix-flock }
catchsql { SELECT * FROM t1 } db2
} {1 {database is locked}}
# Make sure we are not accidentally using the dotfile locking scheme.
do_test lock5-flock.2 {
file exists test.db.lock
} {0}
do_test lock5-flock.4 {
execsql COMMIT
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
do_test lock5-flock.3 {
catch { sqlite3 db2 test.db -vfs unix-flock }
catchsql { SELECT * FROM t1 } db2
} {1 {database is locked}}
do_test lock5-flock.5 {
execsql BEGIN
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
do_test lock5-flock.4 {
execsql COMMIT
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
do_test lock5-flock.6 {
execsql {SELECT * FROM t1}
catchsql { SELECT * FROM t1 } db2
} {1 {database is locked}}
do_test lock5-flock.5 {
execsql BEGIN
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
do_test lock5-flock.7 {
db close
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
do_test lock5-flock.6 {
execsql {SELECT * FROM t1}
catchsql { SELECT * FROM t1 } db2
} {1 {database is locked}}
do_test lock5-flock.8 {
db2 close
} {}
do_test lock5-flock.7 {
db close
catchsql { SELECT * FROM t1 } db2
} {0 {1 2}}
#####################################################################
do_test lock5-flock.8 {
db2 close
} {}
do_test lock5-none.1 {
sqlite3 db test.db -vfs unix-none
sqlite3 db2 test.db -vfs unix-none
execsql { PRAGMA mmap_size = 0 } db2
execsql {
BEGIN;
INSERT INTO t1 VALUES(3, 4);
}
} {}
do_test lock5-none.2 {
execsql { SELECT * FROM t1 }
} {1 2 3 4}
do_test lock5-none.3 {
execsql { SELECT * FROM t1; } db2
} {1 2}
do_test lock5-none.4 {
execsql {
BEGIN;
SELECT * FROM t1;
} db2
} {1 2}
do_test lock5-none.5 {
execsql COMMIT
execsql {SELECT * FROM t1} db2
} {1 2}
#####################################################################
ifcapable memorymanage {
do_test lock5-none.1 {
sqlite3 db test.db -vfs unix-none
sqlite3 db2 test.db -vfs unix-none
execsql {
BEGIN;
INSERT INTO t1 VALUES(3, 4);
}
} {}
do_test lock5-none.2 {
execsql { SELECT * FROM t1 }
} {1 2 3 4}
do_test lock5-flock.3 {
execsql { SELECT * FROM t1 } db2
} {1 2}
do_test lock5-none.4 {
execsql {
BEGIN;
SELECT * FROM t1;
} db2
} {1 2}
do_test lock5-none.5 {
execsql COMMIT
} {}
do_test lock5-none.6 {
sqlite3_release_memory 1000000
execsql {SELECT * FROM t1} db2
} {1 2 3 4}
}
} {1 2}
do_test lock5-none.X {
db close
db2 close
} {}
ifcapable memorymanage {
do_test lock5-none.6 {
sqlite3_release_memory 1000000
execsql {SELECT * FROM t1} db2
} {1 2 3 4}
}
do_test lock5-flock.X {
db close
db2 close
} {}
}
ifcapable lock_proxy_pragmas {
set env(SQLITE_FORCE_PROXY_LOCKING) $::using_proxy
+5 -3
View File
@@ -126,9 +126,10 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
set lockpath
} {{:auto: (not held)}}
set lpp [exec mktemp -t fail]
do_test lock6-1.4.1 {
execsql "PRAGMA lock_proxy_file='$lpp'"
catchsql {
PRAGMA lock_proxy_file="notmine";
select * from sqlite_master;
} db
} {1 {database is locked}}
@@ -137,7 +138,7 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
execsql {
PRAGMA lock_proxy_file;
} db
} {notmine}
} $lpp
do_test lock6-1.5 {
testfixture $::tf1 {
@@ -150,9 +151,10 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
catch {testfixture $::tf1 {db close}}
set lpp [exec mktemp -t ok]
do_test lock6-1.6 {
execsql "PRAGMA lock_proxy_file='$lpp'"
execsql {
PRAGMA lock_proxy_file="mine";
select * from sqlite_master;
} db
} {}
+142
View File
@@ -0,0 +1,142 @@
# 2008 June 28
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library. The
# focus of this script is database proxy locks.
#
# $Id$
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# This file is only run if using the unix backend compiled with the
# SQLITE_ENABLE_LOCKING_STYLE macro.
db close
if {[catch {sqlite3 db test.db -vfs unix-none} msg]} {
finish_test
return
}
db close
file delete -force test.db.lock
#####################################################################
ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
set ::using_proxy 0
foreach {name value} [array get env SQLITE_FORCE_PROXY_LOCKING] {
set ::using_proxy $value
}
# enable the proxy locking for these tests
set env(SQLITE_FORCE_PROXY_LOCKING) "1"
# test conch file creation
#
catch { file delete lock_proxy_test.db }
catch { file delete .lock_proxy_test.db-conch }
# test that proxy locking mode creates conch files
do_test lock_proxy1.0 {
sqlite3 db2 lock_proxy_test.db
catchsql {
create table x(y);
} db2
file exists .lock_proxy_test.db-conch
} {1}
catch { db2 close }
# test proxy locking readonly file system handling
#
if {[file exists /usr/bin/hdiutil]} {
puts "Creating readonly file system for proxy locking tests..."
if {[file exists /Volumes/readonly]} {
exec hdiutil detach /Volumes/readonly
}
if {[file exists readonly.dmg]} {
file delete readonly.dmg
}
exec hdiutil create -megabytes 1 -fs HFS+ readonly.dmg -volname readonly
exec hdiutil attach readonly.dmg
# create test1.db and a .test1.db-conch for host4
set sqlite_hostid_num 4
sqlite3 db2 /Volumes/readonly/test1.db
execsql {
create table x(y);
} db2
db2 close
# create test2.db and a .test2.db-conch for host5
set sqlite_hostid_num 5
sqlite3 db2 /Volumes/readonly/test2.db
execsql {
create table x(y);
} db2
db2 close
# create test3.db without a conch file
set env(SQLITE_FORCE_PROXY_LOCKING) "0"
sqlite3 db2 /Volumes/readonly/test3.db
execsql {
create table x(y);
} db2
db2 close
exec hdiutil detach /Volumes/readonly
exec hdiutil attach -readonly readonly.dmg
# test that an unwritable, host-mismatched conch file prevents
# read only proxy-locking mode database access
set env(SQLITE_FORCE_PROXY_LOCKING) "1"
do_test lock_proxy2.0 {
sqlite3 db2 /Volumes/readonly/test1.db
catchsql {
select * from sqlite_master;
} db2
} {1 {database is locked}}
catch { db2 close }
# test that an unwritable, host-matching conch file allows
# read only proxy-locking mode database access
do_test lock_proxy2.1 {
sqlite3 db2 /Volumes/readonly/test2.db
catchsql {
select * from sqlite_master;
} db2
} {0 {table x x 2 {CREATE TABLE x(y)}}}
catch { db2 close }
# test that an unwritable, nonexistant conch file allows
# read only proxy-locking mode database access
do_test lock_proxy2.2 {
sqlite3 db2 /Volumes/readonly/test3.db
catchsql {
select * from sqlite_master;
} db2
} {0 {table x x 2 {CREATE TABLE x(y)}}}
catch { db2 close }
exec hdiutil detach /Volumes/readonly
file delete readonly.dmg
}
set env(SQLITE_FORCE_PROXY_LOCKING) "0"
set sqlite_hostid_num 0
}
#####################################################################
file delete -force test.db
ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
set env(SQLITE_FORCE_PROXY_LOCKING) $::using_proxy
}
finish_test
+3 -3
View File
@@ -314,7 +314,7 @@ if {[permutation] == ""} {
#
do_test main-3.1 {
catch {db close}
foreach f [glob -nocomplain testdb/*] {forcedelete $f}
catch {foreach f [glob -nocomplain testdb/*] {forcedelete $f}}
forcedelete testdb
sqlite3 db testdb
set v [catch {execsql {SELECT * from T1 where x!!5}} msg]
@@ -322,7 +322,7 @@ do_test main-3.1 {
} {1 {unrecognized token: "!"}}
do_test main-3.2 {
catch {db close}
foreach f [glob -nocomplain testdb/*] {forcedelete $f}
catch {foreach f [glob -nocomplain testdb/*] {forcedelete $f}}
forcedelete testdb
sqlite3 db testdb
set v [catch {execsql {SELECT * from T1 where ^x}} msg]
@@ -442,7 +442,7 @@ do_test main-3.2.30 {
do_test main-3.3 {
catch {db close}
foreach f [glob -nocomplain testdb/*] {forcedelete $f}
catch {foreach f [glob -nocomplain testdb/*] {forcedelete $f}}
forcedelete testdb
sqlite3 db testdb
execsql {
+1 -1
View File
@@ -445,7 +445,7 @@ proc do_malloc_test {tn args} {
set zRepeat "transient"
if {$::iRepeat} {set zRepeat "persistent"}
restore_prng_state
foreach file [glob -nocomplain test.db-mj*] {forcedelete $file}
catch {foreach file [glob -nocomplain test.db-mj*] {forcedelete $file}}
do_test ${tn}.${zRepeat}.${::n} {
+1 -5
View File
@@ -22,12 +22,8 @@ set N 300
# if we're using proxy locks, we use 5 filedescriptors for a db
# that is open and in the middle of writing changes, normally
# sqlite uses 3 (proxy locking adds the conch and the local lock)
set using_proxy 0
foreach {name value} [array get env SQLITE_FORCE_PROXY_LOCKING] {
set using_proxy value
}
set num_fd_per_openwrite_db 3
if {$using_proxy>0} {
if {[forced_proxy_locking]} {
set num_fd_per_openwrite_db 5
}
+20 -18
View File
@@ -11,7 +11,6 @@
# This file implements regression tests for SQLite library. The
# focus of this script is in-memory database backend.
#
# $Id: memdb.test,v 1.19 2009/05/18 16:04:38 danielk1977 Exp $
set testdir [file dirname $argv0]
@@ -407,23 +406,26 @@ do_test memdb-8.2 {
# Test that auto-vacuum works with in-memory databases.
#
ifcapable autovacuum {
do_test memdb-9.1 {
db close
sqlite3 db test.db
db cache size 0
execsql {
PRAGMA auto_vacuum = full;
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(randstr(1000,1000));
INSERT INTO t1 VALUES(randstr(1000,1000));
INSERT INTO t1 VALUES(randstr(1000,1000));
}
set before [db one {PRAGMA page_count}]
execsql { DELETE FROM t1 }
set after [db one {PRAGMA page_count}]
expr {$before>$after}
} {1}
set msize [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0]
if {[lindex $msize 2]!=0} {
ifcapable autovacuum {
do_test memdb-9.1 {
db close
sqlite3 db test.db
db cache size 0
execsql {
PRAGMA auto_vacuum = full;
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(randstr(1000,1000));
INSERT INTO t1 VALUES(randstr(1000,1000));
INSERT INTO t1 VALUES(randstr(1000,1000));
}
set before [db one {PRAGMA page_count}]
execsql { DELETE FROM t1 }
set after [db one {PRAGMA page_count}]
expr {$before>$after}
} {1}
}
}
} ;# ifcapable memorydb
+19 -15
View File
@@ -124,18 +124,20 @@ sqlite3_config singlethread
sqlite3_initialize
reset_highwater_marks
build_test_db memsubsys1-3.1 {PRAGMA page_size=1024}
do_test memsubsys1-3.1.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
} 0
do_test memsubsys1-3.1.4 {
set overflow [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
# Note: The measured PAGECACHE_OVERFLOW is amount malloc() returns, not what
# was requested. System malloc() implementations might (arbitrarily) return
# slightly different oversize buffers, which can result in slightly different
# PAGECACHE_OVERFLOW sizes between consecutive runs. So we cannot do an
# exact comparison. Simply verify that the amount is within 5%.
expr {$overflow>=$max_pagecache*0.95 && $overflow<=$max_pagecache*1.05}
} 1
if !$::sqlite_options(enable_purgeable_pcache) {
do_test memsubsys1-3.1.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
} 0
do_test memsubsys1-3.1.4 {
set overflow [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
# Note: The measured PAGECACHE_OVERFLOW is amount malloc() returns, not what
# was requested. System malloc() implementations might (arbitrarily) return
# slightly different oversize buffers, which can result in different
# PAGECACHE_OVERFLOW sizes between consecutive runs. So we cannot do an
# exact comparison. Simply verify that the amount is within 5%.
expr {$overflow>=$max_pagecache*0.95 && $overflow<=$max_pagecache*1.05}
} 1
}
do_test memsubsys1-3.1.5 {
set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
} 0
@@ -169,9 +171,11 @@ do_test memsubsys1-4.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
expr {$pg_used>=45 && $pg_used<=50}
} 1
do_test memsubsys1-4.4 {
set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
} 0
if !$::sqlite_options(enable_purgeable_pcache) {
do_test memsubsys1-4.4 {
set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
} 0
}
do_test memsubsys1-4.5 {
set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2]
expr {$maxreq<7000}
+6
View File
@@ -14,6 +14,12 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/malloc_common.tcl
# AFP doesn't like multiplex db tests
if { ![path_is_local "."] } {
finish_test
return
}
# The tests in this file assume that SQLite is compiled without
# ENABLE_8_3_NAMES.
#
+40 -31
View File
@@ -553,6 +553,8 @@ proc copy_on_mj_delete {method filename args} {
return SQLITE_OK
}
if {![forced_proxy_locking]} {
# proxy locking uses can't deal with auto proxy file paths longer than MAXPATHLEN
foreach {tn1 tcl} {
1 { set prefix "test.db" }
2 {
@@ -739,6 +741,7 @@ foreach {tn1 tcl} {
db close
tv delete
forcedelete $dirname
}
# Set up a VFS to make a copy of the file-system just before deleting a
# journal file to commit a transaction. The transaction modifies exactly
@@ -1220,7 +1223,7 @@ do_execsql_test pager1-6.12 { PRAGMA max_page_count } {11}
# $ws: The expected size of the WAL file, in bytes, after executing
# the SQL script. Or -1 if the WAL is not expected to exist.
#
ifcapable wal {
if {$::sqlite_options(wal) && [wal_is_ok]} {
faultsim_delete_and_reopen
foreach {tn sql res js ws} [subst {
@@ -1256,6 +1259,9 @@ ifcapable wal {
10 { SELECT * FROM t1 } {1 2 3 4 5 6 7 8} 0 -1
}] {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
do_execsql_test pager1-7.1.$tn.1 $sql $res
catch { set J -1 ; set J [file size test.db-journal] }
catch { set W -1 ; set W [file size test.db-wal] }
@@ -2048,7 +2054,7 @@ do_test pager1-20.2.2 {
}
} {}
ifcapable wal {
if {$::sqlite_options(wal) && [wal_is_ok]} {
do_test pager1-20.3.1 {
faultsim_delete_and_reopen
db func a_string a_string
@@ -2083,7 +2089,7 @@ ifcapable wal {
# pager1-21.1.*: The VFS has an iVersion less than 2, or
# pager1-21.2.*: The VFS does not provide xShmXXX() methods.
#
ifcapable wal {
if {$::sqlite_options(wal) && [wal_is_ok]} {
do_test pager1-21.0 {
faultsim_delete_and_reopen
execsql {
@@ -2114,33 +2120,36 @@ ifcapable wal {
# pager1-22.1.*: is a no-op on a non-WAL db, and
# pager1-22.2.*: does not cause xSync calls with a synchronous=off db.
#
ifcapable wal {
do_test pager1-22.1.1 {
faultsim_delete_and_reopen
execsql {
CREATE TABLE ko(c DEFAULT 'abc', b DEFAULT 'def');
INSERT INTO ko DEFAULT VALUES;
}
execsql { PRAGMA wal_checkpoint }
} {0 -1 -1}
do_test pager1-22.2.1 {
testvfs tv -default 1
tv filter xSync
tv script xSyncCb
proc xSyncCb {args} {incr ::synccount}
set ::synccount 0
sqlite3 db test.db
execsql {
PRAGMA synchronous = off;
PRAGMA journal_mode = WAL;
INSERT INTO ko DEFAULT VALUES;
}
execsql { PRAGMA wal_checkpoint }
set synccount
} {0}
db close
tv delete
}
do_test pager1-22.1.1 {
faultsim_delete_and_reopen
execsql {
CREATE TABLE ko(c DEFAULT 'abc', b DEFAULT 'def');
INSERT INTO ko DEFAULT VALUES;
}
execsql { PRAGMA wal_checkpoint }
} {0 -1 -1}
do_test pager1-22.2.1 {
testvfs tv -default 1
tv filter xSync
tv script xSyncCb
proc xSyncCb {args} {incr ::synccount}
sqlite3 db test.db
# Switch the db to WAL mode. And then execute a SELECT to make sure
# that the WAL file is open. Note that this may change the synchronous
# setting if DEFAULT_WAL_SAFETYLEVEL is defined.
execsql { PRAGMA journal_mode = WAL ; SELECT * FROM ko }
# Set synchronous=OFF. Insert some data and run a checkpoint. Since
# sync=off, this should not cause any calls to the xSync() method.
set ::synccount 0
execsql {
PRAGMA synchronous = off;
INSERT INTO ko DEFAULT VALUES;
PRAGMA wal_checkpoint;
}
set synccount
} {0}
#-------------------------------------------------------------------------
# Tests for changing journal mode.
@@ -2388,7 +2397,7 @@ do_test pager1.27.1 {
# the same database.
#
catch { db close }
ifcapable wal {
if {$::sqlite_options(wal) && [wal_is_ok]} {
do_multiclient_test tn {
do_test pager1-28.$tn.1 {
sql1 {
+33
View File
@@ -1062,6 +1062,39 @@ ifcapable crashtest {
}
#-------------------------------------------------------------------------
# When a 3.7.0 client opens a write-transaction on a database file that
# has been appended to or truncated by a pre-370 client, it updates
# the db-size in the file header immediately. This test case provokes
# errors during that operation.
#
do_test pagerfault-22-pre1 {
faultsim_delete_and_reopen
db func a_string a_string
execsql {
PRAGMA page_size = 1024;
PRAGMA auto_vacuum = 0;
CREATE TABLE t1(a);
CREATE INDEX i1 ON t1(a);
INSERT INTO t1 VALUES(a_string(3000));
CREATE TABLE t2(a);
INSERT INTO t2 VALUES(1);
}
db close
sql36231 { INSERT INTO t1 VALUES(a_string(3000)) }
faultsim_save_and_close
} {}
do_faultsim_test pagerfault-22 -prep {
faultsim_restore_and_reopen
} -body {
execsql { INSERT INTO t2 VALUES(2) }
execsql { SELECT * FROM t2 }
} -test {
faultsim_test_result {0 {1 2}}
faultsim_integrity_check
}
#-------------------------------------------------------------------------
# When a 3.7.0 client opens a write-transaction on a database file that
# has been appended to or truncated by a pre-370 client, it updates
+6 -1
View File
@@ -117,7 +117,9 @@ do_test pcache-1.7 {
# page. Because the number of allocated pages is greater than the
# configured maximum, this page should be freed immediately instead of
# recycled.
#
# Note- purgable_pcache doesn't share caches between connections and these tests
# are only useful for testing that feature.
if !$::sqlite_options(enable_purgeable_pcache) {
do_test pcache-1.8 {
execsql {ROLLBACK} db2
pcache_stats
@@ -178,5 +180,8 @@ do_test pcache-1.15 {
}
pcache_stats
} {current 14 max 15 min 10 recyclable 14}
} else {
db2 close
}
finish_test
+137 -32
View File
@@ -1530,7 +1530,12 @@ sqlite3 dbX :memory:
dbX eval {PRAGMA temp_store_directory = ""}
dbX close
ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
set skip_lock_proxy_tests [path_is_dos "."]
ifcapable !(lock_proxy_pragmas&&prefer_proxy_locking) {
set skip_lock_proxy_tests 1
}
if !$skip_lock_proxy_tests {
set sqlite_hostid_num 1
set using_proxy 0
@@ -1544,67 +1549,67 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
set env(SQLITE_FORCE_PROXY_LOCKING) "0"
sqlite3 db test.db
# set lock proxy name and then query it via pragma interface
set lpp [exec mktemp -t "proxy1"]
do_test pragma-16.1 {
execsql {
PRAGMA lock_proxy_file="mylittleproxy";
select * from sqlite_master;
}
execsql {
PRAGMA lock_proxy_file;
}
} {mylittleproxy}
execsql "PRAGMA lock_proxy_file='$lpp'"
execsql "select * from sqlite_master"
execsql "PRAGMA lock_proxy_file"
} $lpp
# 2 database connections can share a lock proxy file
do_test pragma-16.2 {
sqlite3 db2 test.db
execsql {
PRAGMA lock_proxy_file="mylittleproxy";
} db2
execsql "PRAGMA lock_proxy_file='$lpp'" db2
} {}
db2 close
# 2nd database connection should auto-name an existing lock proxy file
do_test pragma-16.2.1 {
sqlite3 db2 test.db
execsql {
PRAGMA lock_proxy_file=":auto:";
select * from sqlite_master;
} db2
execsql {
PRAGMA lock_proxy_file;
} db2
} {mylittleproxy}
execsql "PRAGMA lock_proxy_file" db2
} $lpp
db2 close
set lpp2 [exec mktemp -t "proxy2"]
# 2nd database connection cannot override the lock proxy file
do_test pragma-16.3 {
sqlite3 db2 test.db
execsql {
PRAGMA lock_proxy_file="myotherproxy";
} db2
execsql "PRAGMA lock_proxy_file='$lpp2'" db2
catchsql {
select * from sqlite_master;
} db2
} {1 {database is locked}}
set lpp3 [exec mktemp -t "proxy3"]
# lock proxy file can be renamed if no other connections are active
do_test pragma-16.4 {
db2 close
db close
sqlite3 db2 test.db
execsql {
PRAGMA lock_proxy_file="myoriginalproxy";
PRAGMA lock_proxy_file="myotherproxy";
PRAGMA lock_proxy_file;
} db2
} {myotherproxy}
execsql "PRAGMA lock_proxy_file='$lpp3'" db2
execsql "PRAGMA lock_proxy_file='$lpp2'" db2
execsql "PRAGMA lock_proxy_file" db2
} $lpp2
db2 close
set env(SQLITE_FORCE_PROXY_LOCKING) "1"
# auto-naming should reuse the last proxy name when available
do_test pragma-16.5 {
sqlite3 db2 test.db
execsql {
PRAGMA lock_proxy_file=":auto:";
PRAGMA lock_proxy_file;
} db2
} {myotherproxy}
} $lpp2
# auto-naming a new proxy should use a predictable & unique name
do_test pragma-16.6 {
db2 close
sqlite3 db2 test2.db
@@ -1616,6 +1621,7 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
} {1}
set sqlite_hostid_num 2
# db access should be limited to one host at a time (simulate 2nd host id)
do_test pragma-16.7 {
list [catch {
sqlite3 db test2.db
@@ -1627,6 +1633,7 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
} {1 {database is locked}}
db close
# default to using proxy locking (simulate network file system detection)
do_test pragma-16.8 {
list [catch {
sqlite3 db test2.db
@@ -1635,19 +1642,25 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
} {1 {database is locked}}
db2 close
set lpp4 [exec mktemp -t "proxy4"]
# check that db is unlocked after first host connection closes
do_test pragma-16.8.1 {
execsql {
PRAGMA lock_proxy_file="yetanotherproxy";
PRAGMA lock_proxy_file;
}
} {yetanotherproxy}
execsql "PRAGMA lock_proxy_file='$lpp4'"
execsql "select * from sqlite_master"
execsql "PRAGMA lock_proxy_file"
} $lpp4
do_test pragma-16.8.2 {
execsql {
create table mine(x);
create table if not exists mine(x);
insert into mine values (1);
}
} {}
db close
file delete -force proxytest.db
file delete -force .proxytest.db-conch
do_test pragma-16.9 {
sqlite3 db proxytest.db
set lockpath2 [execsql {
@@ -1657,6 +1670,98 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking {
string match "*proxytest.db:auto:" $lockpath2
} {1}
# ensure creating directories for a lock proxy file works
set lpp5d [exec mktemp -d -t "proxy5"]
set lpp5 $lpp5d/sub/dir/lock
db close
do_test pragma-16.10.1 {
sqlite3 db proxytest.db
execsql "PRAGMA lock_proxy_file='$lpp5'"
set lockpath2 [execsql {
PRAGMA lock_proxy_file;
} db]
string match "*sub/dir/lock" $lockpath2
} {1}
# ensure that after deleting the path, setting ":auto:" works correctly
db close
file delete -force $lpp5d
do_test pragma-16.10.2 {
sqlite3 db proxytest.db
set lockpath3 [execsql {
PRAGMA lock_proxy_file=":auto:";
create table if not exists pt(y);
PRAGMA lock_proxy_file;
} db]
string match "*sub/dir/lock" $lockpath3
} {1}
# ensure that if the path can not be created (file instead of dir)
# setting :auto: deals with it by creating a new autonamed lock file
db close
file delete -force $lpp5d
close [open "$lpp5d" a]
do_test pragma-16.10.3 {
sqlite3 db proxytest.db
set lockpath2 [execsql {
PRAGMA lock_proxy_file=":auto:";
create table if not exists zz(y);
PRAGMA lock_proxy_file;
} db]
string match "*proxytest.db:auto:" $lockpath2
} {1}
# make sure we can deal with ugly file paths correctly
db close
file delete -force $lpp5d
set lpp6 [exec mktemp -d -t "proxy6"]/./././////./proxytest/../proxytest/sub/dir/lock
do_test pragma-16.10.4 {
sqlite3 db proxytest.db
execsql "PRAGMA lock_proxy_file='$lpp6'"
set lockpath4 [execsql {
create table if not exists aa(bb);
PRAGMA lock_proxy_file;
} db]
string match "*proxytest/sub/dir/lock" $lockpath4
} {1}
# ensure that if the path can not be created (perm), setting :auto: deals
db close
file delete -force $lpp5d
do_test pragma-16.10.5 {
sqlite3 db proxytest.db
execsql "PRAGMA lock_proxy_file='$lpp5'"
execsql {
create table if not exists bb(bb);
}
db close
file delete -force $lpp5d
file mkdir $lpp5d
file attributes $lpp5d -permission 0000
sqlite3 db proxytest.db
set lockpath5 [execsql {
PRAGMA lock_proxy_file=":auto:";
create table if not exists cc(bb);
PRAGMA lock_proxy_file;
} db]
string match "*proxytest.db:auto:" $lockpath5
} {1}
# ensure that if the path can not be created, locking fails
db close
do_test pragma-16.10.6 {
sqlite3 db proxytest.db
execsql "PRAGMA lock_proxy_file='$lpp5'"
catchsql {
create table if not exists faily(y);
PRAGMA lock_proxy_file;
} db
} {1 {database is locked}}
db close
file attributes $lpp5d -permission 0777
file delete -force $lpp5d
set env(SQLITE_FORCE_PROXY_LOCKING) $using_proxy
set sqlite_hostid_num 0
}
+5 -3
View File
@@ -23,7 +23,7 @@ proc do_pragma_ncol_test {tn sql nCol} {
}
# If there is no RHS argument, the following PRAGMA statements operate as
# queries, returning a single row containing a single column.
# queries, returning a single row containing a single column.
#
# Or, if there is RHS argument, they return zero rows of zero columns.
#
@@ -53,6 +53,8 @@ foreach {tn sql} {
24 "PRAGMA schema_version = 211"
25 "PRAGMA short_column_names = 1"
26 "PRAGMA synchronous = full"
27 "PRAGMA temp_store_directory = '/tmp'"
28 "PRAGMA temp_store_directory = ''"
29 "PRAGMA temp_store = memory"
30 "PRAGMA user_version = 405"
31 "PRAGMA writable_schema = 1"
@@ -61,7 +63,7 @@ foreach {tn sql} {
# Without RHS:
do_pragma_ncol_test 1.$tn.1 [lindex [split $sql =] 0] 1
# With RHS:
do_pragma_ncol_test 1.$tn.2 $sql 0
}
@@ -76,7 +78,7 @@ foreach {tn sql} {
5 "PRAGMA case_sensitive_like"
} {
do_pragma_ncol_test 1.$tn.1 $sql 0
do_pragma_ncol_test 2.$tn.1 $sql 0
}
# EXPLAIN on a PRAGMA integrity_check.
+6
View File
@@ -11,12 +11,18 @@
#***********************************************************************
# This file implements regression tests for SQLite library. The
# focus of this file is testing locks on read-only WAL-mode databases.
#
# Note that the apple-osx branch does not allow read-only WAL-mode
# databases (per check-in from Adam Swift on 2011-06-24 20:47:06) and
# so this test module is disabled in the apple-osx branch.
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/lock_common.tcl
set testprefix rowallock
finish_test; return ;# This test module disabled in the apple-osx branch
set mmap_res 1000000
ifcapable !mmap {
set mmap_res 0
+1 -5
View File
@@ -45,13 +45,9 @@ ifcapable autovacuum {
# if we're using proxy locks, we use 2 filedescriptors for a db
# that is open but NOT yet locked, after a lock is taken we'll have 3,
# normally sqlite uses 1 (proxy locking adds the conch and the local lock)
set using_proxy 0
foreach {name value} [array get env SQLITE_FORCE_PROXY_LOCKING] {
set using_proxy $value
}
set extrafds_prelock 0
set extrafds_postlock 0
if {$using_proxy>0} {
if {[forced_proxy_locking]} {
set extrafds_prelock 1
set extrafds_postlock 2
}
+5
View File
@@ -17,6 +17,11 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
test_set_config_pagecache 0 0
# purgeable pcache tracks memory differently
ifcapable {enable_purgeable_pcache} {
finish_test
return
}
unset -nocomplain baseline
do_test shrink-1.1 {
db eval {
+24 -7
View File
@@ -35,8 +35,19 @@ if {$::TEMP_STORE==3} {
finish_test
return
}
# if we're using proxy locks, we use 3 filedescriptors for a db
# that is open but NOT writing changes, normally
# sqlite uses 1 (proxy locking adds the conch and the local lock)
set extrafds 0
if {[forced_proxy_locking]} {
set extrafds 2
}
do_test stmt-1.2 {
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
} {1}
do_test stmt-1.3 {
execsql {
@@ -45,17 +56,20 @@ do_test stmt-1.3 {
INSERT INTO t1 VALUES(1, 1);
}
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
} {2}
do_test stmt-1.4 {
execsql {
INSERT INTO t1 SELECT a+1, b+1 FROM t1;
}
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
# 2016-03-04: statement-journal open deferred
} {2}
do_test stmt-1.5 {
execsql COMMIT
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
} {1}
do_test stmt-1.6.1 {
execsql {
@@ -63,35 +77,38 @@ do_test stmt-1.6.1 {
INSERT INTO t1 SELECT a+2, b+2 FROM t1;
}
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
} {2}
do_test stmt-1.6.2 {
execsql { INSERT INTO t1 SELECT a+4, b+4 FROM t1 }
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
# 2016-03-04: statement-journal open deferred
} {2}
do_test stmt-1.7 {
execsql COMMIT
set sqlite_open_file_count
expr $sqlite_open_file_count-$extrafds
} {1}
proc filecount {testname sql expected} {
proc filecount {testname sql expected extrafds} {
uplevel [list do_test $testname [subst -nocommand {
execsql BEGIN
execsql { $sql }
set ret [set sqlite_open_file_count]
execsql ROLLBACK
set ret
}] $expected]
}] [ expr $expected+$extrafds ] ]
}
filecount stmt-2.1 { INSERT INTO t1 VALUES(9, 9) } 2
filecount stmt-2.2 { REPLACE INTO t1 VALUES(9, 9) } 2
filecount stmt-2.3 { INSERT INTO t1 SELECT 9, 9 } 2
filecount stmt-2.1 { INSERT INTO t1 VALUES(9, 9) } 2 $extrafds
filecount stmt-2.2 { REPLACE INTO t1 VALUES(9, 9) } 2 $extrafds
filecount stmt-2.3 { INSERT INTO t1 SELECT 9, 9 } 2 $extrafds
filecount stmt-2.4 {
INSERT INTO t1 SELECT 9, 9;
INSERT INTO t1 SELECT 10, 10;
} 2
} 2 $extrafds
do_test stmt-2.5 {
execsql { CREATE INDEX i1 ON t1(b) }
@@ -99,6 +116,6 @@ do_test stmt-2.5 {
filecount stmt-2.6 {
REPLACE INTO t1 VALUES(5, 5);
REPLACE INTO t1 VALUES(5, 5);
} 2
} 2 $extrafds
finish_test
+12
View File
@@ -13,6 +13,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/lock_common.tcl
source $testdir/wal_common.tcl
set testprefix superlock
do_not_use_codec
@@ -43,6 +44,11 @@ do_not_use_codec
#
#
if {[forced_proxy_locking]} {
finish_test
return
}
do_execsql_test 1.1 {
CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES(1, 2);
@@ -58,6 +64,12 @@ do_test 1.2 { sqlite3demo_superlock unlock test.db } {unlock}
do_catchsql_test 1.3 { SELECT * FROM t1 } {1 {database is locked}}
do_test 1.4 { unlock } {}
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] } {
finish_test
return
}
do_execsql_test 2.1 {
INSERT INTO t1 VALUES(3, 4);
PRAGMA journal_mode = WAL;
+7 -2
View File
@@ -57,6 +57,11 @@ do_test tempdb-1.2 {
}
} {}
set extrafds 0
if {[forced_proxy_locking]} {
set extrafds 2
}
do_test tempdb-2.1 {
# Set $::jrnl_in_memory if the journal file is expected to be in-memory.
# Similarly, set $::subj_in_memory if the sub-journal file is expected
@@ -81,7 +86,7 @@ do_test tempdb-2.2 {
}
catchsql { INSERT INTO t1 SELECT * FROM t2 }
set sqlite_open_file_count
} [expr 1 + (0==$jrnl_in_memory)]
} [expr 1 + $extrafds + (0==$jrnl_in_memory)]
do_test tempdb-2.3 {
execsql {
PRAGMA temp_store = 'memory';
@@ -93,6 +98,6 @@ do_test tempdb-2.3 {
}
catchsql { INSERT INTO t1 SELECT * FROM t2 }
set sqlite_open_file_count
} [expr 1 + (0==$jrnl_in_memory)]
} [expr 1 + $extrafds + (0==$jrnl_in_memory)]
finish_test
+46 -4
View File
@@ -595,6 +595,23 @@ if {[info exists cmdlinearg]==0} {
sqlite3_soft_heap_limit64 $cmdlinearg(soft-heap-limit)
sqlite3_hard_heap_limit64 $cmdlinearg(hard-heap-limit)
proc forced_proxy_locking {} {
if $::sqlite_options(lock_proxy_pragmas)&&$::sqlite_options(prefer_proxy_locking) {
set force_proxy_value 0
set force_key "SQLITE_FORCE_PROXY_LOCKING="
foreach {env_pair} [exec env] {
if { [string first $force_key $env_pair] == 0} {
set force_proxy_value [string range $env_pair [string length $force_key] end]
}
}
if { "$force_proxy_value " == "1 " } {
return 1
}
}
return 0
}
# Create a test database
#
proc reset_db {} {
@@ -602,6 +619,14 @@ proc reset_db {} {
forcedelete test.db
forcedelete test.db-journal
forcedelete test.db-wal
if {[forced_proxy_locking]} {
sqlite3 db ./test.db
set lock_proxy_path [db eval "PRAGMA lock_proxy_file;"]
catch {db close}
# puts "deleting $lock_proxy_path"
file delete -force $lock_proxy_path
file delete -force test.db
}
sqlite3 db ./test.db
set ::DB [sqlite3_connection_pointer db]
if {[info exists ::SETUP_SQL]} {
@@ -1314,11 +1339,15 @@ proc finalize_testing {} {
if {[info commands vdbe_coverage]!=""} {
vdbe_coverage_report
}
foreach f [glob -nocomplain test.db-*-journal] {
forcedelete $f
catch {
foreach f [glob -nocomplain test.db-*-journal] {
forcedelete $f
}
}
foreach f [glob -nocomplain test.db-mj*] {
forcedelete $f
catch {
foreach f [glob -nocomplain test.db-mj*] {
forcedelete $f
}
}
exit [expr {$nErr>0}]
}
@@ -2230,6 +2259,19 @@ proc presql {} {
set presql
}
proc wal_is_ok {} {
if { [forced_proxy_locking] } {
return 1
}
if { ![path_is_local "."] } {
return 0
}
if { [path_is_dos "."] } {
return 0
}
return 1
}
proc isquick {} {
set ret 0
catch {set ret $::G(isquick)}
+1
View File
@@ -21,6 +21,7 @@ set testprefix tkt-2d1a5c67d
ifcapable {!vtab} {finish_test; return}
if {[wal_is_capable]==0} {finish_test; return}
if {![wal_is_ok]} {finish_test; return}
for {set ii 1} {$ii<=10} {incr ii} {
do_test tkt-2d1a5c67d.1.$ii {
+1
View File
@@ -19,6 +19,7 @@ source $testdir/tester.tcl
source $testdir/malloc_common.tcl
if {![wal_is_capable]} { finish_test ; return }
if ![wal_is_ok] { finish_test; return }
do_execsql_test tkt-313723c356.1 {
PRAGMA page_size = 1024;
+22 -21
View File
@@ -74,27 +74,28 @@ catch {
test_syscall fault 1 1
}
do_test tkt3457-1.2 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions ---------
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.3 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions -w--w--w-
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.4 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions r--r--r--
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.5 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions rw-rw-rw-
catchsql { SELECT * FROM t1 }
} {0 {1 2 3 4 5 6}}
if { ![path_is_dos "."] } {
do_test tkt3457-1.2 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions ---------
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.3 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions -w--w--w-
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.4 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions r--r--r--
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.5 {
forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions rw-rw-rw-
catchsql { SELECT * FROM t1 }
} {0 {1 2 3 4 5 6}}
}
# Reenable fchmod
catch {
+41 -1
View File
@@ -22,6 +22,10 @@ source $testdir/wal_common.tcl
set testprefix wal
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] } {
finish_test
return
}
test_set_config_pagecache 0 0
proc reopen_db {} {
@@ -173,6 +177,9 @@ do_test wal-4.3 {
} {a b}
do_test wal-4.4.1 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
sqlite3 db test.db
db func blob blob
@@ -224,6 +231,9 @@ db2 close
do_test wal-4.5.1 {
reopen_db
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db func blob blob
execsql {
PRAGMA journal_mode = WAL;
@@ -338,6 +348,9 @@ foreach sector {512 4096} {
forcedelete test.db test.db-wal
do_test wal-6.$sector.$pgsz.1 {
sqlite3 db test.db -vfs devsym
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql "
PRAGMA page_size = $pgsz;
PRAGMA auto_vacuum = 0;
@@ -724,6 +737,9 @@ do_test wal-11.8 {
list [expr [file size test.db]/1024] [file size test.db-wal]
} [list 37 [wal_file_size 40 1024]]
do_test wal-11.9 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
list [expr [file size test.db]/1024] [log_deleted test.db-wal]
} {37 1}
@@ -738,6 +754,9 @@ sqlite3_wal db test.db
#ifcapable !mmap {set nWal 37}
set nWal 34
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
do_test wal-11.10 {
execsql {
PRAGMA cache_size = 10;
@@ -785,6 +804,9 @@ do_test wal-12.1 {
list [expr [file size test.db]/1024] [file size test.db-wal]
} [list 1 [wal_file_size 5 1024]]
do_test wal-12.2 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
sqlite3 db test.db
execsql {
@@ -822,6 +844,9 @@ do_test wal-12.6 {
execsql { SELECT * FROM t2 } db2
} {B 2}
db2 close
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
#-------------------------------------------------------------------------
@@ -979,10 +1004,12 @@ foreach {tn ckpt_cmd ckpt_res ckpt_main ckpt_aux} {
PRAGMA aux.auto_vacuum = 0;
PRAGMA main.journal_mode = WAL;
PRAGMA aux.journal_mode = WAL;
SELECT count(*) FROM main.sqlite_master, aux.sqlite_master;
PRAGMA main.synchronous = NORMAL;
PRAGMA aux.synchronous = NORMAL;
PRAGMA aux.synchronous = FULL;
}
} {wal wal}
} {wal wal 0}
do_test wal-16.$tn.2 {
execsql {
@@ -1053,6 +1080,7 @@ foreach {tn sectorsize logsize} "
PRAGMA page_size = 512;
PRAGMA cache_size = -2000;
PRAGMA journal_mode = WAL;
SELECT * FROM sqlite_master;
PRAGMA synchronous = FULL;
}
execsql {
@@ -1268,6 +1296,9 @@ do_test wal-19.2 {
}
} {1 2 3 4 5 6}
do_test wal-19.3 {
ifcapable enable_persist_wal {
file_control_persist_wal db2 0
}
db close
db2 close
file exists test.db-wal
@@ -1422,6 +1453,9 @@ do_test wal-23.1 {
INSERT INTO t1 VALUES(1, 2);
INSERT INTO t1 VALUES(3, 4);
}
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
faultsim_save_and_close
sqlite3_shutdown
@@ -1468,6 +1502,9 @@ ifcapable autovacuum {
INSERT INTO t1 SELECT * FROM t1;
} {wal}
do_test 24.2 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql {
DELETE FROM t1;
PRAGMA wal_checkpoint;
@@ -1496,6 +1533,9 @@ ifcapable autovacuum {
} [wal_file_size 1 1024]
}
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
sqlite3_shutdown
test_sqlite3_log
+56 -13
View File
@@ -22,6 +22,7 @@ source $testdir/wal_common.tcl
set testprefix wal2
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] {finish_test ; return }
set sqlite_sync_count 0
proc cond_incr_sync_count {adj} {
@@ -71,6 +72,13 @@ proc incr_tvfs_hdr {file idx incrval} {
set_tvfs_hdr $file $ints
}
set shmpath test.db-shm
if {[forced_proxy_locking]} {
sqlite3 db test.db
set shmpath [execsql { pragma lock_proxy_file }]-shm
db close
}
#-------------------------------------------------------------------------
# Test case wal2-1.*:
@@ -573,9 +581,15 @@ do_test wal2-6.3.1 {
list [file exists test.db-wal] [file exists test.db-journal]
} {1 0}
do_test wal2-6.3.2 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql { PRAGMA journal_mode = DELETE }
file exists test.db-wal
} {0}
do_test wal2-6.3.2.1 {
execsql { PRAGMA journal_mode; }
} {delete}
do_test wal2-6.3.3 {
execsql { PRAGMA lock_status }
} {main exclusive temp closed}
@@ -730,7 +744,9 @@ foreach {tn sql res expected_locks} {
do_test wal2-6.4.$tn.1 { execsql $S } $res
do_test wal2-6.4.$tn.2 { set ::locks } $L
}
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
tvfs delete
@@ -961,6 +977,9 @@ do_test wal2-10.1.1 {
INSERT INTO t1 VALUES(1, 2);
INSERT INTO t1 VALUES(3, 4);
}
if {[forced_proxy_locking]} {
forcecopy $shmpath sv_test.db-shm
}
faultsim_save_and_close
} {}
do_test wal2-10.1.2 {
@@ -1060,6 +1079,11 @@ tvfs delete
# file itself. Test this.
#
if {$::tcl_platform(platform) == "unix"} {
if {[forced_proxy_locking]} {
# faultsim_delete_and_reopen doesn't know about the shm file redirect...
forcedelete $shmpath
}
faultsim_delete_and_reopen
# Changed on 2012-02-13: umask is deliberately ignored for -wal files.
#set umask [exec /bin/sh -c umask]
@@ -1073,7 +1097,7 @@ if {$::tcl_platform(platform) == "unix"} {
PRAGMA journal_mode = WAL;
}
db close
list [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db-wal] [file exists $shmpath]
} {0 0}
foreach {tn permissions} {
@@ -1088,20 +1112,23 @@ if {$::tcl_platform(platform) == "unix"} {
string map {o 0} [file attributes test.db -permissions]
} $permissions
do_test wal2-12.2.$tn.2 {
list [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db-wal] [file exists $shmpath]
} {0 0}
do_test wal2-12.2.$tn.3 {
sqlite3 db test.db
execsql { INSERT INTO tx DEFAULT VALUES }
list [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db-wal] [file exists $shmpath]
} {1 1}
do_test wal2-12.2.$tn.4 {
set x [list [file attr test.db-wal -perm] [file attr test.db-shm -perm]]
set x [list [file attr test.db-wal -perm] [file attr $shmpath -perm]]
string map {o 0} $x
} [list $effective $effective]
do_test wal2-12.2.$tn.5 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
list [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db-wal] [file exists $shmpath]
} {0 0}
}
}
@@ -1114,7 +1141,7 @@ if {$::tcl_platform(platform) == "unix"} {
if {$::tcl_platform(platform) == "unix"} {
proc perm {} {
set L [list]
foreach f {test.db test.db-wal test.db-shm} {
foreach f {test.db test.db-wal $shmpath} {
if {[file exists $f]} {
lappend L [file attr $f -perm]
} else {
@@ -1124,6 +1151,10 @@ if {$::tcl_platform(platform) == "unix"} {
set L
}
if {[forced_proxy_locking]} {
# faultsim_delete_and_reopen doesn't know about the shm file redirect...
forcedelete $shmpath
}
faultsim_delete_and_reopen
execsql {
PRAGMA journal_mode = WAL;
@@ -1132,8 +1163,11 @@ if {$::tcl_platform(platform) == "unix"} {
INSERT INTO t1 VALUES('3.14', '2.72');
}
do_test wal2-13.1.1 {
list [file exists test.db-shm] [file exists test.db-wal]
list [file exists $shmpath] [file exists test.db-wal]
} {1 1}
if {[forced_proxy_locking]} {
forcecopy $shmpath proxysv_test.db-shm
}
faultsim_save_and_close
foreach {tn db_perm wal_perm shm_perm can_open can_read can_write} {
@@ -1147,14 +1181,17 @@ if {$::tcl_platform(platform) == "unix"} {
9 00000 00644 00644 0 0 0
} {
faultsim_restore
if {[forced_proxy_locking]} {
forcecopy proxysv_test.db-shm $shmpath
}
do_test wal2-13.$tn.1 {
file attr test.db -perm $db_perm
file attr test.db-wal -perm $wal_perm
file attr test.db-shm -perm $shm_perm
file attr $shmpath -perm $shm_perm
set L [file attr test.db -perm]
lappend L [file attr test.db-wal -perm]
lappend L [file attr test.db-shm -perm]
lappend L [file attr $shmpath -perm]
string map {o 0} $L
} [list $db_perm $wal_perm $shm_perm]
@@ -1169,6 +1206,10 @@ if {$::tcl_platform(platform) == "unix"} {
} $r($can_open)
if {$can_open} {
# Different behavior, because Darwin does an access() call prior
# to attempting to open the SHM in read/write mode and demotes to
# read-only if the SHM is read-only.
if {$tn==4 && $::tcl_platform(os)=="Darwin"} {set can_read 1}
# If $can_read is true, then the client should be able to read from
# the database file. If $can_read is false, attempting to read should
@@ -1219,6 +1260,8 @@ foreach {tn sql reslist} {
set sqlite_sync_count 0
set sqlite_fullsync_count 0
set useres $reslist
do_execsql_test wal2-14.$tn.2 {
PRAGMA wal_autocheckpoint = 10;
CREATE TABLE t1(a, b); -- 2 wal syncs
@@ -1234,7 +1277,7 @@ foreach {tn sql reslist} {
do_test wal2-14.$tn.3 {
cond_incr_sync_count 1
list $sqlite_sync_count $sqlite_fullsync_count
} [lrange $reslist 0 1]
} [lrange $useres 0 1]
set sqlite_sync_count 0
set sqlite_fullsync_count 0
@@ -1242,7 +1285,7 @@ foreach {tn sql reslist} {
do_test wal2-14.$tn.4 {
execsql { INSERT INTO t1 VALUES(7, zeroblob(12*4096)) }
list $sqlite_sync_count $sqlite_fullsync_count
} [lrange $reslist 2 3]
} [lrange $useres 2 3]
set sqlite_sync_count 0
set sqlite_fullsync_count 0
@@ -1254,7 +1297,7 @@ foreach {tn sql reslist} {
execsql { INSERT INTO t1 VALUES(13, 14) }
db close
list $sqlite_sync_count $sqlite_fullsync_count
} [lrange $reslist 4 5]
} [lrange $useres 4 5]
}
catch { db close }
+4 -1
View File
@@ -19,6 +19,7 @@ source $testdir/lock_common.tcl
source $testdir/wal_common.tcl
source $testdir/malloc_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] {finish_test ; return }
set a_string_counter 1
proc a_string {n} {
@@ -211,6 +212,8 @@ foreach {tn syncmode synccount} {
foreach {method filename id flags} $args break
lappend ::syncs [file tail $filename] $flags
}
set usecount $synccount
do_test wal3-3.$tn {
forcedelete test.db test.db-wal test.db-journal
@@ -233,7 +236,7 @@ foreach {tn syncmode synccount} {
}
T filter {}
set ::syncs
} $synccount
} $usecount
db close
T delete
+4
View File
@@ -16,6 +16,10 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/malloc_common.tcl
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] || [path_is_dos "."]} {
finish_test
return
}
do_test wal4-1.1 {
execsql {
+11
View File
@@ -18,6 +18,7 @@ source $testdir/tester.tcl
source $testdir/lock_common.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
do_not_use_codec
set testprefix wal5
@@ -80,6 +81,11 @@ foreach {testprefix do_wal_checkpoint} {
}
proc reopen_all {} {
ifcapable enable_persist_wal {
code1 { file_control_persist_wal db 0 }
code2 { file_control_persist_wal db2 0 }
code3 { file_control_persist_wal db3 0 }
}
code1 {db close}
code2 {db2 close}
code3 {db3 close}
@@ -343,6 +349,11 @@ foreach {testprefix do_wal_checkpoint} {
do_test 3.$tn.4 { code3 { do_wal_checkpoint db3 } } {0 2 2}
ifcapable enable_persist_wal {
code1 { file_control_persist_wal db 0 }
code2 { file_control_persist_wal db2 0 }
code3 { file_control_persist_wal db3 0 }
}
code1 {db close}
code2 {db2 close}
code3 {db3 close}
+2
View File
@@ -21,6 +21,8 @@ source $testdir/wal_common.tcl
source $testdir/malloc_common.tcl
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] } {finish_test ; return }
#-------------------------------------------------------------------------
# Changing to WAL mode in one connection forces the change in others.
#
+1
View File
@@ -16,6 +16,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
# Case 1: No size limit. Journal can get large.
#
+2
View File
@@ -26,7 +26,9 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set ::testprefix wal8
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
do_not_use_codec
db close
+14
View File
@@ -33,6 +33,20 @@ proc wal_cksum_intlist {ckv1 ckv2 intlist} {
}
}
# If the synchronous mode for the main database of db handle $db
# is either OFF or NORMAL, return $nRight. Otherwise, if it is
# FULL, return $nWrite+$nTrans.
#
proc wal_frames {db nWrite nTrans} {
set nRet $nWrite
switch -- [$db one {PRAGMA main.synchronous}] {
0 { }
1 { }
default { incr nRet $nTrans }
}
set nRet
}
# This proc calculates checksums in the same way as those used by SQLite
# in WAL files. If the $endian argument is "big", then checksums are
+7
View File
@@ -21,6 +21,7 @@ source $testdir/malloc_common.tcl
do_not_use_codec
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] } { finish_test ; return }
# Test organization:
@@ -324,6 +325,9 @@ foreach {tn src dest dest_final} {
do_test walbak-4.$tn.1 {
sqlite3 db test.db
db eval "PRAGMA journal_mode = $src"
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db eval {
CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES('I', 'II');
@@ -332,6 +336,9 @@ foreach {tn src dest dest_final} {
sqlite3 db2 test.db2
db2 eval "PRAGMA journal_mode = $dest"
ifcapable enable_persist_wal {
file_control_persist_wal db2 0
}
db2 eval {
CREATE TABLE t2(x, y);
INSERT INTO t2 VALUES('1', '2');
+5
View File
@@ -21,6 +21,7 @@ ifcapable !wal {
finish_test
return
}
if ![wal_is_ok] { finish_test; return }
# Do not use a codec for this file, as the database is manipulated using
# external methods (the [fake_big_file] and [hexio_write] commands).
@@ -32,6 +33,10 @@ ifcapable !lfs {
finish_test
return
}
if { ![wal_is_ok] } {
finish_test
return
}
set a_string_counter 1
proc a_string {n} {
+1
View File
@@ -16,6 +16,7 @@ source $testdir/lock_common.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
# Read and return the contents of file $filename. Treat the content as
# binary data.
+1
View File
@@ -28,6 +28,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
db close
+1
View File
@@ -16,6 +16,7 @@ source $testdir/tester.tcl
source $testdir/lock_common.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }
if { ![wal_is_ok] } { finish_test ; return }
#-------------------------------------------------------------------------
+2
View File
@@ -18,6 +18,8 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
set testprefix walcrash3
db close
+1
View File
@@ -19,6 +19,7 @@ source $testdir/malloc_common.tcl
source $testdir/lock_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
#-------------------------------------------------------------------------
# This test case, walfault-1-*, simulates faults while executing a
+7
View File
@@ -22,6 +22,7 @@ source $testdir/tester.tcl
source $testdir/wal_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
set ::wal_hook [list]
proc wal_hook {zDb nEntry} {
@@ -71,8 +72,14 @@ do_test walhook-1.5 {
} [expr 6*1024]
db2 close
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
sqlite3 db test.db
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
do_test walhook-2.1 {
execsql { PRAGMA synchronous = NORMAL }
execsql { PRAGMA wal_autocheckpoint }
+44 -6
View File
@@ -35,6 +35,20 @@ ifcapable !wal {
finish_test
return
}
if { ![wal_is_ok] && ![path_is_dos "."]} {
do_test walmode-0.1 {
execsql { PRAGMA journal_mode = wal }
} {delete}
do_test walmode-0.2 {
execsql { PRAGMA main.journal_mode = wal }
} {delete}
do_test walmode-0.3 {
execsql { PRAGMA main.journal_mode }
} {delete}
finish_test
return
}
do_test walmode-1.1 {
set sqlite_sync_count 0
@@ -45,12 +59,18 @@ do_test walmode-1.2 {
file size test.db
} {1024}
if {[atomic_batch_write test.db]==0} {
set expected_sync_count 3
if {$::tcl_platform(platform)!="windows"} {
ifcapable dirsync {
incr expected_sync_count
}
# Determine how many sync() calls to expect from the "journal_mode=WAL"
# command above. Note that if DEFAULT_WAL_SAFETYLEVEL is defined, the
# safety-level may have been modified while compiling the "journal_mode=WAL"
# statement.
switch -- [db eval {PRAGMA main.synchronous}] {
0 { set expected_sync_count 0 }
1 { set expected_sync_count 2 }
default { set expected_sync_count 3 }
}
if {$::tcl_platform(platform)!="windows"} {
ifcapable dirsync {
incr expected_sync_count
}
do_test walmode-1.3 {
set sqlite_sync_count
@@ -68,6 +88,9 @@ do_test walmode-1.6 {
file exists test.db-wal
} {1}
do_test walmode-1.7 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
file exists test.db-wal
} {0}
@@ -84,6 +107,9 @@ do_test walmode-2.2 {
file exists test.db-wal
} {1}
do_test walmode-2.3 {
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
db close
file exists test.db-wal
} {0}
@@ -106,6 +132,9 @@ do_test walmode-3.2 {
#
do_test walmode-4.1 {
execsql { INSERT INTO t1 VALUES(1, 2) }
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql { PRAGMA journal_mode = persist }
} {persist}
if {[atomic_batch_write test.db]==0} {
@@ -133,6 +162,9 @@ if {[atomic_batch_write test.db]==0} {
#
do_test walmode-4.6 {
sqlite3 db2 test.db
ifcapable enable_persist_wal {
file_control_persist_wal db2 0
}
execsql { PRAGMA main.journal_mode } db2
} {delete}
do_test walmode-4.7 {
@@ -150,6 +182,9 @@ do_test walmode-4.10 {
do_test walmode-4.11 {
db2 close
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql { PRAGMA journal_mode = delete } db
} {delete}
do_test walmode-4.12 {
@@ -303,6 +338,9 @@ db close
do_test walmode-7.0 {
forcedelete test.db
sqlite3 db test.db
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
execsql {
PRAGMA journal_mode = WAL;
CREATE TABLE t1(a, b);
+4
View File
@@ -17,6 +17,7 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix walnoshm
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
db close
testvfs tvfsshm
@@ -53,6 +54,9 @@ do_execsql_test 1.6 { INSERT INTO t1 VALUES(3, 4) }
do_execsql_test 1.7 {
PRAGMA locking_mode = normal;
} {exclusive}
ifcapable enable_persist_wal {
file_control_persist_wal db 0
}
do_execsql_test 1.8 {
PRAGMA journal_mode = delete;
PRAGMA main.locking_mode;
+31 -12
View File
@@ -21,6 +21,12 @@ ifcapable !wal {
finish_test
return
}
if ![wal_is_ok] { finish_test; return }
set shmpath test.db-shm
if {[forced_proxy_locking]} {
set shmpath [execsql { pragma lock_proxy_file }]-shm
}
do_test walpersist-1.0 {
db eval {
@@ -31,22 +37,35 @@ do_test walpersist-1.0 {
file exists test.db-wal
} {1}
do_test walpersist-1.1 {
file exists test.db-shm
file exists $shmpath
} {1}
do_test walpersist-1.2 {
db close
list [file exists test.db] [file exists test.db-wal] [file exists test.db-shm]
} {1 0 0}
ifcapable enable_persist_wal {
do_test walpersist-1.2-on {
db close
list [file exists test.db] [file exists test.db-wal] [file exists $shmpath]
} {1 1 1}
} {
do_test walpersist-1.2-off {
db close
list [file exists test.db] [file exists test.db-wal] [file exists $shmpath]
} {1 0 0}
}
do_test walpersist-1.3 {
sqlite3 db test.db
db eval {SELECT length(a) FROM t1}
} {5000}
do_test walpersist-1.4 {
list [file exists test.db] [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db] [file exists test.db-wal] [file exists $shmpath]
} {1 1 1}
do_test walpersist-1.5 {
file_control_persist_wal db -1
} {0 0}
ifcapable enable_persist_wal {
do_test walpersist-1.5-on {
file_control_persist_wal db -1
} {0 1}
} {
do_test walpersist-1.5-off {
file_control_persist_wal db -1
} {0 0}
}
do_test walpersist-1.6 {
file_control_persist_wal db 1
} {0 1}
@@ -64,7 +83,7 @@ do_test walpersist-1.10 {
} {0 1}
do_test walpersist-1.11 {
db close
list [file exists test.db] [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db] [file exists test.db-wal] [file exists $shmpath]
} {1 1 1}
# Make sure the journal_size_limit works to limit the size of the
@@ -72,7 +91,7 @@ do_test walpersist-1.11 {
# journal_size_limit causes the WAL file to be truncated to zero bytes
# when closing.
#
forcedelete test.db test.db-shm test.db-wal
forcedelete test.db $shmpath test.db-wal
do_test walpersist-2.1 {
sqlite3 db test.db
db eval {
@@ -97,7 +116,7 @@ do_test walpersist-2.3 {
do_test 3.1 {
catch {db close}
forcedelete test.db test.db-shm test.db-wal
forcedelete test.db $shmpath test.db-wal
sqlite3 db test.db
execsql {
PRAGMA page_size = 1024;
+88 -11
View File
@@ -30,6 +30,14 @@ ifcapable !wal {
finish_test
return
}
if ![wal_is_ok] { finish_test; return }
set shmpath test.db-shm
if {[forced_proxy_locking]} {
sqlite3 db test.db
set shmpath [execsql { pragma lock_proxy_file }]-shm
db close
}
do_multiclient_test tn {
@@ -62,11 +70,11 @@ do_multiclient_test tn {
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES('a', 'b');
}
file exists test.db-shm
file exists $shmpath
} {1}
do_test 1.1.2 {
file attributes test.db-shm -permissions r--r--r--
file attributes $shmpath -permissions r--r--r--
code1 { sqlite3 db file:test.db?readonly_shm=1 }
} {}
@@ -99,7 +107,7 @@ do_multiclient_test tn {
do_test 1.2.1 {
code2 { db2 close }
code1 { db close }
list [file exists test.db-wal] [file exists test.db-shm]
list [file exists test.db-wal] [file exists $shmpath]
} {1 1}
do_test 1.2.2 {
@@ -109,9 +117,9 @@ do_multiclient_test tn {
do_test 1.2.3 {
code1 { db close }
file attributes test.db-shm -permissions rw-r--r--
hexio_write test.db-shm 0 01020304
file attributes test.db-shm -permissions r--r--r--
file attributes $shmpath -permissions rw-r--r--
hexio_write $shmpath 0 01020304
file attributes $shmpath -permissions r--r--r--
code1 { sqlite3 db file:test.db?readonly_shm=1 }
csql1 { SELECT * FROM t1 }
} {0 {a b c d e f g h i j}}
@@ -120,11 +128,11 @@ do_multiclient_test tn {
} {SQLITE_OK}
do_test 1.2.5 {
file attributes test.db-shm -permissions rw-r--r--
file attributes $shmpath -permissions rw-r--r--
code2 { sqlite3 db2 test.db }
sql2 "SELECT * FROM t1"
} {a b c d e f g h i j}
file attributes test.db-shm -permissions r--r--r--
file attributes $shmpath -permissions r--r--r--
do_test 1.2.6 { sql1 "SELECT * FROM t1" } {a b c d e f g h i j}
do_test 1.2.7 {
@@ -152,9 +160,13 @@ do_multiclient_test tn {
# Also test that if the -shm file can be opened for read/write access,
# it is not if readonly_shm=1 is present in the URI.
do_test 1.3.2.1 {
ifcapable enable_persist_wal {
code1 { file_control_persist_wal db 0 }
code2 { file_control_persist_wal db2 0 }
}
code1 { db close }
code2 { db2 close }
file exists test.db-shm
file exists $shmpath
} {0}
do_test 1.3.2.2 {
code1 { sqlite3 db file:test.db?readonly_shm=1 }
@@ -162,8 +174,8 @@ do_multiclient_test tn {
} {1 {unable to open database file}}
do_test 1.3.2.3 {
code1 { db close }
close [open test.db-shm w]
file attributes test.db-shm -permissions r--r--r--
close [open $shmpath w]
file attributes $shmpath -permissions r--r--r--
code1 { sqlite3 db file:test.db?readonly_shm=1 }
csql1 { SELECT * FROM t1 }
} {0 {a b c d e f g h i j k l}}
@@ -297,4 +309,69 @@ do_multiclient_test tn {
} {}
}
forcedelete $shmpath
if {$tcl_platform(os)=="Darwin"} {
ifcapable enable_persist_wal {
#--------------------------------------------------------------------------
catch {db2 close}
reset_db
do_execsql_test 3.1 {
CREATE TABLE t1(a, b);
PRAGMA journal_mode = wal;
INSERT INTO t1 VALUES(1, 2);
} {wal}
db_save
db close
db_restore
sqlite3 db test.db -readonly 1
do_execsql_test 3.2 { SELECT * FROM t1 } {1 2}
do_catchsql_test 3.3 {
INSERT INTO t1 VALUES(3, 4)
} {1 {attempt to write a readonly database}}
sqlite3 db2 test.db
do_test 3.4 {
db2 eval { INSERT INTO t1 VALUES(3, 4) }
} {}
do_execsql_test 3.5 { SELECT * FROM t1 } {1 2 3 4}
db close
db2 close
db_restore
file attributes $shmpath -permissions r--r--r--
sqlite3 db test.db -readonly 1
do_execsql_test 3.6 { SELECT * FROM t1 } {1 2}
db close
db_restore
file attributes $shmpath -permissions r--r--r--
sqlite3 db test.db
do_test 3.7 {
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
db close
db_restore
file attributes $shmpath -permissions r--r--r--
sqlite3 db test.db -readonly 1
do_execsql_test 3.8 { SELECT * FROM t1 } {1 2}
sqlite3 db2 test.db
do_test 3.9 { db2 eval { SELECT * FROM t1 } } {1 2}
do_test 3.10 {
catchsql { INSERT INTO t1 VALUES(3, 4) } db2
} {1 {attempt to write a readonly database}}
catch { db close }
catch { db2 close }
forcedelete $shmpath
} ;# endif capable enable_persist_wal
} ;# endif os Darwin
finish_test
+1
View File
@@ -17,6 +17,7 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
db close
set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
+1 -1
View File
@@ -20,7 +20,7 @@ source $testdir/wal_common.tcl
source $testdir/lock_common.tcl
ifcapable !wal {finish_test ; return }
if ![wal_is_ok] { finish_test; return }
set testprefix walslow
proc reopen_db {} {
+1
View File
@@ -19,6 +19,7 @@ source $testdir/tester.tcl
source $testdir/lock_common.tcl
if {[run_thread_tests]==0} { finish_test ; return }
ifcapable !wal { finish_test ; return }
if ![wal_is_ok] { finish_test; return }
set sqlite_walsummary_mmap_incr 64
-1
View File
@@ -1592,7 +1592,6 @@ do_execsql_test 48.1 {
SELECT (SELECT max(x)OVER(ORDER BY x) + min(x)OVER(ORDER BY x))
FROM (SELECT (SELECT sum(a) FROM t1 GROUP BY a) AS x FROM t1);
} {2 2 2}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 49.1 {
+2
View File
@@ -122,6 +122,7 @@ foreach hdr {
sqliteicu.h
sqliteInt.h
sqliteLimit.h
sqlrr.h
vdbe.h
vdbeInt.h
vxworks.h
@@ -397,6 +398,7 @@ foreach file {
rtree.c
icu.c
fts3_icu.c
sqlrr.c
sqlite3rbu.c
dbstat.c
dbpage.c