]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
3 years agoAttempt to transform OP_Column to make use of eCurState instead of the other simplify-cursor-state
drh [Fri, 25 Feb 2022 18:15:09 +0000 (18:15 +0000)] 
Attempt to transform OP_Column to make use of eCurState instead of the other
miscellaneous flags.

FossilOrigin-Name: 09a47f32a44bfe8630157f09518e6467fac281bc70cf229c88efccac2028ea70

3 years agoDo not do a deferred seek on a cursor that is marked nullRow.
drh [Fri, 25 Feb 2022 16:21:00 +0000 (16:21 +0000)] 
Do not do a deferred seek on a cursor that is marked nullRow.

FossilOrigin-Name: 1c026bcb3c9e1ae0f38ad8a3e6e3bda1a0cdff9dcc77a08b1820f2fdde2ee200

3 years agoThis branch proposes to consolidate various state fields of VdbeCursor
drh [Fri, 25 Feb 2022 15:44:13 +0000 (15:44 +0000)] 
This branch proposes to consolidate various state fields of VdbeCursor
(specifically, nullRow, deferredMoveto, and cacheStatus) into a single
eCurState field.  This first check-in adds the new eCurState field while
retaining and continuing to use the legacy state fields.

FossilOrigin-Name: 7953716c12ca1deb50ee2c91d9b62a029e38f7cb61af418eeca438283c45f825

3 years agoImproved comment on the codeDeferredSeek() routine. No code changes.
drh [Fri, 25 Feb 2022 13:29:56 +0000 (13:29 +0000)] 
Improved comment on the codeDeferredSeek() routine. No code changes.

FossilOrigin-Name: 54f49f65ac943263a1622b1efe519c8a61f30f23694fd4fec89ad2bf0e17b473

3 years agoFix unimportant typos in comment text.
drh [Fri, 25 Feb 2022 11:30:29 +0000 (11:30 +0000)] 
Fix unimportant typos in comment text.

FossilOrigin-Name: 393460132994d6ca133e52af57374e43a2795a9e7fc7781bd9dea752a2b52c6a

3 years agoInvoking SQLITE_TESTCTRL_INTERNAL_FUNCTIONS causes the flags field of the
drh [Fri, 25 Feb 2022 01:23:17 +0000 (01:23 +0000)] 
Invoking SQLITE_TESTCTRL_INTERNAL_FUNCTIONS causes the flags field of the
PRAGMA function_list to show all bits, including internal-use-only bits,
rather than just the bits that are part of the API.

FossilOrigin-Name: ad1be34828726bfef0dbc0ce16090400cf3530e7b5077849af96774d7428387b

3 years agoRemove unused P4 types on the Opcode object. Saves a few bytes of code
drh [Fri, 25 Feb 2022 01:10:57 +0000 (01:10 +0000)] 
Remove unused P4 types on the Opcode object.  Saves a few bytes of code
space and simplifies the code.

FossilOrigin-Name: aca538435939e6146f9a42e72e3a65030bbc5f646a0bbc7684e43688a0339888

3 years agoChange the OP_Next and OP_Prev opcodes so that they invoke
drh [Thu, 24 Feb 2022 14:44:23 +0000 (14:44 +0000)] 
Change the OP_Next and OP_Prev opcodes so that they invoke
sqlite3BtreeNext() and sqlite3BtreePrevious() directly rather than through
a function pointer, for improved performance and a decrease in code size.

FossilOrigin-Name: 9d13cbbef3cf64f281d3e100f23f1b2ed6e8d65920c7517a84e1e4f964ceff2e

3 years agoSpell fix, no code change
larrybr [Thu, 24 Feb 2022 11:09:08 +0000 (11:09 +0000)] 
Spell fix, no code change

FossilOrigin-Name: f2597fae3c2b8f77f98a3ba9420b309f649b4008f9530d3cfaeeba1e2bf5d8a3

3 years agoFix an assert() so that it is still valid following OOM with the latest
drh [Thu, 24 Feb 2022 01:41:14 +0000 (01:41 +0000)] 
Fix an assert() so that it is still valid following OOM with the latest
enhancements.

FossilOrigin-Name: ecf832f71fbaee36ee10f6da5bde19a8af9f90adbba06e8c5706d18b768bae1f

3 years agoUpdate the version number of version 3.39.0 for the next development cycle.
drh [Thu, 24 Feb 2022 01:08:53 +0000 (01:08 +0000)] 
Update the version number of version 3.39.0 for the next development cycle.

FossilOrigin-Name: 9542e9bebbd25b20228fa2366b76d55845a40f12fdc4bbd077d1cb48e32b8cf2

3 years agoAdd a new subclass for MemPage.xCellSize specifically for the case of a leaf
drh [Wed, 23 Feb 2022 22:56:10 +0000 (22:56 +0000)] 
Add a new subclass for MemPage.xCellSize specifically for the case of a leaf
page in a B+Tree, that is optimized for that cases.  This gains a half million
cycles or more at the cost of less than 200 bytes of code space.

FossilOrigin-Name: 7ad829224adbec5d74ff9e5ab040eb2ad3e17fe45da7a2cf0cca770a0731401a

3 years agoOptimize calls to get2byte() in btree.c for almost a one-million cycle
drh [Wed, 23 Feb 2022 18:23:15 +0000 (18:23 +0000)] 
Optimize calls to get2byte() in btree.c for almost a one-million cycle
performance gain and a few bytes less code.

FossilOrigin-Name: 41061f29969dc546c2702f7f412127070a4dd54593827692df93a83c939dfb61

3 years agoDefer the check for error check Pgno zero until after the page fetch misses,
drh [Wed, 23 Feb 2022 17:16:30 +0000 (17:16 +0000)] 
Defer the check for error check Pgno zero until after the page fetch misses,
to gain a few CPU cycles and a small size reduction.

FossilOrigin-Name: ece326db50201937eb688809df39edc7fb97413b4614d2e2e783418192f7b02a

3 years agoStore the page number for the PENDING_BYTE page in the Pager object, rather
drh [Wed, 23 Feb 2022 17:00:44 +0000 (17:00 +0000)] 
Store the page number for the PENDING_BYTE page in the Pager object, rather
than computing the page number every time it is needed, because it turns out
that number is needed quite frequently.  This saves a few hundred thousand
CPU cycles and a few bytes of code space.

FossilOrigin-Name: 5aa9c3eb45514d5eb7b32696d25a9aeb7dad485e1ea5adb833fac6d1f2105f1a

3 years agoFor the "PRAGMA database_list" statement, do not check to see if the schema
drh [Tue, 22 Feb 2022 20:29:31 +0000 (20:29 +0000)] 
For the "PRAGMA database_list" statement, do not check to see if the schema
is up-to-date and do not try to reload the schema.

FossilOrigin-Name: 710de6a2137c872812effa43ea888aa77d339362ca0b6c8990d4426c8fb20689

3 years agoVersion 3.38.0 version-3.38.0
drh [Tue, 22 Feb 2022 18:58:40 +0000 (18:58 +0000)] 
Version 3.38.0

FossilOrigin-Name: 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab

3 years agoFix an undersized memory allocation in the test harness for RTREE. This
drh [Tue, 22 Feb 2022 15:47:55 +0000 (15:47 +0000)] 
Fix an undersized memory allocation in the test harness for RTREE.  This
error was in test logic only, not in the SQLite library itself.
[forum:/forumpost/35470a0a72a005e1|forum post 35470a0a72a005e1]

FossilOrigin-Name: 7e3c9594390ac8defaf9825e14b4c19ef8c123b747971dd3d4df16110f443d3b

3 years agoFix compiler warnings for older compilers (ex: gcc 4.0.1 powerpc-apple-darwin).
drh [Mon, 21 Feb 2022 14:30:59 +0000 (14:30 +0000)] 
Fix compiler warnings for older compilers (ex: gcc 4.0.1 powerpc-apple-darwin).

FossilOrigin-Name: 5c188243d769681c68938c8e432155c8ec838d9e32fe8d1b12286ebc9d0e87f1

3 years agoRemove stray tab characters from auxiliary source code files.
drh [Mon, 21 Feb 2022 13:44:51 +0000 (13:44 +0000)] 
Remove stray tab characters from auxiliary source code files.

FossilOrigin-Name: e25e33582b69289a2c3a6bc403e3911de22a3b529db1a565efb9f1af01b9e382

3 years agoAdd SQLITE_OMIT_JSON to the compile-time option test sequence.
drh [Mon, 21 Feb 2022 13:02:23 +0000 (13:02 +0000)] 
Add SQLITE_OMIT_JSON to the compile-time option test sequence.

FossilOrigin-Name: f36325a6e21c4d3b6ab48ebfb2efabda089281344d1e61949d1c9290e88395b1

3 years agoDo not allow error messages from sqlite3NestedParse() to leak up into the
drh [Mon, 21 Feb 2022 00:23:49 +0000 (00:23 +0000)] 
Do not allow error messages from sqlite3NestedParse() to leak up into the
main parse.

FossilOrigin-Name: 9c4e21abdca664d6b7bcf0043fe9ec05ef8b2949ba6ee7208abaaec1ff4ed679

3 years agoImprove .backup and .save help text
larrybr [Sat, 19 Feb 2022 21:25:48 +0000 (21:25 +0000)] 
Improve .backup and .save help text

FossilOrigin-Name: 741651fd4b1b776b4dea156cdc987f426f7c668ece203bda6654b2c7117c8933

3 years agoAdd a NEVER() to a branch that is unreachable for STAT4.
drh [Sat, 19 Feb 2022 15:57:28 +0000 (15:57 +0000)] 
Add a NEVER() to a branch that is unreachable for STAT4.

FossilOrigin-Name: e4e97505af4016c48465009686bfeffe9627e225a5b2082a5bf4baeee40db5c9

3 years agoEnhance the documentation on sqlite3_stmt_readonly() to explain that
drh [Thu, 17 Feb 2022 17:24:39 +0000 (17:24 +0000)] 
Enhance the documentation on sqlite3_stmt_readonly() to explain that
EXPLAIN and EXPLAIN QUERY PLAN do not affect the return value.  Add test
cases to verify this.  Add new test cases and requirements marks for
complete requirements test coverage on this interface.

FossilOrigin-Name: a6fbb7ba0583b3981e2d8b809006b902b3e97e516dbd3ab7d905c5ea73df2272

3 years agoRemove references to the now-defunct SQLITE_ENABLE_JSON1 compile-time option.
drh [Thu, 17 Feb 2022 14:33:13 +0000 (14:33 +0000)] 
Remove references to the now-defunct SQLITE_ENABLE_JSON1 compile-time option.

FossilOrigin-Name: db950192c93db7f5eb4ffcce41d0ea374c58450405945cfb8ebe0c93070b7c48

3 years agoFix a testing error on Windows that was recently added to shell5.test.
drh [Thu, 17 Feb 2022 14:29:39 +0000 (14:29 +0000)] 
Fix a testing error on Windows that was recently added to shell5.test.

FossilOrigin-Name: 6cace54320997dcbbdd49017f20eecafa88ebcc4b264ee800954f25d9605023d

3 years agoMake the sqlite3_error_offset() interface accessible from TCL using the
drh [Wed, 16 Feb 2022 15:11:01 +0000 (15:11 +0000)] 
Make the sqlite3_error_offset() interface accessible from TCL using the
new "erroroffset" method on the sqlite3 object.

FossilOrigin-Name: 3454a1222bedefba527af98c0284ed0bfbd28dd941885d9a0ac9a44aea2fc8ec

3 years agoImproved rendering of floating point numbers without a fractional part in
drh [Tue, 15 Feb 2022 13:23:09 +0000 (13:23 +0000)] 
Improved rendering of floating point numbers without a fractional part in
".dump" output from the CLI.
[forum:/forumpost/550d877659f37cb2|Forum post 550d877659f37cb2].

FossilOrigin-Name: 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006

3 years agoNew assert() statements to help prove correctness of memjournal.c.
drh [Tue, 15 Feb 2022 11:46:31 +0000 (11:46 +0000)] 
New assert() statements to help prove correctness of memjournal.c.

FossilOrigin-Name: d74ec88c2f9b9e056988add8322186750229e14a609d1a6969ba393a5b8c5174

3 years agoGeneralize the in-memory journal so that it is able to accept writes that
drh [Mon, 14 Feb 2022 21:11:17 +0000 (21:11 +0000)] 
Generalize the in-memory journal so that it is able to accept writes that
begin at any offset less than or equal to the current file size.

FossilOrigin-Name: c039d5476e0836c16d8c1ad99a2620f7fd04eb4b0e5dcb2246b42dde2ae1f95a

3 years agoCLI .import can auto-rename non-unique column names when it creates a new table
larrybr [Mon, 14 Feb 2022 18:55:19 +0000 (18:55 +0000)] 
CLI .import can auto-rename non-unique column names when it creates a new table

FossilOrigin-Name: 4b5d07ea7e6f5d6f1279c88bc474ee4bc8bd2cebe38a268f211f47e44569e4b1

3 years agoMinor correction to the early corruption detection added by
drh [Mon, 14 Feb 2022 18:18:56 +0000 (18:18 +0000)] 
Minor correction to the early corruption detection added by
[a6fda39e81d0da98|check-in a6fda39e81d0da98] so that it works even if
the page being cleared in page 1 of the database.

FossilOrigin-Name: a5ec16907ef6ab50e041101d87c5756c71469923872a86c3ab383f188673d7a5

3 years agoFix a bad assert() (it needs an "||CORRUPT_DB" term) in b-tree, discovered
drh [Mon, 14 Feb 2022 13:53:49 +0000 (13:53 +0000)] 
Fix a bad assert() (it needs an "||CORRUPT_DB" term) in b-tree, discovered
by dbsqlfuzz.

FossilOrigin-Name: f5f263cc626d6a8bea3e85e28bb716e3eac0d9cd199cc060c0c8b0c77b280a45

3 years agoCLI's .import column rename made more minimal, and reports renames. auto-column
larrybr [Mon, 14 Feb 2022 01:12:46 +0000 (01:12 +0000)] 
CLI's .import column rename made more minimal, and reports renames.

FossilOrigin-Name: c626cff7f99ec502ebd46f9cdafc3d088697544ef5d6559b6b3ae85679b4f9fa

3 years agoSync w/trunk, fix zAutoColumns placement blunder, all to pass all TCL tests
larrybr [Sun, 13 Feb 2022 22:18:22 +0000 (22:18 +0000)] 
Sync w/trunk, fix zAutoColumns placement blunder, all to pass all TCL tests

FossilOrigin-Name: 67dc59f46d742ad69742fb34540a3074af163a3f1a0f9093f83db2276bf944ca

3 years agoDo not run merge1.test with SQLITE_OMIT_VIRTUALTABLE builds.
dan [Sat, 12 Feb 2022 18:56:24 +0000 (18:56 +0000)] 
Do not run merge1.test with SQLITE_OMIT_VIRTUALTABLE builds.

FossilOrigin-Name: bf8dbfd499e732f14c7a8efee527e8ce155937dbb2a3e85213f8aa64ac497189

3 years agoFix a possible user-after-free in ALTER TABLE found by asan.
dan [Sat, 12 Feb 2022 16:02:37 +0000 (16:02 +0000)] 
Fix a possible user-after-free in ALTER TABLE found by asan.

FossilOrigin-Name: 9252619d410293ddefd108f5cf81b6fb4932bd3f2ceaaa92abb7542e34f66111

3 years agoUpdate fuzz.test to account for a change in error message made in the core.
dan [Sat, 12 Feb 2022 13:45:02 +0000 (13:45 +0000)] 
Update fuzz.test to account for a change in error message made in the core.

FossilOrigin-Name: c57601b51f9b59e9d8f0eb06580fa14f49525e56bd0190c02865e478bd1f48e7

3 years agoAvoid dropping SQLITE_TOOBIG errors in the quote() function.
dan [Sat, 12 Feb 2022 13:37:27 +0000 (13:37 +0000)] 
Avoid dropping SQLITE_TOOBIG errors in the quote() function.

FossilOrigin-Name: 115c3051a1ff7567e84f14fc4c49efe61bc2850248533449b0195c305ab6516e

3 years agoFor .import auto-column, aid build-time override of rename decoration.
larrybr [Sat, 12 Feb 2022 13:12:03 +0000 (13:12 +0000)] 
For .import auto-column, aid build-time override of rename decoration.

FossilOrigin-Name: 433e5ead2b711d1e3b0b62cf8cb5a8a65e2474c68ef2173317ed4323fc8bdc58

3 years agoFix auto-column bug noted by post https://sqlite.org/forum/forumpost/d102c15d63
larrybr [Sat, 12 Feb 2022 10:48:42 +0000 (10:48 +0000)] 
Fix auto-column bug noted by post https://sqlite.org/forum/forumpost/d102c15d63

FossilOrigin-Name: 689137e1b5bc78b0f16e5db86d16415b9fa77d22ded59e93d75e7033b465e673

3 years agoSync w/trunk, allow build-time override of auto-column decorating character
larrybr [Sat, 12 Feb 2022 02:15:37 +0000 (02:15 +0000)] 
Sync w/trunk, allow build-time override of auto-column decorating character

FossilOrigin-Name: caaef4c592c980889efb349fa73b61303ec493172d90cd67d54ffde0855e4138

3 years agoFix a test in without_rowid1.test so that it is disabled without
drh [Fri, 11 Feb 2022 21:20:46 +0000 (21:20 +0000)] 
Fix a test in without_rowid1.test so that it is disabled without
ALTER TABLE support, as it uses ALTER TABLE.

FossilOrigin-Name: ca22a64e6f05a6688974f4cff1a0ff2c873aad1947f3cf6ffaeee8bb074b2627

3 years agoUpdate some OOM tests of the ALTER TABLE command to account for an error message...
dan [Fri, 11 Feb 2022 19:41:03 +0000 (19:41 +0000)] 
Update some OOM tests of the ALTER TABLE command to account for an error message which may be returned if opening the temp db fails.

FossilOrigin-Name: 3409fd4150df059d7308f79fa3672a330af9cefe2ad9120c3da5ef1413921e96

3 years agoLoad recent dbsqlfuzz finds into test/fuzzdata8.db.
drh [Fri, 11 Feb 2022 17:47:58 +0000 (17:47 +0000)] 
Load recent dbsqlfuzz finds into test/fuzzdata8.db.

FossilOrigin-Name: b275ad250d8aa286829647967ab7e75fcd2b5674caab1a34eab59d8486a34cd5

3 years agoReference the wayback machine for the dead hyperlink to the MS support
drh [Fri, 11 Feb 2022 17:47:25 +0000 (17:47 +0000)] 
Reference the wayback machine for the dead hyperlink to the MS support
page in the comments about why the extra typedef for va_arg().  No code
changes.

FossilOrigin-Name: ab1a9b5b78de7c00b38357b1df08e82ce5608a14f8c675ac20c5f2dad5212f50

3 years agoFix an assert() in the pager by adding "|| CORRUPT_DB", in as much as the
drh [Fri, 11 Feb 2022 17:33:02 +0000 (17:33 +0000)] 
Fix an assert() in the pager by adding "|| CORRUPT_DB", in as much as the
assert() is not necessarily true if the database size in the header is
wrong.  dbsqlfuzz f2f996065b90988aa9b0ae425b66dbb296546a08.

FossilOrigin-Name: a51402e8c29fad2b24e32de55b10691fb0ebd6c2cebac941e43e54be211d5d39

3 years agoFix a problem in [c006515ae6faff65] causing an assert() to fail with some build confi...
dan [Fri, 11 Feb 2022 16:10:18 +0000 (16:10 +0000)] 
Fix a problem in [c006515ae6faff65] causing an assert() to fail with some build configurations.

FossilOrigin-Name: d7ff262d6d1fd8b855bcb8f6f54ab1833663a4d8187701ddf045f6b5a62a5d1d

3 years agoUse the enhanced SQLITE_TESTCTRL_LOCALTIME_FAULT (2) capability to do better
drh [Fri, 11 Feb 2022 14:08:05 +0000 (14:08 +0000)] 
Use the enhanced SQLITE_TESTCTRL_LOCALTIME_FAULT (2) capability to do better
testing of the 'localtime' and 'utc' modifiers to date/time functions.

FossilOrigin-Name: f38071946ac2e5bb61e6c0620507e4c94464999ac700d86c1a704b94eb1c009a

3 years agoUpon .import column renaming, issue message saying so. Test this.
larrybr [Fri, 11 Feb 2022 13:40:25 +0000 (13:40 +0000)] 
Upon .import column renaming, issue message saying so. Test this.

FossilOrigin-Name: 8b6ca9304bff9a5b2897a6517ce77e4cd32f337b6c849b73ead5f757228d8ac8

3 years agoFix the bind2.test test script so that it works even if
drh [Fri, 11 Feb 2022 12:06:37 +0000 (12:06 +0000)] 
Fix the bind2.test test script so that it works even if
SQLITE_ENABLE_PREUPDATE_HOOK is not defined.
Fix for test-case breakage from check-in [c006515ae6faff65].

FossilOrigin-Name: 937d3a45b3fef354dbdea2085fbb7d9c752a96e8ebb62f61931deb5a64132946

3 years agoWork around the MSVC bug that prevents the use of function pointer types in
drh [Fri, 11 Feb 2022 11:37:12 +0000 (11:37 +0000)] 
Work around the MSVC bug that prevents the use of function pointer types in
the second argument of va_arg() by adding a typedef.

FossilOrigin-Name: eae3ab0a050079d050f339b2510eebd55afe4464e9b410ddacb7523f89981144

3 years agoCLI auto-column rename revamped after forum discussion.
larrybr [Fri, 11 Feb 2022 01:21:09 +0000 (01:21 +0000)] 
CLI auto-column rename revamped after forum discussion.

FossilOrigin-Name: 2da1f8e45eb0cb1ead6049df6a31a903bfad5a7abd27e92cd3dac25fe355aec3

3 years agoFix SQLITE_TESTCTRL_LOCALTIME_FAULT so that it works even if mutexes are
drh [Thu, 10 Feb 2022 23:12:58 +0000 (23:12 +0000)] 
Fix SQLITE_TESTCTRL_LOCALTIME_FAULT so that it works even if mutexes are
enabled.

FossilOrigin-Name: 64537a0669553e8a6b610b9e9703ec084472516c86cfc22a7a6c73b6c66131ee

3 years agoEnhance SQLITE_TESTCTRL_LOCALTIME_FAULT so that is able to install an
drh [Thu, 10 Feb 2022 21:26:53 +0000 (21:26 +0000)] 
Enhance SQLITE_TESTCTRL_LOCALTIME_FAULT so that is able to install an
alternative localtime() interface so that the localtime logic an be better
tested.

FossilOrigin-Name: 6e25cb0890e8cdc63c9a21e841844d066267fc32ad143527843f7c8d05612b53

3 years agoPerformance improve to the 'localtime' and 'utc' modifiers for date/time
drh [Thu, 10 Feb 2022 15:40:40 +0000 (15:40 +0000)] 
Performance improve to the 'localtime' and 'utc' modifiers for date/time
functions.

FossilOrigin-Name: 85cb6014751a0572d28ebd839331d5d7a78de45c9e522adcd834a8a85746f32e

3 years agoFaster implementation of the date(), time(), and datetime() functions.
drh [Thu, 10 Feb 2022 12:57:53 +0000 (12:57 +0000)] 
Faster implementation of the date(), time(), and datetime() functions.

FossilOrigin-Name: fa1b393bdb66b985f6552190a8242ed878f91d653a03352f65aa8d750de3cec4

3 years agoFix the test harness so that it builds without SQLITE_ENABLE_PREUPDATE_HOOK.
drh [Thu, 10 Feb 2022 12:31:37 +0000 (12:31 +0000)] 
Fix the test harness so that it builds without SQLITE_ENABLE_PREUPDATE_HOOK.
Has been broken since [c006515ae6faff65].

FossilOrigin-Name: 4565f711291bae5daaff6dd2b7b2991b17e139a576b1b73bb1f81f08a4c1a13f

3 years agoA CLI feature. auto .import (new table) columns. WIP
larrybr [Thu, 10 Feb 2022 03:21:48 +0000 (03:21 +0000)] 
A CLI feature. auto .import (new table) columns. WIP

FossilOrigin-Name: 7e3be36dfcb65c87a87344cf91c0c8f8d1aff0f2e4bcc23444a8f6b8ddcdae69

3 years agoCreate new branch named "auto-column"
larrybr [Thu, 10 Feb 2022 02:09:43 +0000 (02:09 +0000)] 
Create new branch named "auto-column"

FossilOrigin-Name: 066febe8931c5d90c009f05fe9ad0924ad35ec25a61ab42db63a9b9dbb1cecce

3 years agoFix a typo in documentation. No code changes.
drh [Thu, 10 Feb 2022 01:01:31 +0000 (01:01 +0000)] 
Fix a typo in documentation.  No code changes.

FossilOrigin-Name: e97c6ad4c915c82c2f0b347a0cdc8f80942c345194675a88174047ce0d0a43ad

3 years agoWhen process first moves a database into WAL mode and then tries to run
drh [Wed, 9 Feb 2022 18:47:09 +0000 (18:47 +0000)] 
When process first moves a database into WAL mode and then tries to run
sqlite3_wal_checkpoint() without first performing a transaction, first
try to run a synthesized transaction to get the Pager caught up before
attemptingn the checkpoint.
[forum:/forumpost/fd0f19d229156939|forum post fd0f19d229156939].

FossilOrigin-Name: eee6de1967609f0b590ee4dbec088c3e7b03b08753267ed2909c5b03d60a0e18

3 years agoFix a problem with using sqlite3_bind_value() with sqlite3_value objects obtained...
dan [Wed, 9 Feb 2022 18:42:15 +0000 (18:42 +0000)] 
Fix a problem with using sqlite3_bind_value() with sqlite3_value objects obtained from sqlite3_preupdate_new() when an integer value is written to a column with real affinity.

FossilOrigin-Name: c006515ae6faff6525d589827d99092b06004472e32b7f586845c00c4732d695

3 years agoWrites to the subjournal should be all-or-nothing. Fix for
drh [Tue, 8 Feb 2022 15:14:18 +0000 (15:14 +0000)] 
Writes to the subjournal should be all-or-nothing.  Fix for
dbsqlfuzz fe3c397fb90029313446c4e0f4a6cd0c81dd9621.

FossilOrigin-Name: 22cc55e84f67f6f39b7dba07a4ef7ae958b2d926633faec91a278922053e50c6

3 years agoProvide sqlite3_error_offset() data for some new errors.
drh [Tue, 8 Feb 2022 13:41:23 +0000 (13:41 +0000)] 
Provide sqlite3_error_offset() data for some new errors.

FossilOrigin-Name: 1269206db810460e55a52e178ba3332add42a11f66c5f292f8f0d29ccd61a4b8

3 years agocomment-only change to sqlite3.h
larrybr [Tue, 8 Feb 2022 12:24:43 +0000 (12:24 +0000)] 
comment-only change to sqlite3.h

FossilOrigin-Name: f815cf4a5f97778f177d373814700e8f2f6429dc467b68b799b5b349cc00b7a2

3 years agoDo not show the error code number of CLI error messages unless the error
drh [Tue, 8 Feb 2022 12:13:16 +0000 (12:13 +0000)] 
Do not show the error code number of CLI error messages unless the error
is something other than 1 (SQLITE_ERROR).

FossilOrigin-Name: b471601892df98c5103bb55132bbdecf3e4dfc428aaecc47bfec1e1d51e583c7

3 years agoImproved error message formatting in the shell. Distinguish between
drh [Tue, 8 Feb 2022 11:52:45 +0000 (11:52 +0000)] 
Improved error message formatting in the shell.  Distinguish between
"Parse errors" and "Runtime errors".

FossilOrigin-Name: ae3e322a029952f575e49c73fb50b46bbea55be6792cc225cb94f5e0cbd046d9

3 years agoDisable the sqlite3_error_offset() when the error occurs in a trigger or
drh [Mon, 7 Feb 2022 18:52:56 +0000 (18:52 +0000)] 
Disable the sqlite3_error_offset() when the error occurs in a trigger or
view or some other bit of text that is not part of the original statement.

FossilOrigin-Name: 0e909e34fa74e7b9b7954e4ed4c39dd293c1d413b58fda03607faab74aa382ad

3 years agoWhen create table/view fails due to name taken, say which took it.
larrybr [Mon, 7 Feb 2022 01:09:49 +0000 (01:09 +0000)] 
When create table/view fails due to name taken, say which took it.

FossilOrigin-Name: 9a206e37fb49a203a7b5fdc93c41acc39e9ceb37144c78432a235e2f0d54a210

3 years agoFix unreachable branches in the sqlite3_error_offset() logic.
drh [Sun, 6 Feb 2022 23:54:41 +0000 (23:54 +0000)] 
Fix unreachable branches in the sqlite3_error_offset() logic.

FossilOrigin-Name: 031381aea371892a35737e550121846af41241711a36c1a2086af3b0c11bf7b6

3 years agoThe sqlite3_vtab_in() interface should return false for a vector IN constraint.
drh [Sun, 6 Feb 2022 22:13:35 +0000 (22:13 +0000)] 
The sqlite3_vtab_in() interface should return false for a vector IN constraint.

FossilOrigin-Name: 245d0241c78870c6a41af3e02b82b13151472e2102fbd62989672f8122feca73

3 years agoWith the new ALTER TABLE under PRAGMA writable_schema=ON processing, do not
drh [Sun, 6 Feb 2022 21:13:59 +0000 (21:13 +0000)] 
With the new ALTER TABLE under PRAGMA writable_schema=ON processing, do not
ignore non-parser errors such as OOMs.

FossilOrigin-Name: 36653ccef68cf61b6001000a713b06e951cb6fddced6b6a906c3b17d70a8af87

3 years agoFaster computation of Expr.nHeight.
drh [Sun, 6 Feb 2022 11:51:23 +0000 (11:51 +0000)] 
Faster computation of Expr.nHeight.

FossilOrigin-Name: a7a5af327ba8bafcd58b828e3e7a10d0008bb780d55a6c573aa15896dcc8ab89

3 years agoRecord the error offset on INTEGER tokens.
drh [Sun, 6 Feb 2022 11:26:51 +0000 (11:26 +0000)] 
Record the error offset on INTEGER tokens.

FossilOrigin-Name: 38e057a580613be176552e230e40b4434a9ed57a82d407e92a23c7b8e62c0b0e

3 years agoFurther improvements to localization of errors in input SQL.
drh [Sun, 6 Feb 2022 00:30:04 +0000 (00:30 +0000)] 
Further improvements to localization of errors in input SQL.

FossilOrigin-Name: fa34676042720161ca03f3926814152eb1d144ec12fd2b44e5429408ea4ad5b0

3 years agoEnhance sqlite3_error_offset() to report the position of unresolved
drh [Sat, 5 Feb 2022 23:11:19 +0000 (23:11 +0000)] 
Enhance sqlite3_error_offset() to report the position of unresolved
identifiers.

FossilOrigin-Name: 5b8d2577907abda10de29884716bacc10bff0df1451228a0ac40342dbea6d589

3 years agoRecord the position of many identifiers in the parse using the new
drh [Sat, 5 Feb 2022 21:49:47 +0000 (21:49 +0000)] 
Record the position of many identifiers in the parse using the new
Expr.w.iOfst field.  This is done with the idea of providing offset
results for sqlite3_error_offset() for a more kinds of errors, though that
part is not yet implemented.

FossilOrigin-Name: 32a3a53b62ab09ac2212905e7f42fe6f1b09d891e015203e5caf4cb16262f18e

3 years agoUpdate stale evidence marks on sqlite3_vtab_rhs_value() test cases.
drh [Sat, 5 Feb 2022 13:27:52 +0000 (13:27 +0000)] 
Update stale evidence marks on sqlite3_vtab_rhs_value() test cases.

FossilOrigin-Name: 46744b83d5e1335bcbc59f9625e8ade3f360469d17f34e8d996f077ba9afa89e

3 years agoWhen PRAGMA writable_schema=ON, allow ALTER TABLE to proceed even if there
drh [Sat, 5 Feb 2022 12:39:17 +0000 (12:39 +0000)] 
When PRAGMA writable_schema=ON, allow ALTER TABLE to proceed even if there
are entries in the sqlite_schema table that do not parse.

FossilOrigin-Name: fc4c82e5694cbdae13f2cb90e5368ba9f6b826a220a81de32ead2ffe1bc5f31f

3 years agoFix a NULL pointer dereference that can occur after OOM. Problem relaxed-alter-table
drh [Sat, 5 Feb 2022 12:05:43 +0000 (12:05 +0000)] 
Fix a NULL pointer dereference that can occur after OOM.  Problem
introduced by check-in [197cbabf1767d060].

FossilOrigin-Name: d4e6b9f0f7567b76760a667a701bca4d6158ade39f9a69d205b583c5a1c0c7f4

3 years agoFix documentation typo.
drh [Sat, 5 Feb 2022 11:13:26 +0000 (11:13 +0000)] 
Fix documentation typo.

FossilOrigin-Name: 1a7d8bb5ea0d0e0c250312f89a701c0274cfbcaef9cd71995fb83bf939668504

3 years agoTypo fixes in documentation.
drh [Sat, 5 Feb 2022 01:01:07 +0000 (01:01 +0000)] 
Typo fixes in documentation.

FossilOrigin-Name: 1ec747d1c34ced9877709dd306e674376e79145de08b9c316d12bc5e06efc03e

3 years agoTest case for permissive ALTER TABLE RENAME when writable_schema=ON.
drh [Fri, 4 Feb 2022 20:16:00 +0000 (20:16 +0000)] 
Test case for permissive ALTER TABLE RENAME when writable_schema=ON.

FossilOrigin-Name: 7ee44f66c896cdc7b6980811e8e4537dbd63b23060ead0104f25132d955890af

3 years agoOne more case of disabling errors for ALTER TABLE RENAME when
drh [Fri, 4 Feb 2022 20:07:24 +0000 (20:07 +0000)] 
One more case of disabling errors for ALTER TABLE RENAME when
writable_schema=ON.

FossilOrigin-Name: c52d0dd8f4f8fab4c3f33cbd26b4012569e76562282e85654018c836dca7b564

3 years agoAdd a compile-time option to include vt02.c in fuzzcheck.
drh [Fri, 4 Feb 2022 19:13:18 +0000 (19:13 +0000)] 
Add a compile-time option to include vt02.c in fuzzcheck.

FossilOrigin-Name: c404c8c72600c11b181519d269bf949aff304eaafb90a50d1415c6fe84d2b092

3 years agoAllow ALTER TABLE RENAME COLUMN to proceed even if there are errors in
drh [Fri, 4 Feb 2022 16:43:30 +0000 (16:43 +0000)] 
Allow ALTER TABLE RENAME COLUMN to proceed even if there are errors in
the schema, as long as PRAGMA writable_schema=ON is active.

FossilOrigin-Name: 197cbabf1767d0603928462fb75cf8100f6999f725e0db60d096c7ca20e3da28

3 years agoFix various harmless compiler warnings.
drh [Fri, 4 Feb 2022 13:15:01 +0000 (13:15 +0000)] 
Fix various harmless compiler warnings.

FossilOrigin-Name: 70049342d5ad57ea3e863bba19253934b868bacdd1c26c9371bac024a829badf

3 years agoFor the MULTI-INDEX-OR optimization, when pushing down WHERE clause terms from
drh [Fri, 4 Feb 2022 13:05:29 +0000 (13:05 +0000)] 
For the MULTI-INDEX-OR optimization, when pushing down WHERE clause terms from
the main query into the various OR-term subqueries, do not push down slices
of a vector comparison, since the right-hand operand of the comparison might
have only been initialized in a different OR branch that was not taken.
dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1.

FossilOrigin-Name: 9f67ad00cd38b7c5ec6d14b379e1a611777bbdf6901d843a80712ba7d94d6d33

3 years agoMinor typo fix in comment. No code changes.
drh [Thu, 3 Feb 2022 18:14:22 +0000 (18:14 +0000)] 
Minor typo fix in comment. No code changes.

FossilOrigin-Name: f9b763042c5c4446115c5375a8e4731e522e36ad9fc53e9ef775de9bc297ea19

3 years agoDo not allow the vdbe-compress.tcl script to generate structures named
drh [Thu, 3 Feb 2022 14:37:06 +0000 (14:37 +0000)] 
Do not allow the vdbe-compress.tcl script to generate structures named
"do" or "if".

FossilOrigin-Name: e35ab16dd0fd40b07a71d26e1cdb19ef664a2a628a4abcb2e130f5e555de8ca9

3 years agoProhibit schema changes within xBestIndex callbacks.
drh [Thu, 3 Feb 2022 14:19:26 +0000 (14:19 +0000)] 
Prohibit schema changes within xBestIndex callbacks.

FossilOrigin-Name: bb0f056b3f2ecc3893e5e48e99c060788550ea6a8ed02b715953af051bafbad0

3 years agoImprovement to the sqlite3_vtab_in_first() documentation.
drh [Wed, 2 Feb 2022 21:06:40 +0000 (21:06 +0000)] 
Improvement to the sqlite3_vtab_in_first() documentation.

FossilOrigin-Name: 403e7ac900e53407282393747b784dc0cd4303958394534e3936fce138bc1bc5

3 years agoAdd the sqlite3_vtab_in() interface that allows virtual tables to process
drh [Wed, 2 Feb 2022 19:51:44 +0000 (19:51 +0000)] 
Add the sqlite3_vtab_in() interface that allows virtual tables to process
IN constraints all at once, rather than one value at a time.

FossilOrigin-Name: 52559af093809b572082b5ebaacf97b727ee1860ae118530761b62e937545163

3 years agoAdditional test cases. batch-in-operator
drh [Wed, 2 Feb 2022 19:30:24 +0000 (19:30 +0000)] 
Additional test cases.

FossilOrigin-Name: 733d81c3a6a513b0b893a7d14894f36aebbbca9da375c326db8a72df4f0c6238

3 years agoTest cases for sqlite3_vtab_in() and sqlite3_vtab_distinct().
drh [Wed, 2 Feb 2022 19:15:53 +0000 (19:15 +0000)] 
Test cases for sqlite3_vtab_in() and sqlite3_vtab_distinct().

FossilOrigin-Name: 21afb81d0a73af39aacd9329b1441faa2b535a52a52036daec89fd303a8b344f

3 years agoImproved documentation for sqlite3_vtab_in(). No code changes.
drh [Wed, 2 Feb 2022 18:47:56 +0000 (18:47 +0000)] 
Improved documentation for sqlite3_vtab_in().  No code changes.

FossilOrigin-Name: c99df4ab5db2c32b044366c5b0ac70fd8887d1456d53323e75fede23cc61c236

3 years agoRelax the restriction that the RHS of the IN operator must be a list in order
drh [Wed, 2 Feb 2022 16:24:01 +0000 (16:24 +0000)] 
Relax the restriction that the RHS of the IN operator must be a list in order
for sqlite3_vtab_in() to work.  Change an unreachable branch into an assert().

FossilOrigin-Name: 3bf2153440dce0e8c0572c4fd39e6b9f34ead75ccab2cea80a646d4ff9d19146

3 years agoBe sure that sqlite3_vtab_in_first() and _next() set the correct encoding.
drh [Wed, 2 Feb 2022 15:10:45 +0000 (15:10 +0000)] 
Be sure that sqlite3_vtab_in_first() and _next() set the correct encoding.

FossilOrigin-Name: 04edf36ee8e043c83235a5169a7ced23f211edd2f7ef3290d96413d5fd229ad7