]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 years agoAdd the "varint.c" utility program in the tool directory.
drh [Fri, 31 Oct 2014 10:31:59 +0000 (10:31 +0000)] 
Add the "varint.c" utility program in the tool directory.

FossilOrigin-Name: ea5d56be5fe14934e4dbe9c17d46b058f487a231

10 years agoRemove an unnecessary branch from balance_nonroot().
drh [Fri, 31 Oct 2014 02:51:41 +0000 (02:51 +0000)] 
Remove an unnecessary branch from balance_nonroot().

FossilOrigin-Name: 9fc7c88e3f5221883aa6eafbf8af3be94db0c299

10 years agoIn the balance_nonroot() routine, protect the values in aPgno[] array from
drh [Fri, 31 Oct 2014 00:05:23 +0000 (00:05 +0000)] 
In the balance_nonroot() routine, protect the values in aPgno[] array from
change during the page sort, so that aPgno[] can be used to avoid unnecessary
pointer-map updates for auto_vacuum databases.

FossilOrigin-Name: 69c3924fe834a78d4a8d86833626bf5f68e33a3a

10 years agoImprovements to the wording of some comments. Reinstate an assert() that
drh [Thu, 30 Oct 2014 23:14:56 +0000 (23:14 +0000)] 
Improvements to the wording of some comments.  Reinstate an assert() that
is only true for non-corrupt database files by adding an "|| CORRUPT_DB" term.

FossilOrigin-Name: 67adb44838f98805f86aecca634d9a3b07370b9e

10 years agoTweaks to comments in btree.c. Minor code changes to enhance testability.
drh [Thu, 30 Oct 2014 20:48:44 +0000 (20:48 +0000)] 
Tweaks to comments in btree.c.  Minor code changes to enhance testability.

FossilOrigin-Name: c7d9aa3a1ce63e27ec94295601bc89fecf1e4977

10 years agoFix the %c format character in sqlite3VXPrintf() so that it correctly
drh [Wed, 29 Oct 2014 18:20:18 +0000 (18:20 +0000)] 
Fix the %c format character in sqlite3VXPrintf() so that it correctly
handles precisions larger than 70.

FossilOrigin-Name: 08a27440f19b7fc884464832e6105af1bf008172

10 years agoIn the OP_Column opcode, when extracting a field that is past the end of
drh [Wed, 29 Oct 2014 00:58:38 +0000 (00:58 +0000)] 
In the OP_Column opcode, when extracting a field that is past the end of
a short record (because the row was originally inserted prior to ALTER TABLE
ADD COLUMN) then make sure the output register is fully NULL and does not
contain leftover flags (such as MEM_Ephem) from its previous use.
Fix for ticket [43107840f1c02].

FossilOrigin-Name: 24780f8ddc1683fc62180e6961dc6bfe1168f4df

10 years agoAdd new test file e_totalchanges.test, containing tests of the sqlite3_total_changes...
dan [Tue, 28 Oct 2014 20:49:59 +0000 (20:49 +0000)] 
Add new test file e_totalchanges.test, containing tests of the sqlite3_total_changes() interface.

FossilOrigin-Name: f84af4adcc34d7a4c72027bf5b038a1a45a4c307

10 years agoUpdate the documentation on the sqlite3_randomness() interface to conform
drh [Tue, 28 Oct 2014 20:35:18 +0000 (20:35 +0000)] 
Update the documentation on the sqlite3_randomness() interface to conform
to enhancements associated with the SQLITE_ENABLE_API_ARMOR change.

FossilOrigin-Name: 96e9917c350dfe2069b87860bbb961424ff1105a

10 years agoModify the documentation for sqlite3_changes() to make it more testable. Add tests...
dan [Tue, 28 Oct 2014 18:24:16 +0000 (18:24 +0000)] 
Modify the documentation for sqlite3_changes() to make it more testable. Add tests and minor fixes for the same.

FossilOrigin-Name: 41cdd0c422d61533a94870cb5ad094682956d472

10 years agoFix a crash that could occur if the WHERE clause of an UPDATE statement on a view...
dan [Tue, 28 Oct 2014 16:50:10 +0000 (16:50 +0000)] 
Fix a crash that could occur if the WHERE clause of an UPDATE statement on a view that does not feature a column named "rowid" contains a term such as "rowid=?".

FossilOrigin-Name: 8523670d50004f3112b7871f11c8b8b02aab96ab

10 years agoFix a faulty assert() in the DELETE code generator.
drh [Tue, 28 Oct 2014 16:19:18 +0000 (16:19 +0000)] 
Fix a faulty assert() in the DELETE code generator.

FossilOrigin-Name: 95f8ebdbf87326f23cd38e561ac5632b5367a449

10 years agoTrivial simplification to the automatic index logic.
drh [Tue, 28 Oct 2014 15:58:50 +0000 (15:58 +0000)] 
Trivial simplification to the automatic index logic.

FossilOrigin-Name: 23073a053931de324323f631a6613086786af411

10 years agoBump the version number to 3.8.8
drh [Tue, 28 Oct 2014 12:35:28 +0000 (12:35 +0000)] 
Bump the version number to 3.8.8

FossilOrigin-Name: 1a7e711ed10860c7985e84b97cdfff748d940b9f

10 years agoCorrect the documentation on the maximum size of a scratch allocation.
drh [Tue, 28 Oct 2014 00:56:18 +0000 (00:56 +0000)] 
Correct the documentation on the maximum size of a scratch allocation.

FossilOrigin-Name: 30f86eb3f9ac88f83ed9e23ea6cd1fccf68e0812

10 years agoAdd special handling for static mutexes in sqlite3_mutex_alloc() when automatic calls...
mistachkin [Mon, 27 Oct 2014 22:06:21 +0000 (22:06 +0000)] 
Add special handling for static mutexes in sqlite3_mutex_alloc() when automatic calls to sqlite3_initialize() are enabled.

FossilOrigin-Name: 7857d27caa845e5629d94c2e66587dc89016daca

10 years agoRemove a small amount of unnecessary #ifdeffery from random.c.
drh [Mon, 27 Oct 2014 20:14:02 +0000 (20:14 +0000)] 
Remove a small amount of unnecessary #ifdeffery from random.c.

FossilOrigin-Name: 2b9340c8684bc382391e02813e960b3166f24daa

10 years agoFix compilation issue with MSVC due to a misplaced variable declaration.
mistachkin [Mon, 27 Oct 2014 19:58:29 +0000 (19:58 +0000)] 
Fix compilation issue with MSVC due to a misplaced variable declaration.

FossilOrigin-Name: 9588b345d09daaa49d24d7fb6cab732e64e5474e

10 years agoFix harmless compiler warning in an assert statement.
mistachkin [Mon, 27 Oct 2014 19:42:02 +0000 (19:42 +0000)] 
Fix harmless compiler warning in an assert statement.

FossilOrigin-Name: d33a1ff3aad0bfabf70a98ac338a68f82074e4fe

10 years agoFix a typo in the macro name of an #ifdef
drh [Mon, 27 Oct 2014 19:39:51 +0000 (19:39 +0000)] 
Fix a typo in the macro name of an #ifdef

FossilOrigin-Name: 9646a136e69cf2583965dfc9fac5f056af4cdb62

10 years agoAdd the SQLITE_ENABLE_API_ARMOR compile-time option for extra API parameter
drh [Mon, 27 Oct 2014 18:34:07 +0000 (18:34 +0000)] 
Add the SQLITE_ENABLE_API_ARMOR compile-time option for extra API parameter
validation.  Enhance sqlite3_stricmp(), sqlite3_strnicmp(), and
sqlite3_uri_parameter() for improved NULL parameter handling.

FossilOrigin-Name: ffb9d8144bbc35bf3d929e0e13a663668fff0558

10 years agoFix an unused variable in btree.c:allocateSpace().
drh [Mon, 27 Oct 2014 18:21:01 +0000 (18:21 +0000)] 
Fix an unused variable in btree.c:allocateSpace().

FossilOrigin-Name: 637246165a14c4808b90d0437e4d43fa5fac659e

10 years agoOptimizations aimed at reducing the number of memcpy() operations required by balance...
dan [Mon, 27 Oct 2014 14:26:54 +0000 (14:26 +0000)] 
Optimizations aimed at reducing the number of memcpy() operations required by balance_nonroot().

FossilOrigin-Name: face33bea1ba3a6d57780655fa827226b4d2baa9

10 years agoAdd test file e_wal.test.
dan [Mon, 27 Oct 2014 11:25:28 +0000 (11:25 +0000)] 
Add test file e_wal.test.

FossilOrigin-Name: fc6920b5483eeeb06a474ff399a21afa51dc4859

10 years agoIf a free-slot is found within a page, but using that free-slot would fragment the... defrag-opt
dan [Mon, 27 Oct 2014 08:02:16 +0000 (08:02 +0000)] 
If a free-slot is found within a page, but using that free-slot would fragment the page further and there are already at least 60 fragmented bytes, degragment the page. This matches the behaviour of the trunk.

FossilOrigin-Name: 1f80f8c136ac970dcc7fb2337263dc5922e348c3

10 years agoMerge trunk with this branch.
dan [Mon, 27 Oct 2014 07:01:04 +0000 (07:01 +0000)] 
Merge trunk with this branch.

FossilOrigin-Name: a13df3013bbac4a0d4fce5cef1376c857508c1c5

10 years agoFurther modifications to new code to better handle corrupt databases.
dan [Sat, 25 Oct 2014 20:36:28 +0000 (20:36 +0000)] 
Further modifications to new code to better handle corrupt databases.

FossilOrigin-Name: 1a8cf0a043347772ac54d150d634c32845beee8b

10 years agoIncrease the resolution of the second parameter to the likelihood() SQL
drh [Sat, 25 Oct 2014 13:42:16 +0000 (13:42 +0000)] 
Increase the resolution of the second parameter to the likelihood() SQL
function (the probability value) so that it can handle probabilities
as small as 0.00000001.  Formerly, it ran out of precision at 0.001.

FossilOrigin-Name: 0f08924fe0c52a85a103f67bee9809e0f8f884b0

10 years agoDo not use virtual (and hence redundant) WHERE-clause terms to restrict the
drh [Sat, 25 Oct 2014 12:28:25 +0000 (12:28 +0000)] 
Do not use virtual (and hence redundant) WHERE-clause terms to restrict the
content of a automatic partial index.  Show when an automatic partial index
is used in the EXPLAIN QUERY PLAN output.

FossilOrigin-Name: b9ad601eab1d7298d369267eb697c7fa1bc16985

10 years agoEnsure that the "Any prior cache entry associated with newKey is guaranteed not to...
dan [Fri, 24 Oct 2014 20:57:03 +0000 (20:57 +0000)] 
Ensure that the "Any prior cache entry associated with newKey is guaranteed not to be pinned" guarantee made to xRekey implementations is not violated.

FossilOrigin-Name: ecc3544e712041736af7c7b4f34864a1f2e30ff7

10 years agoEnhance the automatic index logic so that it creates a partial index when
drh [Fri, 24 Oct 2014 19:28:09 +0000 (19:28 +0000)] 
Enhance the automatic index logic so that it creates a partial index when
doing so gives the same answer for less work.

FossilOrigin-Name: d95d0313c447f5baeabdb17284d8606331ab7d49

10 years agoFix some issues in the new code on this branch related to the handling of corrupt...
dan [Fri, 24 Oct 2014 18:43:57 +0000 (18:43 +0000)] 
Fix some issues in the new code on this branch related to the handling of corrupt databases.

FossilOrigin-Name: 19736dd9fbbb7e252c4f8715e2277d48ac41f5bc

10 years agoFix some minor formatting and code organization issues.
dan [Fri, 24 Oct 2014 16:40:49 +0000 (16:40 +0000)] 
Fix some minor formatting and code organization issues.

FossilOrigin-Name: eab8706dc47aa0a44caf73619de858397c3e0b4e

10 years agoHonor a high likelihood() on range constraints.
drh [Fri, 24 Oct 2014 15:26:29 +0000 (15:26 +0000)] 
Honor a high likelihood() on range constraints.

FossilOrigin-Name: 401235edf40fcd665eaf426cf5155ac6855e8537

10 years agoGet the likelihood() functions working on operators like BETWEEN that
drh [Fri, 24 Oct 2014 14:32:21 +0000 (14:32 +0000)] 
Get the likelihood() functions working on operators like BETWEEN that
create virtual terms in the WHERE-clause analysis.

FossilOrigin-Name: 03d0498d0f24bec2383d5d79edf25069effecd59

10 years agoFix two problems. Tests now passing. api-armor
drh [Fri, 24 Oct 2014 12:37:00 +0000 (12:37 +0000)] 
Fix two problems.  Tests now passing.

FossilOrigin-Name: 1c220b806d56e163842e17038c3331f71861bd9c

10 years agoAdd the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in
drh [Fri, 24 Oct 2014 00:35:58 +0000 (00:35 +0000)] 
Add the SQLITE_ENABLE_API_ARMOR compile-time option.  This is a work in
progress and is not yet completely functional.

FossilOrigin-Name: c297a84bc678f81ffc0aa9139ab73f0ca87c1971

10 years agoImplement sqlite3_create_collation() by invoking
drh [Thu, 23 Oct 2014 01:01:26 +0000 (01:01 +0000)] 
Implement sqlite3_create_collation() by invoking
sqlite3_create_collation_v2() with a NULL destructor argument.  This saves
a little space.

FossilOrigin-Name: 9762ad0639cca2fc1ef0573113fb613ce9e7e83e

10 years agoDisable the use of strchrnul() unless specifically enabled by compile-time
drh [Wed, 22 Oct 2014 20:07:19 +0000 (20:07 +0000)] 
Disable the use of strchrnul() unless specifically enabled by compile-time
options.

FossilOrigin-Name: e580470db77d6da970c755102790e603fb26b3c6

10 years agoChange the 0x800 bit of SQLITE_TESTCTRL_OPTIMIZATIONS so that it disables
drh [Wed, 22 Oct 2014 19:57:16 +0000 (19:57 +0000)] 
Change the 0x800 bit of SQLITE_TESTCTRL_OPTIMIZATIONS so that it disables
the loading of STAT3 and STAT4 content, not just the using of that content.
Change the internal name of that bit to SQLITE_Stat34.

FossilOrigin-Name: ca3b00c44ec52d209642a5ba9ef82e085fac39db

10 years agoMerge latest trunk with this branch.
dan [Wed, 22 Oct 2014 18:42:31 +0000 (18:42 +0000)] 
Merge latest trunk with this branch.

FossilOrigin-Name: 854a54c6c21e800b0cd999023014813f7c50b23f

10 years agoTake steps to avoid misestimating range query costs based on STAT4 data
drh [Wed, 22 Oct 2014 15:27:05 +0000 (15:27 +0000)] 
Take steps to avoid misestimating range query costs based on STAT4 data
due to the roundoff error of converting from integers to LogEst and back
to integers.

FossilOrigin-Name: 3c933bf95f291f7957580d823dce92c981375a5c

10 years agoCall fsync() right after ftruncate() when in journal_mode=TRUNCATE and
drh [Tue, 21 Oct 2014 21:56:06 +0000 (21:56 +0000)] 
Call fsync() right after ftruncate() when in journal_mode=TRUNCATE and
when synchronous=FULL in order to ensure that transactions are durable
across a power loss that happens moments after the commit.  Proposed
fix for [https://bugzilla.mozilla.org/show_bug.cgi?id=1072773].

FossilOrigin-Name: 3e922208b68563489c7766abb9afb4885113e7b8

10 years agoFurther tuning of the cost estimates for skip-scan loops, especially for cases
drh [Tue, 21 Oct 2014 18:16:21 +0000 (18:16 +0000)] 
Further tuning of the cost estimates for skip-scan loops, especially for cases
when skip-scan loops are in competition with regular loops.

FossilOrigin-Name: a27861c28c4791e51d797aa37e9cca806cb58775

10 years agoImprovements to the WHERETRACE debugging logic.
drh [Tue, 21 Oct 2014 16:01:40 +0000 (16:01 +0000)] 
Improvements to the WHERETRACE debugging logic.

FossilOrigin-Name: ec1e942f08548695ff02645b3f3cd6bb2516bc9a

10 years agoIf a skip-scan is a proper subset of some other scan, then adjust the
drh [Tue, 21 Oct 2014 01:05:09 +0000 (01:05 +0000)] 
If a skip-scan is a proper subset of some other scan, then adjust the
cost of the skip-scan upward so that it is more costly than the other scan.
Such a cost imbalance can arise under STAT4 because of difficulties in getting
an accurate estimate for skip-scans.

FossilOrigin-Name: f4b22a2620a5dc48949048c2ecbd226755d4b2c3

10 years agoFix a (probably harmless) but in the CSV output mode of the command-line
drh [Fri, 17 Oct 2014 21:35:05 +0000 (21:35 +0000)] 
Fix a (probably harmless) but in the CSV output mode of the command-line
shell.

FossilOrigin-Name: 19fe4a0a475bd94f491031aea7a183f7c0515cf3

10 years agoVersion 3.8.7 version-3.8.7
drh [Fri, 17 Oct 2014 11:24:17 +0000 (11:24 +0000)] 
Version 3.8.7

FossilOrigin-Name: e4ab094f8afce0817f4074e823fabe59fc29ebb4

10 years agoWork around MSVC not being able to deduce that a local variable was initialized in...
mistachkin [Thu, 16 Oct 2014 21:39:17 +0000 (21:39 +0000)] 
Work around MSVC not being able to deduce that a local variable was initialized in a called function.

FossilOrigin-Name: 06c576c152c4013080c255cbbeb45bf2e298be9f

10 years agoChanges to work around Win32 and MSVCRT APIs that are not present on Windows CE 200x.
mistachkin [Thu, 16 Oct 2014 18:34:50 +0000 (18:34 +0000)] 
Changes to work around Win32 and MSVCRT APIs that are not present on Windows CE 200x.

FossilOrigin-Name: 1418c006e377d7915a50577d4ccb21125b750bae

10 years agoUpdate the vdbe-compress.tcl script to account for expressions of the form (123>var...
dan [Thu, 16 Oct 2014 11:45:14 +0000 (11:45 +0000)] 
Update the vdbe-compress.tcl script to account for expressions of the form (123>var), where "var" should be replaced with a reference to a union member.

FossilOrigin-Name: 640345d880c6178f8434e3ce40329b7527588843

10 years agoUpdate releasetest.tcl so that x86-64 runs a superset of the x86 tests.
dan [Wed, 15 Oct 2014 15:28:27 +0000 (15:28 +0000)] 
Update releasetest.tcl so that x86-64 runs a superset of the x86 tests.

FossilOrigin-Name: 3c1e70f4d55bc009ed9ed4cf6d756d7061985851

10 years agoFix a problem causing lock5.test to fail in mmap-mode.
dan [Wed, 15 Oct 2014 14:45:34 +0000 (14:45 +0000)] 
Fix a problem causing lock5.test to fail in mmap-mode.

FossilOrigin-Name: b3e7b446bdb47cf9d7fe43dc37e3b4f8010ee09e

10 years agoAdd a four-byte prefix to the BtShared.pTmpSpace buffer to avoid reading
drh [Wed, 15 Oct 2014 11:55:51 +0000 (11:55 +0000)] 
Add a four-byte prefix to the BtShared.pTmpSpace buffer to avoid reading
before the beginning of an allocation.

FossilOrigin-Name: 9386bfca128023583a24303e5f1d832987a49d43

10 years agoRearrange an expression in vdbemem.c to avoid a (harmless) reference to a possibly...
dan [Wed, 15 Oct 2014 11:31:35 +0000 (11:31 +0000)] 
Rearrange an expression in vdbemem.c to avoid a (harmless) reference to a possibly unitialized variable.

FossilOrigin-Name: 4a7b3fa049a9aa0668e318287edd4a78c0588bf8

10 years agoMake sure new sqlite3_vtab objects created by the xCreate() virtual table
drh [Tue, 14 Oct 2014 20:25:43 +0000 (20:25 +0000)] 
Make sure new sqlite3_vtab objects created by the xCreate() virtual table
method are initialized by the system, in accordance with the documentation.

FossilOrigin-Name: eab82330631187dcc3e5d2dddd23dbda5752904b

10 years agoFix some code duplication issues on this branch. Add minor optimizations to the new...
dan [Tue, 14 Oct 2014 17:27:04 +0000 (17:27 +0000)] 
Fix some code duplication issues on this branch. Add minor optimizations to the new code.

FossilOrigin-Name: 58d7793bd5d608ba9fc3a2cd44b9d9512e0332ba

10 years agoOptimize a database corruption test inside of the OP_Column opcode.
drh [Mon, 13 Oct 2014 23:39:02 +0000 (23:39 +0000)] 
Optimize a database corruption test inside of the OP_Column opcode.

FossilOrigin-Name: 005e5b388a8a97bca6d1f0e06c40d68d92aa1212

10 years agoUse the padding word in the Mem object as temporary storage for
drh [Mon, 13 Oct 2014 20:12:47 +0000 (20:12 +0000)] 
Use the padding word in the Mem object as temporary storage for
serial_type value in OP_Record, and thus avoid a redundant computation of
the serial_type for each column.

FossilOrigin-Name: 4b3b65ee5ea61e9b9671ca027940bf02689cb890

10 years agoMerge trunk changes into this branch.
dan [Mon, 13 Oct 2014 18:09:13 +0000 (18:09 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: d5b7c5a88dd58de85b3060a1f28b6d96e6e21207

10 years agoFurther work on balance_nonroot().
dan [Mon, 13 Oct 2014 18:03:27 +0000 (18:03 +0000)] 
Further work on balance_nonroot().

FossilOrigin-Name: 6594f9b420e2fa642737722ff8521f756ecef227

10 years agoThree small optimizations to vdbeaux.c.
drh [Mon, 13 Oct 2014 17:42:05 +0000 (17:42 +0000)] 
Three small optimizations to vdbeaux.c.

FossilOrigin-Name: 04892f8ba6c55cec4fe37bfe59b6349fd2a40698

10 years agoReduce the CPU load imposed by sqlit3VdbeCursorMoveto() by factoring out
drh [Mon, 13 Oct 2014 16:02:20 +0000 (16:02 +0000)] 
Reduce the CPU load imposed by sqlit3VdbeCursorMoveto() by factoring out
some of its functions and by avoiding unnecessary calls.

FossilOrigin-Name: c2799aece17d347c64217a0e407bb10e50c184a3

10 years agoRemove the OPFLAG_CLEARCACHE flag from OP_Column. In its place, change the
drh [Mon, 13 Oct 2014 13:00:58 +0000 (13:00 +0000)] 
Remove the OPFLAG_CLEARCACHE flag from OP_Column.  In its place, change the
P3 parameter of OP_SorterData to be the index of the pseudo-table cursor whose
record header cache is to be cleared.  This gives a small size reduction
and performance increase.

FossilOrigin-Name: 20062f49428a2349a2dd705af570c60b499a3eef

10 years agoRemove the VdbeCursor.lastRowid cache of the current rowid, since maintaining
drh [Sun, 12 Oct 2014 22:37:22 +0000 (22:37 +0000)] 
Remove the VdbeCursor.lastRowid cache of the current rowid, since maintaining
the correct cache value uses more CPU cycles than just recomputing the rowid
on the occasions when it is actually needed.  Replace it with the
VdbeCursor.aOffset field which used to be computed from VdbeCursor.aType
when needed. Saves 100 bytes of code space and runs 0.2% faster.

FossilOrigin-Name: 91384a7d727ef0f285cd430e829ba9f3852db50e

10 years agoPerformance optimization and very slight size reduction for OP_Column.
drh [Sat, 11 Oct 2014 23:31:52 +0000 (23:31 +0000)] 
Performance optimization and very slight size reduction for OP_Column.

FossilOrigin-Name: 869c30e45cc87063be423c650f16b99e8adb3df0

10 years agoAttempt to further reduce memcpy() in balance_nonroot().
dan [Sat, 11 Oct 2014 20:00:24 +0000 (20:00 +0000)] 
Attempt to further reduce memcpy() in balance_nonroot().

FossilOrigin-Name: fec849dcca3aead2bc2d4ecffeda750684d32fb0

10 years agoSimplification to the insertCell() routine in btree.c, resulting in a
drh [Sat, 11 Oct 2014 17:22:55 +0000 (17:22 +0000)] 
Simplification to the insertCell() routine in btree.c, resulting in a
performance boost and a very small size decrease.  It turns out that the
extra work involved in sometimes avoiding an memcpy() of the first four bytes
of a record takes more time than just unconditionally copying those
four bytes.

FossilOrigin-Name: 66de15580d3c289601e67debfe1edee286f4db5f

10 years agoRequire the SQLITE_ENABLE_RTREE compile-time option in speedtest1.c in order
drh [Sat, 11 Oct 2014 10:52:54 +0000 (10:52 +0000)] 
Require the SQLITE_ENABLE_RTREE compile-time option in speedtest1.c in order
to enable the R-Tree tests.

FossilOrigin-Name: 5d29a033b0f17b0fd74656b28a8367a9a9067f81

10 years agoMake sure that a GROUP BY that also implements an ORDER BY scans the table
drh [Sat, 11 Oct 2014 02:12:58 +0000 (02:12 +0000)] 
Make sure that a GROUP BY that also implements an ORDER BY scans the table
in the correct order.  Fix for ticket [ba7cbfaedc7e6].

FossilOrigin-Name: 7a32fdfd4be2138c0ab00f3dc6f54a70e4e07be4

10 years agoRemove an unnecessary conditional from the EXPLAIN QUERY PLAN logic.
drh [Sat, 11 Oct 2014 01:22:16 +0000 (01:22 +0000)] 
Remove an unnecessary conditional from the EXPLAIN QUERY PLAN logic.

FossilOrigin-Name: c5dc83ebded914f07286b7f98d0a50c28c16f609

10 years agoAccount for the ASC/DESC properties of ORDER BY expressions when using the same index... experimental
dan [Fri, 10 Oct 2014 20:52:53 +0000 (20:52 +0000)] 
Account for the ASC/DESC properties of ORDER BY expressions when using the same index for GROUP BY and ORDER BY. Candidate fix for [ba7cbfaedc].

FossilOrigin-Name: 2a9573962b837973c4959465d8a5f2641d109a5a

10 years agoRestrict the scope of the explainIndexRange() function in where.c.
drh [Fri, 10 Oct 2014 19:15:35 +0000 (19:15 +0000)] 
Restrict the scope of the explainIndexRange() function in where.c.

FossilOrigin-Name: c30124520027f0f860223bf842e2f09db3dafb5f

10 years agoFix a failing test case in index5.test. Also tweak the way cache memory is divided...
dan [Fri, 10 Oct 2014 19:10:59 +0000 (19:10 +0000)] 
Fix a failing test case in index5.test. Also tweak the way cache memory is divided between read-only and dirty pages when using SQLITE_CONFIG_PAGECACHE to reduce IO in some cases.

FossilOrigin-Name: 8541dfb3bbdf63dc9ab304d8a0ab8b290cdc9d96

10 years agoChanges to enable compiling using VC6.
drh [Fri, 10 Oct 2014 18:09:52 +0000 (18:09 +0000)] 
Changes to enable compiling using VC6.

FossilOrigin-Name: 9ee5686ab3b0bca8cabdf455c75bd9410cdc5378

10 years agoWhen using the -config option to releasetest.tcl, default the testing type
drh [Fri, 10 Oct 2014 17:47:00 +0000 (17:47 +0000)] 
When using the -config option to releasetest.tcl, default the testing type
to "fulltest" if it is not specified on the command line.

FossilOrigin-Name: cf291cbe9f49396f03cfca39c2e892f27f750107

10 years agoProvide the new "-config CONFIG" option to the test/releasetest.tcl script,
drh [Fri, 10 Oct 2014 17:44:03 +0000 (17:44 +0000)] 
Provide the new "-config CONFIG" option to the test/releasetest.tcl script,
which allows one to run a single test configuration selected by name.

FossilOrigin-Name: d479e32be205f6cd0474f002282eae6eec613f36

10 years agoAdd the estimated number of output rows to the EXPLAIN QUERY PLAN output
drh [Fri, 10 Oct 2014 17:20:39 +0000 (17:20 +0000)] 
Add the estimated number of output rows to the EXPLAIN QUERY PLAN output
if compiled with SQLITE_EXPLAIN_ESTIMATED_ROWS.  This feature is off by
default for the time being.

FossilOrigin-Name: daa8314fba9dc3c4f5e7fbda42c97604fbfc4392

10 years agoSimplify the code used to generate the text for EXPLAIN QUERY PLAN.
drh [Fri, 10 Oct 2014 15:47:46 +0000 (15:47 +0000)] 
Simplify the code used to generate the text for EXPLAIN QUERY PLAN.

FossilOrigin-Name: beea1efc3a49cad08087fcbb18dbce71c873fe57

10 years agoFix a potential problem in the whereRangeScanEst() routine when STAT4 is
drh [Fri, 10 Oct 2014 15:01:46 +0000 (15:01 +0000)] 
Fix a potential problem in the whereRangeScanEst() routine when STAT4 is
active.  The problem was introduced by recent enhancements.

FossilOrigin-Name: 68e1b4de700b5291f79249a03e1a750c6b2c9ae4

10 years agoCause the command-line shell to return non-zero if the final SQL statement
drh [Fri, 10 Oct 2014 13:08:33 +0000 (13:08 +0000)] 
Cause the command-line shell to return non-zero if the final SQL statement
is incomplete.

FossilOrigin-Name: 177fff3b98b101b98f1e7d334b6a80530b645565

10 years agoChange the balance_nonroot() routine to reduce the amount of memcpy work that takes...
dan [Thu, 9 Oct 2014 19:35:37 +0000 (19:35 +0000)] 
Change the balance_nonroot() routine to reduce the amount of memcpy work that takes place. This is a work in progress.

FossilOrigin-Name: 29304499ea4b72dbb6701e10cc19b5d41f7e5ac9

10 years agoAllow FTS tokenizers to choose whether or not to consider the "*" character part...
dan [Thu, 9 Oct 2014 15:08:17 +0000 (15:08 +0000)] 
Allow FTS tokenizers to choose whether or not to consider the "*" character part of tokens or not. This restores the pre-[e21bf7a2ad] behaviour. Also fix a problem causing FTS to interpret tokens beginning with "*" characters as EOF.

FossilOrigin-Name: 49dfee7cd1c9ab2901b8a871a6cd00b2ead76801

10 years agoAdd a test case for the memory leak fixed by the previous check-in.
drh [Thu, 9 Oct 2014 14:10:38 +0000 (14:10 +0000)] 
Add a test case for the memory leak fixed by the previous check-in.

FossilOrigin-Name: bae36d544676c90e337381a83f4513b4d925ab05

10 years agoFix a memory leak associated with the FTS4 matchinfo() function.
drh [Thu, 9 Oct 2014 14:00:49 +0000 (14:00 +0000)] 
Fix a memory leak associated with the FTS4 matchinfo() function.

FossilOrigin-Name: fb8da82411b80a234c6a5481622027815450996a

10 years agoRemove an always-true branch in whereRangeScanEst(). Replace it with an
drh [Wed, 8 Oct 2014 19:33:54 +0000 (19:33 +0000)] 
Remove an always-true branch in whereRangeScanEst().  Replace it with an
assert().

FossilOrigin-Name: 42e48fd3a6a6219d9bd6135d821b38c5157922ba

10 years agoFix up test cases to account for the new SQLITE_LIMIT_WORKER_THREADS limit.
drh [Wed, 8 Oct 2014 15:53:21 +0000 (15:53 +0000)] 
Fix up test cases to account for the new SQLITE_LIMIT_WORKER_THREADS limit.

FossilOrigin-Name: 6483d426c4c5c772cd49412ea37e0fa7a0378904

10 years agoSet the connection-specific lastRowid value before calling any SQL function.
drh [Wed, 8 Oct 2014 14:28:31 +0000 (14:28 +0000)] 
Set the connection-specific lastRowid value before calling any SQL function.

FossilOrigin-Name: dff0f6422e60a7e2e4efb658aab202a119cfa702

10 years agoEnsure that the Pager.pTmpSpace allocation is correct even if an OOM error
drh [Wed, 8 Oct 2014 13:34:21 +0000 (13:34 +0000)] 
Ensure that the Pager.pTmpSpace allocation is correct even if an OOM error
occurs while reducing the page size.

FossilOrigin-Name: e4b43967fd9a0b4944be9ab5575bff3678be8ed5

10 years agoRemove some temporary code in mallocA.test that was accidentally checked in.
dan [Wed, 8 Oct 2014 11:11:24 +0000 (11:11 +0000)] 
Remove some temporary code in mallocA.test that was accidentally checked in.

FossilOrigin-Name: dedd15f7cd13868f3be37646dd30ab7ceac5dea7

10 years agoFix the STAT4 range scan estimates for DESC indexes.
drh [Wed, 8 Oct 2014 02:53:25 +0000 (02:53 +0000)] 
Fix the STAT4 range scan estimates for DESC indexes.

FossilOrigin-Name: e3fe84005259ef9a6027d25793514cebb2d4e7e0

10 years agoMore intuitive labels on ".wheretrace" output.
drh [Wed, 8 Oct 2014 00:08:08 +0000 (00:08 +0000)] 
More intuitive labels on ".wheretrace" output.

FossilOrigin-Name: adcb3fed489b580221c7bf2692a60e24248b23a0

10 years agoMake sure the sqlite3VdbeMemClearAndResize() routine is never called with a
drh [Tue, 7 Oct 2014 23:02:24 +0000 (23:02 +0000)] 
Make sure the sqlite3VdbeMemClearAndResize() routine is never called with a
zero size parameter, since a size of zero could lead to either a memory leak
or an assertion fault.

FossilOrigin-Name: f672a380e2e52bede95ff11a533fd9f7d412d494

10 years agoFix the corruptI.test script so that it works with
drh [Tue, 7 Oct 2014 20:09:27 +0000 (20:09 +0000)] 
Fix the corruptI.test script so that it works with
SQLITE_ENABLE_OVERSIZE_CELL_CHECK and with SQLITE_DEFAULT_AUTOVACUUM=1.

FossilOrigin-Name: e405b9e4a9ef322d84b20e902234b4f6aa196b1b

10 years agoRestrict the scope of the valueToText() routine.
drh [Tue, 7 Oct 2014 16:59:22 +0000 (16:59 +0000)] 
Restrict the scope of the valueToText() routine.

FossilOrigin-Name: 13c962b33df411a0d9ead0bb1969596faa286f79

10 years agoEnhance (and fix) the MEMTYPE tags associated with heap memory allocations
drh [Tue, 7 Oct 2014 15:46:54 +0000 (15:46 +0000)] 
Enhance (and fix) the MEMTYPE tags associated with heap memory allocations
when SQLITE_MEMDEBUG is used.

FossilOrigin-Name: ca5b789e33c4e5ce366d8f5372d086442f84e230

10 years agoRemove unreachable branches in decodeIntArray() when compiling without
drh [Mon, 6 Oct 2014 18:33:49 +0000 (18:33 +0000)] 
Remove unreachable branches in decodeIntArray() when compiling without
STAT3 or STAT4.

FossilOrigin-Name: 80e1baa5c225c78902e08dbea9d577ff5757847f

10 years agoImprove the accuracy of the estimates used when searching an index for values not...
dan [Mon, 6 Oct 2014 14:37:48 +0000 (14:37 +0000)] 
Improve the accuracy of the estimates used when searching an index for values not present in any stat4 samples.

FossilOrigin-Name: 3aff9a9cac7aa994dfdaa0ab5c23ae73a1e820f0

10 years agoFix a harmless compiler warning inside an assert() in FTS4.
drh [Mon, 6 Oct 2014 12:41:57 +0000 (12:41 +0000)] 
Fix a harmless compiler warning inside an assert() in FTS4.

FossilOrigin-Name: 418f3c9ad28672e5fe38d772d34e7cf8d26bc0e1

10 years agoTweaks to documentation on sqlite3_open() and sqlite3_bind(). No code changes.
drh [Sat, 4 Oct 2014 19:31:53 +0000 (19:31 +0000)] 
Tweaks to documentation on sqlite3_open() and sqlite3_bind().  No code changes.

FossilOrigin-Name: b8f7f19dc06c59de2e194d83e6c052fb7d28c71d