Commit Graph

9696 Commits

Author SHA1 Message Date
drh e349519f1e Change the unix VFS so that it ignores all but the least-significant bit
of the syncDir flag to xDelete.  Add an assert to prove that the core only
ever uses that one bit.

FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c
2012-01-05 16:07:30 +00:00
drh e0711b47b1 Ensure 8-byte alignment of Index.aiRowEst[] elements even if the size of
an Index object is not a multiple of 8 bytes.

FossilOrigin-Name: 1378f905d37544701776d38987fe7a312b255983
2012-01-05 12:38:02 +00:00
drh bce51350d6 Remove the SQLITE_FCNTL_SYNC_OMITTED cases from the unix and windows VFSes
as they are no longer needed because of check-in [fd3822f1f2].

FossilOrigin-Name: 7cf568a101cda20ab6005bd250154b7f6960193a
2012-01-05 11:43:10 +00:00
drh e4c88c0c38 Fix typos and comments and make minor changes to a few function names,
as suggested by readership.

FossilOrigin-Name: e9d05cbb7676cbda83f1b3b71447404d7edde898
2012-01-04 12:57:45 +00:00
drh 52bcde0e2d Make sure filenames passed into sqlite3OsOpen() always have the extra
zero-terminators needed by sqlite3_uri_parameter().

FossilOrigin-Name: d73e93cfdc9441ade77b796dcdcf6eeb753cb398
2012-01-03 14:50:45 +00:00
drh 8942d4125e Remove the code that attempts to find the sector size from the OS and
hardcode the xSectorSize methods of the unix and windows VFSes to return
SQLITE_DEFAULT_SECTOR_SIZE, which is now set to 4096 unless overridden.

FossilOrigin-Name: 03d8362cd2cadab8e1cc5b18a3194152f2bd0a84
2012-01-02 18:20:14 +00:00
drh a69085cf5f Change page quantities in pcache1.c to unsigned.
FossilOrigin-Name: da52e6e8b490508bc1ee4700aa45a79f398363da
2012-01-02 18:00:55 +00:00
drh 2f32fbae31 Remove an incorrect assert() in btree.c.
FossilOrigin-Name: c1691d998a03fee3bef137ccf2e8ca45acac2df4
2012-01-02 16:38:57 +00:00
drh 5dc2bcda7e Make sure large negative arguments to PRAGMA cache_size do not cause
32-bit signed integer overflow.  Also correct a requirements mark.

FossilOrigin-Name: 17c30634a71051158f8d37fd51b3c2a125ad8bd2
2012-01-02 15:45:12 +00:00
dan aa584af088 Have SQLITE_FCNTL_SYNC_OMITTED use the normal method of returning an error code.
FossilOrigin-Name: fd3822f1f2e6ea181f663e99bfe788d8404176ee
2012-01-02 14:50:12 +00:00
drh 7d39e17eef Fix the build so that it works when SQLITE_ENABLE_8_3_NAMES=1.
FossilOrigin-Name: d9761f15a175724c6c28a52335c979304737b188
2012-01-02 12:41:53 +00:00
drh 20e226d979 Tweaks to improve testability.
FossilOrigin-Name: e3a929e43180f41095cc2cd00c6b0781856a4474
2012-01-01 13:58:53 +00:00
drh b8a45bbdb8 Fix typos in comments. No changes to code.
FossilOrigin-Name: 6827338ecbe43e28da88d919851ebffde9f6d398
2011-12-31 21:51:55 +00:00
dan 23a3de398e Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call in backup.c.
FossilOrigin-Name: 3e0833dbb736a1aca08d17941d6d33901b15a03b
2011-12-31 10:18:00 +00:00
dan b3ce3d6d92 Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call in pager.c.
FossilOrigin-Name: c17a3f5e5d72187c06b598ef071d43ef89328e19
2011-12-30 18:16:02 +00:00
drh 50cc5c2789 Fix a typo in the documentation for PCACHE2. No changes to code.
FossilOrigin-Name: 46e7903ab993b08251c87239bd4a7320e6781cee
2011-12-30 16:16:56 +00:00
dan 4373bb880c Change dbstatus.test to account for the fact that the value reported by DBSTATUS_SCHEMA_USED may be slightly lower than the actual memory used on osx
FossilOrigin-Name: 6f2010c862105a113b55e90018b86a9ece298d4d
2011-12-30 16:09:50 +00:00
drh f4692ccc79 Fix up requirements marks for syntax diagrams to reflect the new and improved
GIF renderings.

FossilOrigin-Name: 1bb23a3b5297e07e08c26362f71aef0c5b978875
2011-12-30 16:07:37 +00:00
drh 2faf5f5e9e Update the text of requirements associated with sqlite3_pcache_methods2.
Update requirements marks embedded in code.  All of the above are comment
changes only; there are no changes to code in this check-in.

FossilOrigin-Name: f945c41a72519d6bcfb478730ba0254bb24e5331
2011-12-30 15:17:47 +00:00
dan d9bb3a9749 Hold the database handle mutex for the duration of sqlite3_db_release_memory().
FossilOrigin-Name: eeaf2988004ff5343be60ab4ba2f809f76c94b51
2011-12-30 11:43:59 +00:00
dan 0420b74a94 Minor changes to fix compilation with SQLITE_OMIT_WAL and SQLITE_OMIT_WSD defined.
FossilOrigin-Name: 26a513a8d2dddfde82f5fd0a0e1cc186c9b0df94
2011-12-30 10:54:24 +00:00
dan 0e208252c9 Change an implicit i64-to-int cast in pager.c to an explicit cast.
FossilOrigin-Name: 6a71ba9ce930838d44ed8d399075ba0723c9132b
2011-12-30 09:00:19 +00:00
dan 44659c9417 Fix some typos in comments. No code changes.
FossilOrigin-Name: 4edc5994b26e1fd3245572cb80242d07ba20a475
2011-12-30 05:08:41 +00:00
drh 4eaff93e4b Documentation updates. No changes to code.
FossilOrigin-Name: a8a1a639fe441a533b11ada7368b2200edea7a05
2011-12-23 20:49:26 +00:00
drh 4e5e108e83 Avoid excess syncs when padding a transaction in a WAL.
FossilOrigin-Name: 1f24ae716df6232de768e245ea990049deee3c22
2011-12-23 13:32:07 +00:00
drh cc8d10a0fd Merge the POWERSAFE_OVERWRITE features and the use of statvfs() from the
statvfs branch into trunk.

FossilOrigin-Name: 2370d70eb51d2259aaa8073d861ab79d6637cbd9
2011-12-23 02:07:10 +00:00
drh cb15f35f3b Change the name ZERO_DAMAGE to the more descriptive POWERSAFE_OVERWRITE.
The query parameter used to control this device characteristic is now "psow".

FossilOrigin-Name: 6191c5e45175f5c6040e891843b0725a929d6dd7
2011-12-23 01:04:17 +00:00
drh bec7c97899 Merge the latest trunk changes into the statvfs branch.
FossilOrigin-Name: d5e36327c12f264429eb079bddbb71a310f76389
2011-12-23 00:25:02 +00:00
drh 9291372094 Add interfaces sqlite3_uri_boolean() and sqlite3_uri_int64() which are
wrappers around sqlite3_uri_parameter() combined with internal routines for
converting strings to booleans and 64-bit integers.

FossilOrigin-Name: 83d26b9a9115eadac9e59a33d608bca0ab2519e3
2011-12-23 00:07:33 +00:00
drh 64803bd2fa Fix minor issues with FTS and RTREE discovered by coverity.
FossilOrigin-Name: 1c27d842163e27c39bbe9409f50657b9de9ade6e
2011-12-22 17:31:17 +00:00
drh de0f18154e Check the return code from sqlite3_initialize() called from within
sqlite3_soft_heap_limit64() and return an error from sqlite3_soft_heap_limit64()
if sqlite3_initialize() fails.

FossilOrigin-Name: 676acce274fec692a1eb34d27ee4b1327b4b3334
2011-12-22 17:10:35 +00:00
dan 0c8cda6e0d Fix a problem in fts3_write.c causing stack memory to be referenced after it is out of scope.
FossilOrigin-Name: f9c4a7c8f4e5821b47c1393d6272e32416d8886c
2011-12-22 15:30:46 +00:00
drh 3a7df358ab Merge recent trunk changes into the statvfs branch.
FossilOrigin-Name: 995ec8a41a7d091d9d87cb8f18f62102c8fda7d7
2011-12-22 02:10:57 +00:00
drh 3b5b351b65 Remove a redundant assignment operator.
FossilOrigin-Name: 19a6852a1e5905b35bc69b309951c5ec8ecd0bef
2011-12-22 01:46:04 +00:00
dan 7c3210e641 Fix other problems where 32-bit integer overflow may cause a problem. Two that require an improbably large sub-journal and two in test harness code.
FossilOrigin-Name: c723e3e18a008922281d8d6e8e3aba07941eb173
2011-12-21 18:04:41 +00:00
dan 27d47fbe6e Avoid 32-bit overflow when calculating the byte offset of an overflow page in SQLITE_DIRECT_OVERFLOW_READ code. Fix for [ac0ff496b7].
FossilOrigin-Name: c5256b59ad70104c1e181b9f49d1d712cf4cc9f6
2011-12-21 17:00:16 +00:00
drh f12b3f609f Add the ability to enable or disable SQLITE_IOCAP_ZERO_DAMAGE using a URI
parameter for both unix and windows.  Add a file-control to query or disable
the ZERO_DAMAGE setting.  Add the -uri option to the "sqlite3" TCL command
in tclsqlite3.c.  Allow the sqlite3_uri_parameter() interface to accept a
NULL pointer for its first parameter.

FossilOrigin-Name: c83627b73285f883719845c1b9fe85f378f28dd2
2011-12-21 14:42:29 +00:00
drh f694aa6454 Remove the code that tries to detect OOO header writes on a WAL recovery.
The code is made obsolete by syncing the WAL header.

FossilOrigin-Name: 7ac713a14e24c48651c2a97acc9839850fa7f3c3
2011-12-20 22:18:51 +00:00
drh d992b150c7 Refactor the sqlite3WalFrames() routine for clarity of presentation.
Do the padded transaction sync as the write pointer crosses the final
sector boundary instead of at the end, for efficiency.  Always sync
the WAL header immediately after it is written.

FossilOrigin-Name: 92c73b421b6242b09247dfb759777a531a107523
2011-12-20 20:13:25 +00:00
drh 4120994fdf Assert that the isCommit parameter to sqlite3WalFrames() is zero if and
only if the nTruncate parameter is zero.

FossilOrigin-Name: 979daf92e09305665d943e197b93b81139197c5b
2011-12-20 13:13:09 +00:00
dan 19969d96ce Add test for WAL mode to unixexcl.test.
FossilOrigin-Name: 4d518bd4801c31bb1e4fb0329ad057e549035237
2011-12-19 15:46:51 +00:00
dan 3604d7c687 Merge [21b76af6ed] into statvfs branch.
FossilOrigin-Name: e694f7b166144a0afba7846e1e18ad568b33a081
2011-12-19 11:57:41 +00:00
dan 7f9026dd94 Fix a couple of test cases to account for the master-journal name related change in [cf3bccc2].
FossilOrigin-Name: 21b76af6edd48f665cdd3af5f99d477f030c7668
2011-12-19 11:16:39 +00:00
dan 0774bb59c6 Modify test cases to account for the ZERO_DAMAGE change.
FossilOrigin-Name: 68684495f1a62a41ad27934f3a6d3bc9d290a57d
2011-12-19 10:07:56 +00:00
drh 1eaaf93a83 Some fixes to the test suite so that it works with ZERO_DAMAGE set to true.
Still lots more problems remain.

FossilOrigin-Name: 41891b231e20a1d32b1d7449e7863470eb38ca0a
2011-12-19 00:31:09 +00:00
drh 374f4a0447 For improved clarity of presentation,
refactor some of the code associated with ZERO_DAMAGE and sector-size.

FossilOrigin-Name: 1dde96c9ee88af1c4e37c2e65acb7c0fe6a20e2a
2011-12-17 20:02:11 +00:00
drh 8bbaa89d8d Add SQLITE_IOCAP_ZERO_DAMAGE and enable it for both unix and windows. Use
this device characteristic to reduce the required work in journaling.
A side effect is that this changes the default page exists back to 1024
even with the use of statvfs().

FossilOrigin-Name: a0be6ea464695fdf1eaf2b7cf0652778617814f2
2011-12-17 19:49:02 +00:00
drh 9c0e29371e Fix a bad #endif with the previous check-in on this branch.
FossilOrigin-Name: 915713ffe4d02ddf1d09a82e39a47b88d3d95ea0
2011-12-17 16:25:17 +00:00
drh 1da88f025f Add support for statvfs() in os_unix.c, for determining the sector size.
This causes many TCL test failures under Linux.

FossilOrigin-Name: e0d44450b9bec8ea7b057c1ad0a2088cd3f1f221
2011-12-17 16:09:16 +00:00
drh fe6163d7cf Merge in changes that cause the first sector of the WAL file to be synced
when the WAL restarts.  This is a fix for the power-loss corruption
problem described in ticket [ff5be73dee086]

FossilOrigin-Name: 44ca4d123385d759c11919865525c998c2e35bdb
2011-12-17 13:45:28 +00:00