]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
13 years agoExperimental changes to prevent buffer overreads when parsing a corrupt no-overread
drh [Tue, 3 Jan 2012 21:33:26 +0000 (21:33 +0000)] 
Experimental changes to prevent buffer overreads when parsing a corrupt
database file.

FossilOrigin-Name: 9e5add51eead8e2e938870df0d0071854cadf414

13 years agoMake sure filenames passed into sqlite3OsOpen() always have the extra
drh [Tue, 3 Jan 2012 14:50:45 +0000 (14:50 +0000)] 
Make sure filenames passed into sqlite3OsOpen() always have the extra
zero-terminators needed by sqlite3_uri_parameter().

FossilOrigin-Name: d73e93cfdc9441ade77b796dcdcf6eeb753cb398

13 years agoRemove the code that attempts to find the sector size from the OS and
drh [Mon, 2 Jan 2012 18:20:14 +0000 (18:20 +0000)] 
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

13 years agoChange page quantities in pcache1.c to unsigned.
drh [Mon, 2 Jan 2012 18:00:55 +0000 (18:00 +0000)] 
Change page quantities in pcache1.c to unsigned.

FossilOrigin-Name: da52e6e8b490508bc1ee4700aa45a79f398363da

13 years agoRemove an incorrect assert() in btree.c.
drh [Mon, 2 Jan 2012 16:38:57 +0000 (16:38 +0000)] 
Remove an incorrect assert() in btree.c.

FossilOrigin-Name: c1691d998a03fee3bef137ccf2e8ca45acac2df4

13 years agoMake sure large negative arguments to PRAGMA cache_size do not cause
drh [Mon, 2 Jan 2012 15:45:12 +0000 (15:45 +0000)] 
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

13 years agoHave SQLITE_FCNTL_SYNC_OMITTED use the normal method of returning an error code.
dan [Mon, 2 Jan 2012 14:50:12 +0000 (14:50 +0000)] 
Have SQLITE_FCNTL_SYNC_OMITTED use the normal method of returning an error code.

FossilOrigin-Name: fd3822f1f2e6ea181f663e99bfe788d8404176ee

13 years agoFix the build so that it works when SQLITE_ENABLE_8_3_NAMES=1.
drh [Mon, 2 Jan 2012 12:41:53 +0000 (12:41 +0000)] 
Fix the build so that it works when SQLITE_ENABLE_8_3_NAMES=1.

FossilOrigin-Name: d9761f15a175724c6c28a52335c979304737b188

13 years agoTweaks to improve testability.
drh [Sun, 1 Jan 2012 13:58:53 +0000 (13:58 +0000)] 
Tweaks to improve testability.

FossilOrigin-Name: e3a929e43180f41095cc2cd00c6b0781856a4474

13 years agoFix typos in comments. No changes to code.
drh [Sat, 31 Dec 2011 21:51:55 +0000 (21:51 +0000)] 
Fix typos in comments.  No changes to code.

FossilOrigin-Name: 6827338ecbe43e28da88d919851ebffde9f6d398

13 years agoAdd calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call...
dan [Sat, 31 Dec 2011 10:18:00 +0000 (10:18 +0000)] 
Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call in backup.c.

FossilOrigin-Name: 3e0833dbb736a1aca08d17941d6d33901b15a03b

13 years agoAdd calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call...
dan [Fri, 30 Dec 2011 18:16:02 +0000 (18:16 +0000)] 
Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call in pager.c.

FossilOrigin-Name: c17a3f5e5d72187c06b598ef071d43ef89328e19

13 years agoFix a typo in the documentation for PCACHE2. No changes to code.
drh [Fri, 30 Dec 2011 16:16:56 +0000 (16:16 +0000)] 
Fix a typo in the documentation for PCACHE2.  No changes to code.

FossilOrigin-Name: 46e7903ab993b08251c87239bd4a7320e6781cee

13 years agoChange dbstatus.test to account for the fact that the value reported by DBSTATUS_SCHE...
dan [Fri, 30 Dec 2011 16:09:50 +0000 (16:09 +0000)] 
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

13 years agoFix up requirements marks for syntax diagrams to reflect the new and improved
drh [Fri, 30 Dec 2011 16:07:37 +0000 (16:07 +0000)] 
Fix up requirements marks for syntax diagrams to reflect the new and improved
GIF renderings.

FossilOrigin-Name: 1bb23a3b5297e07e08c26362f71aef0c5b978875

13 years agoUpdate the text of requirements associated with sqlite3_pcache_methods2.
drh [Fri, 30 Dec 2011 15:17:47 +0000 (15:17 +0000)] 
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

13 years agoHold the database handle mutex for the duration of sqlite3_db_release_memory().
dan [Fri, 30 Dec 2011 11:43:59 +0000 (11:43 +0000)] 
Hold the database handle mutex for the duration of sqlite3_db_release_memory().

FossilOrigin-Name: eeaf2988004ff5343be60ab4ba2f809f76c94b51

13 years agoMinor changes to fix compilation with SQLITE_OMIT_WAL and SQLITE_OMIT_WSD defined.
dan [Fri, 30 Dec 2011 10:54:24 +0000 (10:54 +0000)] 
Minor changes to fix compilation with SQLITE_OMIT_WAL and SQLITE_OMIT_WSD defined.

FossilOrigin-Name: 26a513a8d2dddfde82f5fd0a0e1cc186c9b0df94

13 years agoChange an implicit i64-to-int cast in pager.c to an explicit cast.
dan [Fri, 30 Dec 2011 09:00:19 +0000 (09:00 +0000)] 
Change an implicit i64-to-int cast in pager.c to an explicit cast.

FossilOrigin-Name: 6a71ba9ce930838d44ed8d399075ba0723c9132b

13 years agoFix some typos in comments. No code changes.
dan [Fri, 30 Dec 2011 05:08:41 +0000 (05:08 +0000)] 
Fix some typos in comments. No code changes.

FossilOrigin-Name: 4edc5994b26e1fd3245572cb80242d07ba20a475

13 years agoDocumentation updates. No changes to code.
drh [Fri, 23 Dec 2011 20:49:26 +0000 (20:49 +0000)] 
Documentation updates.  No changes to code.

FossilOrigin-Name: a8a1a639fe441a533b11ada7368b2200edea7a05

13 years agoAvoid excess syncs when padding a transaction in a WAL.
drh [Fri, 23 Dec 2011 13:32:07 +0000 (13:32 +0000)] 
Avoid excess syncs when padding a transaction in a WAL.

FossilOrigin-Name: 1f24ae716df6232de768e245ea990049deee3c22

13 years agoMerge the POWERSAFE_OVERWRITE features and the use of statvfs() from the
drh [Fri, 23 Dec 2011 02:07:10 +0000 (02:07 +0000)] 
Merge the POWERSAFE_OVERWRITE features and the use of statvfs() from the
statvfs branch into trunk.

FossilOrigin-Name: 2370d70eb51d2259aaa8073d861ab79d6637cbd9

13 years agoChange the name ZERO_DAMAGE to the more descriptive POWERSAFE_OVERWRITE. statvfs
drh [Fri, 23 Dec 2011 01:04:17 +0000 (01:04 +0000)] 
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

13 years agoMerge the latest trunk changes into the statvfs branch.
drh [Fri, 23 Dec 2011 00:25:02 +0000 (00:25 +0000)] 
Merge the latest trunk changes into the statvfs branch.

FossilOrigin-Name: d5e36327c12f264429eb079bddbb71a310f76389

13 years agoAdd interfaces sqlite3_uri_boolean() and sqlite3_uri_int64() which are
drh [Fri, 23 Dec 2011 00:07:33 +0000 (00:07 +0000)] 
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

13 years agoFix minor issues with FTS and RTREE discovered by coverity.
drh [Thu, 22 Dec 2011 17:31:17 +0000 (17:31 +0000)] 
Fix minor issues with FTS and RTREE discovered by coverity.

FossilOrigin-Name: 1c27d842163e27c39bbe9409f50657b9de9ade6e

13 years agoCheck the return code from sqlite3_initialize() called from within
drh [Thu, 22 Dec 2011 17:10:35 +0000 (17:10 +0000)] 
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

13 years agoFix a problem in fts3_write.c causing stack memory to be referenced after it is out...
dan [Thu, 22 Dec 2011 15:30:46 +0000 (15:30 +0000)] 
Fix a problem in fts3_write.c causing stack memory to be referenced after it is out of scope.

FossilOrigin-Name: f9c4a7c8f4e5821b47c1393d6272e32416d8886c

13 years agoMerge recent trunk changes into the statvfs branch.
drh [Thu, 22 Dec 2011 02:10:57 +0000 (02:10 +0000)] 
Merge recent trunk changes into the statvfs branch.

FossilOrigin-Name: 995ec8a41a7d091d9d87cb8f18f62102c8fda7d7

13 years agoRemove a redundant assignment operator.
drh [Thu, 22 Dec 2011 01:46:04 +0000 (01:46 +0000)] 
Remove a redundant assignment operator.

FossilOrigin-Name: 19a6852a1e5905b35bc69b309951c5ec8ecd0bef

13 years agoFix other problems where 32-bit integer overflow may cause a problem. Two that requir...
dan [Wed, 21 Dec 2011 18:04:41 +0000 (18:04 +0000)] 
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

13 years agoAvoid 32-bit overflow when calculating the byte offset of an overflow page in SQLITE_...
dan [Wed, 21 Dec 2011 17:00:16 +0000 (17:00 +0000)] 
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

13 years agoAdd the ability to enable or disable SQLITE_IOCAP_ZERO_DAMAGE using a URI
drh [Wed, 21 Dec 2011 14:42:29 +0000 (14:42 +0000)] 
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

13 years agoRemove the code that tries to detect OOO header writes on a WAL recovery.
drh [Tue, 20 Dec 2011 22:18:51 +0000 (22:18 +0000)] 
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

13 years agoRefactor the sqlite3WalFrames() routine for clarity of presentation.
drh [Tue, 20 Dec 2011 20:13:25 +0000 (20:13 +0000)] 
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

13 years agoAssert that the isCommit parameter to sqlite3WalFrames() is zero if and
drh [Tue, 20 Dec 2011 13:13:09 +0000 (13:13 +0000)] 
Assert that the isCommit parameter to sqlite3WalFrames() is zero if and
only if the nTruncate parameter is zero.

FossilOrigin-Name: 979daf92e09305665d943e197b93b81139197c5b

13 years agoAdd test for WAL mode to unixexcl.test.
dan [Mon, 19 Dec 2011 15:46:51 +0000 (15:46 +0000)] 
Add test for WAL mode to unixexcl.test.

FossilOrigin-Name: 4d518bd4801c31bb1e4fb0329ad057e549035237

13 years agoMerge [21b76af6ed] into statvfs branch.
dan [Mon, 19 Dec 2011 11:57:41 +0000 (11:57 +0000)] 
Merge [21b76af6ed] into statvfs branch.

FossilOrigin-Name: e694f7b166144a0afba7846e1e18ad568b33a081

13 years agoFix a couple of test cases to account for the master-journal name related change...
dan [Mon, 19 Dec 2011 11:16:39 +0000 (11:16 +0000)] 
Fix a couple of test cases to account for the master-journal name related change in [cf3bccc2].

FossilOrigin-Name: 21b76af6edd48f665cdd3af5f99d477f030c7668

13 years agoModify test cases to account for the ZERO_DAMAGE change.
dan [Mon, 19 Dec 2011 10:07:56 +0000 (10:07 +0000)] 
Modify test cases to account for the ZERO_DAMAGE change.

FossilOrigin-Name: 68684495f1a62a41ad27934f3a6d3bc9d290a57d

13 years agoSome fixes to the test suite so that it works with ZERO_DAMAGE set to true.
drh [Mon, 19 Dec 2011 00:31:09 +0000 (00:31 +0000)] 
Some fixes to the test suite so that it works with ZERO_DAMAGE set to true.
Still lots more problems remain.

FossilOrigin-Name: 41891b231e20a1d32b1d7449e7863470eb38ca0a

13 years agoFor improved clarity of presentation,
drh [Sat, 17 Dec 2011 20:02:11 +0000 (20:02 +0000)] 
For improved clarity of presentation,
refactor some of the code associated with ZERO_DAMAGE and sector-size.

FossilOrigin-Name: 1dde96c9ee88af1c4e37c2e65acb7c0fe6a20e2a

13 years agoAdd SQLITE_IOCAP_ZERO_DAMAGE and enable it for both unix and windows. Use
drh [Sat, 17 Dec 2011 19:49:02 +0000 (19:49 +0000)] 
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

13 years agoFix a bad #endif with the previous check-in on this branch.
drh [Sat, 17 Dec 2011 16:25:17 +0000 (16:25 +0000)] 
Fix a bad #endif with the previous check-in on this branch.

FossilOrigin-Name: 915713ffe4d02ddf1d09a82e39a47b88d3d95ea0

13 years agoAdd support for statvfs() in os_unix.c, for determining the sector size.
drh [Sat, 17 Dec 2011 16:09:16 +0000 (16:09 +0000)] 
Add support for statvfs() in os_unix.c, for determining the sector size.
This causes many TCL test failures under Linux.

FossilOrigin-Name: e0d44450b9bec8ea7b057c1ad0a2088cd3f1f221

13 years agoMerge in changes that cause the first sector of the WAL file to be synced
drh [Sat, 17 Dec 2011 13:45:28 +0000 (13:45 +0000)] 
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

13 years agoAdd tests to walcrash3.test.
dan [Sat, 17 Dec 2011 08:10:34 +0000 (08:10 +0000)] 
Add tests to walcrash3.test.

FossilOrigin-Name: d76880428013ae2c5be00d87bb3e1695af6f706f

13 years agoMake sure the Salt-1 value in the WAL file is sequentially numbered at
drh [Sat, 17 Dec 2011 01:31:44 +0000 (01:31 +0000)] 
Make sure the Salt-1 value in the WAL file is sequentially numbered at
each checkpoint, as it says it should be in the documentation.

FossilOrigin-Name: 7b63b11b93396079131686abb36c4221354fa50e

13 years agoEnhance the WAL header sync so that it honors the various synchronous wal-header-sync
drh [Fri, 16 Dec 2011 21:26:26 +0000 (21:26 +0000)] 
Enhance the WAL header sync so that it honors the various synchronous
pragmas, settings, and device characteristics.

FossilOrigin-Name: 9799241f7de952c4d1ea8bf6508b577d2b57a370

13 years agoProposed changes that ensure that the WAL header is written prior to the
drh [Fri, 16 Dec 2011 19:34:36 +0000 (19:34 +0000)] 
Proposed changes that ensure that the WAL header is written prior to the
first commit mark.

FossilOrigin-Name: 91d0437c0702904d27f0ef7b1b52d0797efe1826

13 years agoAdd code for a test that was failing before the persistent-wal related changes of...
dan [Fri, 16 Dec 2011 17:01:04 +0000 (17:01 +0000)] 
Add code for a test that was failing before the persistent-wal related changes of [9ccc4a1be].

FossilOrigin-Name: 49d21ce50fcf535e470d284ccbb9eb4d4bcfa3a6

13 years agoMerge the fix for [a1fa75cbdd02] from the experimental branch. Also
drh [Fri, 16 Dec 2011 15:38:52 +0000 (15:38 +0000)] 
Merge the fix for [a1fa75cbdd02] from the experimental branch.  Also
fix the persistent-wal mode feature of truncating the WAL on close so that
it always truncates the WAL to zero bytes.

FossilOrigin-Name: 09ccc4a1be7ba81890f10aac6623dd90dab4f990

13 years agoImproved logging of master-journal name conflicts.
drh [Fri, 16 Dec 2011 15:11:39 +0000 (15:11 +0000)] 
Improved logging of master-journal name conflicts.

FossilOrigin-Name: b1005ef46cc2b46dd8e448ae1a9a9508bd5666ab

13 years agoMerge the nx-devkit changes into trunk.
drh [Fri, 16 Dec 2011 13:42:03 +0000 (13:42 +0000)] 
Merge the nx-devkit changes into trunk.

FossilOrigin-Name: cf3bccc2e944cd2dd3efb8554682994a06115f16

13 years agoExperimental fix for [a1fa75cbdd].
dan [Fri, 16 Dec 2011 13:24:27 +0000 (13:24 +0000)] 
Experimental fix for [a1fa75cbdd].

FossilOrigin-Name: 6492af76ea6585a1b377d69751af930c0ccfe688

13 years agoTweaks to the way multiplexSubOpen() works, for backwards compatibility.
drh [Fri, 16 Dec 2011 05:50:39 +0000 (05:50 +0000)] 
Tweaks to the way multiplexSubOpen() works, for backwards compatibility.

FossilOrigin-Name: bb40338887c912be70cb6fe3b760d87c14bb88a5

13 years agoFix a potential infinite loop (inserted by the previous check-in)
drh [Fri, 16 Dec 2011 05:09:46 +0000 (05:09 +0000)] 
Fix a potential infinite loop (inserted by the previous check-in)
on the multiplexWrite() method of the multiplexor.

FossilOrigin-Name: 022bf427c2edfe494ec7c222f436953ff56574a6

13 years agoThe xTruncate method for the multiplexor now changes surplus overflow
drh [Fri, 16 Dec 2011 04:57:32 +0000 (04:57 +0000)] 
The xTruncate method for the multiplexor now changes surplus overflow
files to zero-length by default.  Or if the "truncate" query parameter
is used, it actually deletes the surplus overflow files.  This allows
VACUUM to shrink the database again.

FossilOrigin-Name: 5aefef04d6cc3b734c3f05e036b3869a52248f4d

13 years agoCall sqlite3_log() with an appropriate message if unable to find a unique
drh [Fri, 16 Dec 2011 01:30:15 +0000 (01:30 +0000)] 
Call sqlite3_log() with an appropriate message if unable to find a unique
master-journal filename.

FossilOrigin-Name: e9177f7d4ec19f0841d0613990d2fb5725700ba1

13 years agoA better solution to being unable to find a unique master-journal filename:
drh [Fri, 16 Dec 2011 01:21:31 +0000 (01:21 +0000)] 
A better solution to being unable to find a unique master-journal filename:
just delete an existing master-journal and reuse it.

FossilOrigin-Name: 2685c2b949061f18bf6a4940eac8c8148873abb6

13 years agoMake sure the antipenultimate character of master-journal filenames is a "9"
drh [Fri, 16 Dec 2011 00:33:04 +0000 (00:33 +0000)] 
Make sure the antipenultimate character of master-journal filenames is a "9"
in order to avoid collisions with other files in 8+3 filename mode.  Also,
limit the number of attempts at finding a unique master-journal filename.

FossilOrigin-Name: 34a0483605d36e6cf03065ed0df33fb1f7c8a272

13 years agoAdd stdio support to the quota VFS.
drh [Thu, 15 Dec 2011 17:44:33 +0000 (17:44 +0000)] 
Add stdio support to the quota VFS.

FossilOrigin-Name: 322bd15f97143d39b3a88d5f6cf7afb454e0666e

13 years agoUse _commit() rather than FlushFileBuffers() as a substitute for fsync() quota-stdio
drh [Thu, 15 Dec 2011 17:42:35 +0000 (17:42 +0000)] 
Use _commit() rather than FlushFileBuffers() as a substitute for fsync()
on windows.  Also cast for C++ and add support for SQLITE_FCNTL_VFSNAME.

FossilOrigin-Name: e85cfe9a17a2943ee0cf7915451ff6cc05908030

13 years agoWhen deleting a file with the multiplexor VFS, also delete any overflow files that...
dan [Thu, 15 Dec 2011 17:00:10 +0000 (17:00 +0000)] 
When deleting a file with the multiplexor VFS, also delete any overflow files that exist.

FossilOrigin-Name: 3af1feaa35d3fb2e7be550cd32a727001b874938

13 years agoMake sure the chunksize in test_multiplex does not cause the pending byte
drh [Thu, 15 Dec 2011 13:29:12 +0000 (13:29 +0000)] 
Make sure the chunksize in test_multiplex does not cause the pending byte
to fall near the end of a chunk.  Adjust the chunksize upward as necessary
to prevent this.

FossilOrigin-Name: e05f8a2998f4f4cbdb65702baa65893c538b3d38

13 years agoFix some problems with dropped error codes in multiplexOpen().
dan [Thu, 15 Dec 2011 11:45:19 +0000 (11:45 +0000)] 
Fix some problems with dropped error codes in multiplexOpen().

FossilOrigin-Name: 2d50f78188e3297e8cefdf73cff51fa0a3b36e65

13 years agoIn the multiplexor, do not try to delete overflow files that do not exist.
drh [Thu, 15 Dec 2011 02:22:16 +0000 (02:22 +0000)] 
In the multiplexor, do not try to delete overflow files that do not exist.
And assume all but the last overflow file is the size of the chunk size.

FossilOrigin-Name: a822a80d3cfe42b2fca6f8c9ff11762993114a27

13 years agoMerge the nx-devkit changes into trunk. This includes the new
drh [Wed, 14 Dec 2011 18:33:13 +0000 (18:33 +0000)] 
Merge the nx-devkit changes into trunk.  This includes the new
SQLITE_FCNTL_VFSNAME file-control.

FossilOrigin-Name: da118e02c0576ce16f7a26663f59413316223d55

13 years agoMerge the VFSNAME file-control addition into the nx-devkit branch.
drh [Wed, 14 Dec 2011 18:28:18 +0000 (18:28 +0000)] 
Merge the VFSNAME file-control addition into the nx-devkit branch.

FossilOrigin-Name: 08c1dc517c1340737a55ad9012b7b06f72899c6f

13 years agoAdd a file-control that will discover the name of the bottom-level VFS and vfsname-filectrl
drh [Wed, 14 Dec 2011 17:53:36 +0000 (17:53 +0000)] 
Add a file-control that will discover the name of the bottom-level VFS and
all the shims in between.

FossilOrigin-Name: cdbfb553af02d10767a905489d9dfc57fc6be54e

13 years agoImprovements to comments. No code changes.
drh [Wed, 14 Dec 2011 01:38:12 +0000 (01:38 +0000)] 
Improvements to comments.  No code changes.

FossilOrigin-Name: 08bbbd8e38697908ab8ae0f6b512d01c32f7e4da

13 years agoTreat a zero return value from the Win32 APIs MultiByteToWideChar and WideCharToMulti...
mistachkin [Wed, 14 Dec 2011 00:37:45 +0000 (00:37 +0000)] 
Treat a zero return value from the Win32 APIs MultiByteToWideChar and WideCharToMultiByte as an error condition.

FossilOrigin-Name: c65e5a36f1a1c91cb3415158ebe0f5759cbcdf96

13 years agoHarden the utf8-to-mbcs converter in the quota module against failures.
drh [Wed, 14 Dec 2011 00:04:52 +0000 (00:04 +0000)] 
Harden the utf8-to-mbcs converter in the quota module against failures.

FossilOrigin-Name: 1cda511deb625868395a23c95346e14d0c300670

13 years agoEnhancements to test_quota.c: Remove the external dependency on
drh [Tue, 13 Dec 2011 23:26:10 +0000 (23:26 +0000)] 
Enhancements to test_quota.c:  Remove the external dependency on
sqlite3_win32_utf8_to_msbc().  Add an extra parameter to quota_fflush()
that will also do an fsync (or the equivalent).

FossilOrigin-Name: 92f4188f90e3cdd71f1457a6e0eb22615e4a54f4

13 years agoAdd a hard limit to the number of chunks a multiplexed database may consist of if...
dan [Tue, 13 Dec 2011 19:03:34 +0000 (19:03 +0000)] 
Add a hard limit to the number of chunks a multiplexed database may consist of if ENABLE_8_3_NAMES is defined.

FossilOrigin-Name: 43a1264088c57bf598787b7a9f5d7a2536603d67

13 years agoChange the SQLITE_EXTRA_INIT routine to take a single argument which is a
drh [Tue, 13 Dec 2011 18:22:38 +0000 (18:22 +0000)] 
Change the SQLITE_EXTRA_INIT routine to take a single argument which is a
pointer to a string.  Call SQLITE_EXTRA_INIT with a NULL argument.
Fixes to multiplexor to treat the VFS properly in corner cases.  Fix the
initialization of multiplex3.test.

FossilOrigin-Name: 8e65b9132530e46c62bd1352bfc2e9c29f57af5f

13 years agoAdd extra tests for the multiplexor VFS. No changes to code.
dan [Tue, 13 Dec 2011 16:40:33 +0000 (16:40 +0000)] 
Add extra tests for the multiplexor VFS. No changes to code.

FossilOrigin-Name: c7de6f683d0fec62bc138b4a53b5cccc80c736c3

13 years agoMerge the nx-devkit changes into trunk.
drh [Tue, 13 Dec 2011 15:37:12 +0000 (15:37 +0000)] 
Merge the nx-devkit changes into trunk.

FossilOrigin-Name: 03a70c3dae8d912fccd9d72c575dc372b198d238

13 years agoUpdate the multiplex.test script to conform to that found in the "experimental"
drh [Tue, 13 Dec 2011 15:25:06 +0000 (15:25 +0000)] 
Update the multiplex.test script to conform to that found in the "experimental"
branch off of trunk.

FossilOrigin-Name: 2eb79efbff9cdab843b172e9fa9fb400c542fab1

13 years agoMove the multiplexor changes in the experimental branch
drh [Tue, 13 Dec 2011 15:02:54 +0000 (15:02 +0000)] 
Move the multiplexor changes in the experimental branch
(check-ins [255d21499b] and [199f52bced]) into the nx-devkit branch.

FossilOrigin-Name: eb95d2f72c625bcfd0f8e9db1db2cb8799854b57

13 years agoWhen an sqlite3_auto_extension() function fails, report back its actual
drh [Tue, 13 Dec 2011 04:08:36 +0000 (04:08 +0000)] 
When an sqlite3_auto_extension() function fails, report back its actual
error code, not the generic SQLITE_ERROR.

FossilOrigin-Name: ce55f250f56fa3a1ca864f81e9e86f911b981490

13 years agoWhen the multiplexor FileSize procedure fails to open the file, assume that
drh [Tue, 13 Dec 2011 02:41:13 +0000 (02:41 +0000)] 
When the multiplexor FileSize procedure fails to open the file, assume that
the file is zero bytes in size.

FossilOrigin-Name: dc8118cd89da71f2035c6ee07c0edb772bba2186

13 years agoAdd a compile-time shutdown procedure to be called by sqlite3_shutdown()
drh [Tue, 13 Dec 2011 01:34:21 +0000 (01:34 +0000)] 
Add a compile-time shutdown procedure to be called by sqlite3_shutdown()
to undo the effects of the compile-time initialization procedure.

FossilOrigin-Name: c2ed86f5945662a4ddcdc7b303df3f64fb3bf17d

13 years agoBackport a minimal set of changes needed to get 8+3 filenames and the
drh [Mon, 12 Dec 2011 20:01:12 +0000 (20:01 +0000)] 
Backport a minimal set of changes needed to get 8+3 filenames and the
multiplexor shim playing well together.

FossilOrigin-Name: c4e2ce486217c96373836bfe641f46abf891799a

13 years agoFix os_unix.c so that, unless 8.3 filenames are actually in use, journal and wal...
dan [Mon, 12 Dec 2011 19:48:43 +0000 (19:48 +0000)] 
Fix os_unix.c so that, unless 8.3 filenames are actually in use, journal and wal file permissions are assigned correctly even if SQLITE_ENABLE_8_3_NAMES is defined.

FossilOrigin-Name: 169e12295cca701443746b1209bd6a7714fd8988

13 years agoMake sure the quota logic is usable as C++.
drh [Mon, 12 Dec 2011 19:47:25 +0000 (19:47 +0000)] 
Make sure the quota logic is usable as C++.

FossilOrigin-Name: f4534bd3023a599691018f35389a76045e49d831

13 years agoChange the multiplexor VFS so that xTruncate is a no-op on database files.
dan [Mon, 12 Dec 2011 18:55:44 +0000 (18:55 +0000)] 
Change the multiplexor VFS so that xTruncate is a no-op on database files.

FossilOrigin-Name: ee1e012256ae8010b6b6c4895a74b6883f20e73c

13 years agoFix for the xFileSize method of test_multiplex.c when used on a file opened with...
dan [Mon, 12 Dec 2011 18:21:44 +0000 (18:21 +0000)] 
Fix for the xFileSize method of test_multiplex.c when used on a file opened with the DELETEONCLOSE flag set.

FossilOrigin-Name: 713071c493e9937a20c436b07299df428249e378

13 years agoAdd magic comments to shell.c to make it easier for scripts to
drh [Mon, 12 Dec 2011 16:51:50 +0000 (16:51 +0000)] 
Add magic comments to shell.c to make it easier for scripts to
insert additional version information displays for custom builds.

FossilOrigin-Name: 9b2691aa911289d74bfe3edf45937a33fb7eaa8d

13 years agoIn the multiplexor shim, when using 8+3 filenames, begin numbering journal
drh [Sun, 11 Dec 2011 22:44:09 +0000 (22:44 +0000)] 
In the multiplexor shim, when using 8+3 filenames, begin numbering journal
overflow files with 101 instead of 001 to avoid name collisions with the
main database file.

FossilOrigin-Name: 05bf8a0b17a13a581ac973dc84ceaf66532d7f92

13 years agoUpdate comments describing the flattening optimization in select.c.
drh [Sun, 11 Dec 2011 21:51:04 +0000 (21:51 +0000)] 
Update comments describing the flattening optimization in select.c.

FossilOrigin-Name: dab4c137a852222f11179fa2ade52d17a4206dd2

13 years agoFix STAT3 so that it works with the new uninitialized register logic of
drh [Sun, 11 Dec 2011 02:30:35 +0000 (02:30 +0000)] 
Fix STAT3 so that it works with the new uninitialized register logic of
the VDBE.  Ticket [7bbfb7d4422ff]

FossilOrigin-Name: d11a57985c394772043c63d4c2b534944be0a664

13 years agoFix harmless compiler warnings.
drh [Sun, 11 Dec 2011 02:29:25 +0000 (02:29 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 1e6a698aab9270637d3ea00fd6b0e94f4172e875

13 years agoMinor cleanups of the compound-subquery flattening logic. New test cases
drh [Sat, 10 Dec 2011 23:18:32 +0000 (23:18 +0000)] 
Minor cleanups of the compound-subquery flattening logic.  New test cases
added for joins the compound subquery.

FossilOrigin-Name: 5061d85ff934db3c217c97acbbbed3286d9e02aa

13 years agoAllow UNION ALL compounds to be promoted up to replace a simple wrapper
drh [Sat, 10 Dec 2011 17:17:17 +0000 (17:17 +0000)] 
Allow UNION ALL compounds to be promoted up to replace a simple wrapper
SELECT even if the compounds are joins.

FossilOrigin-Name: 3d4b4f4fb7c1d9f1c742fef884383e9f50f8630e

13 years agoImport the experimental parse-tree explainer, with fixes, from the
drh [Sat, 10 Dec 2011 15:55:01 +0000 (15:55 +0000)] 
Import the experimental parse-tree explainer, with fixes, from the
tree-explain branch.

FossilOrigin-Name: bcbc7152d49107afa926c8950360c61a6cf3d244

13 years agoMerge the latest trunk changes into tree-explain branch. tree-explain
drh [Sat, 10 Dec 2011 14:44:31 +0000 (14:44 +0000)] 
Merge the latest trunk changes into tree-explain branch.

FossilOrigin-Name: 1a360da0f8314f232c224c71829646bc7558892b

13 years agoAlways use _msize() to get memory allocation sizes on windows, without having
drh [Sat, 10 Dec 2011 13:49:44 +0000 (13:49 +0000)] 
Always use _msize() to get memory allocation sizes on windows, without having
to do anything special in the makefile.

FossilOrigin-Name: 256e27bd118ed3ab6ecb19ad6a6494b71ac9bdd5

13 years agoChange the VDBE so that all registers are initialized to "Invalid" instead of
drh [Fri, 9 Dec 2011 18:06:44 +0000 (18:06 +0000)] 
Change the VDBE so that all registers are initialized to "Invalid" instead of
NULL and report errors on any attempted read of an Invalid register.  This
will help prevent future bugs similar to [7bbfb7d442].

FossilOrigin-Name: 0064bab77149768640d7758a3e271d5a1d63b256