1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-23 06:45:40 +03:00

1192 Commits

Author SHA1 Message Date
shaneh
1df2db7fd1 Fix some compiler warnings in the MSVC build.
FossilOrigin-Name: 1f5662b7db5d623c8d99c45a8d97a0aa4427593f
2010-08-18 02:28:48 +00:00
drh
89bd82ae9d Remove a NEVER() that is actually reachable.
FossilOrigin-Name: acb171d4cfef2fec8833f761019f5c81f0d138a0
2010-08-17 19:49:14 +00:00
drh
43b18e1e55 Suppress harmless compiler warning.
FossilOrigin-Name: 3f8c068a41b01f59d7f5d56f3bced78587f4d26c
2010-08-17 19:40:08 +00:00
drh
0028486b73 It is no longer possible to reach pagerStress() while in the error state,
so put a NEVER() around the error state test of that routine.

FossilOrigin-Name: d7ed463496c4474cc435d032874a4e55d780e74a
2010-08-17 18:37:12 +00:00
dan
a81a2207a3 If an SQLITE_FULL error occurs during rollback or journal finalization, treat it in the same way as SQLITE_IOERR (i.e. require that the pager internals be completely reset before it is next read from or written to).
FossilOrigin-Name: 8ac185236e766becdac7248c1ba3dfa42a9464b1
2010-08-17 18:15:48 +00:00
drh
719e3a7a57 Changes to pager for improved testability.
FossilOrigin-Name: 61c64b3aeb027fcc9c25591d6b9048ac7850ad3d
2010-08-17 17:25:15 +00:00
drh
919fc66ea7 Remove an superfluous branch from pager.c.
FossilOrigin-Name: 4271a95c8236bda4a4f8c02bf3a3560de1d00402
2010-08-16 20:02:09 +00:00
drh
8fb8b53728 Change sqlite3PagerPagecount() to return void, since the return value was
always SQLITE_OK and was never used.

FossilOrigin-Name: 7dd78eb7974ec7c40af3fcf2b125ca5bc0766b5c
2010-08-14 17:12:04 +00:00
drh
e5918c62e9 Tweaks to comments in pager.c. Fix two compiler warnings.
FossilOrigin-Name: 68a49f7fe382e4d36e1259cdeec956c942906ddb
2010-08-14 12:42:45 +00:00
dan
1879b088bd If an error occurs in PagerSetPagesize(), set the output variable to the unmodified page-size before returning.
FossilOrigin-Name: 02def8f92588b8a45dff3976d1e7f9e3f0359b3b
2010-08-12 16:36:34 +00:00
dan
5653e4da36 Add coverage tests for pager.c.
FossilOrigin-Name: 228c5b16af80c22e97d9d4deb351e0d3f4523f89
2010-08-12 11:25:47 +00:00
drh
b2eced5de2 Increase the maximum page size from 32k to 64k.
FossilOrigin-Name: 45362437d491fbe0f033a67b398f8ba68cbf1b3b
2010-08-12 02:41:12 +00:00
dan
22b328b23c Improve coverage of pager.c.
FossilOrigin-Name: 2fa05d01b6b11788a5b73d203fcac9d4a4ba9fd8
2010-08-11 18:56:45 +00:00
dan
7e68423894 Fix a bug in pager.c causing it to omit the xSync() call required following a hot-journal rollback.
FossilOrigin-Name: 42ba43ac690dc800fb8b969ae257a79942918342
2010-08-10 15:46:06 +00:00
dan
c864912ad1 Add variable pager.dbHintSize, used to limit the number of calls made to the xFileControl(FCNTL_SIZE_HINT) method.
FossilOrigin-Name: eb3ac895bd92c880ac6acca58de8cf9643c2b5e4
2010-08-10 09:58:57 +00:00
dan
de5fd22f3d Modify some comments in pager.c.
FossilOrigin-Name: 5662da6d4f648e5d07d7cbea6bbd92fa684c02c9
2010-08-09 19:17:29 +00:00
dan
5198bead7a Fix a memory leak in test_journal.c causing tests to fail.
FossilOrigin-Name: f229487cccc7514b2663e8e6e04798702c9cfb10
2010-08-09 16:12:51 +00:00
dan
73d66fdb22 Fix minor problems and update comments in pager.c.
FossilOrigin-Name: 92e456374b052aceff356d10317b5b94fcdeaa5c
2010-08-07 16:17:48 +00:00
dan
e5953ccdb2 Fix a problem wherein changing the journal-mode immediately after leaving exclusive-locking mode could lead to the database being unlocked without clearing the changeCountDone flag.
FossilOrigin-Name: 531abc808526d607768bf6f503268d4cc66ab169
2010-08-07 09:31:14 +00:00
dan
85d14ed238 Further enhancements to comments in pager.c.
FossilOrigin-Name: 876162c7e036af1cb447409b685afc72c0061a32
2010-08-06 17:18:00 +00:00
dan
5db5640185 Merge trunk changes into experimental branch.
FossilOrigin-Name: aef6698c732f3f9e46986f53e63ca2bdf5f7d208
2010-08-06 13:53:09 +00:00
dan
de1ae34eed Further updates to comments in pager.c.
FossilOrigin-Name: 5f4c17a33fd442d66c1bf75af9b21954f6906897
2010-08-06 12:00:27 +00:00
dan
11f47a9b4e Fix a bug to do with deleting the journal file when exiting exclusive-locking mode.
FossilOrigin-Name: 6217b607f0cd60383c6cb4ab0fe9da008f611244
2010-08-06 06:54:47 +00:00
dan
54919f8238 Add comments describing UNKNOWN_LOCK to pager.c. Improve some other comments i the same file.
FossilOrigin-Name: 54eff6de9d8d87f33192c192ca91907c4c090988
2010-08-05 18:53:26 +00:00
dan
5761dbe4a3 Catch an error code that was not being propagated back to the caller.
FossilOrigin-Name: 800f496929fb0d45d16c573c5dca0197ac922e2b
2010-08-05 16:08:26 +00:00
dan
4e004aa6b9 Fixes for error handling with temp databases. And for errors that occur within OS locking primitives.
FossilOrigin-Name: f99a902f9b3d0bf6f607c4ba641b4096fbbef5d5
2010-08-05 15:30:22 +00:00
dan
431b0b4291 Fix some problems with error recovery introduced while reworking pager state.
FossilOrigin-Name: 77eaab6f77c53cc4f429b65dfcf287ad6084c2da
2010-08-04 19:14:22 +00:00
dan
d5e0101be0 Merge trunk changes into experimental branch.
FossilOrigin-Name: 15368a9f8523d5fb611cd576080daed2cf2f1500
2010-08-03 18:29:04 +00:00
dan
a42c66bdfb Set the Pager.eState variable to PAGER_ERROR whenever the pager enters the error state.
FossilOrigin-Name: 4d384761d27425b71555f4f3262778277a955835
2010-08-03 18:18:41 +00:00
dan
b22aa4a63d Add comments to clarify the purpose of the pager "error state".
FossilOrigin-Name: fde4c59782e98366792e1552fd122e7d80a277ff
2010-08-03 15:57:09 +00:00
dan
937ac9da38 Add state diagram to comments in experimental version of pager.c.
FossilOrigin-Name: 16dcf5a6d3ebff9a734705693b5ac740f4ff2cc1
2010-08-03 12:48:45 +00:00
dan
763afe62e1 Incremental checkin on pager state refactoring.
FossilOrigin-Name: 0a636798bdb6961a47327091715b254f79add823
2010-08-03 06:42:39 +00:00
dan
d08640871c Experimental refactoring of the Pager object state.
FossilOrigin-Name: 03a240514aa07a22db787d221641253f23933e88
2010-08-02 14:32:52 +00:00
drh
1e8ed64ed0 Remove a test from sqlite3PagerCommitPhaseOne which is now always true
after the multi-file transaction fix.

FossilOrigin-Name: 6758f6a8ec97941e09847b309812b3194eb57f19
2010-07-30 16:44:29 +00:00
dan
51133eaefa Remove variable Pager.needSync, which was almost completely unused.
FossilOrigin-Name: 347f22a5b777af92873590a5b9af5a6498bef918
2010-07-30 15:43:13 +00:00
dan
6037b92a4e Merge trunk changes into experimental again.
FossilOrigin-Name: 87e0f4e184284bf775c2fc7c4e9a334f4f237c59
2010-07-30 14:39:13 +00:00
dan
1e01cf1b84 Changes to the comments describing the Pager.setMaster variable in pager.c. Add an assert() statement to verify that two master journal pointers are not written to a single journal file.
FossilOrigin-Name: ad78ccacb00e2f8a5ca93e2c9006266d9477fe48
2010-07-30 11:31:12 +00:00
drh
abfb62f9bd Cherry-pick the multi-file transaction fix for ticket [f3e5abed55] out of
the experimental branch.

FossilOrigin-Name: 40f7f0a583e6bba66cd006253a0ef4623ea74f17
2010-07-30 11:20:35 +00:00
dan
eb9444a4b3 Make sure a connection has an exclusive lock on all database files involved in a multi-file transaction before writing the master-journal pointer into any journal files. Fix for [f3e5abed55].
FossilOrigin-Name: 50c0f2202d21bbf6b593d75fd20f13c0fac23eff
2010-07-30 10:02:24 +00:00
dan
4d9c1b7fc4 Merge further trunk changes into experimental branch.
FossilOrigin-Name: fb847d70407b0f0e548919b7554f62bc1dab8a6c
2010-07-30 07:26:51 +00:00
drh
0cf68a9b17 Unconditionally include the pTmpSpace size in the estimate of the pager
memory used.

FossilOrigin-Name: 4b97f8640e9167cd355a24836fe74e4224cf12b9
2010-07-29 10:13:25 +00:00
dan
76d5918243 Merge trunk changes into experimental branch.
FossilOrigin-Name: aa81900153a2762cb2ad41e6710c1f1e7dc8b41e
2010-07-28 18:35:50 +00:00
drh
233f816b84 Improve the accuracy of the Pager heap usage estimate.
FossilOrigin-Name: ae89777e7f8bae2cdd3407395ea84c1b39577c4b
2010-07-28 17:36:11 +00:00
dan
502019c8bb Support FCNTL_CHUNK_SIZE on windows too.
FossilOrigin-Name: a038688c991435967b935946c2283707820bb5da
2010-07-28 14:26:17 +00:00
dan
da9fe0c327 Changes so that the xShmOpen VFS method is no longer required. Its job can be done by the first call to xShmMap. Rename xShmClose to xShmUnmap.
FossilOrigin-Name: f4780bde62c6c19146d2723c101540b8db898d38
2010-07-13 18:44:03 +00:00
drh
a485cccd0a Add a test case to cover code that was left untested by the journal_mode
simplification.

FossilOrigin-Name: bcdddba4f011cf008d29918bcac59131007a8138
2010-07-08 19:19:51 +00:00
dan
ab7e8d85a9 When rolling back a savepoint, reset the changeCountDone flag.
FossilOrigin-Name: fb62f4e3a7ceaa60ff6af2196ccf35b48759307e
2010-07-07 17:53:51 +00:00
dan
7fb574ecf7 Do not make the SQLITE_FCNTL_SIZE_HINT call if an error has already occurred during transaction commit.
FossilOrigin-Name: e92de834a39be07da5f0848d7ec5f1f6dff902a5
2010-07-07 16:18:45 +00:00
drh
146151cd23 Avoid the need for a NEVER() from pager_write_pagelist() by passing in
pPager as an extra parameter.

FossilOrigin-Name: b3179379437dbcb1d8e7f1f8f631a3e7df1a5c9a
2010-07-07 14:19:13 +00:00
dan
db10f08282 Simplify the previous commit by removing the pagerCheckForOrDeleteWAL() wrapper.
FossilOrigin-Name: a1324d125e2dd7004eaf8680f5f832ef17285087
2010-07-05 19:13:26 +00:00