]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoAdd sqlite3BeginBenignMalloc() and EndBenignMalloc() calls to debugging function...
dan [Sat, 16 May 2020 15:18:27 +0000 (15:18 +0000)] 
Add sqlite3BeginBenignMalloc() and EndBenignMalloc() calls to debugging function sqlite3VdbePrintOp().

FossilOrigin-Name: 6f857d0e9e0893524c2f828a1a1600fefb6efeff12ecbc9bb1da106a5aff9c1c

5 years agoUpdate code in sqlite3expert.c to account for the fact that "-- TRIGGER xyz" VM comme...
dan [Fri, 15 May 2020 18:48:31 +0000 (18:48 +0000)] 
Update code in sqlite3expert.c to account for the fact that "-- TRIGGER xyz" VM comments are now omitted for some builds.

FossilOrigin-Name: 7cf93dc55c48c68731a1fe3ae3517fcfeb5c252bfa87e715a333c6194bcc0ace

5 years agoFix another build problem for SQLITE_OMIT_VIRTUALTABLE builds.
dan [Fri, 15 May 2020 16:19:35 +0000 (16:19 +0000)] 
Fix another build problem for SQLITE_OMIT_VIRTUALTABLE builds.

FossilOrigin-Name: 5e1eb0fa3afd74251bc8f484e3edfa81b15610479431af205bd952c91eecd21f

5 years agoFix a documentation typo. No changes to code.
drh [Fri, 15 May 2020 16:05:31 +0000 (16:05 +0000)] 
Fix a documentation typo.  No changes to code.

FossilOrigin-Name: 758353c72627a847ba027ca44a750bbf057827dafd05811f56e4765dfc77623b

5 years agoAdjust some requirement marks. No changes to code.
drh [Fri, 15 May 2020 15:03:51 +0000 (15:03 +0000)] 
Adjust some requirement marks.  No changes to code.

FossilOrigin-Name: 7285ae2ce8fb1439e1acea2ec321abbc76aab0a2e84b58683fddb0a7bf74fb1b

5 years agoUpdate test file e_fkey.test to account for the fact that new columns with REFERENCE...
dan [Fri, 15 May 2020 13:52:33 +0000 (13:52 +0000)] 
Update test file e_fkey.test to account for the fact that new columns with REFERENCE clauses and non-NULL default values may now be added using ALTER TABLE if the table is empty.

FossilOrigin-Name: 4087fce97252beda2456164afe9508f952fc9fe4be68ad0e9b330569a78e42f2

5 years agoFix SQLITE_OMIT_VIRTUALTABLE testfixture builds.
dan [Fri, 15 May 2020 11:36:16 +0000 (11:36 +0000)] 
Fix SQLITE_OMIT_VIRTUALTABLE testfixture builds.

FossilOrigin-Name: 3d9780c5f6095ea35bc731a51eb34d7cf8bd5dcece825b686b94fd50131626e2

5 years agoTest script changes to account for the fact that the "p5" column in the EXPLAIN outpu...
dan [Fri, 15 May 2020 11:26:31 +0000 (11:26 +0000)] 
Test script changes to account for the fact that the "p5" column in the EXPLAIN output is now an integer, not a text values containing a 2-digit hex value.

FossilOrigin-Name: 102126d80872fdb7469233611cab28100c8455aab4ce25702b83398394559185

5 years agoEnhancements to long-path support in the Win32 VFS.
mistachkin [Fri, 15 May 2020 01:18:07 +0000 (01:18 +0000)] 
Enhancements to long-path support in the Win32 VFS.

FossilOrigin-Name: 0119d96decd344ae711388ac8475b92464a6d018ecf73862170f137410036dac

5 years agoMove some new test cases from fts3snippet.test into fts3snippet2.test.
drh [Fri, 15 May 2020 01:13:46 +0000 (01:13 +0000)] 
Move some new test cases from fts3snippet.test into fts3snippet2.test.

FossilOrigin-Name: fa203999944133941a38e5c858f1f66fc1ef4d2f33222ab81cbf4e3fc1539f1c

5 years agoAdd the SQLITE_ENABLE_FTS3_PARENTHESIS option to fuzzcheck. Add a new
drh [Fri, 15 May 2020 01:02:00 +0000 (01:02 +0000)] 
Add the SQLITE_ENABLE_FTS3_PARENTHESIS option to fuzzcheck.  Add a new
test case that uses that option.

FossilOrigin-Name: c49a33db954f1a3fbc1889bbe9f3f3fdb8fb00e31aafb91cd6f5d1602db5c2b9

5 years agoFix a null pointer deference that can occur on a strange matchinfo()
drh [Thu, 14 May 2020 23:59:24 +0000 (23:59 +0000)] 
Fix a null pointer deference that can occur on a strange matchinfo()
query.

FossilOrigin-Name: a4dd148928ea65bd4e1654dfacc3d8057d1f85b8c9939416991d50722e5a720e

5 years agoDo not allow a virtual table to be renamed into the name of one of its
drh [Thu, 14 May 2020 21:16:52 +0000 (21:16 +0000)] 
Do not allow a virtual table to be renamed into the name of one of its
shadows.

FossilOrigin-Name: eca0ba2cf4c0fdf757bae19c6397a48245adb99e8017ddc28f01804072a30b2c

5 years agoImplement the IIF(x,y,z) SQL function that is short-hand for
drh [Wed, 13 May 2020 18:03:34 +0000 (18:03 +0000)] 
Implement the IIF(x,y,z) SQL function that is short-hand for
"CASE WHEN x THEN y ELSE z END".  For compatibility with SQL Server.

FossilOrigin-Name: fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a

5 years agoRemove unused constant SQLITE_FUNC_COALESCE.
drh [Wed, 13 May 2020 17:26:38 +0000 (17:26 +0000)] 
Remove unused constant SQLITE_FUNC_COALESCE.

FossilOrigin-Name: a116b20f863e9732cd08fbfbb1aa48204a17d611c9c1edde85dcf59310bde782

5 years agoUse AtomicStore() and AtomicLoad() in a few more places to avoid a theoretically...
dan [Wed, 13 May 2020 13:33:30 +0000 (13:33 +0000)] 
Use AtomicStore() and AtomicLoad() in a few more places to avoid a theoretically undefined behaviour. This is not actually problem on any known hardware.

FossilOrigin-Name: fda57d4d2f1499c861d43026aa9362d1a30d67c9c002ebf5b0cdc25251537fbb

5 years agoNew test case in test/fuzzdata8.db.
drh [Mon, 11 May 2020 11:11:25 +0000 (11:11 +0000)] 
New test case in test/fuzzdata8.db.

FossilOrigin-Name: fa11230135610f01c56d6f436f30a8b57a50b430fe7397ea3a0b6642986b3a39

5 years agoFix a problem handling constant integer expressions with collation sequences in PARTI...
dan [Mon, 11 May 2020 10:55:24 +0000 (10:55 +0000)] 
Fix a problem handling constant integer expressions with collation sequences in PARTITION BY clauses.

FossilOrigin-Name: 155e6649efe8614718be7ac6c3cccf5b073ae57496dc220db5e4313621f5188e

5 years agoRelease some restrictions on columns added by ALTER TABLE so that they
drh [Fri, 8 May 2020 19:02:21 +0000 (19:02 +0000)] 
Release some restrictions on columns added by ALTER TABLE so that they
only apply if the table contains one or more rows.

FossilOrigin-Name: 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff

5 years agoFix the count-optimization so that it honors the NOT INDEXED clause.
drh [Fri, 8 May 2020 18:22:00 +0000 (18:22 +0000)] 
Fix the count-optimization so that it honors the NOT INDEXED clause.

FossilOrigin-Name: 0d23a0b209900f4d7c6c13f75d4364f19afc23db72f9cfdb11e05b81502e8040

5 years agoNew test cases added to test/fuzzdata8.db.
drh [Fri, 8 May 2020 15:28:07 +0000 (15:28 +0000)] 
New test cases added to test/fuzzdata8.db.

FossilOrigin-Name: 3fce9711a47329811cd333ae2f1d1384a96d73b9a5d6f9d08454a57a3fd24fc8

5 years agoDo not retry on a failed realloc() unless SQLITE_ENABLE_MEMORY_MANAGEMENT
drh [Fri, 8 May 2020 10:44:23 +0000 (10:44 +0000)] 
Do not retry on a failed realloc() unless SQLITE_ENABLE_MEMORY_MANAGEMENT
is available, meaning that the retry has some possibility of success.

FossilOrigin-Name: e9a8f910b5e2b84dd77364783f0610bca970cc88aa037c88636c72145b99f411

5 years agoFix a failing assert() in fts3 triggered by a corrupt database.
dan [Thu, 7 May 2020 19:55:40 +0000 (19:55 +0000)] 
Fix a failing assert() in fts3 triggered by a corrupt database.

FossilOrigin-Name: cb299a090c81cdc5c116c4e15ab38fce112916f8b0fad0c7f2ab127e79238a94

5 years agoChanges to avoid deadlock in SQLITE_ENABLE_SETLK_TIMEOUT builds.
dan [Thu, 7 May 2020 14:39:56 +0000 (14:39 +0000)] 
Changes to avoid deadlock in SQLITE_ENABLE_SETLK_TIMEOUT builds.

FossilOrigin-Name: 652e4b23fffbff128b177697d7217b7d5aad8baf2364df1646b268ce6774e0fb

5 years agoFix an error that could occur if the first transaction executed by a connection confi... setlk-deadlock-changes
dan [Thu, 7 May 2020 14:26:40 +0000 (14:26 +0000)] 
Fix an error that could occur if the first transaction executed by a connection configured to use blocking locks is a write-transaction for which the WRITER lock cannot be obtained.

FossilOrigin-Name: 49e4dc72f7a4b28e4b49d7b91030bc986aea3ff44dac38cb6e68305800cd1de5

5 years agoMerge trunk changes into this branch.
dan [Thu, 7 May 2020 14:05:08 +0000 (14:05 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: ac4ee69664278a828e0a64c5be3b96fdb6eb6acc95646a9425c667aea328791c

5 years agoFix the handling of reserve-bytes so that the maximum value of 255 can be used.
drh [Thu, 7 May 2020 01:56:57 +0000 (01:56 +0000)] 
Fix the handling of reserve-bytes so that the maximum value of 255 can be used.

FossilOrigin-Name: 99749d4fd4930ccf15227f67c732266af9e09dd3cabdc0834fb450ef98196441

5 years agoAvoid leaking a file-handle in test file walsetlk.test.
dan [Wed, 6 May 2020 21:25:39 +0000 (21:25 +0000)] 
Avoid leaking a file-handle in test file walsetlk.test.

FossilOrigin-Name: 3cfc675e2e917b69108feb3a75728b573abe8e44f0890a7d20d307b0b6784c0e

5 years agoFix an assert() failure that could follow an IO error.
dan [Wed, 6 May 2020 21:24:29 +0000 (21:24 +0000)] 
Fix an assert() failure that could follow an IO error.

FossilOrigin-Name: e89c864299024cdce395a15c19b000b976142b9eed267901a288adaa695f9e65

5 years agoFix harmless compiler warnings.
drh [Wed, 6 May 2020 20:55:38 +0000 (20:55 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 92dc59132f8547635d73c61c21ea29b380c401ddc84a6d01412808e00386b9e8

5 years agoFix a problem preventing building without SQLITE_ENABLE_SETLK_TIMEOUT defined.
dan [Wed, 6 May 2020 20:45:11 +0000 (20:45 +0000)] 
Fix a problem preventing building without SQLITE_ENABLE_SETLK_TIMEOUT defined.

FossilOrigin-Name: 98eb54c6d83992886f17a00b6fc8998df230e3b5f45bafc6fae0d15a9ee5a4c6

5 years agoAdd error code SQLITE_BUSY_TIMEOUT, used internally by the OS layer to indicate that...
dan [Wed, 6 May 2020 20:27:18 +0000 (20:27 +0000)] 
Add error code SQLITE_BUSY_TIMEOUT, used internally by the OS layer to indicate that a call to xShmLock() has failed due to timeout of a blocking lock.

FossilOrigin-Name: f3ef9c7c2b4ba3de1057ad569f068b241d5f23e6629d8e0dacf85e57fd13b8aa

5 years agoFix compiler warnings in non-SQLITE_ENABLE_SETLK_TIMEOUT builds.
dan [Wed, 6 May 2020 19:22:59 +0000 (19:22 +0000)] 
Fix compiler warnings in non-SQLITE_ENABLE_SETLK_TIMEOUT builds.

FossilOrigin-Name: 22de99ef410ba2a540871f3e61157d8dc4b969416f14808aeca73971b17fcd51

5 years agoBlock on the WRITER lock when attempting to run recovery.
dan [Wed, 6 May 2020 19:14:41 +0000 (19:14 +0000)] 
Block on the WRITER lock when attempting to run recovery.

FossilOrigin-Name: 105d6c9bbcadc64faa2b24e315cb13227b17cfc6bf1b3512713f80ce56976a3d

5 years agoProvide the SQLITE_DEFAULT_LEGACY_ALTER_TABLE compile-time option.
drh [Wed, 6 May 2020 18:43:57 +0000 (18:43 +0000)] 
Provide the SQLITE_DEFAULT_LEGACY_ALTER_TABLE compile-time option.

FossilOrigin-Name: 63e659d9a793227604aa95685a8d83cd08305f1d01e135407a3ffc6d54482ab8

5 years agoAdd tests for running recovery when opening a write transaction or performing a check...
dan [Wed, 6 May 2020 17:18:57 +0000 (17:18 +0000)] 
Add tests for running recovery when opening a write transaction or performing a checkpoint with blocking locks enabled. Fix some failing assert() statements.

FossilOrigin-Name: d096ea3fe20f8af90f9e3f798fd0a69527b32ac8e208ade58b9d0af0e831f41b

5 years agoMerge latest trunk changes into this branch.
dan [Wed, 6 May 2020 15:07:25 +0000 (15:07 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: a3727dba10b476f414f0a049b35f2a5c169a408eccefa6833821560684e07f8b

5 years agoUnless upgrading an existing read transaction, have ENABLE_SETLK_TIMEOUT builds attem...
dan [Tue, 5 May 2020 20:30:07 +0000 (20:30 +0000)] 
Unless upgrading an existing read transaction, have ENABLE_SETLK_TIMEOUT builds attempt to use a blocking lock when opening a write transaction on a wal mode database.

FossilOrigin-Name: d6f819a9e6b35f3fd558bd93255a6a24ad690a0fa15a82b009ca9c641db983c6

5 years agoThe only known path to a corruption detection branch was cut off by the
drh [Tue, 5 May 2020 19:54:02 +0000 (19:54 +0000)] 
The only known path to a corruption detection branch was cut off by the
previous commit implementing earlier index corruption.  So make the branch
NEVER.  Maybe a fuzzer will find a new path.

FossilOrigin-Name: 9a84d8eb44b12ddea921baa73ac3bffa8c8d23a852605dc1dbde37907360bd79

5 years agoEarlier detection of index corruption caused by missing index entries.
drh [Tue, 5 May 2020 18:42:49 +0000 (18:42 +0000)] 
Earlier detection of index corruption caused by missing index entries.

FossilOrigin-Name: f339f31f9e9a856b576f99c5230fdf6d60fdc2873e48cb5aa0a4ab1d04e3c930

5 years agoFix a compiler warning in cksumvfs.c.
drh [Tue, 5 May 2020 13:41:40 +0000 (13:41 +0000)] 
Fix a compiler warning in cksumvfs.c.

FossilOrigin-Name: 68033bcade87e6046f4c0a49936d63ce531c680c1def98fae02afa0c79db2c7f

5 years agoFix harmless compiler warnings.
drh [Mon, 4 May 2020 19:52:00 +0000 (19:52 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 8eee591d3cb9fadfd5cac5543bd66ef9cb371a72d3ad3241fb3bfd67fb216eda

5 years agoChanges to avoid deadlock in SQLITE_ENABLE_SETLK_TIMEOUT builds.
dan [Mon, 4 May 2020 19:42:35 +0000 (19:42 +0000)] 
Changes to avoid deadlock in SQLITE_ENABLE_SETLK_TIMEOUT builds.

FossilOrigin-Name: 553423c23142cf0ec219192315d57ce8a0e10c3d8678d28bc110a1a9a7c17cee

5 years agoMinor change to the sqlite_stmt virtual table, for test coverage.
drh [Mon, 4 May 2020 19:04:23 +0000 (19:04 +0000)] 
Minor change to the sqlite_stmt virtual table, for test coverage.

FossilOrigin-Name: 838987b2097c4b7acaa65aea99cfdaf199f04d76bcf6ef12743c60b338a965f7

5 years agoSimplify the initialization of built-in extensions.
drh [Mon, 4 May 2020 17:15:21 +0000 (17:15 +0000)] 
Simplify the initialization of built-in extensions.

FossilOrigin-Name: 729f2397358d0382e255ba0058bf70bc9ed410b7621a67466da13de437d3ba5c

5 years agoEnsure that the master-journal name is in a form suitable to be passed
drh [Mon, 4 May 2020 11:47:38 +0000 (11:47 +0000)] 
Ensure that the master-journal name is in a form suitable to be passed
into sqlite3_uri_parameter().

FossilOrigin-Name: d1ba026d882f070b351280028e2fa88a3cca59b46d4683302e24c6677e0951b9

5 years agoAdd the SQLITE_FCNTL_CKPT_START file-control and use it to optimize
drh [Sat, 2 May 2020 04:08:23 +0000 (04:08 +0000)] 
Add the SQLITE_FCNTL_CKPT_START file-control and use it to optimize
the cksumvfs extension.

FossilOrigin-Name: efdecb13091316aeac2722f58577cb0314e008e857f2816a2a222bac0a83e9e1

5 years agoAdd support for PRAGMA analyze_limit and approximate analysis.
drh [Sat, 2 May 2020 03:46:32 +0000 (03:46 +0000)] 
Add support for PRAGMA analyze_limit and approximate analysis.

FossilOrigin-Name: 812547525d35df975f40cbbeb604cc9cd2dec809c1ca083cbb139fe59ffa1d73

5 years agoAdd a missing VdbeCoverage() macro. approximate-analyze
drh [Sat, 2 May 2020 03:29:21 +0000 (03:29 +0000)] 
Add a missing VdbeCoverage() macro.

FossilOrigin-Name: 77a55c394d2c313a5710229bee9262457dcfc6620e6500f9f526c5f6acf87cef

5 years agoMerge the bytecode and tables_used table-valued functions. Requires
drh [Sat, 2 May 2020 00:31:00 +0000 (00:31 +0000)] 
Merge the bytecode and tables_used table-valued functions.  Requires
-DSQLITE_ENABLE_BYTECODE_VTAB at compile-time.

FossilOrigin-Name: d09bcce37f1eaf084e3b07eb4a23653ea1f370cdd290ce3875408186adf87022

5 years agoCorner-case changes to the bytecode virtual table for testability and bytecode-function
drh [Sat, 2 May 2020 00:01:39 +0000 (00:01 +0000)] 
Corner-case changes to the bytecode virtual table for testability and
correctness.

FossilOrigin-Name: baa720e4a88f268ed95337daab5f434fd3263b00f09101cddc6424765bf3b722

5 years agoMerge recent enhancements from trunk.
drh [Fri, 1 May 2020 18:58:21 +0000 (18:58 +0000)] 
Merge recent enhancements from trunk.

FossilOrigin-Name: 96dfc71ea599702ef38b60952d03e95dce5a8c534cd943e076e9c76b00e61e65

5 years agoAdd the SQLITE_FCNTL_CKPT_START file-control. Use it to optimize the ckpt-start-fcntl
drh [Fri, 1 May 2020 18:37:34 +0000 (18:37 +0000)] 
Add the SQLITE_FCNTL_CKPT_START file-control.  Use it to optimize the
cksumvfs extension.

FossilOrigin-Name: b40f5aa344ae10cf4da83b3aa9e4866d6f6ffb06ba7e34ec1ce80c92468cf3bf

5 years agoMerge recent trunk enhancements.
drh [Fri, 1 May 2020 15:04:13 +0000 (15:04 +0000)] 
Merge recent trunk enhancements.

FossilOrigin-Name: 2100b2c8f339e9778723fa0c91e479bab8675cf6fbea1664b6af49f40db6d27b

5 years agoClarification to the sqlite3_uri() family of interfaces. Documentation
drh [Fri, 1 May 2020 13:45:12 +0000 (13:45 +0000)] 
Clarification to the sqlite3_uri() family of interfaces.  Documentation
enhancement only - no changes to code.

FossilOrigin-Name: 853703cd6d44d6dd48ef5eda6523e374b8ebdf7c338ddaad31c15a40a8b3fd9b

5 years agoUpdate documentation for sqlite3_close_v2() for clarity. No functional
drh [Fri, 1 May 2020 13:32:19 +0000 (13:32 +0000)] 
Update documentation for sqlite3_close_v2() for clarity.  No functional
changes.

FossilOrigin-Name: 80498b69ea489e8816c80a52c9e55a62699116fcbfdcbfd922ef23c2d9938871

5 years agoAdd the new SQLITE_IOERR_DATA result code and use it in cksumvfs.
drh [Fri, 1 May 2020 11:31:43 +0000 (11:31 +0000)] 
Add the new SQLITE_IOERR_DATA result code and use it in cksumvfs.
Also enhance cksumvfs to emit an sqlite3_log() message whenever it finds
an invalid checksum.

FossilOrigin-Name: a094e8bfdef10d9e5d97f5a9f7c15b0fc547358b83367762ba5c2dfd2c9d0117

5 years agoDo not allow page_size changes on an active cksumvfs database.
drh [Wed, 29 Apr 2020 01:09:46 +0000 (01:09 +0000)] 
Do not allow page_size changes on an active cksumvfs database.

FossilOrigin-Name: 2c17cdce26fd935e6d81ff828f4670291fc014013c93b2a1578506598345ee86

5 years agoFix incorrect error message when something goes wrong with the
drh [Tue, 28 Apr 2020 23:09:56 +0000 (23:09 +0000)] 
Fix incorrect error message when something goes wrong with the
sqlite3_dbpage() table-valued function in the .dbinfo command of the CLI.

FossilOrigin-Name: 0dcf002463f5931c3875d2038d2b97298f1800b1cdfa70485d6430ab758f3b25

5 years agoAdd the cksumvfs extension.
drh [Tue, 28 Apr 2020 20:47:40 +0000 (20:47 +0000)] 
Add the cksumvfs extension.

FossilOrigin-Name: 237c10f941cc6cb775693ae87513ff1b816f12b5e9c3d57b057421204d2d02cf

5 years agoUse AtomicStore() when setting the mem0.nearlyFull boolean to avoid
drh [Tue, 28 Apr 2020 14:01:31 +0000 (14:01 +0000)] 
Use AtomicStore() when setting the mem0.nearlyFull boolean to avoid
harmless TSAN warnings and to forestall doubts about threadsafety.

FossilOrigin-Name: ce980af65a9b528f112baa22a95020a98ac5340155a0b53b09c46f99aad9b12b

5 years agoUse an AtomicLoad() macro in sqlite3HeapNearlyFull().
drh [Tue, 28 Apr 2020 11:45:41 +0000 (11:45 +0000)] 
Use an AtomicLoad() macro in sqlite3HeapNearlyFull().

FossilOrigin-Name: 7556bc632e271d8a1e4fd836ce91e28213768ac09c90857b91171e9cd1009884

5 years agoYet another attempt to enhance sqlite3_load_extension() so that it works
drh [Sun, 26 Apr 2020 22:04:48 +0000 (22:04 +0000)] 
Yet another attempt to enhance sqlite3_load_extension() so that it works
with Window-style pathnames using a backslash separator character.

FossilOrigin-Name: b73d9a7d6f7fec0ffc9640902a849289c305f8651e891388c01255c4da7a6c4b

5 years agoFix an issue with check-in [bc3bf7c6681a96bc] when compiling on Windows.
drh [Sun, 26 Apr 2020 14:33:54 +0000 (14:33 +0000)] 
Fix an issue with check-in [bc3bf7c6681a96bc] when compiling on Windows.

FossilOrigin-Name: 57b16d8ca3d1ede3b411389256bec6686433aae716f47bca309ee7c8e5fe3128

5 years agoFix the sqlite3_load_extension() interface so that it tolerates backslashes
drh [Sat, 25 Apr 2020 21:05:51 +0000 (21:05 +0000)] 
Fix the sqlite3_load_extension() interface so that it tolerates backslashes
in place of forward-slashes in pathnames on Windows.

FossilOrigin-Name: bc3bf7c6681a96bc18a1ed02f0ccced4731d5dab45f60c347dd1841706e6b62a

5 years agoEnsure affinity is not discarded from a view column if the view appears on the rhs...
dan [Sat, 25 Apr 2020 15:01:53 +0000 (15:01 +0000)] 
Ensure affinity is not discarded from a view column if the view appears on the rhs of a LEFT JOIN. Fix for [45f4bf4e].

FossilOrigin-Name: ac31edd3eeafcef46164a4506bbc32c711bb7cd78378aeaa4c9bb12524ac5ea1

5 years agoThe new sqlite3_database_file_object() interface requires that the pager
drh [Fri, 24 Apr 2020 18:20:30 +0000 (18:20 +0000)] 
The new sqlite3_database_file_object() interface requires that the pager
never invoke xOpen with SQLITE_OPEN_MAIN_JOURNAL unless it is using
a pointer to the journal name found in the Pager structure itself.   Make
this the case when processing a master-journal.

FossilOrigin-Name: b4987a5ced0c0f2c606c040e0c1b8ee11175f40ae35a7446308a43e77b1f1db2

5 years agoNew test case for ticket [1dcb4d44964846ad].
drh [Fri, 24 Apr 2020 17:55:52 +0000 (17:55 +0000)] 
New test case for ticket [1dcb4d44964846ad].

FossilOrigin-Name: 9e9f1e96c9aac60fcbbcda6923e01e350ca4dd88acefb9d400979419ba4e1e4d

5 years agoFix an uninitialized variable in the newly enhanced ".output" command of
drh [Thu, 23 Apr 2020 20:45:46 +0000 (20:45 +0000)] 
Fix an uninitialized variable in the newly enhanced ".output" command of
the CLI.

FossilOrigin-Name: 65c6c26bb48d5347ce53bb3607de3a03a5a03946b232d35e46a20533f86750f8

5 years agoFix an off-by-one error in the "calculated" page count output from the
drh [Wed, 22 Apr 2020 13:49:25 +0000 (13:49 +0000)] 
Fix an off-by-one error in the "calculated" page count output from the
sqlite3_analyzer utility for databases that are more than 1GB in size.

FossilOrigin-Name: 8789368b91fb5b7477bdba3a953412fc3839b4894443b65186f7b8f79f6369c9

5 years agoFix an integer overflow in fts3 causing a usan error.
dan [Wed, 22 Apr 2020 11:11:17 +0000 (11:11 +0000)] 
Fix an integer overflow in fts3 causing a usan error.

FossilOrigin-Name: e256f85289a78e629acdf83e5bf1f8df2a0ffb3d559738eb9e49db6c228dc8c0

5 years agoClarify the comment on the sqlite3BtreeGetRequestedReserve() routine.
drh [Wed, 22 Apr 2020 00:50:21 +0000 (00:50 +0000)] 
Clarify the comment on the sqlite3BtreeGetRequestedReserve() routine.
No changes to code.

FossilOrigin-Name: 52a6acca6d5d376308d354c02f4d676d9375c34c3841d7b1941196ee8b4e2511

5 years agoAdd the sqlite3_database_file_object() interface.
drh [Tue, 21 Apr 2020 20:19:25 +0000 (20:19 +0000)] 
Add the sqlite3_database_file_object() interface.

FossilOrigin-Name: f534ebeaaf34f825550138f09f9a40221dfa7cd5c6537ef9f86dce5249025ec3

5 years agoAdd the sqlite3_database_file_object() interface to sqlite3ext.h. sqlite3_database_file_object
drh [Tue, 21 Apr 2020 19:27:08 +0000 (19:27 +0000)] 
Add the sqlite3_database_file_object() interface to sqlite3ext.h.

FossilOrigin-Name: 3cabe06b6e9433cbfb4bf7bd72a425f43b54f57d84a205adbaa6a1147bbe46bf

5 years agoExperimental API: sqlite3_database_file_object().
drh [Tue, 21 Apr 2020 01:06:35 +0000 (01:06 +0000)] 
Experimental API: sqlite3_database_file_object().

FossilOrigin-Name: ae697b152d22737169892411a0c4d908895ff5fb249cce9bdb1ba0bbe32806f0

5 years agoDo not use O_NOFOLLOW when opening a directory just to call fsync() on
drh [Mon, 20 Apr 2020 17:35:32 +0000 (17:35 +0000)] 
Do not use O_NOFOLLOW when opening a directory just to call fsync() on
that directory.

FossilOrigin-Name: 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b

5 years agoEnhance the ".filectrl" command in the CLI to support the --schema option.
drh [Mon, 20 Apr 2020 16:21:30 +0000 (16:21 +0000)] 
Enhance the ".filectrl" command in the CLI to support the --schema option.

FossilOrigin-Name: 698d40db58b76f4094687d46b5c6292702a62168054f9e6a70ee86650a6635f7

5 years agoThe SQLITE_TESTCTRL_RESERVE operator is removed. In its place is the
drh [Mon, 20 Apr 2020 15:18:43 +0000 (15:18 +0000)] 
The SQLITE_TESTCTRL_RESERVE operator is removed.  In its place is the
more generate SQLITE_FCNTL_RESERVE_BYTES which is an API and which can
operator on more than just the main schema.

FossilOrigin-Name: abc1aad74f7b6a1e72fb09936239f2224aa942d16296c6a3de0b8daef4bc8471

5 years agoRemove an obsolete comment. No changes to code.
drh [Mon, 20 Apr 2020 14:05:54 +0000 (14:05 +0000)] 
Remove an obsolete comment.  No changes to code.

FossilOrigin-Name: 4135cb024456288d9c85aef5fb572dbb591527dd33d9a60ca5946b712c269941

5 years agoAdd the --bom option to the ".excel", ".once", and ".output" commands
drh [Sat, 18 Apr 2020 14:12:00 +0000 (14:12 +0000)] 
Add the --bom option to the ".excel", ".once", and ".output" commands
of the CLI.  Also fix the "--all" option on ".help" so that it works with
two dashes in addition to just one.

FossilOrigin-Name: d5b0def96ba6d90f47bc96fab1ccf9c501d84885d086744035b16fd96f3e248c

5 years agoFix the ".excel" command and the ".open -x" and ".open -e" command so that
drh [Fri, 17 Apr 2020 23:46:54 +0000 (23:46 +0000)] 
Fix the ".excel" command and the ".open -x" and ".open -e" command so that
they work better when running from an in-memory database and on Windows
and when running from a script.

FossilOrigin-Name: 07752164c2bf00b6885808533bbdb2cefbf1bf281a887b0b4f6316649a6cb810

5 years agoMerge accidentally created fork.
dan [Thu, 16 Apr 2020 15:56:03 +0000 (15:56 +0000)] 
Merge accidentally created fork.

FossilOrigin-Name: cb772b7a8fb53694cb267e74c11f49d2b9fd6920821c4e232f90ec35739c8904

5 years agoImprove corruption detection in fts3 shadow tables earlier in order to prevent an...
dan [Thu, 16 Apr 2020 11:35:27 +0000 (11:35 +0000)] 
Improve corruption detection in fts3 shadow tables earlier in order to prevent an assert() from failing.

FossilOrigin-Name: a9ec8c8f80a59badabb0afdb4189f0fd2934f936530d4151de395b3a7e7c1f1f

5 years agoClarification of the byte-order determination for UTF16 inputs to routines
drh [Wed, 15 Apr 2020 17:39:39 +0000 (17:39 +0000)] 
Clarification of the byte-order determination for UTF16 inputs to routines
like sqlite3_bind_text16() and sqlite3_result_text16() and others that
accept UTF16 input strings.

FossilOrigin-Name: a42fdcf54bcbd72a301dad4a040346dc48e67cacab43479ec618f5c32108c55f

5 years agoBuild the UINT collating sequence extension into the CLI.
drh [Tue, 14 Apr 2020 15:53:58 +0000 (15:53 +0000)] 
Build the UINT collating sequence extension into the CLI.

FossilOrigin-Name: 2b8c6b035a276029850de02651712a5fd69f4dfee45083d24b9d1f998004829b

5 years agoAdd the UINT collating sequence extension. The implementation is copied out
drh [Tue, 14 Apr 2020 15:48:55 +0000 (15:48 +0000)] 
Add the UINT collating sequence extension.  The implementation is copied out
of the "natsort" branch.

FossilOrigin-Name: 6f46c6e3e3c471ca864d7596e0211ee90316b784c8fe22c7ae177c9d29731dc7

5 years agoWhen compiling the shell for WinRT, avoid using Win32 APIs that are unavailable.
mistachkin [Thu, 9 Apr 2020 15:31:22 +0000 (15:31 +0000)] 
When compiling the shell for WinRT, avoid using Win32 APIs that are unavailable.

FossilOrigin-Name: 85d3dc8c50d8dbb8eac1956e8976e861d3b671e03355ca9257060fa3dca51cc4

5 years agoMerge recent trunk enhancements into the bytecode-function branch.
drh [Thu, 9 Apr 2020 15:07:22 +0000 (15:07 +0000)] 
Merge recent trunk enhancements into the bytecode-function branch.

FossilOrigin-Name: 7e6576ec00fde277c5c7abac264f7ec7e531de00c4e112bf733a07fe703fadcc

5 years agoMerge trunk enhancements into the approximate-analyze branch.
drh [Thu, 9 Apr 2020 15:01:09 +0000 (15:01 +0000)] 
Merge trunk enhancements into the approximate-analyze branch.

FossilOrigin-Name: 17901ea6a1951b8c55671408841901c6660e3f8099378204f080b171a684d718

5 years agoLimit LIKE/GLOB pattern length to 100 bytes (default is 50K) when running
drh [Tue, 7 Apr 2020 15:07:11 +0000 (15:07 +0000)] 
Limit LIKE/GLOB pattern length to 100 bytes (default is 50K) when running
dbsql cases in the fuzzcheck utility.

FossilOrigin-Name: 10306118e8591e727af477a1a15d136852d21170e645bd0e75f7c88346b037d7

5 years agoAdd the --spinner option to the fuzzcheck test program.
drh [Tue, 7 Apr 2020 13:08:56 +0000 (13:08 +0000)] 
Add the --spinner option to the fuzzcheck test program.

FossilOrigin-Name: b1eae2686f03a6e20a49ca2b3a654b3019506d4941708ee3919c339cd093a57d

5 years agoThe ALTER TABLE fix of check-in [7e5ad8e0ab7ee91a] is no longer needed due
drh [Tue, 7 Apr 2020 01:18:23 +0000 (01:18 +0000)] 
The ALTER TABLE fix of check-in [7e5ad8e0ab7ee91a] is no longer needed due
to the changes at check-in [4cf8721f5ceb1fda].  But, we keep the defense
in place as an assert() for extra safety.

FossilOrigin-Name: 230556e859536bbadf0daf8133a9a01ef4f03148b3296723e37bad66e3fc3d82

5 years agoRemove dead code that was added during initial development of RENAME COLUMN
drh [Tue, 7 Apr 2020 00:54:09 +0000 (00:54 +0000)] 
Remove dead code that was added during initial development of RENAME COLUMN
but never actually served a purpose.

FossilOrigin-Name: c95c4cda4640f05d61b13b4e60494dec07d4483734fc41ffcce73fb5163cbb0d

5 years agoPerformance improvement in sqlite3ResolveExprNameList().
drh [Mon, 6 Apr 2020 20:35:52 +0000 (20:35 +0000)] 
Performance improvement in sqlite3ResolveExprNameList().

FossilOrigin-Name: 7e170e67f24c7cdef7e7ceac4e0b81a75382618e4abe9e604f3d7f6db9dc6396

5 years agoPerformance improvement for column name lookup.
drh [Mon, 6 Apr 2020 18:16:31 +0000 (18:16 +0000)] 
Performance improvement for column name lookup.

FossilOrigin-Name: 1e4b6a93987cdfbf829e2ff35ef417c290625f2894ad11949e301af518f1fb44

5 years agoWhen running ALTER TABLE, avoid adding some internally generated tokens to the token...
dan [Mon, 6 Apr 2020 16:37:05 +0000 (16:37 +0000)] 
When running ALTER TABLE, avoid adding some internally generated tokens to the token map to improve performance on schemas with nested views.

FossilOrigin-Name: 4cf8721f5ceb1fdaefdc355b3211f75c53c4cdf9d2582ca70fc96777a9b057c2

5 years agoRemove a NEVER() that could be true in sqlite3MatchEName().
drh [Sat, 4 Apr 2020 11:58:22 +0000 (11:58 +0000)] 
Remove a NEVER() that could be true in sqlite3MatchEName().

FossilOrigin-Name: 921448f0e24a3753374b32be9d7bf36a9ca5d8522eff9f0b51dc243f08652419

5 years agoIn the push-down optimization, do not substitute columns that have previously
drh [Sat, 4 Apr 2020 00:15:54 +0000 (00:15 +0000)] 
In the push-down optimization, do not substitute columns that have previously
been identified as being constant by the propagate-constants optimization.
Fix for ticket [51166be0159fd2ce]

FossilOrigin-Name: 70c44811d12f540d4ec1c29dedbe999cf79b82e326a8712ae2fa0725d6bd8a65

5 years agoAvoid factoring out constant expressions on the LHS of an IN(...) operator, as the...
dan [Fri, 3 Apr 2020 19:37:14 +0000 (19:37 +0000)] 
Avoid factoring out constant expressions on the LHS of an IN(...) operator, as the IN(...) operation may affect the affinity of these values.

FossilOrigin-Name: 98d56b4a34fddcbaecd953a045ae0270b4d78c1edf34cc73522fb4e12743af80

5 years agoAdd a test case to fuzzdata8.db for the recent Henry Liu bugs.
drh [Fri, 3 Apr 2020 16:11:32 +0000 (16:11 +0000)] 
Add a test case to fuzzdata8.db for the recent Henry Liu bugs.

FossilOrigin-Name: 42b02454b146ca1b04c0a5321465326435fc5b995f5498d3b1cf69c558a20f95