- C Merge\srecent\strunk\schanges\sinto\sbegin-concurrent-pnu-wal2.
- D 2020-04-09T19:00:09.171
+ C Merge\slatest\strunk\schanges\sinto\sthis\sbranch.
-D 2020-05-18T17:18:28.234
++D 2020-05-18T19:55:43.468
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
- F main.mk 2d639b933fb46af9994c907634954e02dc888c07a53d6935f30c3b7d85358c4e
-F main.mk 50c169e0b33358e178174218e57bd1fcc55872affa3c677f2988e7378f903e12
++F main.mk 558344f9f7a5f399c4f93e1703e04daf67f28a7905e5ad6c8d68de18fee0cb1d
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
- F src/alter.c fa2c3be9b0ebecfafb7062072a0ae6eda126d3e5a9fd51b2eded5acd95dc783c
- F src/analyze.c 831bb090988477a00d3b4c000746e1b0454dcc93b10b793e6ebe1c47f25d193a
+ F src/alter.c 826bc4561456094cf758f095776026f25892a2bb3a7cd86742323267dc9bdb5f
+ F src/analyze.c 953a6c43870ccaf080597244e1eeb4dc2ff6cb84f9501b24e46323de36970b61
F src/attach.c ff2daea0fe62080192e3f262670e4f61f5a86c1e7bea9cec34e960fe79852aa1
F src/auth.c a3d5bfdba83d25abed1013a8c7a5f204e2e29b0c25242a56bc02bb0c07bf1e06
- F src/backup.c 5e617c087f1c2d6005c2ec694ce80d6e16bc68d906e1b1c556d7c7c2228b636b
+ F src/backup.c b1c90cd4110248c8e1273ff4578d3a84c0c34725e1b96dacd4a6294a908702de
-F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
+F src/bitvec.c 8433d9e98dd6f2ea3286e0d2fe5d65de1bfc18a706486eb2026b01be066b5806
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
- F src/btree.c f35d8d490c6ad5d46932810e041f4b36e0a38e63431610e8995c49dcb9fc4f41
- F src/btree.h 58768397849b547fe49c3ec276fbf3f9443aae1ff46c9e94454bfebb5443ec24
- F src/btreeInt.h b0e3cdf8dba3b17b9f61736ce78c627a384907080e1ae159e1385be745001426
- F src/build.c e8ee72dc44d85d467df3a1069269b0fa31adf19408d75e9f7cb1afca7ce01e45
-F src/btree.c 8977eed059a51320352f9a79bce388b4cb3679c8ae785bc485ca2bc3eeac9855
-F src/btree.h 989ef3c33413549e3e148f3dcb46c030f317dac130dc86809ba6b9aa4b16c72a
-F src/btreeInt.h 5c8b8749805787313ecf49eb5be3ced1e94bbf8ef54bb01470ce6bd0d5185c67
-F src/build.c ca9e7a33b74f1bf2eb3a5f37f9d07dfed335469f2d70c0bd350e0dd42a50183a
++F src/btree.c 61260c56f81a6562802ff4dc1db238348b779a7e6b867b901a8230e27f240192
++F src/btree.h 024ee56278d64622b7fe9350b0a0cdadd57ccb1f6f2de279d2053458b16cae8c
++F src/btreeInt.h d92bf22ef471c3d877daa32e677755ac9578707089116a679481c646e6b3e0b0
++F src/build.c 87e14ac12acd6151b631537697a36c1cc2dd8b01c6bd3a6a74971cce077ddac3
F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
- F src/ctime.c 6a77ec9e0eb87aea929e002c816298907e337094a7b556898ae2d1e6be209f90
+ F src/ctime.c e98518d2d3d4029a13c805e07313fb60c877be56db76e90dd5f3af73085d0ce6
F src/date.c b29b349d277e3d579dcc295b24c0a2caed83fd8f090a9f7cbe6070c0fd662384
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
F src/dbstat.c 793deaf88a0904f88285d93d6713c636d55ede0ffd9f08d10f4ea825531d367f
- F src/delete.c 11000121c4281c0bce4e41db29addfaea0038eaa127ece02557c9207bc3e541d
- F src/expr.c b292bdecd64cd695109ceaa3c810f8b41f202368c75adb9ea680a875df5b0308
+ F src/delete.c 88047c8e59878c920fce14582bc1dde4d81157d1ca5ffdf36c2907e6d41996c4
+ F src/expr.c 8eed44d9de8a3b0fe1c9809bb75a02b65488774c8ba8685512d8f63adade18e5
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c 4b575423b0a5d4898b1a7868ce985cf1a8ad91c741c9abbb108ff02536d20f41
- F src/func.c e9fc14ee686360ff77884731eeb97233a50ca424fd705d4a8c04e2afcf7039b0
-F src/func.c 2333eb4277f55a5efdc12ef754e7d7ec9105d257b2fd00301d23ce1e8fa67dc0
++F src/func.c 3796e7e269a9f23867ad3e64152399d5f850f83b9ee3ba57a931da7e46ef9c00
F src/global.c 79a988b56b06ce2d08ebefe1d35da9aa25b3851faa47ea5233361c4827185a64
F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
F src/insert.c 8e4211d04eb460c0694d486c6ba1c068d468c6f653c3f237869a802ad82854de
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
- F src/loadext.c b179df50e6e8bb0c36c149e95d958d49bd8c6c7469e59c01b53d164360bc6c32
- F src/main.c 48eb5ecb2096222f23f38c619730891a9fb79e0fd6ccceab4c530816bd6a7ebf
- F src/malloc.c cabfef0d725e04c8abfe0231a556ed8b78bf329dcc3fddbf903f6cdcd53cf4e6
+ F src/loadext.c 421310045bd78afefb772294a99e50f37d87ae578786a6169074e6291e30d969
-F src/main.c 97d962ab1f830540043042e41085c5b85636a60e6ed95002c1a56b64f7eb6a0b
++F src/main.c 1290592ac9c7bd928f17e30fe442e523d30ce7e9ebabf56e7979735c1c7ede36
+ F src/malloc.c d0400b0366e1a3a2414ca4534b4a7406df34732835f37a15cb4642eb7df1a363
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
F src/mem2.c f1940d9e91948dd6a908fbb9ce3835c36b5d83c3
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
- F src/os_unix.c 359f1c8d414c2004486ec2c5a633c5adcb371d922c8546983564e7d76796c74c
- F src/os_win.c 035a813cbd17f355bdcad7ab894af214a9c13a1db8aeac902365350b98cd45a7
-F src/os_unix.c 13f983da988b6460ef3c4c22099c67ab0938291e543644ac4d99eccc8ba604f1
++F src/os_unix.c 313c7a38d1521de28dc3f55c1e8117cccabbc0e87b5af3ef58b7782ef702fe99
+ F src/os_win.c 317718e8f04c449e7d9e1eacac0d14e7508e4a77c9d4c3cb7382299bd24561b7
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
- F src/pager.c d6987e8bfd31b8ab8636332dad234ef400b2433495184e9fbf9edcb693f86c9d
- F src/pager.h 71cd94899138d252161d0279bf719c2c7fb48d14525965c1d851d91f7fde76f6
-F src/pager.c 5683689017800028c2f06602b1283474daf49b0848bfbcca03e109e269a28472
-F src/pager.h 57058a96dc235ffdbd36a6b23400573a1c39a34a3b3c43a4acc41ee3830ad61c
-F src/parse.y c8eff38606f443d5ba245263fa7abc05e4116d95656e050c4b78e9bfbf931add
++F src/pager.c a294b736317270e1b5b74ab1bf1ded471850fcc1b39e12255b323596024d1398
++F src/pager.h 72506550d3a2d8953812220bf164b077ef122a3986d86262ed15fdb77137dbce
+F src/parse.y 0724899be1d00dc438d0acadbfc2baddd4132a47268f25676ac79d56c1ee7351
F src/pcache.c 385ff064bca69789d199a98e2169445dc16e4291fa807babd61d4890c3b34177
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
F src/pcache1.c 6596e10baf3d8f84cc1585d226cf1ab26564a5f5caf85a15757a281ff977d51a
- F src/pragma.c ad117cc1a80f65cc81997d9a4b29558afb2e1baaee9e324a47a7d4d58174d106
- F src/pragma.h 9a5f52a4397ce0d9b6e99f2e3b9b657335e09e32127c712a768ed2744a9088b0
+ F src/pragma.c 6ac2af3f44124d1e42eeee977f1aa979d425226fefb98a34996e122ce95d2bed
-F src/pragma.h 8168e588536bffd95319451f34e9a754dc37d205ebe433031a7813c5b286beae
++F src/pragma.h f45ac571c578e80533f6c72df0725b7879bdf861fdf1f5b75433495dbecdb0aa
F src/prepare.c 8d4d6c8aa6afefc48027c54b41cdf134b4d6bc2fc4badbe483ad7fd9e1728a28
- F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
+ F src/printf.c ebf563cff3122f6a61149964b738b470196d3619df31d6a720d0ff72fcfd7c7b
-F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
+F src/random.c f27af4099afaea7284ade5c206224dcfdb2334cfd119d018b470d46356b3f27d
F src/resolve.c d36a2b1639e1c33d7b508abfd3452a63e7fd81737f6f3940bfef085fca6f21f4
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
- F src/select.c 150b1ce2b99cd9a7dcf3e68b1caadd1fcd2aa2030a68c93141efbf37fdabb49c
- F src/shell.c.in cf7d6140c33859a86188aa52093dfa5d4e4d9ce32ecf1d588a127cb0a8f6f96f
- F src/sqlite.h.in 9df0e92cf5c83269f5b7ccd0cce62265e92cf9031867d3a6e0e1c71e6be45eb6
-F src/select.c ee4b02ad8047c35891b7a612091beec21ae7a0155290dcbefb0824aed20c46f3
++F src/select.c 23d31a8bb7b7a147e547a00a210ce2a96144e48651f2e9d5ab7cb13a655bf36f
+ F src/shell.c.in cf2d24f54412c06e5fb34af7fabc748651125e1dceac29b740e91f06d23447b6
-F src/sqlite.h.in 74342b41e9d68ff9e56b192009046f8dd0aa2bd76ce1a588f330de614ba61de7
++F src/sqlite.h.in bfd502d24286258ce9091c7a2865c4e6e953958d489d50ad23e46ca1e37b03cc
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
- F src/sqlite3ext.h 9c5269260409eb3275324ccace6a13a96f4ad330c708415f70ca6097901ff4ee
- F src/sqliteInt.h 7047360cafbf5bbf6ed9c0f1065c9853ff34263d08fcd1f512df06b173749d9b
+ F src/sqlite3ext.h 2d1af80082edffd71c6f96f70ad1ce6a4fb46615ad10291fc77fe0dea9ff0197
-F src/sqliteInt.h 8878a88c18a013d1843638001d7fc56a8f99740f151fc7597b1641b61accf58c
++F src/sqliteInt.h 76d6c74a5325cc97047efe4bdd236efd3589f86568d50c117885a9101eca2dec
F src/sqliteLimit.h 95cb8479ca459496d9c1c6a9f76b38aee12203a56ce1092fe13e50ae2454c032
F src/status.c 9ff2210207c6c3b4d9631a8241a7d45ab1b26a0e9c84cb07a9b5ce2de9a3b278
- F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
- F src/tclsqlite.c d0aa320416efe88c4dbb0156ed6c494f2f9958871a940e46984ee57b3e7fcc50
+ F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
+ F src/tclsqlite.c 986b6391f02cd9b53c1d688be55899f6ffddeb8e8014cd83c1b73ff912579a71
-F src/test1.c 5e8b8cc54e8c88906ea8a084387aa79bad245e539f4cee73149e5c0527e1db16
+F src/test1.c c84b9ca57d9953e17410b0ca17b8c4b18a6b44676fa95bc5524caa0f0820d6bd
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
F src/test3.c 61798bb0d38b915067a8c8e03f5a534b431181f802659a6616f9b4ff7d872644
F src/test4.c 405834f6a93ec395cc4c9bb8ecebf7c3d8079e7ca16ae65e82d01afd229694bb
F src/tokenize.c eee7bae3ec0bc4abee951554bf46a8ba567c0f7752ac90c820ed8afff4c612dc
F src/treeview.c 82c6391a3ba76215d4185fd4719a56ec4caf186a40c8a7b6e6ba4ae4467c2742
F src/trigger.c 4ada1037cc99777f647a882cdacbd1a4deb6567b69daf02946286401b88cdc04
- F src/update.c 2a7aa6bbcb3958941468674205c91c3a0feccf9b905be38aa00acdfc5c04712a
-F src/update.c 3199098455830fc2d8c8fc4ae3ec2ea513eef64339ae9a7048db62b21169bc7a
++F src/update.c 055b77950b774edbd7dfc14e3067fee95c8616712acf26684a444d4beb1d087e
F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
F src/utf.c 95fb6e03a5ca679045c5adccd05380f0addccabef5911abddcb06af069500ab7
F src/util.c 3b6cedf7a0c69bd6e1acce832873952d416212d6293b18d03064e07d7a9b5118
- F src/vacuum.c b6a321f6c6068c49f763fda52a0cd75fae9228d31f121b977436a00a158f22dc
- F src/vdbe.c 9a6d025e4bb034ee53f6dc995c3ecfad5d665cac3dcae7ec962202afdd689307
- F src/vdbe.h 51282fbe819ee0e8eeeaab176240860d334c20a12b14f3b363e7f1a4e05d60b9
- F src/vdbeInt.h 0b728ee662862a38b1912af741e2ac64f524de3c77aa86cf4306c42bdcd9de59
- F src/vdbeapi.c d176ee7251d5344de7bb2a0d2dd0fe536834e5843d9bc2389e0f5cdcd5374141
- F src/vdbeaux.c d49b9578906607b77e61e1251b636db7852bb3a64f7a736e92d4fffa68d200ac
-F src/vacuum.c de9780b89fa4ee74c3534f60b94820e3179aca759ffc1338ee53cb4ea7693dd3
-F src/vdbe.c d8a95ca518c10963198938e26c15b8e646840e1d538866ace82e9b1c8b4205af
++F src/vacuum.c 28f9a2430bf250c04bbf40a70d749e8c081c007b99602df61717d35b29b817ab
++F src/vdbe.c 92a24ceae20f5e67dbf55e3a79b8a7dd6ea0ed8a36f747a1e4ca4ccd8d16d177
+ F src/vdbe.h 07b8c636a87df8b6e58f29d6badd7f10d5844353deff1d7c88ed1c2bfe3bbd35
+ F src/vdbeInt.h 571413068b5ac07e2ed8ca7a02fa529622fd5455ae6981498376e5e492d2e5ef
+ F src/vdbeapi.c e467b75a710ea099f8d2d022abf601d2ccd05e28f63b44b12d93000b6a75f4a8
-F src/vdbeaux.c 80626786d21296d9e7936186850343afe5fc6368ad9724a172e151788425a063
++F src/vdbeaux.c af90721686bc750f0ea4961c734648ed9233984521a53d59c5e58158abe413be
F src/vdbeblob.c 253ed82894924c362a7fa3079551d3554cd1cdace39aa833da77d3bc67e7c1b1
F src/vdbemem.c 39b942ecca179f4f30a32b54579a85d74ccaefa5af2a0ad2700abe5ef0768b22
F src/vdbesort.c 2be76d26998ce2b3324cdcc9f6443728e54b6c7677c553ad909c7d7cfab587df
F src/vdbetrace.c fa3bf238002f0bbbdfb66cc8afb0cea284ff9f148d6439bc1f6f2b4c3b7143f0
- F src/vtab.c 7b704a90515a239c6cdba6a66b1bb3a385e62326cceb5ecb05ec7a091d6b8515
+ F src/vdbevtab.c ee5b4c902fdda2230f9503ac7b84c6d614c91e8f6f4dc1633e2e8dfef8ffb144
+ F src/vtab.c 7b452592ed2ee95dedb1f323d557cebede5a6f3b4558b21a5dca527e6ae9b12c
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
- F src/wal.c 1227919e84ed474bc02e83533f3b17dfa137c573381d13bdb750722513ea21f1
- F src/wal.h c1a0f32c170634cf42908f8e978fa6bd8921f7364301fa34606cd171fce883b1
-F src/wal.c a12866b518cb4362445601d837e17c1c28cef5e7b95ecd3a352a4d031849a4c8
-F src/wal.h d01234e828943e002040c22a7e017642962f9fd9b2dc142fa599769ae4e459e9
++F src/wal.c 55bdc1be81348aab720ecf2792a975fdea469bf51548e7a267edddf882b858cf
++F src/wal.h 7a733af13b966ecb81872ce397e862116b3575ea53245b90b139a2873ee87825
F src/walker.c 7c429c694abd12413a5c17aec9f47cfe9eba6807e6b0a32df883e8e3a14835ed
F src/where.c 9546c82056e8cdb27291f98cf1adca5d271240b399bb97b32f77fc2bea6146c9
F src/whereInt.h 6b874aa15f94e43a2cec1080be64d955b04deeafeac90ffb5d6975c0d511be3c
F test/vtab_err.test dcc8b7b9cb67522b3fe7a272c73856829dae4ab7fdb30399aea1b6981bda2b65
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
F test/vtabdrop.test 65d4cf6722972e5499bdaf0c0d70ee3b8133944a4e4bc31862563f32a7edca12
- F test/wal.test a233cd4733928a5aaef24738727c4094d561ea68089f93cccd1f6e9dec610212
+ F test/wal.test 09c9e05591a5e513ecf14f72b4ca86726fca778a7abab1063a16f3ceb8cf2a86
-F test/wal2.test 537f59e5c5932e3b45bf3591ae3e48a2601360c2e52821b633e222fe6ebd5b09
+F test/wal2.test 6af203a0eb4be054661d9e0072cb22402c78dea4a89a10b77e9118ae3b91148a
F test/wal2big.test 0b4ec526f9ca4bbabc355042c38045ae2e253fb46eb327bb7693d0122bc6968b
+F test/wal2concurrent.test 7fc3e570073683a2a28f42bda46ecf516f5bc82afd703c1fbf4aa38e18fb3361
F test/wal2fault.test 2e8e60cacd5bcd451618aeffd05f676894d17202d3e2986e288d36e2c5993249
F test/wal2lock.test 0ef98d72dc6bcf7711dedd684760488400d9a9a6eec0dc5d3822060437793552
F test/wal2recover.test ba8f4bc9397c838734619f9e759bd98b00e355347b3cf80a2e677610d231d5d8
F test/walprotocol2.test 7e4bedd5ee83607e2928ac438bf7332a396b980d3e02aa0746509ce11ad1f13c
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
F test/walro2.test 0e79dd15cbdb4f482c01ea248373669c732414a726b357d04846a816afafb768
-F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
+F test/walrofault.test 5a25f91c16a68bae65edec7cdef4495e5c6494c8408743fe9b29045fa6665cd0
+ F test/walsetlk.test 11f7fe792fdce54cf09874dab824e0627f2eedecfb9f7983e325606ec5184e0c
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
F tool/mkopcodeh.tcl 352a4319c0ad869eb26442bf7c3b015aa15594c21f1cce5a6420dbe999367c21
F tool/mkopts.tcl 680f785fdb09729fd9ac50632413da4eadbdf9071535e3f26d03795828ab07fa
- F tool/mkpragmatab.tcl e7cec3e2c6a95b55dd3a17b4f133c4e9bf6e2133c5b79cd1112f47c64ad26f48
-F tool/mkpragmatab.tcl d348a4bf71ac068bddf89326562071cbbd962273d88f9b5e5d622f3e73b78bdf
++F tool/mkpragmatab.tcl b4074a101791d034bd3a5b8a6c69e9c4c8b7c420914f647ae78419130938f6d1
F tool/mkshellc.tcl 70a9978e363b0f3280ca9ce1c46d72563ff479c1930a12a7375e3881b7325712
F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b079b9
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
- P 76668b55894a9c75b2ed1f404ecd3c93ef22586bc20a86ac1ab23f20828474cc 6fb870625cb7007fe5055609da35f6af87f3b375b7a43fd4e842d40dfef9169f
- R 16cc622593637b27627971847cac726c
- U drh
- Z a8b3921512b1c7ea9a45962527a2afa8
-P 6fb870625cb7007fe5055609da35f6af87f3b375b7a43fd4e842d40dfef9169f 69e149f76853d196c8855fedfc98848b60fb116ac36bc08824b1a122469f8ece
-R c2ab80ad5e65c7322c33833a421871e0
++P 6c11b67bd2c2844566027d59bf5a342d8b2bebd591cd06922e4609e79aa46b82 16b1eca922d6e10a0ebce1deb559c6c7dd74f8655e3456bad8384c6f4637e6d6
++R 0aad6afe74ac8dcb36dce09b9aee2f48
+ U dan
-Z 2201cfa00c678efbefa3c7153a345e7b
++Z 4f6b8b763671cf3990701b3c85716542
- 6c11b67bd2c2844566027d59bf5a342d8b2bebd591cd06922e4609e79aa46b82
-16b1eca922d6e10a0ebce1deb559c6c7dd74f8655e3456bad8384c6f4637e6d6
++5dc355ccf6ecf0af61e73efbf65bc5e1e192f748568344afbf8bca014ef98df9
*/
int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVersion){
BtShared *pBt = p->pBt;
+ Pager *pPager = pBt->pPager;
int rc = SQLITE_OK;
+ int bConcurrent = (p->db->bConcurrent && !ISAUTOVACUUM);
sqlite3BtreeEnter(p);
btreeIntegrity(p);
if( (pBt->btsFlags & BTS_READ_ONLY)!=0 ){
rc = SQLITE_READONLY;
}else{
- rc = sqlite3PagerBegin(pPager, wrflag>1, sqlite3TempInMemory(p->db));
+ int exFlag = bConcurrent ? -1 : (wrflag>1);
- rc = sqlite3PagerBegin(pBt->pPager, exFlag, sqlite3TempInMemory(p->db));
++ rc = sqlite3PagerBegin(pPager, exFlag, sqlite3TempInMemory(p->db));
if( rc==SQLITE_OK ){
rc = newDatabase(pBt);
}else if( rc==SQLITE_BUSY_SNAPSHOT && pBt->inTransaction==TRANS_NONE ){
** open savepoints. If the second parameter is greater than 0 and
** the sub-journal is not already open, then it will be opened here.
*/
- rc = sqlite3PagerOpenSavepoint(pPager, p->db->nSavepoint);
+ int nSavepoint = p->db->nSavepoint;
- rc = sqlite3PagerOpenSavepoint(pBt->pPager, nSavepoint);
++ rc = sqlite3PagerOpenSavepoint(pPager, nSavepoint);
+ if( rc==SQLITE_OK && nSavepoint ){
+ rc = btreePtrmapBegin(pBt, nSavepoint);
+ }
}
}
assert( pShmNode->hShm>=0 || pDbFd->pInode->bProcessLock==1 );
assert( pShmNode->hShm<0 || pDbFd->pInode->bProcessLock==0 );
- /* Check that, if this to be a blocking lock, that locks have been
- ** obtained in the following order.
+ if( pDbFd->pInode->bProcessLock ){
+ return unixMutexFreeShmlock(pDbFd, ofst, n, flags);
+ }
+
+
+ /* Check that, if this to be a blocking lock, no locks that occur later
+ ** in the following list than the lock being obtained are already held:
**
** 1. Checkpointer lock (ofst==1).
- ** 2. Recover lock (ofst==2).
+ ** 2. Write lock (ofst==0).
** 3. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK).
- ** 4. Write lock (ofst==0).
**
** In other words, if this is a blocking lock, none of the locks that
** occur later in the above list than the lock being obtained may be
rc = walOpenWal2(pWal);
}
- #ifdef SQLITE_ENABLE_SETLK_TIMEOUT
- /* If they were disabled earlier and the read-transaction has been
- ** successfully opened, re-enable blocking locks. This is because the
- ** connection may attempt to upgrade to a write-transaction, which does
- ** benefit from using blocking locks. */
- if( rc==SQLITE_OK ){
- sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_LOCK_TIMEOUT, (void*)&tmout);
- }
- #endif
-
+ pWal->nPriorFrame = pWal->hdr.mxFrame;
#ifdef SQLITE_ENABLE_SNAPSHOT
if( rc==SQLITE_OK ){
if( pSnapshot && memcmp(pSnapshot, &pWal->hdr, sizeof(WalIndexHdr))!=0 ){
** There can only be a single writer active at a time.
*/
int sqlite3WalBeginWriteTransaction(Wal *pWal){
- int rc = walWriteLock(pWal);
+ int rc;
+
+ #ifdef SQLITE_ENABLE_SETLK_TIMEOUT
+ /* If the write-lock is already held, then it was obtained before the
+ ** read-transaction was even opened, making this call a no-op.
+ ** Return early. */
+ if( pWal->writeLock ){
+ assert( !memcmp(&pWal->hdr,(void *)walIndexHdr(pWal),sizeof(WalIndexHdr)) );
+ return SQLITE_OK;
+ }
+ #endif
++
++ rc = walWriteLock(pWal);
+ if( rc==SQLITE_OK ){
+ /* If another connection has written to the database file since the
+ ** time the read transaction on this connection was started, then
+ ** the write is disallowed. Release the WRITER lock and return
+ ** SQLITE_BUSY_SNAPSHOT in this case. */
+ if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){
+ walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
+ pWal->writeLock = 0;
+ rc = SQLITE_BUSY_SNAPSHOT;
+ }
+ }
+ return rc;
+}
- /* Cannot start a write transaction without first holding a read
- ** transaction. */
- assert( pWal->readLock!=WAL_LOCK_NONE );
- assert( pWal->writeLock==0 && pWal->iReCksum==0 );
+/*
+** This function is called by a writer that has a read-lock on aReadmark[0]
+** (pWal->readLock==0). This function relinquishes that lock and takes a
+** lock on a different aReadmark[] slot.
+**
+** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+*/
+static int walUpgradeReadlock(Wal *pWal){
+ int cnt;
+ int rc;
+ assert( pWal->writeLock && pWal->readLock==0 );
+ assert( isWalMode2(pWal)==0 );
+ walUnlockShared(pWal, WAL_READ_LOCK(0));
+ pWal->readLock = -1;
+ cnt = 0;
+ do{
+ int notUsed;
+ rc = walTryBeginRead(pWal, ¬Used, 1, ++cnt);
+ }while( rc==WAL_RETRY );
+ assert( (rc&0xff)!=SQLITE_BUSY ); /* BUSY not possible when useWal==1 */
+ testcase( (rc&0xff)==SQLITE_IOERR );
+ testcase( rc==SQLITE_PROTOCOL );
+ testcase( rc==SQLITE_OK );
+ return rc;
+}
- if( pWal->readOnly ){
- return SQLITE_READONLY;
- }
- /* Only one writer allowed at a time. Get the write lock. Return
- ** SQLITE_BUSY if unable.
- */
- rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);
- if( rc ){
- return rc;
- }
- pWal->writeLock = 1;
+#ifndef SQLITE_OMIT_CONCURRENT
+/*
+** This function is only ever called when committing a "BEGIN CONCURRENT"
+** transaction. It may be assumed that no frames have been written to
+** the wal file. The second parameter is a pointer to the in-memory
+** representation of page 1 of the database (which may or may not be
+** dirty). The third is a bitvec with a bit set for each page in the
+** database file that was read by the current concurrent transaction.
+**
+** This function performs three tasks:
+**
+** 1) It obtains the WRITER lock on the wal file,
+**
+** 2) It checks that there are no conflicts between the current
+** transaction and any transactions committed to the wal file since
+** it was opened, and
+**
+** 3) It ejects any non-dirty pages from the page-cache that have been
+** written by another client since the CONCURRENT transaction was started
+** (so as to avoid ending up with an inconsistent cache after the
+** current transaction is committed).
+**
+** If no error occurs and the caller may proceed with committing the
+** transaction, SQLITE_OK is returned. SQLITE_BUSY is returned if the WRITER
+** lock cannot be obtained. Or, if the WRITER lock can be obtained but there
+** are conflicts with a committed transaction, SQLITE_BUSY_SNAPSHOT. Finally,
+** if an error (i.e. an OOM condition or IO error), an SQLite error code
+** is returned.
+*/
+int sqlite3WalLockForCommit(
+ Wal *pWal,
+ PgHdr *pPage1,
+ Bitvec *pAllRead,
+ Pgno *piConflict
+){
+ Pager *pPager = pPage1->pPager;
+ int rc = walWriteLock(pWal);
- /* If another connection has written to the database file since the
- ** time the read transaction on this connection was started, then
- ** the write is disallowed.
+ /* If the database has been modified since this transaction was started,
+ ** check if it is still possible to commit. The transaction can be
+ ** committed if:
+ **
+ ** a) None of the pages in pList have been modified since the
+ ** transaction opened, and
+ **
+ ** b) The database schema cookie has not been modified since the
+ ** transaction was started.
*/
- if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){
- walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
- pWal->writeLock = 0;
- rc = SQLITE_BUSY_SNAPSHOT;
+ if( rc==SQLITE_OK ){
+ WalIndexHdr head;
+
+ if( walIndexLoadHdr(pWal, &head) ){
+ /* This branch is taken if the wal-index header is corrupted. This
+ ** occurs if some other writer has crashed while committing a
+ ** transaction to this database since the current concurrent transaction
+ ** was opened. */
+ rc = SQLITE_BUSY_SNAPSHOT;
+ }else if( memcmp(&pWal->hdr, (void*)&head, sizeof(WalIndexHdr))!=0 ){
+ int bWal2 = isWalMode2(pWal);
+ int iHash;
+ int nLoop = 1+(bWal2 && walidxGetFile(&head)!=walidxGetFile(&pWal->hdr));
+ int iLoop;
+
+
+ assert( nLoop==1 || nLoop==2 );
+ for(iLoop=0; rc==SQLITE_OK && iLoop<nLoop; iLoop++){
+ u32 iFirst; /* First (external) wal frame to check */
+ u32 iLastHash; /* Last hash to check this loop */
+ u32 mxFrame; /* Last (external) wal frame to check */
+
+ if( bWal2==0 ){
+ assert( iLoop==0 );
+ /* Special case for wal mode. If this concurrent transaction was
+ ** opened after the entire wal file had been checkpointed, and
+ ** another connection has since wrapped the wal file, then we wish to
+ ** iterate through every frame in the new wal file - not just those
+ ** that follow the current value of pWal->hdr.mxFrame (which will be
+ ** set to the size of the old, now overwritten, wal file). This
+ ** doesn't come up in wal2 mode, as in wal2 mode the client always
+ ** has a PART lock on one of the wal files, preventing it from being
+ ** checkpointed or overwritten. */
+ iFirst = pWal->hdr.mxFrame+1;
+ if( memcmp(pWal->hdr.aSalt, (u32*)head.aSalt, sizeof(u32)*2) ){
+ assert( pWal->readLock==0 );
+ iFirst = 1;
+ }
+ mxFrame = head.mxFrame;
+ }else{
+ int iA = walidxGetFile(&pWal->hdr);
+ if( iLoop==0 ){
+ iFirst = walExternalEncode(iA, 1+walidxGetMxFrame(&pWal->hdr, iA));
+ mxFrame = walExternalEncode(iA, walidxGetMxFrame(&head, iA));
+ }else{
+ iFirst = walExternalEncode(!iA, 1);
+ mxFrame = walExternalEncode(!iA, walidxGetMxFrame(&head, !iA));
+ }
+ }
+ iLastHash = walFramePage(mxFrame);
+
+ for(iHash=walFramePage(iFirst); iHash<=iLastHash; iHash += (1+bWal2)){
+ WalHashLoc sLoc;
+
+ rc = walHashGet(pWal, iHash, &sLoc);
+ if( rc==SQLITE_OK ){
+ u32 i, iMin, iMax;
+ assert( mxFrame>=sLoc.iZero );
+ iMin = (sLoc.iZero >= iFirst) ? 1 : (iFirst - sLoc.iZero);
+ iMax = (iHash==0) ? HASHTABLE_NPAGE_ONE : HASHTABLE_NPAGE;
+ if( iMax>(mxFrame-sLoc.iZero) ) iMax = (mxFrame-sLoc.iZero);
+ for(i=iMin; rc==SQLITE_OK && i<=iMax; i++){
+ PgHdr *pPg;
+ if( sLoc.aPgno[i]==1 ){
+ /* Check that the schema cookie has not been modified. If
+ ** it has not, the commit can proceed. */
+ u8 aNew[4];
+ u8 *aOld = &((u8*)pPage1->pData)[40];
+ int sz;
+ i64 iOff;
+ u32 iFrame = sLoc.iZero + i;
+ int iWal = 0;
+ if( bWal2 ){
+ iWal = walExternalDecode(iFrame, &iFrame);
+ }
+ sz = pWal->hdr.szPage;
+ sz = (sz&0xfe00) + ((sz&0x0001)<<16);
+ iOff = walFrameOffset(iFrame, sz) + WAL_FRAME_HDRSIZE + 40;
+ rc = sqlite3OsRead(pWal->apWalFd[iWal],aNew,sizeof(aNew),iOff);
+ if( rc==SQLITE_OK && memcmp(aOld, aNew, sizeof(aNew)) ){
+ rc = SQLITE_BUSY_SNAPSHOT;
+ }
+ }else if( sqlite3BitvecTestNotNull(pAllRead, sLoc.aPgno[i]) ){
+ *piConflict = sLoc.aPgno[i];
+ rc = SQLITE_BUSY_SNAPSHOT;
+ }else if( (pPg = sqlite3PagerLookup(pPager, sLoc.aPgno[i])) ){
+ /* Page aPgno[i], which is present in the pager cache, has been
+ ** modified since the current CONCURRENT transaction was
+ ** started. However it was not read by the current
+ ** transaction, so is not a conflict. There are two
+ ** possibilities: (a) the page was allocated at the of the file
+ ** by the current transaction or (b) was present in the cache
+ ** at the start of the transaction.
+ **
+ ** For case (a), do nothing. This page will be moved within the
+ ** database file by the commit code to avoid the conflict. The
+ ** call to PagerUnref() is to release the reference grabbed by
+ ** the sqlite3PagerLookup() above.
+ **
+ ** In case (b), drop the page from the cache - otherwise
+ ** following the snapshot upgrade the cache would be
+ ** inconsistent with the database as stored on disk. */
+ if( sqlite3PagerIswriteable(pPg) ){
+ sqlite3PagerUnref(pPg);
+ }else{
+ sqlite3PcacheDrop(pPg);
+ }
+ }
+ }
+ }
+ if( rc!=SQLITE_OK ) break;
+ }
+ }
+ }
}
+ pWal->nPriorFrame = pWal->hdr.mxFrame;
return rc;
}
/* Return the journal mode (WAL or WAL2) used by this Wal object. */
int sqlite3WalJournalMode(Wal *pWal);
+ #ifdef SQLITE_ENABLE_SETLK_TIMEOUT
+ int sqlite3WalWriteLock(Wal *pWal, int bLock);
+ void sqlite3WalDb(Wal *pWal, sqlite3 *db);
+ #endif
+
+/* sqlite3_wal_info() data */
+int sqlite3WalInfo(Wal *pWal, u32 *pnPrior, u32 *pnFrame);
+
+/* sqlite3_wal_info() data */
+int sqlite3WalInfo(Wal *pWal, u32 *pnPrior, u32 *pnFrame);
+
#endif /* ifndef SQLITE_OMIT_WAL */
#endif /* SQLITE_WAL_H */