1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-09-05 10:44:27 +03:00
Commit Graph

30303 Commits

Author SHA1 Message Date
stephan
11ba513fe5 Skip checking for dlopen() on mingw builds and those which include "windows" in their host tuple, as suggested in [forum:2436c8ffed | forum post 2436c8ffed]. Those environments identify as Windows for SQLite's purposes so use LoadLibrary().
FossilOrigin-Name: 69b87d4fa8089ef6101e976131dfd5c47dbc3d8c01a7e7d90a444b7a4794f78b
2025-08-06 19:16:16 +00:00
drh
e7440380c2 Do not allow the number of terms in an ORDER BY or GROUP BY clause to
exceed the maximum number of columns in a table.

FossilOrigin-Name: 139e587c7b349e771d67a8b4ee02ab3ad5d5712d4ff4713dad63cb765bdee248
2025-08-06 19:12:10 +00:00
drh
e6061cba7f Fix Windows makefile breakage caused by [ae9d7c9c922bb241].
FossilOrigin-Name: c41324139d6a75b0d37aeec2b0572c63207dd0b06e6a99e4fb221be564e73024
2025-08-06 19:05:39 +00:00
stephan
5d06c6b3f1 Add *.obj to the make clean target for the sake of the Unix-on-Windows environments.
FossilOrigin-Name: da07e0c02fe7de7b67f2564c29f49f251ae2374c0e269d246bd13e68a9a73328
2025-08-06 16:51:12 +00:00
stephan
de048aeda9 Extend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1bb7ca8e03 | forum post ca3c1bb7ca8e03].
FossilOrigin-Name: 79a14a5ebd0e8a0aa7f7bb180fcaa348a3ecd046662e3ee05a34f2c9a7db3dd6
2025-08-06 15:57:44 +00:00
drh
7270a56fdf Minor bug fixes in the script added by the previous check-in
FossilOrigin-Name: 2e1a2db3f92b0bd484d979b422fe28e86732121594d190b76dbf46f5d7533643
2025-08-06 12:47:58 +00:00
drh
aa86b2a373 Add a script to build ARM64EC binaries on Windows11 for ARM64.
FossilOrigin-Name: 2d5b74b84a9c778183a11070623e89b553ba9cde905b779dbf115ea95aa0ca9b
2025-08-06 12:43:06 +00:00
drh
ff1d5e5bb8 Fix a possible printf() of a NULL string in fuzzcheck. (Passing a NULL to
"%s" in SQLite's internal printf() prints the text
"NULL", but it apparently segfaults glibc.  Whatever.)
[forum:/forumpost/e07d56579b|Forum post e07d56579b].

FossilOrigin-Name: 4ec69baf4f2a75585b92388cbc352836116381dce3f2d44a3b0f7d3360a17cf0
2025-08-05 23:01:31 +00:00
drh
cd70a44d45 Remove the <i>experimental</i> lsm1 extension from trunk, in as much as
readers were thinking that this was a supported extension and were reporting
bugs against it.

FossilOrigin-Name: ae9d7c9c922bb241363aa690b42b9664c4ad6e76ed5ce474daf1ab44461bc6a3
2025-08-05 12:01:43 +00:00
drh
332eb8e63c Add bounds checking and error messages and improved comments
to the (unused) zorder extension function.
[forum:/forumpost/e3f1ede174|Forum post e3f1ede174]

FossilOrigin-Name: 6bb717acf706e6ffd4671660ca78237e6a42863f344518e6d21065bf735f971e
2025-08-05 10:54:56 +00:00
drh
f9c2cff2fe Improved defenses against corrupt ZIP archives in the zipfile extension.
FossilOrigin-Name: 642e89191deaf75db236102248c662aeef65bcd3dcbdfea694256583556be75f
2025-08-05 01:53:03 +00:00
drh
eff534e1a5 Back out a recently added NEVER().
FossilOrigin-Name: 4fcdd5bdb061d550b4a35594eb16c9a1699c76caf1d906f1781b4f9cb29ac80c
2025-08-05 00:16:40 +00:00
drh
a37bf61539 Fix a bug in the fuzzcheck.c test program introduced by [1cccea0508f5c8b8].
FossilOrigin-Name: 90b217e11c988785d19b8efbba435250c120837492f430cf16d6d4524dd55136
2025-08-04 23:37:48 +00:00
drh
d7d77eb56d When doing an indexed row-value comparison using an IN operator where the
order of the columns in the row-value need to be rearranged in order to match
the index, be sure to make affinity conversions before the rearranging of
columns so that the correct affinity is applied.  Fix for the bug
reported by [forum:/forumpost/eab63506cf|forum post eab63506cf].  This
problem goes back almost nine years to [ddb5f0558c445699].

FossilOrigin-Name: 8800c13deca3717c8a9bed42ef5f09752e4ca8a31adfb4ab0545e0e2b5684bd0
2025-08-04 23:05:35 +00:00
dan
82b08cc8ef Add an assert() to verify that IN_INDEX_NOOP is not used for vector operations.
FossilOrigin-Name: 49c587c6d204841a3d26f183812913ebd585006259040fdf7ba68346cc75580a
2025-08-04 20:48:37 +00:00
drh
e318c4573b Remove the "experimental" mark the snapshot interfaces.
FossilOrigin-Name: 015dc43f628a6f5054152b05b20eb03b6a1153231f824c910a4416792af05272
2025-08-04 19:35:20 +00:00
drh
8725bf916d Fix harmless compiler warnings arising from [1cccea0508f5c8b8].
FossilOrigin-Name: d682557464a6069a93f890bb0aa983cea020ccde8261335ceeab19b9b6423863
2025-08-04 11:50:41 +00:00
stephan
1f4c281b0b Minor doc typo fix in sqliteLimit.h.
FossilOrigin-Name: 8bb315ef7429a60899f5afe878a3b1aa146b18eef2ac9f4d6eca98587a2255cd
2025-08-04 11:20:31 +00:00
stephan
1cf61ce636 Add a note to sqlite3_deserialize() that a schema name of NULL implies the main db, a former shortcoming pointed out in [forum:0543d8aa8e|forum post 0543d8aa8e].
FossilOrigin-Name: 50234bc9e9fe58daf820ed5a1355f1d173728b5d33a7534244f1acff974baa30
2025-08-03 08:56:16 +00:00
drh
cd552cf99f Tag a condition in os_unix.c as unreachable.
FossilOrigin-Name: 151844ad5451295104f18f4823d2fdaf041f22bc09099f1fa3f90898aafa7ea5
2025-08-02 17:37:59 +00:00
stephan
8c30f16a2e Fiddle: move the About button into the main toolbar. Extend the About text with some info which only shows up (or is only hidden) when terminal mode is available.
FossilOrigin-Name: da524d6c61330fb004dade810c5ad84bb6d37625786c1d0fd473593f2448d904
2025-08-02 15:04:50 +00:00
stephan
f681a9a7d8 Fiddle: make the toolbar visible in terminal mode and hide non-terminal-mode options when in terminal mode. Move the terminal/split-view toggle button into the toolbar. Improve the view-switching handling.
FossilOrigin-Name: 711bf423d213a2c468c32a48c0b09927cdfdffce36e5e4a3b35a32bfa055ff82
2025-08-02 14:50:01 +00:00
stephan
380ef6006b Fiddle: move the About button into the header bar and get it working together with the optional jquery.terminal console mode.
FossilOrigin-Name: 9639382c5478115df7c1584c14a52c176fe747df73078419be4ab276374a704b
2025-08-02 13:21:07 +00:00
stephan
a0e569d5ba Fiddle: add an about/info/help view and a button to toggle it. Change the color schema to a more conventional black/white. Force imported databases out of WAL mode, which doesn't work in fiddle.
FossilOrigin-Name: 27d1d0100c0cb6e5c0c576be0f99209bb905f302008d8c257039adf8c5402f7d
2025-08-02 12:06:37 +00:00
drh
46c7568db5 Ensure that stack space allocated for a flexible array has the correct
alignment.  Fix to [d4307a0d43f42e96] to for some compilers
(DeveloperStudio) and platforms (Sparc).

FossilOrigin-Name: 1cccea0508f5c8b8ff751f407873713adc33f8642dcb6cdd495fd2d72ebcbdd3
2025-07-31 12:25:23 +00:00
stephan
210b182b79 Generic JS doc touchups. No functional changes.
FossilOrigin-Name: cc5f126ea4fa4a1abf183c95d151a7e9bd151b90c5c581d3be56db23bbe05a19
2025-07-31 09:54:09 +00:00
drh
1e687a4187 On MacOS, when increasing the size of files on FAT filesystems from 0 to
1 byte in order to preserve their inode numbers, be sure to fsync() the file.

FossilOrigin-Name: 727efa8559852012cf3381baf5fcb1da198ff27d8856ce7b813920b99367dee5
2025-07-31 09:45:20 +00:00
stephan
67695a30ea Minor doc and consistency improvements to [cf7163f82ca380958].
FossilOrigin-Name: 690a7273226df361f3eaa90f9b693ba554ed9d9456c19c5d3a12e812eca49eab
2025-07-31 07:44:18 +00:00
stephan
3e616d3445 Back out [e283d817e3a9] because further testing has proven it unnecessary.
FossilOrigin-Name: 7318a00de64ec89c2a08d86e9f50c694894c4b59b07ff52b0d1f9f0ab8c4df44
2025-07-30 21:39:27 +00:00
stephan
d38777134b Move the flexarray union members from [527bbc1676a85a9] to the end of their respective objects.
FossilOrigin-Name: 3082e07926695863bd5ef51c3c4803fbe267dc0d9b6ac9a717c225459f8988ba
2025-07-30 21:34:47 +00:00
stephan
df23b518da Apply alignment-related patches suggested in [forum:41cd226375cd49c6 | forum post 41cd226375].
FossilOrigin-Name: 527bbc1676a85a927352cd10a292afe041a72692ec0b1360e5a1ccaa19a32fcb
2025-07-30 19:48:12 +00:00
drh
7957c70947 Default pointer size for the __SUNPRO_C compiler is 4 bytes.
FossilOrigin-Name: e283d817e3a93a3cd42c7b79e08e5fb61cb4fa4734137b92f1748dbbe8b8b919
2025-07-30 18:23:33 +00:00
stephan
b79848edd4 JS: ensure that sqlite3WorkerPromiser.v2.defaultConfig initially refers to sqlite3WorkerPromiser.defaultConfig. This fixes a longstanding oversight rather than a known in-the-wild problem.
FossilOrigin-Name: cf7163f82ca380958a79350473b2c5a2cebda7496d6d575fa2835c362010fea1
2025-07-30 16:17:14 +00:00
stephan
1560d52f82 Adjust the previous check-in to replace the db's WASM address with yet another random number, and increase the range of random numbers, reducing the chance of cross-worker db ID collision to 1 in many billions.
FossilOrigin-Name: f5e2a72c57e802c5042ab8343e5009ba9f22ca7138a1c78f4b8201ab9b4fd395
2025-07-30 15:02:32 +00:00
stephan
f402509b62 JS: add a random element when assigning db IDs to Worker1 db instances. This addresses [https://github.com/sqlite/sqlite-wasm/issues/113 | the npm project's ticket #113], which demonstrates that two independent workers can end up generating non-globally-unique IDs. That's not a bug, per se, but it makes the IDs useless for client-side mapping of db connection IDs to client-side state, so we add some randomness to them.
FossilOrigin-Name: 6d2a43075fda9c4eae28f9ca4aaf459c41d305c861947a47fb2cbd513249c4b9
2025-07-30 14:50:44 +00:00
drh
bac6793a8a Enhance the printf formatter for %#f such that the minus sign is omitted
if the '+' is missing and all digits shown in the rendering are zero.
Thus, for example, '%#.2f' renders -0.004 as "0.00" instead of "-0.00".

FossilOrigin-Name: 09e1d7c7b4615262dd03adf1be201122f3cb8909ad381d67f51c812f07e25719
2025-07-30 13:37:49 +00:00
dan
7423ecb0a9 Fix SQLITE_OMIT_WAL builds on windows.
FossilOrigin-Name: 575271c3ae53c64784a2aa1e9b7c6cdcb0402022967155dd176a6b1f1e560b50
2025-07-29 11:04:32 +00:00
drh
7bcb650f57 Add new extended error codes to SQLITE_ERROR and SQLITE_IOERR, for use
by extensions.

FossilOrigin-Name: 02b241bc4ce72d50a8d7621a663e759443b532a5ff9354fc3266ad6bb9433ed4
2025-07-26 12:51:18 +00:00
drh
6d7be8293e Do not apply the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] if
the subquery contains a LIMIT clause.
[forum:/forumpost/2025-07-23T10:59:14z|forum post 2025-07-23T10:59:14z].

FossilOrigin-Name: 314c493f273a34dff7b9f954e7553bc540bbcf5b913f779ef9ce0b9ba11acf7a
2025-07-23 12:48:16 +00:00
drh
5a6f651397 Fix a potentially uninitialized field in the WhereLoop object that is used
as part of the skip-ahead-distinct optimization.  This fixes various
[forum:/timeline?ymd=20250722&u=yxchen&vfx|recent forum reports from yxchen].

FossilOrigin-Name: c10f9970c6a3ffacaef0f0728fc7ff11011686835dc78ca43035c0493e0af319
2025-07-22 15:51:41 +00:00
stephan
d649d7b90c Apply [ebb346c5aa]'s change to sqlite3.1, as reported in [forum:bf92f78344 | forum post bf92f78344].
FossilOrigin-Name: 477211be60cd873d078293f0dd767506c069c3dd83bc1759ae7258d4d3dff359
2025-07-21 18:00:44 +00:00
stephan
095d399e7c Ensure that certain local files are not inadvertently carried over into the snapshot tarball and causing confusing build results.
FossilOrigin-Name: 47fdf7ed2cad7ec56118cf4f77297b1178cd2104a21b19d4afad46437a944378
2025-07-20 18:29:35 +00:00
stephan
fdd37e9637 Teach autoconf/tea/configure to be able to run from the canonical source tree so that a snapshot build or appropriate symlinks are not necessary in order to test the extension.
FossilOrigin-Name: 71b9365b848d9b2bc75336ebbec815eba3a7ed5168798759753a990a1b706fc8
2025-07-20 18:05:45 +00:00
drh
2445ee0e37 Factor out the unusual encoding-change case from vdbeCompareMemString() for
a performance improvement in the common case, and a small size reduction.

FossilOrigin-Name: cbd46ab8a8b4622f42dd9f87f28b812c1d6fa5ea73a4e8f1253514455f397783
2025-07-19 20:10:07 +00:00
drh
ea8f9708c5 Small performance optimization in sqlite3VdbeRecordUnpack().
FossilOrigin-Name: eae168def2ff11f57f730f8a3bd86748b0943077e37b2709c10de0aecff664ec
2025-07-19 19:54:44 +00:00
drh
bcd14a0a3e Split the (internal) sqlite3VdbeCheckFk() routine into two variants,
sqlite3VdbeCheckFkImmediate() and sqlite3VdbeCheckFkDeferred(), which
run faster than the combined general-purpose variant.

FossilOrigin-Name: 872b1b52ed93ef85911c2ef87b15673f9e102aef564f208e0a916af62671df93
2025-07-19 18:46:03 +00:00
drh
c585e03a4b Use fewer CPU cycles to commit a read transaction.
FossilOrigin-Name: 861e55656abb208b4f1f2c8808c76c0454427af85a8930ab53f9c053605f39c7
2025-07-19 18:17:06 +00:00
stephan
1f436ad563 Add SQLITE_SELFORDER1 to JS's sqlite3.capi namespace. It's only useful when built with an sqlite3.c which itself was created with -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES, which the canonical build does not do but custom builds may.
FossilOrigin-Name: fdd15e938ccfac9e871d781d1c8fe8be6dbd9e8cbbcb8b7f0b035e5ceebb8746
2025-07-18 22:18:41 +00:00
drh
daa4cdf84a Fix a minor comment inaccuracy.
FossilOrigin-Name: b66fcb61a1d044fa18419ab382a8b159e9b6bb52956917d8a9de4dccf8dc9a87
2025-07-18 19:17:32 +00:00
drh
bae748a76e Increase the precision of the "real time" output from the ".timer" command
in the CLI from milliseconds to microseconds.

FossilOrigin-Name: c5dbe93114d318fea431859e388af74aeb4cb854c514c9910590441c990321f3
2025-07-18 17:40:34 +00:00