]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoFix a problem in sqlite3CodecQueryParameters() that was introduced by the
drh [Sat, 1 Feb 2020 13:30:39 +0000 (13:30 +0000)] 
Fix a problem in sqlite3CodecQueryParameters() that was introduced by the
query parameter encoding changes for the 3.31.1 release.

FossilOrigin-Name: cc65ca541265bd7061ed8f5ec9a54f3c384c41019c5ea1c68dcaabeff3495839

5 years agoVersion 3.31.1 version-3.31.1
drh [Mon, 27 Jan 2020 19:55:54 +0000 (19:55 +0000)] 
Version 3.31.1

FossilOrigin-Name: 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6

5 years agoUpdate the version number to 3.31.1.
drh [Mon, 27 Jan 2020 17:09:02 +0000 (17:09 +0000)] 
Update the version number to 3.31.1.

FossilOrigin-Name: 6fb9a8fb85486a8fccc462856316ef523450c23a7a7a81c8dfb323fbe809f8f5

5 years agoRevise the layout of filenames in the Pager object so that it is unchanged
drh [Mon, 27 Jan 2020 14:40:44 +0000 (14:40 +0000)] 
Revise the layout of filenames in the Pager object so that it is unchanged
from prior versions.  It turns out that some important 3rd-party software
does questionable pointer manipulations on those filenames that depend on
that legacy layout.  Technical this is a misuse of SQLite by the 3rd-party
software, but we want to avoid unnecessary breakage.

FossilOrigin-Name: 34ab760689fd493eda482e856047708d74e769a01cc90b69da456d79ffe39aea

5 years agoFix typos in the sqlite3ext.h header file that prevent some newer APIs from
drh [Thu, 23 Jan 2020 15:00:18 +0000 (15:00 +0000)] 
Fix typos in the sqlite3ext.h header file that prevent some newer APIs from
being accessed from loadable extensions.

FossilOrigin-Name: 14331989fcaf6591336290ed1548e9c90f0f153e27f456f4c30c966f9c23aa6e

5 years agoFix variable declaration issue seen with MSVC.
mistachkin [Thu, 23 Jan 2020 00:08:25 +0000 (00:08 +0000)] 
Fix variable declaration issue seen with MSVC.

FossilOrigin-Name: 8a6fe3066cf0599fcf2960e8fb3ae39e4e7a61ec81e8ec71d0b5910aee2c16f6

5 years agoFix a NEVER() macro that can be true if compiled with
drh [Wed, 22 Jan 2020 23:08:19 +0000 (23:08 +0000)] 
Fix a NEVER() macro that can be true if compiled with
SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION.
Ticket [b985f0bd1636d9bc]

FossilOrigin-Name: 9f0f5d593a383ec2bebb6513ad566813f5b3dc6f052c61bcd76e8ac557bbb062

5 years agoVersion 3.31.0 version-3.31.0
drh [Wed, 22 Jan 2020 18:38:59 +0000 (18:38 +0000)] 
Version 3.31.0

FossilOrigin-Name: f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824

5 years agoUpdate test file exclusive.test so that it works with the "journaltest" permutation.
dan [Tue, 21 Jan 2020 16:31:26 +0000 (16:31 +0000)] 
Update test file exclusive.test so that it works with the "journaltest" permutation.

FossilOrigin-Name: 4daf94d83319231e42243625c804d5db2d14f10fa5ea1a1f358c3603c47b955b

5 years agoFix a problem with using views in SQLITE_OMIT_VIRTUAL_TABLE builds. Also some test...
dan [Tue, 21 Jan 2020 16:23:17 +0000 (16:23 +0000)] 
Fix a problem with using views in SQLITE_OMIT_VIRTUAL_TABLE builds. Also some test case fixes required for the same builds.

FossilOrigin-Name: 934ee8bdb481a5cbd3d9c5f53028073129d3bca4fee14fe4a49bbf9c0c9d74f7

5 years agoFix a case in fts3auto.test that fails for SQLITE_DISABLE_FTS4_DEFERRED builds.
dan [Tue, 21 Jan 2020 15:01:14 +0000 (15:01 +0000)] 
Fix a case in fts3auto.test that fails for SQLITE_DISABLE_FTS4_DEFERRED builds.

FossilOrigin-Name: d241055ead935f0e461a67f483788bcd59f7e8d65ade54b9c7c7c4fec9414102

5 years agoFix an assert() that could fail in SQLITE_MUTATION_TEST builds following an error...
dan [Tue, 21 Jan 2020 14:42:48 +0000 (14:42 +0000)] 
Fix an assert() that could fail in SQLITE_MUTATION_TEST builds following an error in a query that uses CTEs.

FossilOrigin-Name: c7e29458a73bbe73a1429477d0c01d5a7b870ab75d3cb08a703be21714e439b7

5 years agoFix a problem in the userauth extension causing it to occasionally set "PRAGMA count_...
dan [Tue, 21 Jan 2020 13:40:35 +0000 (13:40 +0000)] 
Fix a problem in the userauth extension causing it to occasionally set "PRAGMA count_changes" (and some others) to true.

FossilOrigin-Name: 3a62f64222ebd176c06e89b9fe5275b7b1f09df0afbae1c5c148a4e527e9d80b

5 years agoFix the series.c and spellfix.c extensions to use SQLITE_VTAB_INNOCUOUS
drh [Tue, 21 Jan 2020 12:29:02 +0000 (12:29 +0000)] 
Fix the series.c and spellfix.c extensions to use SQLITE_VTAB_INNOCUOUS
correctly.  Fix the documentation on sqlite3_vtab_config() to take into
account SQLITE_VTAB_INNOCUOUS and SQLITE_VTAB_DIRECTONLY.

FossilOrigin-Name: 9265cb7f026c0e959bd034d4cd94fe597744e0dd455d0a20736ee5f5bee880c8

5 years agoImprovements to the autoconf TEA Makefile for MSVC.
mistachkin [Tue, 21 Jan 2020 01:45:27 +0000 (01:45 +0000)] 
Improvements to the autoconf TEA Makefile for MSVC.

FossilOrigin-Name: cffcf12f03906debeac6a974534b4439a4952cc72767e3bcb8e6d91da944d69f

5 years agoIn the fuzzcheck test program, reduce the default expression depth limit
drh [Mon, 20 Jan 2020 14:42:09 +0000 (14:42 +0000)] 
In the fuzzcheck test program, reduce the default expression depth limit
from 1000 to 500 to avoid stack-overflow problems when running stress tests
using clang ASAN.

FossilOrigin-Name: 63d886f4ce3c770498b8bdad45b04143a3f63197d81793bde107450aba4a9c87

5 years agoEnhancement to the CLI to allow the ".parameter init" command to work
drh [Sun, 19 Jan 2020 20:37:26 +0000 (20:37 +0000)] 
Enhancement to the CLI to allow the ".parameter init" command to work
even if defensive mode is turned on.

FossilOrigin-Name: 4d46255096671ae7be33081e81bb25561304e069f459ffa7587f1f19381a1851

5 years agoDocumentation improvements.
drh [Sat, 18 Jan 2020 23:52:45 +0000 (23:52 +0000)] 
Documentation improvements.

FossilOrigin-Name: 535afe150939d06342fbbed4ca1b6a1472fde51ac9edd4b4b583b87d90f509c2

5 years agoIn the TCL interface, add the ability to change the
drh [Sat, 18 Jan 2020 22:20:14 +0000 (22:20 +0000)] 
In the TCL interface, add the ability to change the
SQLITE_DBCONFIG_TRUSTED_SCHEMA setting using the "db config" method.

FossilOrigin-Name: 1accfa8cf05856b03cecab7a2cd0c0337842a0003cfbec207b6f0acdd93e8f15

5 years agoAllow non-deterministic function in CHECK constraints. It turns out that
drh [Sat, 18 Jan 2020 21:34:31 +0000 (21:34 +0000)] 
Allow non-deterministic function in CHECK constraints.  It turns out that
PostgreSQL, MySQL, and SQLServer all allow this.  We should be the the
exception.  Ticket [830277d9db6c3ba1]

FossilOrigin-Name: 8c8ce526adb60b8061e55151599ca8b11f1ec2e968d3bacc73a2a249e9e95ee1

5 years agoDo not use memcpy() of zero bytes when initializing a pager. This avoids
drh [Sat, 18 Jan 2020 19:46:42 +0000 (19:46 +0000)] 
Do not use memcpy() of zero bytes when initializing a pager.  This avoids
a warning.

FossilOrigin-Name: cca437788e092b21ed1784dd94d4b1c7204ff1717538d276a10880d1345904bd

5 years agoDisable a redundant test case that uses a very large stack, and hence
drh [Sat, 18 Jan 2020 19:07:00 +0000 (19:07 +0000)] 
Disable a redundant test case that uses a very large stack, and hence
is unable to run with -fsanitize=undefined,address.

FossilOrigin-Name: 3c63f68e12af36e9fd9a3dd4daec9402e75e80bcd819d39c0215a427fd0d7803

5 years agoFix harmless compiler warning seen with MSVC.
mistachkin [Sat, 18 Jan 2020 19:02:20 +0000 (19:02 +0000)] 
Fix harmless compiler warning seen with MSVC.

FossilOrigin-Name: cd0437ba5b13593ebe4ec30d6236623183f8cfa30ca8a0612662eccb282a863e

5 years agoAdd extra front margin to the fake empty filename returned by
drh [Sat, 18 Jan 2020 14:50:06 +0000 (14:50 +0000)] 
Add extra front margin to the fake empty filename returned by
sqlite3PagerFilename() for an in-memory or TEMP database.

FossilOrigin-Name: fee945671a19a93287f9bfadc346f9821fb1311c7fc75b95a6a48d1419c840e7

5 years agoFix the VDBE so that it correctly handles the sequence of operations
drh [Sat, 18 Jan 2020 13:53:46 +0000 (13:53 +0000)] 
Fix the VDBE so that it correctly handles the sequence of operations
OP_OpenEphemeral, OP_OpenDup, OP_OpenEphemeral, and OP_OpenDup in that
order on the same cursor.

FossilOrigin-Name: a1be6ee0188911448c064e2c25fb0ca1daad50f3d50fb49a34430bd09736b4a9

5 years agoFix a typo in a comment. No code changes.
drh [Fri, 17 Jan 2020 23:27:41 +0000 (23:27 +0000)] 
Fix a typo in a comment.  No code changes.

FossilOrigin-Name: 4363f69c3ad5a9859471547cab713f1acabd5fce13872cc1ddaa972d6c1dfb35

5 years agoThe compress() function should not be deterministic since the same input can
drh [Fri, 17 Jan 2020 21:12:22 +0000 (21:12 +0000)] 
The compress() function should not be deterministic since the same input can
have multiple possible compressed outputs.  The uncompress() function, on the
other hand, is deterministic.

FossilOrigin-Name: 84f314902c48336849081c7e9fe2a52caf171b8215a1c6e80cded0700c447eb1

5 years agoFix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options.
drh [Fri, 17 Jan 2020 19:14:08 +0000 (19:14 +0000)] 
Fix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options.
Update compile-time option testing.

FossilOrigin-Name: 7584e4b649d57767aac3906da6b06549d5b772aaa69f469c623ae5da834d54d5

5 years agoImproved rounding in the 'unixepoch' feature of the date and time functions.
drh [Fri, 17 Jan 2020 16:47:07 +0000 (16:47 +0000)] 
Improved rounding in the 'unixepoch' feature of the date and time functions.

FossilOrigin-Name: c9abf1bd2d2496ced9ef4619cd997933cd58452e6ab527ba70746c9975104b6a

5 years agoUpdate test script instrfault.test to account for the fact that bound blob values...
dan [Fri, 17 Jan 2020 15:45:59 +0000 (15:45 +0000)] 
Update test script instrfault.test to account for the fact that bound blob values cast to text values are now intepreted using the text encoding of the database, instead of always as utf-8.

FossilOrigin-Name: 4d6cb28811c01599e34c0394fe5ed17d47f14893c860590c9b4660bef68eb294

5 years agoFix a case in "fuzz.test" that could fail, as non-deterministic functions may no...
dan [Fri, 17 Jan 2020 11:18:54 +0000 (11:18 +0000)] 
Fix a case in "fuzz.test" that could fail, as non-deterministic functions may no longer appear in CHECK constraints.

FossilOrigin-Name: a370871e21bd1028ac968ca4f48e6b5f75e647ac40d4342aeb0504a848452908

5 years agoNew testcase() macros in select.c, for coverage of the change from two
drh [Thu, 16 Jan 2020 17:53:24 +0000 (17:53 +0000)] 
New testcase() macros in select.c, for coverage of the change from two
check-ins ago.

FossilOrigin-Name: 52206488f315803df73f964774270ef4783923407a2567936f56b0a1a88b4400

5 years agoAdd the SQLITE_FCNTL_CKPT_DONE file-control for the use of custom VFSs.
dan [Thu, 16 Jan 2020 16:32:57 +0000 (16:32 +0000)] 
Add the SQLITE_FCNTL_CKPT_DONE file-control for the use of custom VFSs.

FossilOrigin-Name: 3cc39e5069c8a6a32ecc49c571593615c0f347cadcd3e0325b7f9a11ddc1f546

5 years agoDo not allow the constant-propagation optimization to apple to ON/USING clause
drh [Thu, 16 Jan 2020 16:12:07 +0000 (16:12 +0000)] 
Do not allow the constant-propagation optimization to apple to ON/USING clause
terms as it does not help and it might cause downstream problems.

FossilOrigin-Name: 1bc783da63d58b05c690468b569cb2787846357b63c1100d11777666c5787bf4

5 years agoFix an SQL syntax error in the comment on the omit-left-join optimization.
drh [Thu, 16 Jan 2020 12:25:14 +0000 (12:25 +0000)] 
Fix an SQL syntax error in the comment on the omit-left-join optimization.
No changes to code.

FossilOrigin-Name: 86b5e5a20e967af7ac444ff0a40c2e8b93b7e5c505eebf6d3753a341b05503a8

5 years agoClean up the definitions of the TERM_ constants in the code generator.
drh [Thu, 16 Jan 2020 11:51:09 +0000 (11:51 +0000)] 
Clean up the definitions of the TERM_ constants in the code generator.
Formatting only - no logic changes.

FossilOrigin-Name: af06f80a590e20f64fa2f630e85fa728c266ea4696b975cc5f2ab72a3b914379

5 years agoDo not allow the "PRAGMA encoding" statement to change the database
drh [Wed, 15 Jan 2020 16:20:16 +0000 (16:20 +0000)] 
Do not allow the "PRAGMA encoding" statement to change the database
encoding if TEMP content exists, or content in any other attached
database.  Formerly, encoding changes were allowed if just the main
database file was empty.  Ticket [a08879a4a476eea9].

FossilOrigin-Name: 03b003c988d27f3aa1b1e44972ee5a3c7e44ad667ec7f2b8a31d0411c66583d3

5 years agoFix the urifuncs.c extension (used for testing and debugging only) so that
drh [Tue, 14 Jan 2020 16:50:09 +0000 (16:50 +0000)] 
Fix the urifuncs.c extension (used for testing and debugging only) so that
the sqlite3_filename_database() SQL function and its siblings correctly handle
an invalid schema name passed in as the argument.

FossilOrigin-Name: 3d7434a9d85dae9135473d1c58c22ac01a282e654807aa10be9b39f127291594

5 years agoRemove an ALWAYS on a branch for improved database corruption detection
drh [Tue, 14 Jan 2020 16:39:54 +0000 (16:39 +0000)] 
Remove an ALWAYS on a branch for improved database corruption detection
in btree.c:freeSpace().  Test case found by dbsqlfuzz.

FossilOrigin-Name: 54bf04811951db6c894f272f870e3e41f8f5e05a25c1115efbbdbd0d8bba54be

5 years agoAdd the new noop_nd() debugging function to the noop.c extension.
drh [Tue, 14 Jan 2020 16:33:07 +0000 (16:33 +0000)] 
Add the new noop_nd() debugging function to the noop.c extension.

FossilOrigin-Name: 72911fb1b010ae093a161b9c0d21cbdedcbc1f924a55f12227fbe342bd978e08

5 years agoFor the showdb utility program, more accurate detection of when the database
drh [Tue, 14 Jan 2020 13:24:14 +0000 (13:24 +0000)] 
For the showdb utility program, more accurate detection of when the database
is in autovacuum mode for the "pgidx" subcommand.

FossilOrigin-Name: 9ce2192b81a81bb8928e3184664694ed2f863ce41c2777cdc35e6b61486aea46

5 years agoFix a minor typo on a comment in the CLI implementation.
drh [Tue, 14 Jan 2020 13:13:19 +0000 (13:13 +0000)] 
Fix a minor typo on a comment in the CLI implementation.

FossilOrigin-Name: db4fb3503c4e1e40d7bd140187014e8f0cc186c441a0c7462987c77e2c83136a

5 years agoImprovements to sqlite3_open_v2() documentation.
drh [Tue, 14 Jan 2020 00:52:56 +0000 (00:52 +0000)] 
Improvements to sqlite3_open_v2() documentation.

FossilOrigin-Name: 4c4fd62a092b8db6398c64a92c9ff35915eedcce1079a77aeda81811d94096c4

5 years agoMore documentation updates. No code changes.
drh [Mon, 13 Jan 2020 15:25:43 +0000 (15:25 +0000)] 
More documentation updates.  No code changes.

FossilOrigin-Name: a684d4ef08a48962c632b598242f5e34c9b2fa3ad6339023fbce8ac91582b5e3

5 years agoDocumentation updates. No changes to code.
drh [Mon, 13 Jan 2020 13:33:08 +0000 (13:33 +0000)] 
Documentation updates.  No changes to code.

FossilOrigin-Name: cc0e0aa3a7d534b806cdf63200b32ab3b7f0e08dde717f043a36d2f91c8a046c

5 years agoBetter than removing the incorrect assert() is to change it into a
drh [Sun, 12 Jan 2020 22:38:17 +0000 (22:38 +0000)] 
Better than removing the incorrect assert() is to change it into a
testcase() together with a comment indicating where an appropriate test case
can be found, and the ticket that provoked the change.
Ticket [614b25314c766238]

FossilOrigin-Name: 3e3c60d8124672ff72a57dfa2e51276316bcac8c8ae8a5739da358f26924b0fb

5 years agoChange the zipfile virtual table so that the xBestIndex method gives a
drh [Sun, 12 Jan 2020 22:25:58 +0000 (22:25 +0000)] 
Change the zipfile virtual table so that the xBestIndex method gives a
reasonable cost estimate even if no filename is specified.  The missing
filename error continues to be raised in the xFilter method.  Meanwhile,
the more reasonable cost estimate avoids unnecessary wierdness in the query
planner.

FossilOrigin-Name: 0e468aa6decc73be307596782a778a739ff1b5dc0eb10fc4bd6776e460f99f8b

5 years agoRemove an incorrect assert(). Fix for ticket [614b25314c766238]
drh [Sun, 12 Jan 2020 22:20:07 +0000 (22:20 +0000)] 
Remove an incorrect assert().  Fix for ticket [614b25314c766238]

FossilOrigin-Name: 6a999c5aa0d1d5569a5bda50d27e3a15c13e93e69d00db97c5294901522064a3

5 years agoNew apis: sqlite3_filename_database(), sqlite3_filename_journal(), and
drh [Sat, 11 Jan 2020 21:08:59 +0000 (21:08 +0000)] 
New apis: sqlite3_filename_database(), sqlite3_filename_journal(), and
sqlite3_filename_wal().  Also sqlite3_uri_key().  And the other sqlite3_uri
functions now work using the journal or wal filename in addition to the
database file.  And the sqlite3_db_filename() result is guaranteed to work
as an argument to the sqlite3_uri functions.

FossilOrigin-Name: fd7bcc53524096f5245e5ae04c12780d2c43b9b3af17ec529447aed21b82cc2b

5 years agoMinor changes for consistency between sqlite3_filename_wal() and enhanced-uri
drh [Sat, 11 Jan 2020 20:27:02 +0000 (20:27 +0000)] 
Minor changes for consistency between sqlite3_filename_wal() and
sqlite3_filename_journal().

FossilOrigin-Name: 9a70ff43a7b6848a71d5049f5a4ae24e3eb8a83d5c6651f5a9937abf03b3eccf

5 years agoRedesign for better legacy compatibility. Add the sqlite3_uri_key() interface.
drh [Sat, 11 Jan 2020 16:08:31 +0000 (16:08 +0000)] 
Redesign for better legacy compatibility.  Add the sqlite3_uri_key() interface.

FossilOrigin-Name: bcb43d11c4d0be36888c9e968ccdf85e7d7fccd72a29866f85c014e0562d4b93

5 years agoRearchitect the way in which filenames are stored in the Pager object so that
drh [Fri, 10 Jan 2020 18:05:55 +0000 (18:05 +0000)] 
Rearchitect the way in which filenames are stored in the Pager object so that
the sqlite3_uri_parameter() interface will work from journal and WAL filenames
too.  This check-in implements the central idea, and compile and runs somewhat,
but crashes on an extended test.

FossilOrigin-Name: 2ae77bd2335708343bce4541b4d2cf16edfe3fd5bc2dfb93757238c926aa960b

5 years agoFix to the register validity tracking logic in debug builds. No impact
drh [Fri, 10 Jan 2020 01:05:49 +0000 (01:05 +0000)] 
Fix to the register validity tracking logic in debug builds.  No impact
on release builds.

FossilOrigin-Name: 0a500da6aa659a8e73206e6d22ddbf2da5e4f1d1d551eeb66433163a3e13109d

5 years agoDocumentation updates on newer APIs. No changes to code.
drh [Fri, 10 Jan 2020 00:00:18 +0000 (00:00 +0000)] 
Documentation updates on newer APIs.  No changes to code.

FossilOrigin-Name: 8845a8c22a4ceabee130ce2addbe07e13b0496eeb542c89850f8658d21a48f89

5 years agoFix the fossildelta.c extension so that it will compile on mingw.
drh [Thu, 9 Jan 2020 23:07:21 +0000 (23:07 +0000)] 
Fix the fossildelta.c extension so that it will compile on mingw.

FossilOrigin-Name: 20237d5dc4451f142b511e50a4acef4574cef17b9222c87dcebfe1ed1bab0ad9

5 years agoMerge in the untrusted-schema enhancements.
drh [Thu, 9 Jan 2020 20:44:37 +0000 (20:44 +0000)] 
Merge in the untrusted-schema enhancements.
See [/doc/87aea3ab1cdda453/doc/trusted-schema.md|doc/trusted-schema.md]
for details.

FossilOrigin-Name: 5720924cb07766cd54fb042da58f4b4acf12b60029fba86a23a606ad0d0f7c68

5 years agoOnly register the fts3_tokenizer() function using a single text encoding.
drh [Thu, 9 Jan 2020 20:33:36 +0000 (20:33 +0000)] 
Only register the fts3_tokenizer() function using a single text encoding.

FossilOrigin-Name: 966964af1021feebc56cfda7b08bc787be7f447d682299f7958463aca30a73af

5 years agoFix a harmless compiler warning.
drh [Thu, 9 Jan 2020 20:33:13 +0000 (20:33 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: edbf911fdeda14bd63cd752f6237896400eb5a65ef486abe7b91433621d21b5c

5 years agoFix an assert() in window.c that could fail with some obscure SELECT statements that...
dan [Thu, 9 Jan 2020 20:11:29 +0000 (20:11 +0000)] 
Fix an assert() in window.c that could fail with some obscure SELECT statements that use window functions.

FossilOrigin-Name: 83dc55679a91bf5d1d13706088ce58eed02b9aad1ad0ae237966e78e0d769663

5 years agoFix a problem in the encoding display in the updated PRAGMA function_list. new-security-options
drh [Thu, 9 Jan 2020 16:28:50 +0000 (16:28 +0000)] 
Fix a problem in the encoding display in the updated PRAGMA function_list.

FossilOrigin-Name: 318ff7720bc60c30c0826becce424226e9cec25c1d59cb2cdb75793739322760

5 years agoFix minor typos in the trusted-schema.md document.
drh [Thu, 9 Jan 2020 16:00:08 +0000 (16:00 +0000)] 
Fix minor typos in the trusted-schema.md document.

FossilOrigin-Name: 87aea3ab1cdda4533e6fed605d1295e83bae0bbb9e1b238d239ce158a0d42954

5 years agoMinor formatting changes in the trusted-schema.md document.
drh [Thu, 9 Jan 2020 15:18:08 +0000 (15:18 +0000)] 
Minor formatting changes in the trusted-schema.md document.

FossilOrigin-Name: 55553b5e5ece8282f6a56a6f5c71024eaaef3c86ec42203af3da708b0de3643b

5 years agoDesign notes for the new-security-options branch.
drh [Thu, 9 Jan 2020 14:51:47 +0000 (14:51 +0000)] 
Design notes for the new-security-options branch.

FossilOrigin-Name: af7c1ed4f8a7293d0ecacca3cfbe9414e0de5ec40b418ce7831b8dc724feb747

5 years agoSimplified error message for the unsafe use of a virtual table.
drh [Thu, 9 Jan 2020 13:08:28 +0000 (13:08 +0000)] 
Simplified error message for the unsafe use of a virtual table.

FossilOrigin-Name: d662129a601e05e8fca5717a890b5bc920b80a750d061f3c2494788d32b917a5

5 years agoFix a problem that restricted edgy functions in TEMP tables.
drh [Thu, 9 Jan 2020 01:20:03 +0000 (01:20 +0000)] 
Fix a problem that restricted edgy functions in TEMP tables.
New test cases added.

FossilOrigin-Name: 8878c40753566a8c4ccd1d413019cabde7569b947f730527d13bfc3db384e97d

5 years agoBlock edgy functions used in DEFAULT constraints.
drh [Wed, 8 Jan 2020 22:22:36 +0000 (22:22 +0000)] 
Block edgy functions used in DEFAULT constraints.

FossilOrigin-Name: da434dc149786e4b1cd80b3b2b25f8b614d0dec62d5439f839a66b536999e398

5 years agoPerformance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"
drh [Wed, 8 Jan 2020 20:37:45 +0000 (20:37 +0000)] 
Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"

FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54

5 years agoCheck for whether or not it is safe to use non-innocuous functions as the
drh [Wed, 8 Jan 2020 17:28:19 +0000 (17:28 +0000)] 
Check for whether or not it is safe to use non-innocuous functions as the
function is being coded, not when its name is resolved.

FossilOrigin-Name: 1da802d54b689a462e1fe899c6ffa08ef14d34f36728b14b055b5a76b1edc274

5 years agoProvide the -innocuous option to the "db func" method in the TCL interface.
drh [Wed, 8 Jan 2020 15:44:10 +0000 (15:44 +0000)] 
Provide the -innocuous option to the "db func" method in the TCL interface.

FossilOrigin-Name: 0138652b6c2f21fd67e59a23a396a5b9d6a16ee9b44701cddfc49b23fddfce5b

5 years agoFix the rot13.c extension to be deterministic. Add the noop.c extension.
drh [Wed, 8 Jan 2020 15:43:29 +0000 (15:43 +0000)] 
Fix the rot13.c extension to be deterministic.  Add the noop.c extension.

FossilOrigin-Name: a679122ca8ec95d5c8afba3a1a50170db9dd519a3810e56877b8f56e858d0175

5 years agoIn the TreeView debugging output, show a "DDL" mark on SrcList and Expr nodes
drh [Wed, 8 Jan 2020 14:39:57 +0000 (14:39 +0000)] 
In the TreeView debugging output, show a "DDL" mark on SrcList and Expr nodes
that derive from a non-TEMP schema.

FossilOrigin-Name: fe7472fd2a70b4df6cb62041b72ed1638ba27ed1e6ceb8aaf56d1c8a82d91889

5 years agoMerge recent changes from trunk.
drh [Wed, 8 Jan 2020 13:08:52 +0000 (13:08 +0000)] 
Merge recent changes from trunk.

FossilOrigin-Name: 5962921fceaf2ec645379a5f1d18e2c2c13abbf92cf64606caee69f45a21c500

5 years agoWhen doing a test-to-double conversion on a BLOB with an odd number of bytes
drh [Wed, 8 Jan 2020 12:17:46 +0000 (12:17 +0000)] 
When doing a test-to-double conversion on a BLOB with an odd number of bytes
and assuming a UTF16 encoding, ignore the last byte.
Ticket [9eda2697f5cc1aba].

FossilOrigin-Name: 1c76f1d8ec0937a2d2e4ce75f98494c953e9621db31945d7e44f45d90d1c3892

5 years agoFix a minor formatting error in the display of BLOB values during VDBE
drh [Wed, 8 Jan 2020 11:36:30 +0000 (11:36 +0000)] 
Fix a minor formatting error in the display of BLOB values during VDBE
tracing.

FossilOrigin-Name: 295442887a3cd5868df26c5be244649ffb3bae8367f5cf02fe513424a1c9f6a7

5 years agoImprovements to the documentation of sqlite3_create_collation().
drh [Wed, 8 Jan 2020 10:57:27 +0000 (10:57 +0000)] 
Improvements to the documentation of sqlite3_create_collation().

FossilOrigin-Name: fa866aec56deca8cc1b70814215bbdc683f41bc0826da0f8804d952de429820c

5 years agoSimplification of the logic in the constant-propagation optimization.
drh [Wed, 8 Jan 2020 04:36:01 +0000 (04:36 +0000)] 
Simplification of the logic in the constant-propagation optimization.

FossilOrigin-Name: 1c3e5c20a9e6f501befa2bf6241a1b5190872bd83b765dac67065d252d04ea4f

5 years agoFix the constant propagation optimization so that it does not try to
drh [Wed, 8 Jan 2020 01:43:47 +0000 (01:43 +0000)] 
Fix the constant propagation optimization so that it does not try to
propagate constant expressions that have affinity.  Ticket [82ac75ba0093e5dc]

FossilOrigin-Name: 6db1c3498f6bfa01bb460e62b802b63ec4bf43577a17a94e1e2fa0ecc1e64960

5 years agoFix a misworded comment. No code changes.
drh [Wed, 8 Jan 2020 00:39:37 +0000 (00:39 +0000)] 
Fix a misworded comment.  No code changes.

FossilOrigin-Name: ee0bc7ede0fbf3e54bb934c0d580c62d7393c984cbc374ece6d57fe9211dac26

5 years agoCreate the "trusted_schema" pragma. Add sqlite3_vtab_config() calls to set
drh [Tue, 7 Jan 2020 19:45:40 +0000 (19:45 +0000)] 
Create the "trusted_schema" pragma.  Add sqlite3_vtab_config() calls to set
the risk rank for many virtual tables.

FossilOrigin-Name: 4c21373c21c9b17b222ae65297a039a035e6ec6b505c00c33704e3c03f94f834

5 years agoEnforce SQLITE_VTABRISK restrictions.
drh [Tue, 7 Jan 2020 18:10:56 +0000 (18:10 +0000)] 
Enforce SQLITE_VTABRISK restrictions.

FossilOrigin-Name: 3d87ff312e617a26846d482b423163cad9c222513f33e128f0fe348dda27c7c9

5 years agoFix a performance regression caused by the previous check-in.
drh [Tue, 7 Jan 2020 18:10:01 +0000 (18:10 +0000)] 
Fix a performance regression caused by the previous check-in.

FossilOrigin-Name: d7d98d3dff2f0e0cfa5bb8be8e5fd2af5ab470be399eafe3d77b23ee1262f70d

5 years agoInvert the UNTRUSTED_SCHEMA setting to be TRUSTED_SCHEMA.
drh [Tue, 7 Jan 2020 16:09:11 +0000 (16:09 +0000)] 
Invert the UNTRUSTED_SCHEMA setting to be TRUSTED_SCHEMA.

FossilOrigin-Name: f5fcf1fbc6473f8e91315b14d67745f2748010641b7463d1f4ca51e6fdf97462

5 years agoMerge recent fixes from trunk.
drh [Tue, 7 Jan 2020 15:44:22 +0000 (15:44 +0000)] 
Merge recent fixes from trunk.

FossilOrigin-Name: 5dfa33a09e608d26549e46c58a5563754688af68fa99415f9a548e91f81aca7c

5 years agoAdd an "|| CORRUPT_DB" term to an assert() statement inside of btree.
drh [Tue, 7 Jan 2020 13:32:15 +0000 (13:32 +0000)] 
Add an "|| CORRUPT_DB" term to an assert() statement inside of btree.

FossilOrigin-Name: 03c1d75ddc063469fc856114595bd12d21759fe0979ce1ba1cf52e48e6b0d4a1

5 years agoFix an instance of an undefined behaviour (a left-shift of a 64-bit unsigned integer...
dan [Tue, 7 Jan 2020 09:06:43 +0000 (09:06 +0000)] 
Fix an instance of an undefined behaviour (a left-shift of a 64-bit unsigned integer by a value greater than 64) that could occur in fts3.

FossilOrigin-Name: e1f12978b53683114ab0ef0e84a14dd4fabc72750b214aac19cd9da22a582a27

5 years agoIn the typeof() optimization in OP_Column, expand the size of the bogus buffer
drh [Mon, 6 Jan 2020 20:48:45 +0000 (20:48 +0000)] 
In the typeof() optimization in OP_Column, expand the size of the bogus buffer
provided for data so that it is big enough to cover the increased number of
bytes displayed during register tracing from check-in [54553bf16fabd72d].
This is the correct fix for ticket [bbd55a97e66ff50d], though the earlier one
does not hurt and is useful to retain.

FossilOrigin-Name: e1154c39ba0f8caec70d330e6d5bec745c93ec9a7eafedb3e3730fadc8b8277c

5 years agoMerge enhancements from trunk.
drh [Mon, 6 Jan 2020 19:30:36 +0000 (19:30 +0000)] 
Merge enhancements from trunk.

FossilOrigin-Name: 9c50f6c28a4cadb2c33954c066a8e94f8aaf4c31b6c0309db35efc472cb0bcaa

5 years agoRewrite the (debugging use only) sqlite3VdbeMemPrettyPrint() function to use
drh [Mon, 6 Jan 2020 19:23:41 +0000 (19:23 +0000)] 
Rewrite the (debugging use only) sqlite3VdbeMemPrettyPrint() function to use
the safer StrAccum interface rather than writing directly into a static string
buffer.  Perhaps this will address ticket [bbd55a97e66ff50d], which we are
unable to reproduce.

FossilOrigin-Name: 69f6a7e42f42116d29514239575ee1dc381b5b673da012cb5f3e8cf17922d493

5 years agoBackout change [4d0b9109f7a5312d4e1] because the conditional it added is
drh [Mon, 6 Jan 2020 18:59:46 +0000 (18:59 +0000)] 
Backout change [4d0b9109f7a5312d4e1] because the conditional it added is
no longer reachable due to check-in [1409758f72c0206c].

FossilOrigin-Name: b3f2696705cc3e7b038f156423f808432a4680ea7e313dc15e34bdf6b1845655

5 years agoMove variable declaration to start-of-block for MSVC.
mistachkin [Mon, 6 Jan 2020 18:44:56 +0000 (18:44 +0000)] 
Move variable declaration to start-of-block for MSVC.

FossilOrigin-Name: 55c136ef61f23a04be1bf351ab7f6bdfa033653c32557a04916cc9770453f261

5 years agoDo not attempt to use the skip-scan optimization if prior terms of the
drh [Mon, 6 Jan 2020 17:33:09 +0000 (17:33 +0000)] 
Do not attempt to use the skip-scan optimization if prior terms of the
index are already used for non-equality constraints.
Ticket [304017f5f04a0035]

FossilOrigin-Name: d7126a9ced86cb0934d5bde2bf535e6b529c361444c99e723f29dd3eb36e7044

5 years agoEnsure the SF_Aggregate flag on a SELECT statement is set if a DISTINCT is transforme...
dan [Mon, 6 Jan 2020 17:06:12 +0000 (17:06 +0000)] 
Ensure the SF_Aggregate flag on a SELECT statement is set if a DISTINCT is transformed to a GROUP BY. Ticket [9c944882].

FossilOrigin-Name: 1409758f72c0206cc48f9f7e789382472949523b7056ea46f8dcb93fd3ea60c6

5 years agoRefactor names of flags for improved legibility.
drh [Mon, 6 Jan 2020 15:25:41 +0000 (15:25 +0000)] 
Refactor names of flags for improved legibility.

FossilOrigin-Name: 411e8ec2219bb4181aaf2209fb1e7baf5e8df8b8c8adb82a69b48cf7e8e7e7d4

5 years agoRemove a NEVER in btree due to a new test case from dbsqlfuzz.
drh [Sun, 5 Jan 2020 21:53:15 +0000 (21:53 +0000)] 
Remove a NEVER in btree due to a new test case from dbsqlfuzz.

FossilOrigin-Name: 46f8ef70fb8b3ae00cc081b280f3dff38b1d0f1b52a8f4477ec89dec32e4d813

5 years agoRefactor the names of the new controls for restricting what actions the schema
drh [Sat, 4 Jan 2020 20:58:41 +0000 (20:58 +0000)] 
Refactor the names of the new controls for restricting what actions the schema
can take behind the application's back.

FossilOrigin-Name: 65d7d39a858c51ffd781f5a6335e029895e597aeb1e1ccdadea8ce79c8ad412f

5 years agoEnhance PRAGMA function_list to show internal functions if the direct use
drh [Sat, 4 Jan 2020 19:58:28 +0000 (19:58 +0000)] 
Enhance PRAGMA function_list to show internal functions if the direct use
of internal functions is enabled via the SQLITE_TESTCTRL_INTERNAL_FUNCTIONS
test control.

FossilOrigin-Name: 7a8d7ca726666f4384925f959df0d58f7622229e06f1b5e643a3caccd539bb6e

5 years agoMerge all fixes and enhancements from trunk.
drh [Sat, 4 Jan 2020 19:19:54 +0000 (19:19 +0000)] 
Merge all fixes and enhancements from trunk.

FossilOrigin-Name: b878c30f03e895bbc5c4c99c0f727d49093bb78bdc275593cf4852148579ae69

5 years agoFix DBSTAT so that it returns now rows, rather than an error when the
drh [Sat, 4 Jan 2020 19:14:48 +0000 (19:14 +0000)] 
Fix DBSTAT so that it returns now rows, rather than an error when the
WHERE clause is "schema=NULL".

FossilOrigin-Name: 5b246b47aeadc25dbec0956e2d6edcd49fbe874a01734fdf15b770507648222d

5 years agoFix harmless compiler warnings.
drh [Sat, 4 Jan 2020 19:12:13 +0000 (19:12 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 8452fe03430d34abecab618d6136b863630f91d68d69ebbc115f808bc81c3817

5 years agoOmit the omit flat from eq constraints on column "name" of dbstat virtual tables...
dan [Sat, 4 Jan 2020 18:38:58 +0000 (18:38 +0000)] 
Omit the omit flat from eq constraints on column "name" of dbstat virtual tables. Fix for [74a4c386].

FossilOrigin-Name: cfff5cb2279088aa66f435bd0d627b2c74c9a99ad9addfd44a4df8ba770b795a