Commit Graph

28528 Commits

Author SHA1 Message Date
drh
235b5d0ac5 If a subquery is materialized due to an ORDER BY and that ordering is useful
in helping to satisfy the ORDER BY or GROUP BY in the order query without
doing an extra sort, then omit the extra sort.

FossilOrigin-Name: 2fbb4dc2327ee435cb2b7a4adcddf5a9cee6dff7de96e2ecb761166427b5ddea
2024-08-15 23:38:52 +00:00
dan
41ebf965cd Extra tests.
FossilOrigin-Name: fb257540d32ced4a5fe0759d3ad9c1b36fd2b7d64d93cb0a0ecdb48355a68b7a
2024-08-15 20:33:05 +00:00
dan
189c41221d Further tests and fixes for this branch.
FossilOrigin-Name: d27985245a0e8c0d6b04323c98b26b6a8fb4e489fa8f5f3234252c7c198f23c8
2024-08-15 18:50:13 +00:00
drh
7c5a829025 Improved help message for --disable-tcl on the configure script.
FossilOrigin-Name: 96e6cfb211f7f1aab50f997f4bc61dfb9701beb720c59bc413a4285c1ae5e20d
2024-08-15 15:31:46 +00:00
drh
3f138e1d8f Reinstate the --disable-tcl option on ./configure.
[forum:/forumpost/845d4a57becc7f3c|Forum thread 845d4a57becc7f3c].

FossilOrigin-Name: de927016aadd7ee55d947134e3540907a3ea5ab4015034c5d088e3a84905d98a
2024-08-15 15:23:33 +00:00
stephan
ff7200e75b Doc typo correction reported in the forum.
FossilOrigin-Name: 48900a867cc4b6d733d2a3533a553af3dfadf96d3ef7ddf4c72bd432e7bf0f76
2024-08-14 20:00:03 +00:00
drh
78f9ba9774 Improved documentation for the sha3() SQL functions in the shathree.c
extension in ext/misc.

FossilOrigin-Name: 0ce609103eb35cfa26d9b6fa1769679be7e2b9032c37cc8c00a194fe355b06a4
2024-08-14 17:58:46 +00:00
dan
8ff952773d Fix an assert() in fts5 that might fail with an expression like "... NOT ''".
FossilOrigin-Name: 317c91edfc69d1d47e233bb6ac13934241742fda1ba03a88fd51bdf98fcbc463
2024-08-14 14:26:02 +00:00
dan
a7384e0de2 More tests for the new code on this branch.
FossilOrigin-Name: 00792e807f1dde750e6ac9f9b0095cf60b9fa6ff7cf4b14440600a21de2ee61a
2024-08-13 21:15:43 +00:00
drh
797fcb8433 Add the sha3_agg() aggregate to the shathree extension.
FossilOrigin-Name: c4d7f9996ce4f5f6d08d83fc3abdb81b6825cfb556318f90c6896736a1da5175
2024-08-13 21:04:00 +00:00
dan
7dad9b4297 Add tests and fix minor issues with the code on this branch.
FossilOrigin-Name: def5243a7b4f1d50427ba607d31332db2d6ac34b181b0cbd2ed4911064f5637a
2024-08-13 15:04:00 +00:00
dan
3e38aa0821 Add extra documentation comments to fts5_main.c.
FossilOrigin-Name: 1a7a9bd3f6a2b9347720f7f0386399e7f14b428500acf07d7c55b9dde1ec233a
2024-08-12 18:39:13 +00:00
dan
a4a8e91022 Fix problem with some fts5 aux function APIs with (locale=, detail=none/column) tables.
FossilOrigin-Name: bf116dec6fb20cce69099cb8c031b0de511195482919a99ccfb3c498e9bf8125
2024-08-12 17:28:13 +00:00
dan
10e54e365a Fix further issues to do with fts5 locale support.
FossilOrigin-Name: e626123580065986f7df50b6140f00048944becce179b9391fbf09f97ac55485
2024-08-12 17:03:37 +00:00
dan
29d5e43ad4 Update the porter tokenizer to use locales.
FossilOrigin-Name: 3291ce3a3359a80e51e4546a3d7a187cbe4c7530fca6632f0bb2728525efe212
2024-08-12 11:46:09 +00:00
dan
1286677773 Update the auxiliary function API to include xTokenize_x2() instead of xSetLocale().
FossilOrigin-Name: f7d56a1f2149f0da117167db62e2c28ec337e8da3403873b64cdfc6a951e2e8e
2024-08-12 11:13:56 +00:00
drh
8c411f7fce Resolve parameters Bind $int_N and $test_T in fuzzcheck inputs.
FossilOrigin-Name: 9c10664416274df6f8da53ddd86f6356c9704ad798fd4034d2784ae433c1c056
2024-08-12 09:49:02 +00:00
dan
9b118de9d5 Merge trunk changes into this branch.
FossilOrigin-Name: b243007525a825b3daf8aa9bb2d3088efb853bd8b7c9ea3c0924fde193eb5c44
2024-08-10 20:03:01 +00:00
dan
195ef6baca Prevent the fts5 xPhraseNext() or xPhraseFirst() APIs from returning an out-of-range column number, even if the database is corrupt.
FossilOrigin-Name: d4014c87ba9b011a6a04c2bf85879b668dc762ebcbbfb50a2f8a417ce594ef88
2024-08-10 19:57:28 +00:00
dan
7978910f85 Fix an uninitialized variable in fts5_tcl.c.
FossilOrigin-Name: 924d3467cebd71ac8dfef8225965d71eda82ef1f0b43508af5b7ea78e2099cf3
2024-08-10 19:18:19 +00:00
dan
ff6ab9dd2b Update the fts5_tokenizer_v2 API so that the locale is passed as parameter to xTokenize(), instead of via a separate call to xSetLocale().
FossilOrigin-Name: 03e63ed24e7a08817341e59b075ae2d4e3f7a5e5b37e0e6138359d5fd29a5e9e
2024-08-10 18:59:36 +00:00
drh
5af9fd53f4 Revision to check-in [d9f726ade6b258f8] so that OOM and other unrelated failures
are not overridden by a syntax error in the tokenizer spec.

FossilOrigin-Name: 3778b2a9ca1cc12a88ef6c32a1ee7c58a0a829ed9715a3d32a225d377d7527ef
2024-08-10 15:46:57 +00:00
drh
4a9a5cbbe9 Fix harmless compiler warning related to the TCL8-to-TCL9 transition. This
change in testing code only and is not relevante to the core SQLite.

FossilOrigin-Name: c86ef65545485eae6aca23b4582e8115d4edfdd6084afa77858e11b21aa270f6
2024-08-10 15:05:22 +00:00
drh
6010980914 Fix behavior change in the offset() SQL function introduced by
check-in [f0b671183f44d0ae].

FossilOrigin-Name: c2ac17f183082d6388336338b8d5c0b334095e5f77a27bc08419431f37471d22
2024-08-10 14:53:21 +00:00
drh
fe4ed96006 Enhancements to covering-index prediction. In particular, avoid the
false-positive prediction described by
[forum:/forumpost/e60e4c295d22f8ce|forum post e60e4c295d22f8ce].
Add early detection of over-prediction of covering-indexes so that
sqlite3_prepare() will return an error rather than just generate bad
bytecode.

FossilOrigin-Name: f0b671183f44d0ae294956e7651a1653f47bd6219f9636872d15993f30f28dfb
2024-08-10 10:05:22 +00:00
drh
4098aa5d19 Add an assert() to fix a harmless compiler warning in the recovery
extension.

FossilOrigin-Name: 2502339339f3c831966479a400c2b1a531fb4d990b1776b4dc4870cf734c3fcd
2024-08-10 09:56:36 +00:00
drh
555aaa432c Fix a few minor TCL9 compatibilities issues.
FossilOrigin-Name: 69eed19914ef52bc0101f4ae1c7b242df4ee28675b3581e1f4d60a35494f9f76
2024-08-09 22:48:11 +00:00
dan
5eba4281b0 Ensure tokenizers registered with xCreateTokenizer_v2() can be accessed using xFindTokenizer(), and that those registered with xCreateTokenizer() work with xFindTokenizer_v2().
FossilOrigin-Name: a3ef7d47b582a66a85ebe802ab40114f77289d6b44a4b375ea7858c60f59b27f
2024-08-09 20:59:50 +00:00
drh
c5900bfd59 Import the second ALTER TABLE fix from trunk.
FossilOrigin-Name: 1de3e5883613ff6093203720f3cdcf6b3a3e626c99735284fae95a438e1ce24f
2024-08-09 18:53:02 +00:00
drh
c60c928717 Fix another instance where ALTER TABLE was returning SQLITE_INTERNAL instead
of SQLITE_ERROR one malformed input.

FossilOrigin-Name: b416756320dfb46ad72b843a7fbf18807d3fd1966251c320de626280b5238a5c
2024-08-09 18:42:01 +00:00
drh
8f924f0530 Merge the error code fix from trunk.
FossilOrigin-Name: 81dfb8cd5d59ecf974018b03175ddabd11366d2aca0211dc982f7e14ff314d4d
2024-08-09 18:22:20 +00:00
drh
610a5bafe2 Fix the internal routine sqlite3ResolveExprListNames() so that it returns
SQLITE_OK or SQLITE_ERROR instead of WRC_Continue or WRC_Abort.  Without this
fix, some times of obscure syntax errors end up returning SQLITE_INTERNAL
rather than SQLITE_ERROR.

FossilOrigin-Name: 9052187efd1f78abd9b285ac94269a3ba4d65b6aa74c9fa34002ee0628c83919
2024-08-09 18:18:11 +00:00
drh
8bc2647e0c Do not attempt to use a covering index based purely on columns-used
when doing an UPDATE or DELETE of a WITHOUT ROWID table.  Raise an
SQLITE_INTERNAL error if there is ever a situation where a table reference
cannot be converted into an index reference when the query planner thinks
that a covering index is appropriate.

FossilOrigin-Name: fae39ae9320c0f4fcc2e3b3baf0a4170ba2b9a04634a0a1fa41dd4918a74b106
2024-08-09 17:09:18 +00:00
drh
1107b4b9cf Bind the new debug parameters in fuzzinvariants.c.
FossilOrigin-Name: 7e1dc263051cf50db04643d1a2aa9f91559b2b121859b750ce4446012d5f3c3e
2024-08-09 12:35:27 +00:00
stephan
caa7a62591 Remove unused static var cBadGroup from ext/consio/console_io.c to resolve a compiler warning reported in the fossil forum. This is a build fix, not a functional change.
FossilOrigin-Name: fa047c3ea7a03d76afd6a11f58ef7b84c653f583ed795e0de5be2a6b986e558e
2024-08-09 12:19:11 +00:00
dan
0c8c9a64b3 Ensure sqlite3expert.c unregisters any SQL user-functions it registers with the database handle before returning.
FossilOrigin-Name: 123b154ce3b6fee1bbf483704812bd6f8538966f9687520b4470d700f0270719
2024-08-08 15:26:11 +00:00
dan
679f5d458e Add assert() statements and reorganize code slightly in fts3 and fts5 to make it easier to follow.
FossilOrigin-Name: 797b0a13fd7a42b0a48ecbf0cd1961aa932da3e9c9ccffd903a3a4d963d0cc54
2024-08-08 15:07:27 +00:00
drh
1193e4679d Do not let the number of terms on a VALUES clause be limited by
SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains elements
that appear to be variables due to the use of double-quoted string literals.
[https://issues.chromium.org/issues/358174302|Chromium issue 358174302].

FossilOrigin-Name: 670beb133eb203065a75022f0c6db7c605a4e0e22c8ef6d6b4724be2663ff3dc
2024-08-08 14:45:50 +00:00
drh
35c6f58dce Back out the --memory option to ".parameter init" in the CLI, as the
capability is no longer needed for testing due to the new "$int_N" and
"$text_T" automatic bindings, and the "init --memory" is hence just
added complication.

FossilOrigin-Name: 3b1b0c141993eb0f8749f54ea40d6014f9bdccbe0fdb3ccccad971a0baea8d3c
2024-08-08 12:14:07 +00:00
drh
6e7a0c2d86 In the CLI, recognize magic parameter names "$int_NNN" and "$text_TTT" and
bind them with integer value NNN and text value TTT respectively.  Intended
for testing and debugging use only.

FossilOrigin-Name: a929cdb00ff74d77cdf55087d32abf53578f7127b36276f89b64ccbef1d4a9a4
2024-08-08 12:08:36 +00:00
stephan
5529ec74da Move a misplaced va_end, as reported in [forum:702c79e9da|forum post 702c79e9da].
FossilOrigin-Name: daa25fb35fd7bdd482d51214439f38b0b9a7df93f689a2b3d30a113daa9f2a1a
2024-08-08 10:51:56 +00:00
drh
6d02d2647b Add the --memory option to the ".parameter init" CLI command. When present,
the --memory option causes the sqlite_parameters table to be created in a
completely independent :memory: database.  This can be done to avoid
parameter binding queries from being affected by debug settings such as
".wheretrace", ".treetrace", "PRAGMA vdbe_addoptrace=on", and similar.

FossilOrigin-Name: 4e69dce2093b75b7db4fbdca4953b664b907be15d991ed352ea1d87c64fbf9d2
2024-08-08 10:10:38 +00:00
dan
5cd01c30b4 Fix a broken assert in fts5_expr.c.
FossilOrigin-Name: 08cc5488404d068e59378b82988460793710df43ec21b4a83a794b497abd035f
2024-08-07 21:20:08 +00:00
drh
c76520c5b9 Add a new assert() to help static analyzers understand that a pointer is
never NULL.

FossilOrigin-Name: 433f2b942ee6f79d50ebe9b08fa3ea8162db6a10ce9d80e2bc193124baa1b083
2024-08-07 15:17:37 +00:00
drh
92d317f787 Fix a harmless compiler warning in an assert().
FossilOrigin-Name: 5e4c9a74b2efa74ace67f644fb6bb37e07f5982f8faaca9463e3daa50b0469d7
2024-08-07 14:54:54 +00:00
drh
eaa560f3fc Remove unused test cases from FTS5, as they interfere with "grep".
FossilOrigin-Name: 048a71bae48aacdfc91e59330db4d4b3d663f00665f51a7110ea82e0508758ec
2024-08-06 23:09:37 +00:00
drh
e9b919d550 Improved robustness of parsing of tokenize= arguments in FTS5.
[forum:/forumpost/171bcc2bcd|Forum post 171bcc2bcd].

FossilOrigin-Name: d9f726ade6b258f8723f90d0b04a4682e885e30939eb29773913e4dfc8e85503
2024-08-06 22:49:01 +00:00
drh
210f6f89be Improvements to ./configure that will hopefully break fewer builds.
FossilOrigin-Name: 769e32a69b7b7c04225afa0371f139b2ed29aaee5a7a4159a30d600ed9f25c57
2024-08-06 20:00:10 +00:00
drh
575a7b85f5 Change the AggInfoColumnReg() and AggInfoFuncReg() macros for
compilers that cannot parse empty elements of a comma expression.
[forum:/forumpost/8fd21998dc|Forum post 8fd21998dc].

FossilOrigin-Name: 533a6251f188805363f0e39613ea03b1bfd758eaea00e0855803238585bdfec7
2024-08-06 10:29:41 +00:00
drh
f2b21a5f57 Restore legacy "tcl_install" makefile target, as an interim measure until
I can figure out what is going on.

FossilOrigin-Name: 931ad7d9e3aedb6d466fffc0af1f8d6b20d57a35dec644f28585f3e84f22d1ce
2024-08-04 10:13:01 +00:00