]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 years agoIf an SQL function makes a recursive call to do an INSERT into the same
drh [Fri, 26 Sep 2014 01:10:02 +0000 (01:10 +0000)] 
If an SQL function makes a recursive call to do an INSERT into the same
database, make sure that the last_insert_rowid() for that INSERT is recorded.

FossilOrigin-Name: e93aecc090c2a1d3c231bb2bde044886eff0bdf7

10 years agoMinor code reformatting and comment change, to improve clarity.
drh [Thu, 25 Sep 2014 17:42:41 +0000 (17:42 +0000)] 
Minor code reformatting and comment change, to improve clarity.
No logic changes.

FossilOrigin-Name: baeb72a356d73e6f624edacd2986ab766105e177

10 years agoSimplifications to the SQL function and aggregate calling procedures.
drh [Thu, 25 Sep 2014 13:17:30 +0000 (13:17 +0000)] 
Simplifications to the SQL function and aggregate calling procedures.

FossilOrigin-Name: 3467049a1705b49905ea88a5c6becb6fe318f2fa

10 years agoSimplification to the random rowid picking logic that begins running when
drh [Thu, 25 Sep 2014 12:31:28 +0000 (12:31 +0000)] 
Simplification to the random rowid picking logic that begins running when
the maximum possible rowid has already been used.

FossilOrigin-Name: 1330c72e172324c68ab49e5bb2ceba985935ae01

10 years agoStill more performance enhancements to the LIKE and GLOB operators.
drh [Thu, 25 Sep 2014 11:08:57 +0000 (11:08 +0000)] 
Still more performance enhancements to the LIKE and GLOB operators.

FossilOrigin-Name: 6c8924cacc2b875270770fed2cc3b1884f57a655

10 years agoMore performance optimization for the LIKE and GLOB operators.
drh [Thu, 25 Sep 2014 03:51:37 +0000 (03:51 +0000)] 
More performance optimization for the LIKE and GLOB operators.

FossilOrigin-Name: 5ab1023d6cfe31fa8a194804b8216058977ac973

10 years agoChange that might allow SQLite to build and work using the EBCDIC character
drh [Thu, 25 Sep 2014 02:44:29 +0000 (02:44 +0000)] 
Change that might allow SQLite to build and work using the EBCDIC character
set.

FossilOrigin-Name: ef30e0352b3d4a29749cd0872c10e45a6649ec52

10 years agoSize reduction and performance improvement in the LIKE and GLOB operators.
drh [Thu, 25 Sep 2014 00:56:00 +0000 (00:56 +0000)] 
Size reduction and performance improvement in the LIKE and GLOB operators.

FossilOrigin-Name: b2c89ef49cd19b8031a8149a2dc47cea07dd04e0

10 years agoHave each open database allocate its pTmpSpace when the first write cursor
drh [Wed, 24 Sep 2014 19:47:27 +0000 (19:47 +0000)] 
Have each open database allocate its pTmpSpace when the first write cursor
is opened, rather than on each insert or delete, for a small space savings
and performance boost.

FossilOrigin-Name: 99323552c001bc9173eb2a44542234c8ef7a9845

10 years agoSmall performance and size optimization for btreeUnlockIfUnused().
drh [Wed, 24 Sep 2014 18:31:07 +0000 (18:31 +0000)] 
Small performance and size optimization for btreeUnlockIfUnused().

FossilOrigin-Name: 13c746f85d254475b10c3dd58555acd3bbead0ce

10 years agoDo not allow parameters in a DEFAULT clause of a CREATE TABLE statement.
drh [Wed, 24 Sep 2014 13:20:22 +0000 (13:20 +0000)] 
Do not allow parameters in a DEFAULT clause of a CREATE TABLE statement.
Ticket [78c0c8c3c9f7c1].

FossilOrigin-Name: 1ad2bc1ed4c4ac81ac67a9660761f0eeb47c7fef

10 years agoHave the clearCell() routine return the cell size to the caller, rather
drh [Wed, 24 Sep 2014 02:05:41 +0000 (02:05 +0000)] 
Have the clearCell() routine return the cell size to the caller, rather
than have the caller make a separate call to cellSizePtr().

FossilOrigin-Name: f21d217583c205dc17f98bb4877fd4ed98cefcb1

10 years agoShorten all lines of source code in btree.c to at most 80 characters.
drh [Wed, 24 Sep 2014 01:23:00 +0000 (01:23 +0000)] 
Shorten all lines of source code in btree.c to at most 80 characters.
No logical changes.

FossilOrigin-Name: 5dd41cdbfebdd088ebd9a90a394ee296c207ad90

10 years agoAdd the MemPage.noPayload boolean and use it to help
drh [Wed, 24 Sep 2014 00:59:08 +0000 (00:59 +0000)] 
Add the MemPage.noPayload boolean and use it to help
cellSizePtr() and btreeParseCellPtr() run faster.

FossilOrigin-Name: 8e3375313ebbf26b68561f3ed31d2a488222e5d0

10 years agoRemove an unused C-preprocessor macro. No functional changes to the code.
drh [Tue, 23 Sep 2014 23:12:53 +0000 (23:12 +0000)] 
Remove an unused C-preprocessor macro.  No functional changes to the code.

FossilOrigin-Name: f480582ccae0e9a917d4523191025bd16016ba64

10 years agoAvoid calling btreeParseCellPtr() from within fillInCell() since most of
drh [Tue, 23 Sep 2014 22:36:25 +0000 (22:36 +0000)] 
Avoid calling btreeParseCellPtr() from within fillInCell() since most of
what btreeParseCellPtr() computes is ignored by fillInCell().  Instead, have
fillInCell() compute the values it needs inline.  Performance improvement.

FossilOrigin-Name: 4147f6671e3faa8ddffab8387a6c7d9b5b962fc8

10 years agoSimplify the CellInfo structure for a size reduction and performance
drh [Tue, 23 Sep 2014 21:25:19 +0000 (21:25 +0000)] 
Simplify the CellInfo structure for a size reduction and performance
improvement.

FossilOrigin-Name: bf59df66b3613c38cfb13a68091b8328ebb22c78

10 years agoAdd the "multiplex_truncate" PRAGMA to the multiplexor extension, for
drh [Tue, 23 Sep 2014 18:30:00 +0000 (18:30 +0000)] 
Add the "multiplex_truncate" PRAGMA to the multiplexor extension, for
querying and setting the truncate flag on a database connection.

FossilOrigin-Name: d2962a5f388f30a02429e0c8b87399f482b5604c

10 years agoAdjust skip-scan cost estimates slightly so that a full table scan is
drh [Tue, 23 Sep 2014 01:40:59 +0000 (01:40 +0000)] 
Adjust skip-scan cost estimates slightly so that a full table scan is
preferred over a skip-scan to a column with only two distinct values.

FossilOrigin-Name: ae9a42b268ad3f7d21a5813bb931e795c6917014

10 years agoFix to payload size overflow detection in the cellSizePtr() change of
drh [Mon, 22 Sep 2014 20:38:10 +0000 (20:38 +0000)] 
Fix to payload size overflow detection in the cellSizePtr() change of
the previous check-in.

FossilOrigin-Name: 7609744014c6a84a8379794a0351a2e9626ec86b

10 years agoSize reduction and substantial performance increase for cellSizePtr().
drh [Mon, 22 Sep 2014 19:51:35 +0000 (19:51 +0000)] 
Size reduction and substantial performance increase for cellSizePtr().

FossilOrigin-Name: bc8bbf3207288d160287519c3b7123997996b440

10 years agoTune the query planner to be more aggressive about using automatic indexes
drh [Mon, 22 Sep 2014 14:30:51 +0000 (14:30 +0000)] 
Tune the query planner to be more aggressive about using automatic indexes
on views and subqueries for which there is not opportunity to declare a
persistent schema index.

FossilOrigin-Name: 41de1643bfc9ae25e20790d707e2789b665baa2b

10 years agoDisable shared memory operations using the unix-nolock VFS.
drh [Mon, 22 Sep 2014 03:22:27 +0000 (03:22 +0000)] 
Disable shared memory operations using the unix-nolock VFS.

FossilOrigin-Name: 10a6e510497b471d67ac3dfb19ff256a7d18adf4

10 years agoCorrectly handle an ORDER BY clause on an outer query when applying
drh [Sun, 21 Sep 2014 22:31:52 +0000 (22:31 +0000)] 
Correctly handle an ORDER BY clause on an outer query when applying
the compound-subquery flattening optimization.  Ticket [89398880bcfff].
Also add the SQLITE_ENABLE_SELECTTRACE option for additional debugging
and analysis information about select statement processing.

FossilOrigin-Name: d5880abd63c83c88e135257373afa0a3fd88297e

10 years agoAdd test cases for ticket [89398880bcfff9]. select-trace
drh [Sun, 21 Sep 2014 20:31:26 +0000 (20:31 +0000)] 
Add test cases for ticket [89398880bcfff9].

FossilOrigin-Name: 9683e001ed38b41979220eef0bdfcb54df5f3191

10 years agoAdd the "showauth" extension in ext/misc.
drh [Sun, 21 Sep 2014 17:51:37 +0000 (17:51 +0000)] 
Add the "showauth" extension in ext/misc.

FossilOrigin-Name: 28d52c1c38d849f099bc777f5987d1ef89680c2a

10 years agoImproved ".selecttrace" output.
drh [Sun, 21 Sep 2014 00:27:26 +0000 (00:27 +0000)] 
Improved ".selecttrace" output.

FossilOrigin-Name: c0b61f7092a7fd2c5f51db26ce7a7a5c75c227fe

10 years agoCandidate fix for [d11a6e908f].
dan [Sat, 20 Sep 2014 20:38:48 +0000 (20:38 +0000)] 
Candidate fix for [d11a6e908f].

FossilOrigin-Name: 89398880bcfff96e91d2a9c45774f5fb3209ffc1

10 years agoFix the SELECTTRACE_ENABLE macro so that it doesn't cause problems for
drh [Sat, 20 Sep 2014 20:24:49 +0000 (20:24 +0000)] 
Fix the SELECTTRACE_ENABLE macro so that it doesn't cause problems for
testfixture.  Add new SELECTTRACE() calls.

FossilOrigin-Name: f1ba68f131d2f03e4a7bc50cde23a7609d384279

10 years agoEnable SELECT query planning tracing when compiled with
drh [Sat, 20 Sep 2014 18:18:33 +0000 (18:18 +0000)] 
Enable SELECT query planning tracing when compiled with
SQLITE_ENABLE_SELECTTRACE and either SQLITE_DEBUG or SQLITE_TEST.

FossilOrigin-Name: cbe0cf9ddf46f0a678c85d49bfa74e3b7712e1a1

10 years agoFix the usage of the _GNU_SOURCE and _BSD_SOURCE macros in the main
drh [Sat, 20 Sep 2014 00:35:05 +0000 (00:35 +0000)] 
Fix the usage of the _GNU_SOURCE and _BSD_SOURCE macros in the main
internal header file, sqliteInt.h.  Set HAVE_STRCHRNUL to 1 by default on
Linux only.

FossilOrigin-Name: 59e2c9df02d7e988c5ad44c560ead1e5288b12e7

10 years agoOnly enable HAVE_STRCHRNUL by default on linux, as that is the only place sqliteIntMacros
drh [Sat, 20 Sep 2014 00:29:20 +0000 (00:29 +0000)] 
Only enable HAVE_STRCHRNUL by default on linux, as that is the only place
it appears to work by default.

FossilOrigin-Name: 0fac2c045f47c7735af4eb68ced81d8b43622a1f

10 years agoRevise macro usage in 'sqliteInt.h'.
mistachkin [Sat, 20 Sep 2014 00:02:23 +0000 (00:02 +0000)] 
Revise macro usage in 'sqliteInt.h'.

FossilOrigin-Name: 35db3e2f350ca2bc6bb9e1a647aec7f93bfb7065

10 years agoSimplify two conditionals and add testcase() macros to the affinity transform
drh [Fri, 19 Sep 2014 22:44:20 +0000 (22:44 +0000)] 
Simplify two conditionals and add testcase() macros to the affinity transform
logic in the comparison operators.

FossilOrigin-Name: 544664cadfb4e504bc0b321c865d1ecb8a831e20

10 years agoRecognize the invariant that a Mem object cannot be MEM_Dyn and have
drh [Fri, 19 Sep 2014 22:30:49 +0000 (22:30 +0000)] 
Recognize the invariant that a Mem object cannot be MEM_Dyn and have
a non-zero szMalloc at the same time.  Enforce this with assert()s and
exploit it in the sqlite3VdbeMemClearAndResize() routine for a performance
increase.

FossilOrigin-Name: 3b21cf2b284048da4b728a5d6ec89e5c330144d4

10 years agoTighten the conditions under which applyNumericAffinity() be called and add
drh [Fri, 19 Sep 2014 22:01:54 +0000 (22:01 +0000)] 
Tighten the conditions under which applyNumericAffinity() be called and add
assert() statements to prove that it is never called otherwise.

FossilOrigin-Name: e996ca32cb643c558b616c0dd872f3351b6aa3ef

10 years agoFix the affinity on inserts into the ANALYZE tables. Change the affinity
drh [Fri, 19 Sep 2014 20:13:25 +0000 (20:13 +0000)] 
Fix the affinity on inserts into the ANALYZE tables.  Change the affinity
characters to be upper case, to make the P5 parameter of comparison operators
easier to read.

FossilOrigin-Name: 3f3ca76aea38d566a574f4403b375bdac32854ed

10 years agoDo not attempt to extend the temp file if VFS version 3 is not supported and
drh [Fri, 19 Sep 2014 19:43:20 +0000 (19:43 +0000)] 
Do not attempt to extend the temp file if VFS version 3 is not supported and
hence memory mapped I/O is unavailable.

FossilOrigin-Name: 3ab20ba14f0204efeec62c7dbb87cb3f60e2497f

10 years agoMake the "nolock" VFS on unix a version-3 VFS so that the sorter can
drh [Fri, 19 Sep 2014 19:00:48 +0000 (19:00 +0000)] 
Make the "nolock" VFS on unix a version-3 VFS so that the sorter can
use memory-mapped I/O.

FossilOrigin-Name: 3db78d6100a1ecf58c18eec3abefa7d1250c649c

10 years agoRemove a local variable from the OP_Column implementation, resulting in a
drh [Fri, 19 Sep 2014 16:56:45 +0000 (16:56 +0000)] 
Remove a local variable from the OP_Column implementation, resulting in a
modest size reduction and a performance increase.

FossilOrigin-Name: 6199760d1340858d97c845177986b783da915d9e

10 years agoSmall size reduction and performance increase for releaseMemArray().
drh [Fri, 19 Sep 2014 16:13:12 +0000 (16:13 +0000)] 
Small size reduction and performance increase for releaseMemArray().

FossilOrigin-Name: 24cd32d681df58f687b2afbe4b13d579e3efdd4b

10 years agoUpdates to comments. No code changes.
drh [Fri, 19 Sep 2014 16:02:06 +0000 (16:02 +0000)] 
Updates to comments.  No code changes.

FossilOrigin-Name: 9b42c3da6b2593a10b8fe4b2fcc3d650132625c1

10 years agoThe OP_Column opcode runs faster and is smaller by manually in-lining the
drh [Fri, 19 Sep 2014 15:28:33 +0000 (15:28 +0000)] 
The OP_Column opcode runs faster and is smaller by manually in-lining the
code that persists string values in the output register.

FossilOrigin-Name: 36b613ccf0ddb764af90841994da91b7fcaa8f00

10 years agoAdd the sqlite3VdbeMemClearAndResize() function. Fix a sorting-index
drh [Fri, 19 Sep 2014 04:42:38 +0000 (04:42 +0000)] 
Add the sqlite3VdbeMemClearAndResize() function.  Fix a sorting-index
prefilter problem.

FossilOrigin-Name: 987a7a211913b3949da20e43423af376f72a28ba

10 years agoMake sure that the sorting-index pre-filter recognizes that a rowid reference Cplusplus-comment
drh [Fri, 19 Sep 2014 02:01:37 +0000 (02:01 +0000)] 
Make sure that the sorting-index pre-filter recognizes that a rowid reference
might be sortable.  This fixes a performance regression.

FossilOrigin-Name: 72727b68cd07969165f1f0943cc7e1a265436653

10 years agoAdd the sqlite3VdbeMemClearAndResize() interface to be used in place of
drh [Fri, 19 Sep 2014 00:43:39 +0000 (00:43 +0000)] 
Add the sqlite3VdbeMemClearAndResize() interface to be used in place of
sqlite3VdbeMemGrow().

FossilOrigin-Name: 5b9b8987797abf7c68d2c3154f6657be9b8b1c8f

10 years agoAdd the Mem.szMalloc element to the Mem object and use it to keep track of
drh [Thu, 18 Sep 2014 21:25:33 +0000 (21:25 +0000)] 
Add the Mem.szMalloc element to the Mem object and use it to keep track of
the size of the Mem.zMalloc allocation.

FossilOrigin-Name: 9c09ac353df6041808cace41880f4729ee73f5e1

10 years agoCorrect typos in comments. No changes to code.
mistachkin [Thu, 18 Sep 2014 18:55:47 +0000 (18:55 +0000)] 
Correct typos in comments.  No changes to code.

FossilOrigin-Name: 55879932116d373c95a5f32ec44b53a9c3f4db24

10 years agoMerge the Mem.r value into the MemValue union as Mem.u.r. Hence, a Mem can
drh [Thu, 18 Sep 2014 17:52:15 +0000 (17:52 +0000)] 
Merge the Mem.r value into the MemValue union as Mem.u.r.  Hence, a Mem can
now store an integer or a real but not both at the same time.  Strings are
still stored in a separate element Mem.z, for now.

FossilOrigin-Name: 4c8c89d7e62aecfe2eb735f7bb114aed6b452847

10 years agoPerformance improvement for affinity transformations on comparison operators.
drh [Thu, 18 Sep 2014 16:28:59 +0000 (16:28 +0000)] 
Performance improvement for affinity transformations on comparison operators.

FossilOrigin-Name: d7afdcbac24350b73a30c06c45cf0f2122820e4f

10 years agoSince numeric affinity is the most common case, check it first. Interchange
drh [Thu, 18 Sep 2014 14:36:00 +0000 (14:36 +0000)] 
Since numeric affinity is the most common case, check it first.  Interchange
the NONE and TEXT affinity codes for easier checking of no affinity.

FossilOrigin-Name: 4ef4c9a7c8510203bce0941dda2f76ded8da1de2

10 years agoModify an assert() within sqlite3PagerWalFramesize(), a function only ever used by...
dan [Thu, 18 Sep 2014 09:59:28 +0000 (09:59 +0000)] 
Modify an assert() within sqlite3PagerWalFramesize(), a function only ever used by zipvfs, to account for recent zipvfs changes.

FossilOrigin-Name: 3bd7c1b2faa2d4cc95b255633204006849bfd5e0

10 years agoFix harmless warnings on 32-bit MSVC builds.
drh [Thu, 18 Sep 2014 02:20:54 +0000 (02:20 +0000)] 
Fix harmless warnings on 32-bit MSVC builds.

FossilOrigin-Name: 5192f964b2a85459553f1cea741b9791606ccc4e

10 years agoMake sure of the strchrnul() library function on platforms where it is
drh [Thu, 18 Sep 2014 01:50:09 +0000 (01:50 +0000)] 
Make sure of the strchrnul() library function on platforms where it is
available.

FossilOrigin-Name: ef1aa10b7f54912cba71cd0a98c5055d501de54f

10 years agoMerge micro-optimizations into trunk after fixing the build on MSVC.
drh [Thu, 18 Sep 2014 01:29:11 +0000 (01:29 +0000)] 
Merge micro-optimizations into trunk after fixing the build on MSVC.
Performance now shows 7.58% faster than the 3.8.6 release on x64 with
gcc 4.8.1 and -Os.

FossilOrigin-Name: 1de558bcb13edc4e9a42a0b05e4b0ed6b14286a4

10 years agoFix compiler warnings and change the nullMem structure initializer into a
drh [Thu, 18 Sep 2014 01:21:43 +0000 (01:21 +0000)] 
Fix compiler warnings and change the nullMem structure initializer into a
format that MSVC can understand.

FossilOrigin-Name: 163bfae8583b2d3002a3a43d6bf8a66fefd73acb

10 years agoPerformance improvement and slight size reduction to the comparison operators
drh [Wed, 17 Sep 2014 23:37:38 +0000 (23:37 +0000)] 
Performance improvement and slight size reduction to the comparison operators
in the VDBE.

FossilOrigin-Name: 14052a7d088bed8196d90a3361ce717a5193bdc8

10 years agoIn the Mem object, stop requiring that Mem.xDel be NULL when the MEM_Dyn
drh [Wed, 17 Sep 2014 16:41:15 +0000 (16:41 +0000)] 
In the Mem object, stop requiring that Mem.xDel be NULL when the MEM_Dyn
bit is clear.  Also reduce the amount of initialization of Mem objects.
All for a small size reduction and performance increase.

FossilOrigin-Name: fdddb477c89dabb9f7bf2d5ccb32534868df3a03

10 years agoImproved interface to the Mem object handling. Small size reduction and
drh [Wed, 17 Sep 2014 14:52:46 +0000 (14:52 +0000)] 
Improved interface to the Mem object handling.  Small size reduction and
performance increase.

FossilOrigin-Name: 4e437844322cc20eef92928b53fa6b37eded586e

10 years agoContinuing cleanup of memory register memory allocation handling.
drh [Tue, 16 Sep 2014 21:54:11 +0000 (21:54 +0000)] 
Continuing cleanup of memory register memory allocation handling.

FossilOrigin-Name: 2598aedc5dd2bac67e2e518a31f2803e469c2ba6

10 years agoMake sure registers are cleared properly prior to being used to store
drh [Tue, 16 Sep 2014 20:05:21 +0000 (20:05 +0000)] 
Make sure registers are cleared properly prior to being used to store
the result of an OP_Column operator.

FossilOrigin-Name: 78fb8838d80b229418c347c63579989432e1af7d

10 years agoSimplification of the OP_Column logic for the case of rows with overflow.
drh [Tue, 16 Sep 2014 18:22:44 +0000 (18:22 +0000)] 
Simplification of the OP_Column logic for the case of rows with overflow.

FossilOrigin-Name: f73678038d8fc399c1ca55230ae45962007c909c

10 years agoRemove an unused parameter from sqlite3VdbeIdxRowid(). This is cosmetic
drh [Tue, 16 Sep 2014 14:55:08 +0000 (14:55 +0000)] 
Remove an unused parameter from sqlite3VdbeIdxRowid().  This is cosmetic
only as the C-compiler optimizers were already omitting this parameter on
amalgamation builds.

FossilOrigin-Name: a10a6bba4963761b490b7243b388dcc920c4cfed

10 years agoReduce the number of arguments to RecordCompare functions from 4 to 3,
drh [Tue, 16 Sep 2014 14:37:35 +0000 (14:37 +0000)] 
Reduce the number of arguments to RecordCompare functions from 4 to 3,
resulting in a small performance increase.

FossilOrigin-Name: 8239c35aedd583af79505378bb7dbb78346a3f45

10 years agoReorder the elements of the Mem object for a small size reduction and
drh [Tue, 16 Sep 2014 14:16:31 +0000 (14:16 +0000)] 
Reorder the elements of the Mem object for a small size reduction and
performance improvement.

FossilOrigin-Name: 0be3019ed794c10de67dfd645ceea7d45815bc4b

10 years agoChanges to sqlite3VdbeRecordUnpack() to make it slightly smaller and faster.
drh [Tue, 16 Sep 2014 13:30:05 +0000 (13:30 +0000)] 
Changes to sqlite3VdbeRecordUnpack() to make it slightly smaller and faster.

FossilOrigin-Name: 8fb90da77ce0e662c1ef1ae0d854e5164494b7af

10 years agoPerformance improvement to the sqlite3MemCompare() routine by factoring out
drh [Tue, 16 Sep 2014 03:24:43 +0000 (03:24 +0000)] 
Performance improvement to the sqlite3MemCompare() routine by factoring out
sqlite3BlobCompare().

FossilOrigin-Name: 20ed2321b09ba076e50f9fc2f42c135b25746d72

10 years agoFix tool/showwal.c so that it handles WAL files that contain 64KiB pages.
dan [Mon, 15 Sep 2014 16:53:23 +0000 (16:53 +0000)] 
Fix tool/showwal.c so that it handles WAL files that contain 64KiB pages.

FossilOrigin-Name: 4060efb646c873c4abde7ab9ddf330489a44f274

10 years agoAvoid attempting to call the xFetch() method of an sqlite3_io_methods object with...
dan [Mon, 15 Sep 2014 16:50:34 +0000 (16:50 +0000)] 
Avoid attempting to call the xFetch() method of an sqlite3_io_methods object with a version number less than 3.

FossilOrigin-Name: dedaa6fb3d2e6e697d4a48649af5f42d9a11c333

10 years agoRemove the EXPENSIVE_ASSERTS in pcache.c having to do with the pSynced field
drh [Mon, 15 Sep 2014 14:59:12 +0000 (14:59 +0000)] 
Remove the EXPENSIVE_ASSERTS in pcache.c having to do with the pSynced field
of the Pcache object, as they are incorrect, as revealed by recent pcache
enhancements.

FossilOrigin-Name: 69a64560777f85b47349b4b2aab01dc99298592e

10 years agoDo not flatten aggregate subqueries that contain min() or max() functions
drh [Mon, 15 Sep 2014 14:46:02 +0000 (14:46 +0000)] 
Do not flatten aggregate subqueries that contain min() or max() functions
so that if the min()/max() are discarded by the outer query, they still
function and cause non-aggregate expression to be evaluated on the minimal
or maximal row.

FossilOrigin-Name: 0bdf1a086b3946722f4d4b328e25917f61c14713

10 years agoAdjust comments to show that subquery flattening restriction (10) was
drh [Mon, 15 Sep 2014 11:14:50 +0000 (11:14 +0000)] 
Adjust comments to show that subquery flattening restriction (10) was
removed from the code back in 2005.  This is a comment change only.

FossilOrigin-Name: 4ff0eb96bc364baed2d8005c69291ca9240b99dd

10 years agoSmall performance improvement to the dirty list handling in the pager.
drh [Fri, 12 Sep 2014 20:30:59 +0000 (20:30 +0000)] 
Small performance improvement to the dirty list handling in the pager.

FossilOrigin-Name: b332a84d5154f70f3197537df4af243eaebbb011

10 years agoSimplify the way the column cache is managed around OP_Move instructions.
drh [Fri, 12 Sep 2014 17:41:30 +0000 (17:41 +0000)] 
Simplify the way the column cache is managed around OP_Move instructions.

FossilOrigin-Name: 320556233e19cdd9d590a09655c3465754700d39

10 years agoFix a problem with parser memory allocation on 32-bit systems.
drh [Fri, 12 Sep 2014 04:28:33 +0000 (04:28 +0000)] 
Fix a problem with parser memory allocation on 32-bit systems.

FossilOrigin-Name: 2f69a1fa6adc9377149ae7faa586a5d30b6a631b

10 years agoFix an issue with sqlite3_bind_text64() with the SQLITE_UTF16 encoding
drh [Thu, 11 Sep 2014 23:34:55 +0000 (23:34 +0000)] 
Fix an issue with sqlite3_bind_text64() with the SQLITE_UTF16 encoding
parameter.  Remove some unreachable code from the text64() and blob64()
implementation.

FossilOrigin-Name: 34292b084ef48cd6e9ca5704f6b072a29733b4c2

10 years agoAdd new APIs that take 64-bit length parameters: sqlite3_malloc64(),
drh [Thu, 11 Sep 2014 18:44:04 +0000 (18:44 +0000)] 
Add new APIs that take 64-bit length parameters: sqlite3_malloc64(),
sqlite3_realloc64(), sqlite3_bind_blob64(), sqlite3_bind_text64(),
sqlite3_result_blob64(), and sqlite3_result_text64().
Add the sqlite3_msize() interface.
Internal memory allocation routines now use 64-bit unsigned
length parameters for safety.
Fix the sqlite3_get_table() to use sqlite3_realloc64() to avoid
a integer overflow problem.

FossilOrigin-Name: 7e4978c003867d1b532b69221013dda75ca61953

10 years agoAdd the SQLITE_USER_AUTHENTICATION extension to the trunk. This extension
drh [Thu, 11 Sep 2014 17:27:54 +0000 (17:27 +0000)] 
Add the SQLITE_USER_AUTHENTICATION extension to the trunk.  This extension
is disabled by default.  Special compilation procedures are need to enable
it.

FossilOrigin-Name: 65884d4f81a4705b0356b6cb8ec4909945ff5c19

10 years agoClean up some #includes in the extension API implementation. user-auth
drh [Thu, 11 Sep 2014 17:14:54 +0000 (17:14 +0000)] 
Clean up some #includes in the extension API implementation.

FossilOrigin-Name: b149ef5c639e6bcff7bd1c7866353e7f7f468070

10 years agoSuppress the potential schema error that occurs when a non-user-auth
drh [Thu, 11 Sep 2014 16:36:43 +0000 (16:36 +0000)] 
Suppress the potential schema error that occurs when a non-user-auth
SQLite library tries to parse the sqlite_user table definition in a
user-auth database.

FossilOrigin-Name: cda33c1ef35416a155af602c0b4e9d42ccf8633f

10 years agoEnhance the sqlite3_user_add() interface to initialize the user
drh [Thu, 11 Sep 2014 16:19:31 +0000 (16:19 +0000)] 
Enhance the sqlite3_user_add() interface to initialize the user
authentication logic.  Add test cases for the extra argument on the
end of the authorizer callback.

FossilOrigin-Name: 842c6da8f1a62bd13a1b4089a98b0835a46a2285

10 years agoAll interfaces working and tested.
drh [Thu, 11 Sep 2014 15:25:02 +0000 (15:25 +0000)] 
All interfaces working and tested.

FossilOrigin-Name: 96ea5c0b3cd1dec81d490f2f958ebd2e47a24921

10 years agoGet the sqlite3_user_delete() interface working.
drh [Thu, 11 Sep 2014 14:56:45 +0000 (14:56 +0000)] 
Get the sqlite3_user_delete() interface working.

FossilOrigin-Name: 974a9c65583f7ab438d5673dc00c347ab8322855

10 years agoFix the sqlite3_user_change() interface so that it does allow a
drh [Thu, 11 Sep 2014 14:40:27 +0000 (14:40 +0000)] 
Fix the sqlite3_user_change() interface so that it does allow a
non-admin user to change their own password.

FossilOrigin-Name: 52d440c7e1b07fc03f14ed5fa4cc4c89a75cd430

10 years agoMove user authentication blocking from sqlite3_prepare() over to the
drh [Thu, 11 Sep 2014 14:01:41 +0000 (14:01 +0000)] 
Move user authentication blocking from sqlite3_prepare() over to the
table lock generator, thus allowing SQL statements (like
"PRAGMA locking_mode") that do not touch database content to run
prior to authentication.

FossilOrigin-Name: 70121e7cf868b7d6d19bf98794ddc3809a901456

10 years agoAdd support for the extra parameter on the sqlite3_set_authorizer() callback
drh [Thu, 11 Sep 2014 13:44:52 +0000 (13:44 +0000)] 
Add support for the extra parameter on the sqlite3_set_authorizer() callback
and support for failing an ATTACH with an authentication-required database
using bad credentials.  The extension is now feature complete, but much
testing and bug-fixing remains.

FossilOrigin-Name: 596e728b0eb19a34c888e33d4d37978ca2bf1e00

10 years agoReorder parameters on the sqlite3_user_*() interfaces for consistency.
drh [Thu, 11 Sep 2014 00:27:53 +0000 (00:27 +0000)] 
Reorder parameters on the sqlite3_user_*() interfaces for consistency.
Add the first TCL test cases.

FossilOrigin-Name: 2f6d8f32eef526b5912f42ab467e3c7812480d8b

10 years agoComplete the implementation of the various APIs. Fix several problems.
drh [Wed, 10 Sep 2014 22:46:46 +0000 (22:46 +0000)] 
Complete the implementation of the various APIs.  Fix several problems.
This is another incremental check-in that does not completely work.

FossilOrigin-Name: 4eaaa7fa87aa912d24f8b35440ab60310dc08310

10 years agoAdd the ".user" shell command and implement the sqlite3_user_add()
drh [Wed, 10 Sep 2014 19:01:14 +0000 (19:01 +0000)] 
Add the ".user" shell command and implement the sqlite3_user_add()
routine.  Incremental check-in.  The code compiles but does not work.

FossilOrigin-Name: a0455f9deb603bf91684158d911269622720fc1a

10 years agoFurther ideas on user authentication. Not yet working code.
drh [Wed, 10 Sep 2014 17:34:28 +0000 (17:34 +0000)] 
Further ideas on user authentication.  Not yet working code.

FossilOrigin-Name: c8171ecd0d6f097c9e95d5f6643bae8d67f44750

10 years agoChange the name of the _texte64() interfaces to just _test64(), without the "e". 64-bit-lengths
drh [Tue, 9 Sep 2014 20:30:24 +0000 (20:30 +0000)] 
Change the name of the _texte64() interfaces to just _test64(), without the "e".

FossilOrigin-Name: 6ab76c5fedfe568b0f0f34a600f9135bf6558148

10 years agoAdd new interfaces to the loadable extension mechanism.
drh [Tue, 9 Sep 2014 18:41:32 +0000 (18:41 +0000)] 
Add new interfaces to the loadable extension mechanism.

FossilOrigin-Name: 18d80cbc590165913d82056aa69ddaeea07b76ec

10 years agoAdd new APIs that take 64-bit length parameters:
drh [Tue, 9 Sep 2014 17:27:35 +0000 (17:27 +0000)] 
Add new APIs that take 64-bit length parameters:
sqlite3_malloc64(),
sqlite3_realloc64(),
sqlite3_bind_blob64(),
sqlite3_bind_texte64(),
sqlite3_result_blob64(),
and sqlite3_result_texte64().
Internal memory allocation routines also now use 64-bit unsigned length
parameters for safety.
Also add the sqlite3_msize() interface.
Fix the sqlite3_get_table() to use sqlite3_realloc64() to avoid a
integer overflow problem.

FossilOrigin-Name: 94954850cf2e1ec0b7f590c7f46cdc54c72558ce

10 years agoNon-working preliminary implementation attempts on user authentication.
drh [Tue, 9 Sep 2014 14:47:53 +0000 (14:47 +0000)] 
Non-working preliminary implementation attempts on user authentication.

FossilOrigin-Name: 8440f093bac19a41d44ee352744354eab897fe4e

10 years agoFixes to os_unix.c to support database (and other) files larger than 2GiB on Android.
dan [Sat, 6 Sep 2014 17:06:13 +0000 (17:06 +0000)] 
Fixes to os_unix.c to support database (and other) files larger than 2GiB on Android.

FossilOrigin-Name: ad7063aa1a0db32cdbe71815545b2edca57d3bcc

10 years agoMerge latest trunk changes with this branch. android-large-filles
dan [Sat, 6 Sep 2014 16:52:18 +0000 (16:52 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 9dca7ce55797b3eb617859f6189c1a2ec6f66566

10 years agoFixes to os_unix.c to support database (and other) files larger than 2GiB.
dan [Sat, 6 Sep 2014 16:49:40 +0000 (16:49 +0000)] 
Fixes to os_unix.c to support database (and other) files larger than 2GiB.

FossilOrigin-Name: e7fae33c0754488336ce093189a83dfe1b818d89

10 years agoFix typos in comments. No code changes.
peter.d.reid [Sat, 6 Sep 2014 16:39:46 +0000 (16:39 +0000)] 
Fix typos in comments. No code changes.

FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69

10 years agoDo not require a page-size change if the attempt to change the page size
drh [Sat, 6 Sep 2014 03:38:51 +0000 (03:38 +0000)] 
Do not require a page-size change if the attempt to change the page size
failed due to an OOM error.

FossilOrigin-Name: 4d4fb197dc438a486cf5d967cf435f1132902c63

10 years agoAdd the sqlite3_memdebug_title_count global variable, used during debugging
drh [Sat, 6 Sep 2014 03:16:28 +0000 (03:16 +0000)] 
Add the sqlite3_memdebug_title_count global variable, used during debugging
to count the number of invocations of test_memdebug_settitle.  By examining
this variable in the debugger after a segfault, one can then set a breakpoint
on test_memdebug_settitle that will fire just before the problem.

FossilOrigin-Name: 27e3ca3e0f1da54e3527704a8601bb9003b086bf