Commit Graph

28890 Commits

Author SHA1 Message Date
stephan
10d1b0c5db Fix build portability problems discovered on an ARM OpenBSD system.
FossilOrigin-Name: ef5348dc3f5b9fbe19753ff85e4da461ee962f0790e5f9cfda6eba522576451b
2024-10-08 16:33:42 +00:00
stephan
59ded3ff14 Get some basic install rules working.
FossilOrigin-Name: e9ab211f82f789c89ab52e8d5fe7526c09943b2b8b3002fa7a16fb2b40addc8f
2024-10-08 16:06:11 +00:00
stephan
d5503d383b Make tool/emcc.sh.in Bourne-friendly.
FossilOrigin-Name: a69ab88474a7b917679633e366364b05a99c348dabc37f1bbc5010f7005d5500
2024-10-08 16:05:54 +00:00
drh
ab85d9abd6 Additional improvements to the behavior of ".crnl" in the CLI. The default
output mode is O_BINARY so that results are identical on Windows and
non-Windows systems.  On Windows you can optionally do ".crnl on" to enable
NL-to-CRLF conversion on output.  Output to Windows console is always
O_U8TEXT and so is unaffected by the .crnl setting.

FossilOrigin-Name: dbfc10b8981bcce4f875c4adef43f398871b41551074445087e343ded50253c5
2024-10-08 15:11:43 +00:00
drh
dd2deecbbd Fix the .crnl command in the shell so that it does not get undone by
calls to print a quoted string or CSV output.

FossilOrigin-Name: 6b932337c8dee3e52b472a38984e91b5091f3d90c41ac1cc171fa4149cc491c5
2024-10-08 14:07:28 +00:00
drh
eaefd9ccc8 Allow expressions with subtypes to be read from indexes unless they are
being used as direct or indirect parameters to SQLITE_SUBTYPE functions.

FossilOrigin-Name: 39a56a23fec24dd713905457b6d4ed7c148f88e325a26c376f1e6daf147c69c8
2024-10-08 10:10:42 +00:00
drh
7998b889e8 Add an ALWAYS() on a branch in the new indexed-subtype logic.
FossilOrigin-Name: f150c3c5b898975b1f83d61fa589753449a48f8a0007e8e167dbd702528197c5
2024-10-08 00:15:22 +00:00
drh
ddc764b274 Add a NEVER() to an unreachable branch in the new indexed-subtype logic.
Mark the pi() function as deterministic.

FossilOrigin-Name: 50be8f5091b2202b67a80f826feee2c378f001745ad5acb7c4374423bbf6ff22
2024-10-07 21:04:57 +00:00
drh
f7f78a624d The (undocumented) subtype() SQL function should have the SQLITE_SUBTYPE flag.
FossilOrigin-Name: c361dd91841da64fdd009e6eab389ccd81266a24d1070e5313fe1d22e6cef65a
2024-10-07 18:06:17 +00:00
drh
56423385fb Merge the latest trunk enhancements into the indexed-subtype-expr branch.
FossilOrigin-Name: 2fe2f374584b025676684ebe4ef29304883a3b0b125b62abc1dbf74815eecdfb
2024-10-07 16:53:41 +00:00
drh
2813eb3c9e Add the undocumented test/debug function parseuri(), useful for fuzzing.
Only appears when compiling with SQLITE_DEBUG.

FossilOrigin-Name: 011fab70cb3d194b27742ebb236b05be582230567cf78e3e6cac6911de86922f
2024-10-07 12:48:21 +00:00
drh
ce527f2e97 Fix handling of U+fffd in the LIKE optimization.
dbsqlfuzz eee57fb9eea1dfa5aa40dfa87865cf8c84d12f96.

FossilOrigin-Name: bce52ce2a6e7f3d3d1b2807d1ea95243d9b655e557c1bb6f0b8a9a6cefb1aed6
2024-10-07 12:19:23 +00:00
dan
29f976432a Fix an assert() failure in "PRAGMA integrity_check" that could occur when checking a corrupt database.
FossilOrigin-Name: d218993be5886f07193d5c2a66ccd0ecdd7bb87687947b89945c90e31cea5451
2024-10-07 11:47:05 +00:00
drh
fba24d3528 Origin should not send content for the lock-byte page to the replica, in
sqlite3-rsync.
[forum:/forumpost/d14b55e5fa19c25f|Forum post d14b55e5fa19c25f].

FossilOrigin-Name: aa9bd711cc1b0136098388976d22adc0a2fc89f50fe2273ed80ee3e4e50c98b6
2024-10-06 21:26:56 +00:00
drh
74672acd94 New SQL function for testing/debugging use only: parseuri().
FossilOrigin-Name: 37d3b6b17e92b2c760239c3053bbc7fb85091acd688c54a73af7611fe9501312
2024-10-06 15:01:31 +00:00
stephan
2c72c55dca Back out [2f7eab381e16] because the stderr output on systems without gmake causes grief in the testing tools.
FossilOrigin-Name: cc6f3de0320aceb0e9d81413fa4c021ad2b4ee1c72ecef13438d80c4d3701135
2024-10-05 21:44:21 +00:00
dan
d564bdb050 Allow expressions with subtypes to be read from indexes unless they are being used as direct or indirect parameters to SQLITE_SUBTYPE functions.
FossilOrigin-Name: aa440e78e9004c7ca3e03beaf264f54d0070ad7298a3c96ca097d8b35c872e5f
2024-10-05 18:10:02 +00:00
dan
c857b9eb5d Experimental change to allow expressions with subtypes to be read from indexes in situations where they are not used as function parameters.
FossilOrigin-Name: ac63f98ad85a4dd1e49cc64b41f0ca0044153972c15d71c669f4bc3ec590e268
2024-10-05 17:37:19 +00:00
stephan
d0be4a781e Merge trunk into autosetup branch.
FossilOrigin-Name: 6cbb05fde1b74ced6d56d6ec7f815c989697381531175daccebc4311bfef61d9
2024-10-05 12:06:31 +00:00
stephan
706fdeebb8 Add ext/wasm to the top-level clean/distclean rules in such a way that any error due to a lack of gmake are ignored.
FossilOrigin-Name: 2f7eab381e16760952d1c90a9119d2a217933f0136442d8f6eeb6d95e366ca4f
2024-10-05 12:02:17 +00:00
dan
c8c95f5149 Fix typo in documentation for SQLITE_SUBTYPE. No code changes.
FossilOrigin-Name: 6733893f450097e07cbd563d6a46790825fd0689283d60181c09793ce7d5509e
2024-10-04 17:02:36 +00:00
drh
51bbf0c7b8 Unconditionally include <ctype.h> in sqliteInt.h, even in builds where
it is not needed.

FossilOrigin-Name: 825f01d7e258ac7981f715fd10708560381b079f0e026abc414cf56d16d862da
2024-10-03 16:31:08 +00:00
drh
1e2834dd45 Fix to the previous: The dbpageRollbackTo() method should return SQLITE_OK.
FossilOrigin-Name: 4dea7221129350a15df8dee5aabd5567e47adda4d255b65d4ba82fd821913759
2024-10-03 10:06:51 +00:00
drh
c51dccbd8b Fix missing return value from the new dbpageRollbackTo() callback.
FossilOrigin-Name: d1e0992e1f2885be9725d872b8688806e06788f3d66a70de86255179d93f74d3
2024-10-03 09:53:44 +00:00
drh
46a62afbab Modify the behavior of sqlite_dbpage so that the null-INSERT that truncates
a database must be the very last INSERT operation within a transaction in order
to be effective.  This simplifies the code and also makes the behavior
easier to document and understand.

FossilOrigin-Name: b869a7d9ce9567a61d2257272032aaee705bbc6158c7f2cd36e7f3ee66d72722
2024-10-02 18:54:40 +00:00
dan
44b8c37017 Fix a typo in fts5delete.test.
FossilOrigin-Name: b1f001435eff72c2119ecee973194385f70fd1b66ef0be8a66c0b0ad02ae43df
2024-10-02 17:43:06 +00:00
dan
c5c3cbc026 Add the contentless_unindexed=1 option to fts5. This causes the values of any UNINDEXED columns of a contentless fts5 table to be stored persistently in the database.
FossilOrigin-Name: 58313ac59e0bd164f601d68a1474f658c5d1c038638e00f3dc15eb58202e661c
2024-10-02 17:04:30 +00:00
drh
3b3f230d95 Adjust the new truncation behavior of sqlite_dbpage(N,null) such that it causes
the database to be truncated to N-1 pages.  This makes more since.  An error is
raised if N is less than 2.

FossilOrigin-Name: 7d5ff86ef7386f4f7f6a956dc0de607e61040d335c9f98d1f71e76a39f4f5e03
2024-10-02 16:55:27 +00:00
drh
92e71573ce Remove all use of the "long double" data type from SQLite, as hardware support
for long double is increasingly rare and the use of long double creates
challenges for some compilers.

FossilOrigin-Name: 761d8fd18b0ee8681b12998f01a2eca1b796807a5174a1270cfb9bdc841424ac
2024-10-02 13:26:17 +00:00
drh
010f9f8704 Remove a few more traces of long double from the code.
FossilOrigin-Name: 11d6a89e4a25c3f884ff617036d239dc42522859400cd1f4674634f6c7adbb02
2024-10-02 11:34:11 +00:00
dan
dceffee1ba Ensure that if sqlite3_snapshot_get() is called immediately after a "BEGIN", then it locks the database such that the returned snapshot object may not be invalidated by a writer or checkpointer until after the sqlite3_snapshot_get() caller has closed its transaction.
FossilOrigin-Name: eb5277e490a9b48c865f2dc449cdb8f1b604e233737e492abb4f2f7101a6715b
2024-10-02 11:15:22 +00:00
dan
512ad53f3a Merge latest trunk changes into this branch.
FossilOrigin-Name: 2b3945e6a597e6853cac567052e92926c8cb6d7a029ac64c2d45c321bbe2e94d
2024-10-02 11:11:29 +00:00
dan
f9d1141a3b Update docs for sqlite3_snapshot_get().
FossilOrigin-Name: 78c3892ab777a39406da8a9df84d0634397514e25512b0363a13bff3b8bc8925
2024-10-02 11:11:00 +00:00
drh
e8b2c92240 Remove all code that makes use of the C-language "long double" datatype.
FossilOrigin-Name: f622b52024c8bec1d241b1dc480fbbd839fc1af50b6220f012812503de2c656e
2024-10-01 20:29:43 +00:00
drh
7151010919 New #ifdefs to omit code that is unused when SQLITE_USE_LONG DOUBLE is defined.
FossilOrigin-Name: 98066e2d226e7d2eceec1931a1432baea956f49bf3c708d8a6d511fa4e864ca3
2024-10-01 19:10:47 +00:00
stephan
1f2faa647f Another comment about the LONGDOUBLE wasm topic. No code changes.
FossilOrigin-Name: 1755831cb1ac58241e0b11d8d003b5eca39b65aa3cb84229b215662028b1b3c0
2024-10-01 17:57:55 +00:00
stephan
c9c1b65698 Use the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM builds, as they cannot be represented in JS and this saves approximately 5.5kb in the resulting wasm file.
FossilOrigin-Name: fa7b56f776b715d061581fad6f04b871504ff5d808e7364419d1d6cdef82c5ee
2024-10-01 17:08:23 +00:00
drh
dac22f6566 Add compile-time option -DSQLITE_USE_LONG_DOUBLE=0 to omit all attempts to use
"long double".  Or =1 to omit attempts to use the Dekker algorithms to achieve
high-resolution floating point.

FossilOrigin-Name: ca5964ef70efad3332e0bf9c158eb5fd5006d3022051d1ac506c097c427735a1
2024-10-01 16:55:30 +00:00
stephan
ea63f48ec8 Get more of the CLI utils building.
FossilOrigin-Name: 6838b7b5d6130b1e0af9a71ad2c5922b1ef35f082907dffeed03811e1e62406f
2024-10-01 13:40:59 +00:00
stephan
51e8287dde Correct missing LDFLAGS_ZLIB for libsqlite3.so.
FossilOrigin-Name: 98bbba3a05734e080a0c8c51fac0368436809d4ff3c39959a51970400b4470cb
2024-10-01 11:09:50 +00:00
stephan
2e7c9ae473 Fix reversed logic in the build/target/host names in several hwaci-* functions.
FossilOrigin-Name: fde7257ad9ce84be6d907be3c6d277b04dd9466ee6828bfded4cfefc86db22db
2024-10-01 11:04:02 +00:00
stephan
ed94e0e677 Add an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as brought up in [forum:cbfb0d0ac0a4e349 | forum post cbfb0d0ac]. No functional changes.
FossilOrigin-Name: 0b83e8f1ef53b35a9dda0740b4922b8691428f7484f3058833a961f3f8d0b178
2024-10-01 10:49:30 +00:00
stephan
aca993423f Add static library build. Get build working (for a given value of working) with the --disable-amalgamation flag.
FossilOrigin-Name: ddfda58004fa3e43c4f2d497c6feecbea3b195d14196bf179f4aafd21ea089ea
2024-09-30 19:01:41 +00:00
drh
cacef23082 Fix the character width tables for the CLI such that all unicode code-points
less than 0x300 have a width of 1.  This is in fact the case for Mac, Ubuntu,
and Windows.

FossilOrigin-Name: f0c5a86fefecded07e098e1326dd54c72504b0bb480f710e395d4041a322dfcb
2024-09-30 18:19:38 +00:00
stephan
c4c951adbe More generic build tinkering.
FossilOrigin-Name: 433bfc790258e1d2e7c9ea4839a9edb25dde0b99d1e888d1e2a4cf669825fb79
2024-09-30 17:44:41 +00:00
dan
d5838eaa42 In fts5, avoid starting a new merge of level L if there exists already an ongoing merge of a level less than L.
FossilOrigin-Name: 350c6e75ce3c1e81458d1baa73045df489284206e8b279ab3c2f5e3d011c262a
2024-09-30 17:28:45 +00:00
stephan
0831b3a989 Generic build tinkering.
FossilOrigin-Name: b6c1772ce0278988ecaea485c4feb8b0919fa1530f0c53b8321d9bd2277b5acd
2024-09-30 14:33:36 +00:00
drh
54fd01c4ab Fix the CLI so that the --bom option only outputs a single BOM, not two.
FossilOrigin-Name: 76b6331e6a705a420a64820a18214f07cf4c1d5151e7158d6fff09964e63f352
2024-09-28 19:52:38 +00:00
dan
dcf757c2ea Merge trunk changes into this branch.
FossilOrigin-Name: 81d48df62ccf8b56e7adbc5327103e8ab5499bb22e587c4f0d0780a66adbdb67
2024-09-28 15:20:13 +00:00
stephan
33669ef289 Add another missing mkdir to the wasm build process.
FossilOrigin-Name: e815055b321085deda8607ac3279ef1a1c890fe3bf9d9b9c0a74028e87857a7d
2024-09-28 15:13:49 +00:00