]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 years agoFix handling of schema changes mid-session.
dan [Thu, 24 Mar 2011 16:53:57 +0000 (16:53 +0000)] 
Fix handling of schema changes mid-session.

FossilOrigin-Name: 76d2d2ad3b2a5171393b7894f35f463ff284e53b

15 years agoFix handling of schema mismatches in sqlite3session.c so that it matches the docs...
dan [Thu, 24 Mar 2011 16:04:54 +0000 (16:04 +0000)] 
Fix handling of schema mismatches in sqlite3session.c so that it matches the docs in sqlite3session.h.

FossilOrigin-Name: 506a0d7a710e1ff2f367821e73f5080fcf63fbc5

15 years agoStore primary key definitions for modified tables in changesets. Add the sqlite3chang...
dan [Thu, 24 Mar 2011 11:22:59 +0000 (11:22 +0000)] 
Store primary key definitions for modified tables in changesets. Add the sqlite3changeset_pk() API to extract this data from a changeset iterator.

FossilOrigin-Name: 54298ee5ed183d1f1c49524f25e8ae1407f3d4b5

15 years agoThe changes to fix [f7b4edece25c9948] mean that the schema is always loaded
drh [Thu, 24 Mar 2011 01:34:03 +0000 (01:34 +0000)] 
The changes to fix [f7b4edece25c9948] mean that the schema is always loaded
whenever a prepared statement is running.  This means that a couple of
branches can be eliminated and one operand of OP_ParseSchema can be removed.

FossilOrigin-Name: b6e268fce12829f058f1dfa223731ec8479493f8

15 years agoFix a signed/unsigned comparison compiler warning.
drh [Wed, 23 Mar 2011 22:54:59 +0000 (22:54 +0000)] 
Fix a signed/unsigned comparison compiler warning.

FossilOrigin-Name: c81da6f98d89935442c447a51736e11baf5a7bc1

15 years agoUpdate the test_vfstrace.c shim to conform to the new VFS interface for
drh [Wed, 23 Mar 2011 22:51:46 +0000 (22:51 +0000)] 
Update the test_vfstrace.c shim to conform to the new VFS interface for
xSetSystemCall and xGetSystemCall.

FossilOrigin-Name: ad4dc7b95f94fc9a5430c1305fb61d9de79b3365

15 years agoMerge in all the latest changes from the trunk, and especially the interface
drh [Wed, 23 Mar 2011 22:48:46 +0000 (22:48 +0000)] 
Merge in all the latest changes from the trunk, and especially the interface
changes to the SystemCall methods of the VFS.

FossilOrigin-Name: 9c3a6e479988e96086bef00c79dbce508a14da0d

15 years agoChange the xSetSyscall methods of the VFS so that they do not cast object
drh [Wed, 23 Mar 2011 22:02:23 +0000 (22:02 +0000)] 
Change the xSetSyscall methods of the VFS so that they do not cast object
pointers into function pointers.  Fix other unrelated compiler warnings.

FossilOrigin-Name: e059152adce3a8fb693f082b82b5669a238c8d6f

15 years agoIncrease the upper bound on SQLITE_MAX_ATTACHED from 30 to 62.
drh [Wed, 23 Mar 2011 18:22:34 +0000 (18:22 +0000)] 
Increase the upper bound on SQLITE_MAX_ATTACHED from 30 to 62.

FossilOrigin-Name: 7aaf8772274422f5020fad9eea490e195170720f

15 years agoFix a bug in fts4 to do with matchinfo and deferred tokens.
dan [Wed, 23 Mar 2011 17:10:43 +0000 (17:10 +0000)] 
Fix a bug in fts4 to do with matchinfo and deferred tokens.

FossilOrigin-Name: 30d42dc66f19ef5cc5b27d6273eadf56619a3ce8

15 years agoAdd the "indirect flag" to the changeset blob format. Also the sqlite3session_indirec...
dan [Wed, 23 Mar 2011 16:03:11 +0000 (16:03 +0000)] 
Add the "indirect flag" to the changeset blob format. Also the sqlite3session_indirect() API.

FossilOrigin-Name: 1feaf2d35fd9ec777319717ae2c2929d66fe7baa

15 years agoIn the shell, make sure the ".log" command has at least one argument.
drh [Wed, 23 Mar 2011 11:16:22 +0000 (11:16 +0000)] 
In the shell, make sure the ".log" command has at least one argument.

FossilOrigin-Name: 1ed5e361ca7bfa9226fec265704394e0f228f0c5

15 years agoFix a numbering issue in rtree6.test. Add a couple of extra tests.
dan [Wed, 23 Mar 2011 10:52:23 +0000 (10:52 +0000)] 
Fix a numbering issue in rtree6.test. Add a couple of extra tests.

FossilOrigin-Name: 0b7668a71ef8995ea0306c7d890f87761961426e

15 years agoChange the rtree module to support queries with multiple comparison operators (i...
dan [Wed, 23 Mar 2011 10:38:49 +0000 (10:38 +0000)] 
Change the rtree module to support queries with multiple comparison operators (i.e. > or <) of the same type on a single column.

FossilOrigin-Name: 387b55aa9bb0f978641f9c2fa40f84fd98662047

15 years agoAdd API function sqlite3_preupdate_depth(), for determining the depth of the trigger...
dan [Tue, 22 Mar 2011 18:45:29 +0000 (18:45 +0000)] 
Add API function sqlite3_preupdate_depth(), for determining the depth of the trigger stack from within a pre-update callback.

FossilOrigin-Name: bdea70895c2c686a4dd3f4bf0a475fd1501d9551

15 years agoFix a crash that can follow an OOM when "all tables" are registered with a session...
dan [Tue, 22 Mar 2011 16:54:12 +0000 (16:54 +0000)] 
Fix a crash that can follow an OOM when "all tables" are registered with a session module.

FossilOrigin-Name: 183c236e991faaabdc768e52e926c52cf4a7abc9

15 years agoIf a NULL pointer is passed to sqlite3session_attach() in place of a table name,...
dan [Tue, 22 Mar 2011 15:21:03 +0000 (15:21 +0000)] 
If a NULL pointer is passed to sqlite3session_attach() in place of a table name, attach all database tables to the session object.

FossilOrigin-Name: e9037e4e4ccaa5c633759c4d041b60b631b92c6c

15 years agoAdd OOM tests and related fixes for the session module.
dan [Tue, 22 Mar 2011 12:08:00 +0000 (12:08 +0000)] 
Add OOM tests and related fixes for the session module.

FossilOrigin-Name: 06048a68b351e3eb15a890cb54db8a1d4b345fbc

15 years agoFix a couple typos for consistency in sessions documentation.
shaneh [Tue, 22 Mar 2011 02:03:23 +0000 (02:03 +0000)] 
Fix a couple typos for consistency in sessions documentation.

FossilOrigin-Name: 510198f171b9f77a4ad49c06c978c5fbb3a5b7f9

15 years agoRemove some unreachable code in sqlite3session.c. Add test cases.
dan [Mon, 21 Mar 2011 19:41:29 +0000 (19:41 +0000)] 
Remove some unreachable code in sqlite3session.c. Add test cases.

FossilOrigin-Name: 39cdfa5324ae91bfbbac733b1e3e2d33ca883340

15 years agoMerge in the sqlite3_db_config() enhancements for enabling and disabling
drh [Mon, 21 Mar 2011 17:17:49 +0000 (17:17 +0000)] 
Merge in the sqlite3_db_config() enhancements for enabling and disabling
FKs and triggers from trunk.

FossilOrigin-Name: 2b3c8b9d9aa909f64a29ed8167de24c328c50d85

15 years agoAdd the ability to enable and disable foreign key constraints and triggers
drh [Mon, 21 Mar 2011 17:15:58 +0000 (17:15 +0000)] 
Add the ability to enable and disable foreign key constraints and triggers
using calls to sqlite3_db_config().

FossilOrigin-Name: 09e167f9c14625924b17bbb1f292f89ac9ddc93a

15 years agoAdd start of fault-injection tests for session module. Fix some bugs related to the...
dan [Mon, 21 Mar 2011 16:17:42 +0000 (16:17 +0000)] 
Add start of fault-injection tests for session module. Fix some bugs related to the same.

FossilOrigin-Name: 32e95164d1192b87b1ab019549fd2394642cd3fe

15 years agoClarify handling of NULL values in PK columns in sqlite3session.h. Add tests and...
dan [Mon, 21 Mar 2011 11:55:06 +0000 (11:55 +0000)] 
Clarify handling of NULL values in PK columns in sqlite3session.h. Add tests and fixes for the same.

FossilOrigin-Name: aed4273054cbd150c86b36ea951d17c981633ba0

15 years agoFix session module problems with real (floating point) values.
dan [Mon, 21 Mar 2011 11:03:24 +0000 (11:03 +0000)] 
Fix session module problems with real (floating point) values.

FossilOrigin-Name: a192d04f4e3a9e4960a4d96d1d3ee8635bc1034d

15 years agoFix some typos in sqlite3session.h.
dan [Mon, 21 Mar 2011 07:23:09 +0000 (07:23 +0000)] 
Fix some typos in sqlite3session.h.

FossilOrigin-Name: 0853e530cc8d96f025f5160540e8ab3243dea11b

15 years agoDocumentation format updates to sqlite3session.h.
dan [Sun, 20 Mar 2011 11:20:41 +0000 (11:20 +0000)] 
Documentation format updates to sqlite3session.h.

FossilOrigin-Name: f227f60210fba3930f3050aebb1facee8bac9c0b

15 years agoFix a problem involving session objects and attached databases.
dan [Sat, 19 Mar 2011 19:19:26 +0000 (19:19 +0000)] 
Fix a problem involving session objects and attached databases.

FossilOrigin-Name: ad91d30073a8faa7eb064dd2e1cc4d2297d7b3f8

15 years agoFix a bug in changeset generation code.
dan [Sat, 19 Mar 2011 18:46:15 +0000 (18:46 +0000)] 
Fix a bug in changeset generation code.

FossilOrigin-Name: 825df75ba453c853953e17ec29653e11c46f92bb

15 years agoMove session1.test from test/ to ext/session/.
dan [Sat, 19 Mar 2011 17:07:57 +0000 (17:07 +0000)] 
Move session1.test from test/ to ext/session/.

FossilOrigin-Name: c4436a936ab302aec3b7f41a4552f69ad5815744

15 years agoFix a problem with resizing a hash table in sqlite3session.c.
dan [Sat, 19 Mar 2011 16:26:11 +0000 (16:26 +0000)] 
Fix a problem with resizing a hash table in sqlite3session.c.

FossilOrigin-Name: 6e5907e14d3316d56313243c4f8ce8f14d0858fc

15 years agoFix some bugs in sqlite3changeset_apply().
dan [Sat, 19 Mar 2011 15:37:02 +0000 (15:37 +0000)] 
Fix some bugs in sqlite3changeset_apply().

FossilOrigin-Name: 7250318dda542c5bbf28852c1f1d0f3c52ae8f96

15 years agoFix a problem with INTEGER PRIMARY KEY columns and the pre-update hook.
dan [Sat, 19 Mar 2011 08:38:50 +0000 (08:38 +0000)] 
Fix a problem with INTEGER PRIMARY KEY columns and the pre-update hook.

FossilOrigin-Name: 24d4d5dd007197a141555bcca6f2ac9ab47cde80

15 years agoMerge the fix to ticket [f7b4edece25c99485] into the sessions branch.
drh [Sat, 19 Mar 2011 02:37:38 +0000 (02:37 +0000)] 
Merge the fix to ticket [f7b4edece25c99485] into the sessions branch.

FossilOrigin-Name: 1b736ac2934f2361dee5062e9033cbf26b41fc3a

15 years agoAdd a test case to verify that ticket [f7b4edece25c994857] is fixed.
drh [Sat, 19 Mar 2011 02:04:02 +0000 (02:04 +0000)] 
Add a test case to verify that ticket [f7b4edece25c994857] is fixed.

FossilOrigin-Name: eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe

15 years agoAdd a generation counter to the Schema object and enhance OP_VerifySchema
drh [Fri, 18 Mar 2011 21:55:46 +0000 (21:55 +0000)] 
Add a generation counter to the Schema object and enhance OP_VerifySchema
to also check the Schema generation.  Fix for
ticket [f7b4edece25c99].

FossilOrigin-Name: 36c04dd1695f0899b53ce58738181b146fc005ed

15 years agoHold the database mutex for the duration of an sqlite3changeset_apply() call. Also...
dan [Fri, 18 Mar 2011 18:03:13 +0000 (18:03 +0000)] 
Hold the database mutex for the duration of an sqlite3changeset_apply() call. Also for the duration of all sqlite3session_xxx() calls.

FossilOrigin-Name: c615c38c3283e21c33550c093099a793761123a7

15 years agoFixes for compiler warnings. Minor code cleanup.
drh [Fri, 18 Mar 2011 16:47:27 +0000 (16:47 +0000)] 
Fixes for compiler warnings.  Minor code cleanup.

FossilOrigin-Name: 9604d13001e0a195718c7f03fc0e73e352226caa

15 years agoFurther improvements to documentation in sqlite3session.h.
dan [Fri, 18 Mar 2011 16:13:53 +0000 (16:13 +0000)] 
Further improvements to documentation in sqlite3session.h.

FossilOrigin-Name: 07019bb9e8d8f2445d1e0342f74ab520e9804cb5

15 years agoFix a memory allocation issues in the preupdate hook so that the hook.test
drh [Fri, 18 Mar 2011 15:13:31 +0000 (15:13 +0000)] 
Fix a memory allocation issues in the preupdate hook so that the hook.test
script runs clean in valgrind.

FossilOrigin-Name: bd94f4c8b1c4590c437030f0122015f1a37e2582

15 years agoUpdate comments in sqlite3session.h. More to come.
dan [Fri, 18 Mar 2011 13:05:15 +0000 (13:05 +0000)] 
Update comments in sqlite3session.h. More to come.

FossilOrigin-Name: e73e9082f3b14088752717193a10dd7657deb8af

15 years agoMerge all the latest trunk enhancements into the sessions branch.
drh [Fri, 18 Mar 2011 12:35:36 +0000 (12:35 +0000)] 
Merge all the latest trunk enhancements into the sessions branch.

FossilOrigin-Name: 94fd5bb6da5ef4d850c2ed4ad38afabc5569dae6

15 years agoChange to the session module to use user-defined primary keys instead of rowids when...
dan [Thu, 17 Mar 2011 19:20:27 +0000 (19:20 +0000)] 
Change to the session module to use user-defined primary keys instead of rowids when collecting changes.

FossilOrigin-Name: 6614cfcb9c41da71ddec3c44a3de0d4d849e1cdd

15 years agoUpdate the implementation of ".testctrl" in the command-line shell to use
drh [Thu, 17 Mar 2011 16:45:50 +0000 (16:45 +0000)] 
Update the implementation of ".testctrl" in the command-line shell to use
a look-up table rather than a long sequence of if-elses.  Shorten source
code lines of shell.c to 80 characters or less.

FossilOrigin-Name: 54bacb95dd6e2d6ac4971391a40484ccb9126d29

15 years agoComment enhancement to better explain the logic in the "x IS NULL"
drh [Thu, 17 Mar 2011 01:58:21 +0000 (01:58 +0000)] 
Comment enhancement to better explain the logic in the "x IS NULL"
optimization.

FossilOrigin-Name: 869f894798a65f8bc0e0b083866a784fa0189f68

15 years agoEnhances to the query planner such that "x IS NULL" constraints take the
drh [Thu, 17 Mar 2011 01:34:26 +0000 (01:34 +0000)] 
Enhances to the query planner such that "x IS NULL" constraints take the
STAT2 statistics into account, just like "x=VALUE" constraints.

FossilOrigin-Name: 2353176811f752a16c1f2351a3d3431919b062a9

15 years agoAdd the sqlite3_preupdate_new() API, for retrieving the new.* values from within...
dan [Wed, 16 Mar 2011 19:59:18 +0000 (19:59 +0000)] 
Add the sqlite3_preupdate_new() API, for retrieving the new.* values from within a pre-update callback.

FossilOrigin-Name: 526545c49f64d9063d1b888cfc14ece62fa3c13c

15 years agoAdditional interpretation of flags and constants in the VFS trace output.
drh [Wed, 16 Mar 2011 18:54:23 +0000 (18:54 +0000)] 
Additional interpretation of flags and constants in the VFS trace output.

FossilOrigin-Name: 3e984195f1f6d28734456dd726d226cedf207da2

15 years agoAdd the -vfstrace option to the usage error message in the shell.
drh [Wed, 16 Mar 2011 17:05:28 +0000 (17:05 +0000)] 
Add the -vfstrace option to the usage error message in the shell.

FossilOrigin-Name: baca45c549e1c144257ee657258939640120e094

15 years agoAdd the VFS-trace shim.
drh [Wed, 16 Mar 2011 16:56:29 +0000 (16:56 +0000)] 
Add the VFS-trace shim.

FossilOrigin-Name: f49a9ef3387bd4453f5654ebe83fea445c03cf4d

15 years agoRemove the sqlite3_transaction_hook() API.
dan [Wed, 16 Mar 2011 09:49:14 +0000 (09:49 +0000)] 
Remove the sqlite3_transaction_hook() API.

FossilOrigin-Name: b0015a1cfe63c924ee5f250aa08460522882009b

15 years agoMake the "unix-excl" VFS work exactly like "unix" if the database
drh [Tue, 15 Mar 2011 19:08:48 +0000 (19:08 +0000)] 
Make the "unix-excl" VFS work exactly like "unix" if the database
file is read-only.

FossilOrigin-Name: d9846834993079fb2e42d6bd2644b2154ef324d1

15 years agoFix an out-of-order variable declaration in shell.c.
drh [Tue, 15 Mar 2011 18:35:44 +0000 (18:35 +0000)] 
Fix an out-of-order variable declaration in shell.c.

FossilOrigin-Name: 725708465072fc63736e99610cc9cb0ac336145a

15 years agoFix some bugs and other code issues in the session module.
dan [Tue, 15 Mar 2011 16:37:27 +0000 (16:37 +0000)] 
Fix some bugs and other code issues in the session module.

FossilOrigin-Name: f2930840e4af3d7d9cb199d316502932fcbbb867

15 years agoAllow multiplex file names to be preceeded by prefix of the form ":multiplex:chunksiz...
shaneh [Tue, 15 Mar 2011 04:45:48 +0000 (04:45 +0000)] 
Allow multiplex file names to be preceeded by prefix of the form ":multiplex:chunksize:maxchunks:"
Still work to be done, though it compiles and prefixes are ignored.

FossilOrigin-Name: cfa4a2f7ea948be0925227efca82baea509249c9

15 years agoFix cut-and-paste typo in debugging print statement in winMutexTry().
shaneh [Tue, 15 Mar 2011 02:55:28 +0000 (02:55 +0000)] 
Fix cut-and-paste typo in debugging print statement in winMutexTry().

FossilOrigin-Name: def98fd23e42bda13547e38ab13fed0e6554ce99

15 years agoFix handling of return values from the conflict handler. Document the conflict handle...
dan [Mon, 14 Mar 2011 19:49:23 +0000 (19:49 +0000)] 
Fix handling of return values from the conflict handler. Document the conflict handler arguments and return codes in sqlite3session.h.

FossilOrigin-Name: cbbb274e500237dbf7155a51d4f9c17583d704ea

15 years agoMerge the unix-excl VFS into the trunk. This merge also adds the -vfs
drh [Mon, 14 Mar 2011 13:54:01 +0000 (13:54 +0000)] 
Merge the unix-excl VFS into the trunk.  This merge also adds the -vfs
option to the command-line shell.

FossilOrigin-Name: 3934b004e93852c89b937ec20431de96a2e99440

15 years agoIn the "unix-excl" VFS, use the heap for shared memory, since only a single unix-excl
drh [Sat, 12 Mar 2011 18:10:44 +0000 (18:10 +0000)] 
In the "unix-excl" VFS, use the heap for shared memory, since only a single
process is able to read or write the database.

FossilOrigin-Name: a05a6d40875df674f9c2b46e33128c6878d4edaa

15 years agoFix some issues with UPDATE changes in the session module.
dan [Sat, 12 Mar 2011 17:22:46 +0000 (17:22 +0000)] 
Fix some issues with UPDATE changes in the session module.

FossilOrigin-Name: 57862efe718fdc93401998f9058511292a0e1a50

15 years agoAdd the new optional "unix-excl" VFS. This VFS grabs an exclusive lock on
drh [Sat, 12 Mar 2011 17:02:57 +0000 (17:02 +0000)] 
Add the new optional "unix-excl" VFS.  This VFS grabs an exclusive lock on
the database preventing other processes from accessing it, but continues to
allow other database connections from the same process.

FossilOrigin-Name: 00051c3296e11211b2bb5ae28f016b17dca857d7

15 years agoMore tests for SQLITE_OMIT_UNIQUE_ENFORCEMENT and minor change to implementation.
shaneh [Sat, 12 Mar 2011 04:58:55 +0000 (04:58 +0000)] 
More tests for SQLITE_OMIT_UNIQUE_ENFORCEMENT and minor change to implementation.

FossilOrigin-Name: b86999436ec2414c990ba720441fe316f647eef6

15 years agoAdd the sqlite3changeset_apply() function. Does not yet handle all cases.
dan [Fri, 11 Mar 2011 19:05:52 +0000 (19:05 +0000)] 
Add the sqlite3changeset_apply() function. Does not yet handle all cases.

FossilOrigin-Name: 2b19be7bf753c7dd12e1c3b384981a3ea1bc8145

15 years agoRemove an unused field from the unix sqlite3_file object.
drh [Fri, 11 Mar 2011 16:15:48 +0000 (16:15 +0000)] 
Remove an unused field from the unix sqlite3_file object.

FossilOrigin-Name: f957f23a8a392bb1720720960bda2c7b24de9663

15 years agoSimplification of tests and more added for SQLITE_OMIT_UNIQUE_ENFORCEMENT tests.
shaneh [Thu, 10 Mar 2011 21:48:02 +0000 (21:48 +0000)] 
Simplification of tests and more added for SQLITE_OMIT_UNIQUE_ENFORCEMENT tests.

FossilOrigin-Name: 75a38411a89bd2969ec5cecca13c13a390b3d478

15 years agoSkip unique constraint enforcement if compiled with SQLITE_OMIT_UNIQUE_ENFORCEMENT.
shaneh [Thu, 10 Mar 2011 21:13:18 +0000 (21:13 +0000)] 
Skip unique constraint enforcement if compiled with SQLITE_OMIT_UNIQUE_ENFORCEMENT.

FossilOrigin-Name: ba85bf8cb88f7ae220d919f5c23f51d9dcedc843

15 years agoMinor clean-up of previous mem5 allocator fix.
shaneh [Thu, 10 Mar 2011 03:54:55 +0000 (03:54 +0000)] 
Minor clean-up of previous mem5 allocator fix.

FossilOrigin-Name: 3643842316239ff7859f0ec522736a2b9c03d22c

15 years agoFix issue with mem5 allocator when min request size is larger thatn 2^30.
shaneh [Wed, 9 Mar 2011 21:36:17 +0000 (21:36 +0000)] 
Fix issue with mem5 allocator when min request size is larger thatn 2^30.

FossilOrigin-Name: d7dae06fb2d57ed6b9555b774712f42077ae4155

15 years agoOmit unnecessary OP_Next and OP_Prev operators when uniqueness constraints
drh [Wed, 9 Mar 2011 21:02:31 +0000 (21:02 +0000)] 
Omit unnecessary OP_Next and OP_Prev operators when uniqueness constraints
guarantee that the code will only make one pass through the loop.

FossilOrigin-Name: f000c9b2b7348238fe2085140d2dd05294a19709

15 years agoAdd a function to the session extension invert a changeset.
dan [Wed, 9 Mar 2011 11:17:05 +0000 (11:17 +0000)] 
Add a function to the session extension invert a changeset.

FossilOrigin-Name: 75d5dff725dbb66d67d56ad042926f1daae56dbe

15 years agoUpdates to the OS/2 implementation from Rich Walsh.
drh [Wed, 9 Mar 2011 11:04:07 +0000 (11:04 +0000)] 
Updates to the OS/2 implementation from Rich Walsh.

FossilOrigin-Name: dc46156a2237701679433779b871844f4f2abe4b

15 years agoAdd start of sessions feature.
dan [Tue, 8 Mar 2011 19:22:50 +0000 (19:22 +0000)] 
Add start of sessions feature.

FossilOrigin-Name: 269a81a37d7dbdcdec3c2322074916af0fbac91c

15 years agoMerge the syscall-override changes into trunk.
drh [Tue, 8 Mar 2011 16:39:29 +0000 (16:39 +0000)] 
Merge the syscall-override changes into trunk.

FossilOrigin-Name: 36d79e6f54cdc4129c6e6366a49722e2cf1cccbd

15 years agoUnix errno integer can vary from one system to the next. So do not
drh [Tue, 8 Mar 2011 14:05:07 +0000 (14:05 +0000)] 
Unix errno integer can vary from one system to the next.  So do not
depend on specific errno values in test cases.

FossilOrigin-Name: ddb747d33a004c7fe532a661e879ccba68c79c59

15 years agoFix two compiler warnings. No functional code changes.
drh [Tue, 8 Mar 2011 13:06:41 +0000 (13:06 +0000)] 
Fix two compiler warnings.  No functional code changes.

FossilOrigin-Name: c829868aa2254c5e2268cdb803462cc6ec5cb71e

15 years agoFix additional cases of possible signed integer overflow, especially with
drh [Tue, 8 Mar 2011 02:38:28 +0000 (02:38 +0000)] 
Fix additional cases of possible signed integer overflow, especially with
regard to negation.

FossilOrigin-Name: 2d5800bd8cfc7d7f5578a71b1aeaa74b2ec4b372

15 years agoAnother minor simplification brought to light by clang.
drh [Sun, 6 Mar 2011 21:54:33 +0000 (21:54 +0000)] 
Another minor simplification brought to light by clang.

FossilOrigin-Name: 3bfbf026dd6a0eeef07f8f5f1ebf74c9cfebcd61

15 years agoRemove dead code identified by the clang static analyzer.
drh [Sun, 6 Mar 2011 21:28:32 +0000 (21:28 +0000)] 
Remove dead code identified by the clang static analyzer.

FossilOrigin-Name: 01a79d5a7af48fb7e50291c0c7c6283d3fb359d0

15 years agoSimplifications to the overflow-free multiplier. Also remove some commented-out
drh [Sat, 5 Mar 2011 21:41:34 +0000 (21:41 +0000)] 
Simplifications to the overflow-free multiplier.  Also remove some commented-out
code that was left in that subroutine by mistake on the previous check-in.

FossilOrigin-Name: 55fc25fdab61e6094289e068c343e012fec10439

15 years agoFix all known instances of signed-integer overflow. Within SQL expressions,
drh [Sat, 5 Mar 2011 20:59:46 +0000 (20:59 +0000)] 
Fix all known instances of signed-integer overflow.  Within SQL expressions,
integer overflow now forces coercion to floating point.  The shift operators
work with any integer right-hand operand with negative values reversing
the direction of the shift.

FossilOrigin-Name: abf21394124a0af46f072793718964cee2ce55d0

15 years agoFix an instance of signed arithmetic overflow and an one bit-shift overflow.
drh [Sat, 5 Mar 2011 13:54:15 +0000 (13:54 +0000)] 
Fix an instance of signed arithmetic overflow and an one bit-shift overflow.
Mark six other signed arithmetic overflow locations that need fixing.

FossilOrigin-Name: 04abab71ecd52f6070b9f84781a3df3d6dba7722

15 years agoHandle EINTR errors from open(). syscall-override
drh [Fri, 4 Mar 2011 15:43:57 +0000 (15:43 +0000)] 
Handle EINTR errors from open().

FossilOrigin-Name: a7d176b27cd73791d45eb3a31df78187ae10ce20

15 years agoDo a better job of choosing the join table order when the tables having
drh [Fri, 4 Mar 2011 00:56:58 +0000 (00:56 +0000)] 
Do a better job of choosing the join table order when the tables having
very different numbers of rows.

FossilOrigin-Name: 952f5e8c69904c48f2decfabf8ea60a2e9f3e134

15 years agoAdd the experimental sqlite3_transaction_hook() API.
dan [Thu, 3 Mar 2011 20:05:59 +0000 (20:05 +0000)] 
Add the experimental sqlite3_transaction_hook() API.

FossilOrigin-Name: 093d8cd8e2f3a6af5d40cf810e396f4919eb5cef

15 years agoFix quoting of the result in rtreeB.test.
drh [Wed, 2 Mar 2011 22:07:29 +0000 (22:07 +0000)] 
Fix quoting of the result in rtreeB.test.

FossilOrigin-Name: c6532b35cc5a81cc753a22e0165bfdd5143941f1

15 years agoAdd additional VFS methods to retrieve system call pointers and to get a
drh [Wed, 2 Mar 2011 19:06:42 +0000 (19:06 +0000)] 
Add additional VFS methods to retrieve system call pointers and to get a
list of all changeable system calls.

FossilOrigin-Name: 38558363494e3a736dcb091dd859e76b7ccd78b0

15 years agoAdd more system calls to the set that can be overridden in os_unix.c.
drh [Wed, 2 Mar 2011 18:01:10 +0000 (18:01 +0000)] 
Add more system calls to the set that can be overridden in os_unix.c.
Also merge in recent fixes from trunk.

FossilOrigin-Name: 80fac2a6e07221bb67613af84ab9dda3e18b5ceb

15 years agoFix bugs in [7b6e30e6a7] that only show up on Mac.
drh [Wed, 2 Mar 2011 17:54:32 +0000 (17:54 +0000)] 
Fix bugs in [7b6e30e6a7] that only show up on Mac.

FossilOrigin-Name: ec55e8c6bb4f2419b3813aa2fd1a20d8f5016159

15 years agoMake sure the rtreenode() testing and analysis routine in the RTREE extension
drh [Wed, 2 Mar 2011 15:44:35 +0000 (15:44 +0000)] 
Make sure the rtreenode() testing and analysis routine in the RTREE extension
can handle 64-bit rowids.  This fix is in response to a message on the
mailing list.

FossilOrigin-Name: 24602557fc3295fe2836d269175f12ec680ac011

15 years agoProof-of-concept prototype for the proposed xSetSystemCall extension method
drh [Wed, 2 Mar 2011 15:09:07 +0000 (15:09 +0000)] 
Proof-of-concept prototype for the proposed xSetSystemCall extension method
on the VFS.

FossilOrigin-Name: 92b5a76abc53290e1bb87b6b55bc64bb1b331dfc

15 years agoLog all error from close() in os_unix.c to sqlite3_log() but do not attempt to
drh [Wed, 2 Mar 2011 02:08:13 +0000 (02:08 +0000)] 
Log all error from close() in os_unix.c to sqlite3_log() but do not attempt to
report errors back up to the application.  Update the unix error logging to
put the most important information earlier in the message.

FossilOrigin-Name: 7b6e30e6a712311d4ef275253b085b85e6e17116

15 years agoAdd the experimental sqlite3_preupdate_hook() API.
dan [Tue, 1 Mar 2011 18:42:07 +0000 (18:42 +0000)] 
Add the experimental sqlite3_preupdate_hook() API.

FossilOrigin-Name: 6145d7b89f83500318713779c60f79a7ab2098ba

15 years agoComment out some code in os_unix.c that only runs on MacOSX with
drh [Fri, 25 Feb 2011 03:25:07 +0000 (03:25 +0000)] 
Comment out some code in os_unix.c that only runs on MacOSX with
SQLITE_ENABLE_LOCKING_STYLE.

FossilOrigin-Name: 4e50b0362ab6604a4b6c9f4ad849ec1733d6ce1a

15 years agoFix a typo in a comment. No changes to code.
drh [Thu, 24 Feb 2011 21:10:00 +0000 (21:10 +0000)] 
Fix a typo in a comment.  No changes to code.

FossilOrigin-Name: af4756184a255f5d8a5cd276bf9f2fc3b38d9169

15 years agoReserve a range of bits in the SQLITE_OPEN_xxxx bit vector for future
drh [Wed, 23 Feb 2011 22:39:23 +0000 (22:39 +0000)] 
Reserve a range of bits in the SQLITE_OPEN_xxxx bit vector for future
expansion.

FossilOrigin-Name: 9b9046546db5b060e37e7ba01c23bb7e9528d861

15 years agoFix a typo in the robust_flock() macro for systems without EINTR.
drh [Wed, 23 Feb 2011 14:00:12 +0000 (14:00 +0000)] 
Fix a typo in the robust_flock() macro for systems without EINTR.

FossilOrigin-Name: af9ba2a6d2c37915e799eec52bb827de46afd34d

15 years agoRetry selected system calls on unix when they fail with EINTR.
drh [Wed, 23 Feb 2011 13:33:46 +0000 (13:33 +0000)] 
Retry selected system calls on unix when they fail with EINTR.

FossilOrigin-Name: b9d29ea385bafcf87c7dd07822ce9ec3d3892bd1

15 years agoWhen a stale schema-cookie is seen, expire only the one statement that
drh [Tue, 22 Feb 2011 03:34:56 +0000 (03:34 +0000)] 
When a stale schema-cookie is seen, expire only the one statement that
encountered the bad cookie, not every statement on the database
connection.  Ticket [b72787b1a7cea1f]

FossilOrigin-Name: 1bca0a7e198391202fd2bc1650c0a62028a9aaa5

15 years agoFix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl".
dan [Mon, 21 Feb 2011 17:49:49 +0000 (17:49 +0000)] 
Fix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl".

FossilOrigin-Name: 9f9f32882501ac9b6e60f81195a64bdbf6e4497b

15 years agoHave os_unix.c call sqlite3_log() following errors in certain system calls.
dan [Mon, 21 Feb 2011 11:46:24 +0000 (11:46 +0000)] 
Have os_unix.c call sqlite3_log() following errors in certain system calls.

FossilOrigin-Name: 01076528a43b61ae20ef6969b7d326de9b5313e4