1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

735 Commits

Author SHA1 Message Date
drh
69da86bf93 Fix harmless compiler warnings in the memstat.c extension. No changes to
the core.

FossilOrigin-Name: 9e903953ba986df98435da40e94fdb645f6f72279552cba63ef50cec1fe3b486
2025-04-02 12:41:16 +00:00
drh
75484481c7 Fix the generate_series() enhancement from check-in [d50b784807333c54]
so that it works even if the number that "value" is being compared against
is a non-integer floating point number.  Bug reported by
[forum:/forumpost/0d5d63257e3ff4f6|forum post 0d5d63257].

FossilOrigin-Name: c113e31b818d16770bec1edc980f6833dfb27c4d74178e66a778fbb5671c3a13
2025-03-22 22:55:33 +00:00
drh
8db881d055 Change the generate_series() table-valued function so that its rowid is just an
alias for its value.  This allows it to be used as the RHS operand of a
RIGHT JOIN.  This fixes the issue raised by
[forum:/forumpost/1e17219c88|forum post 1e17219c88].

FossilOrigin-Name: 77db4d85e70fbf358ae2321c2601966666bdb4d971d7c113ce30a3e541458ee8
2025-03-18 20:15:16 +00:00
drh
99e8490705 Fix the generate_series extension for the case where the termination value
is not an even multiple of the step from the start value and there is also
a value=NNN constraint in the WHERE clause.
[forum:/info/bf2dc8e909983511|Forum post bf2dc8e9]

FossilOrigin-Name: 75e72e3b0d0d689d39e00a01dc361dd6ce2649e68d200bf501ddcf04063041b2
2025-03-13 18:51:18 +00:00
stephan
ba6510a399 Additional 'array index is signed char' warning cleanups for the shell and its embedded extensions, analog to [44bd44532d].
FossilOrigin-Name: f31042595b8f8a378db9778c9a8223b07ec02cf2f528581ba43bf72b5b03c964
2025-03-06 07:48:45 +00:00
stephan
da5f813878 Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.
FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
2025-02-27 21:17:55 +00:00
stephan
5d60f47001 Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.
FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
2025-02-25 20:55:14 +00:00
drh
0424f255ef Fix a copy/paste typo in the output of vfstrace for xDlClose().
FossilOrigin-Name: 1d57b57c85bb8cb9b8a1808b771bb91eeb8150efd14f9064a390e533e715bab7
2025-01-28 18:03:22 +00:00
drh
50637ca5c5 Apparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
Change it so that the SQLITE_USE_W32_FOR_CONSOLE_IO macro causes Win32 APIs
to be used for console I/O and for stdio to be used otherwise.  This is
reported to be necessary for builds that use a C-language runtime other than
the one provided by Microsoft.  This changes if for Windows only.  It is a
bug fix, though we don't have a test case that will demonstrate a malfunction.

FossilOrigin-Name: 925e97e6f4238f02259a0c95b1fc668ae32a95329242f8eeae236ef207aca112
2025-01-28 01:10:45 +00:00
drh
d0c6c6586e Fix a potential one-byte buffer overrun when reading from the Windows
console in the CLI. [forum:/forumpost/95e17b8f5c|Forum post 95e17b8f5c].

FossilOrigin-Name: 4d96759694c91301410f53a3f737a049c33e8b259b0954ff659714aff8b21ae8
2025-01-17 10:39:04 +00:00
drh
290caec8e3 Trying to remove a warning from some compiler that I do not have access to.
FossilOrigin-Name: bc6de90c7049dd429a82d32b186a838f4a21aa7b8a83418eaf0416d19771b41e
2025-01-14 16:10:13 +00:00
drh
43afab28a0 GCC 13 has become more quite pedantic about the signature of functions matching the
type of pointers through which the functions are called.  Make adjustments to
extension functions and test procedures to work around this.  No changes to the
core.

FossilOrigin-Name: ed83b79100b4345235aec990303c4526874f0c2f8701160c4639a80633ebaf70
2025-01-13 11:28:34 +00:00
drh
14bc98d8e2 Fix harmless "implicit fall through" warnings that suddenly appeared when
I upgraded to gcc-13.

FossilOrigin-Name: 3e2875dac27de1525d9c78f38ac5f1fc12fec7e1b43dbdf47798b128fae49084
2025-01-11 16:28:41 +00:00
dan
8d6e3f513c Avoid using Int32x32To64() with a 64-bit argument in fileio.c - this level of micro-optimization is not really necessary there.
FossilOrigin-Name: 1291b013a8c93e7001fe25783bc98d12f5f7c341d1f728e6852632e18a38af58
2025-01-03 11:22:01 +00:00
drh
f7fcf7f910 Fix the vfstrace.c extension so that it supports xFetch and xUnfetch.
FossilOrigin-Name: c7132b7e62422378f0560dcf0837888db5aa70cded9d783ab389581aa43dc5c8
2025-01-01 12:24:01 +00:00
drh
92d252e06d Fix more harmless compiler warnings.
FossilOrigin-Name: f5b8fd77635e5e6d2d88a1ce74e1bd6c4311260a2b695e5055b898b880bf5718
2024-12-07 17:08:13 +00:00
stephan
76412af157 Minor doc correction in ext/misc/shathree.c, as reported in the forum. No functional changes.
FossilOrigin-Name: 3b82d2c6b732617b9be205efadd07326057c93b71c47ffd42de63fc05093667b
2024-12-04 16:01:25 +00:00
drh
178ce6287b Enhance the vfstrace extension such that the output can be controlled using
the "PRAGMA vfstrace('...');" statement.  See header comment on the source code
for details.

FossilOrigin-Name: 96105d33597765c23dbd490b3aa0c2273731d1970d7041720e9f043dbe3517b3
2024-11-15 20:39:41 +00:00
drh
104ab7e81f Enhance the vfstrace.c extension to show symbolic names for the various
SHM locks.

FossilOrigin-Name: c0dd7de8f1e8eb745a8beff086d8b40b289c2dd75fe099a86ccc2bd0581f5e9a
2024-11-13 18:23:18 +00:00
drh
e4d4d73397 Use Win32 APIs to read/write the console in Windows unless the
SQLITE_USE_STDIO_FOR_CONSOLE option is defined.  This is an attempt to get
the build working on MinGW.

FossilOrigin-Name: abfe488ed67e2e3510c230e656ecf203afa549ebd1d1872442f1fadc97d0817e
2024-11-11 17:02:29 +00:00
dan
19c4fa92dd Have the xBestIndex method of the generate_series virtual table ignore contraints on the "value" column with usable=0.
FossilOrigin-Name: f5113a2ef84831ad2da723fa7e29e0d575e74e10585741ff51db8c2e37332cd2
2024-11-05 18:25:32 +00:00
stephan
1934310ebd sqlite3_stdio.c now uses sqlite3_malloc()/sqlite3_free() instead of malloc()/free(). Reported in [forum:6b6cb3ddc8a89b55|forum post 6b6cb3dd].
FossilOrigin-Name: 1982471da14648594d616233be947e343611e7e3d6be7ae6b20d739e544675ea
2024-11-05 02:14:23 +00:00
drh
bf19927688 Fix the percentile extension so that works as an independent extension.
[forum:/forumpost/ab25469a350e0488|Forum post ab25469a350e0488]

FossilOrigin-Name: 27b829c34463d141125d31b59dd65275b88200e3edb1f8238979e02d0fc3614e
2024-11-04 20:16:30 +00:00
stephan
88ef6be57d Fix two mismatched uses of malloc() and sqlite3_free() in sqlite3_stdio.c, as reported in [forum:7dd7c70038 | forum post 7dd7c70038].
FossilOrigin-Name: af0a345b3b287f82b54249cfa574ef3ce52305a6452058aac98cd473c361919e
2024-11-04 13:57:20 +00:00
stephan
7796ee07c4 Add missing ZERO_ARGUMENT_GENERATE_SERIES checks to ext/misc/series.c, as reported via support mail.
FossilOrigin-Name: 5a8e3915eec06dbec7e32d1b87c6a6d5eb618d9d1d9bac13f6e1e7f22bbf8180
2024-10-24 15:58:37 +00:00
drh
863fcdc116 Be consistent about using "CRLF" instead of "CRNL".
FossilOrigin-Name: ec4f4cfd5f8ca83fad4f08cf6566251d9c63e50a3a4284baca299bd94b047951
2024-10-14 09:19:02 +00:00
drh
589ce93e9e Additional clarification in the comments to sqlite3_stdio.c. No changes
to code.

FossilOrigin-Name: 2db24c5364808008fa503f37ca8ccf5d135e8f6bfac2efb29e509e26f7190470
2024-10-11 23:31:37 +00:00
drh
4859bc9a9f Update comments in ext/misc/sqlite3_stdio.c to reflect the latest enhancements.
No changes to code.

FossilOrigin-Name: 9621c3b527702b47799538e028f96945b5697752dbb56078aa7f114c72fd4e1a
2024-10-11 19:57:41 +00:00
drh
0b453b3b33 Avoid undesirable NL to CRLF translation when doing binary output to the
Windows console.

FossilOrigin-Name: d25bdce36abed95524ad058a277aba7bb17270e7ff1476474713dbc29742c762
2024-10-11 14:02:48 +00:00
drh
da1bf77cc2 Fix a problem in the generate_series() extension introduced by
[d50b784807333c54].

FossilOrigin-Name: 41d58a014ce89356932d717843a1fa6e0735f15a7b7265c41ac85a9722a5d826
2024-10-09 16:32:19 +00:00
stephan
c707b2eb6d Squash sign-comparison warnings reported in [forum:5e605a763a65c3f8 | forum post 5e605a763a65c3f8].
FossilOrigin-Name: e74fce93c518296bdb0a4273cd5fd3f785d37d27750ca456b61a3502135775f9
2024-09-27 16:20:03 +00:00
drh
2b041fb97a Provide SQLITE_U8TEXT_ONLY and SQLITE_U8TEXT_STDIO compile-time options
to the sqlite3_stdio.c module.

FossilOrigin-Name: f31588520e3f45b50dcaa9eecab17f52ebb56bb53d0f9bdb88cc596d1a156353
2024-09-26 19:16:20 +00:00
drh
7119a6c16b Have the zipfile and fileio extensions use sqlite3_stdio.c when it is
available - such as when those extensions are preloaded into the CLI.

FossilOrigin-Name: 74bbb2b2b4507d9acbd91209a2ce341968e9ff64f3aebe9e817bfe488d39ae03
2024-09-25 15:26:37 +00:00
drh
6ba175f0c8 Port sqlite3_analyzer.exe to use sqlite3_stdio.
FossilOrigin-Name: 7c1c1226d803dbaf8e75085b1cc2aad88aef4c3168288e587c8c736633d09054
2024-09-24 17:49:06 +00:00
drh
a55901a27c Port sqldiff over to use sqlite3_stdio.
FossilOrigin-Name: 18f784c47d4252bc3696a7e084a1afb9f51f006cf2021292f2103531b8235226
2024-09-24 17:40:54 +00:00
drh
57b32ef924 Add the sqlite3_stdio.h library for Windows console I/O.
FossilOrigin-Name: fcd0ecffc9889f8c855ea340f075ec42cdca482df82d6e67dc9c32613e8d5846
2024-09-24 13:46:32 +00:00
drh
8a894cd804 Fix comment typo in the fileio.c extension. No changes to code.
FossilOrigin-Name: bf2c5b368ac094e048ca33a5e9175fe6a1fb5e2b1e392935eb29388e8999c40b
2024-09-20 17:41:05 +00:00
drh
db467f5777 Fix harmless compiler warning in the vfstrace extension.
FossilOrigin-Name: c8b4d092a22d87f1231424c8e3fa6a02f17fb965cb2a931621e1b51f4d215de7
2024-09-19 15:44:41 +00:00
drh
165daef043 Add sha1() functions to the CLI. Fix sha1b() such that it actually returns
a BLOB.

FossilOrigin-Name: fe65821a3b912f061026e6fd7174be26897010e6b474e2780350cac60faebaad
2024-09-12 14:43:05 +00:00
drh
dc3bec34a6 Progress on the sqlite3-rsync utility. This is an incremental check-in. It
does compile, but it does not work.

FossilOrigin-Name: fa06977b6db7fa745720561ec0b10570cf7e71598dc7a7c5ee650640e5bdf6f5
2024-09-11 17:02:44 +00:00
drh
dbab768d07 Fix dependencies in makefiles to include ext/misc/vfstrace.c as necessary.
Improved xFileControl() output from vfstrace.c.

FossilOrigin-Name: e8f2d6313075c92fdeebcdfd8b50f43e9d45225890b2ef6b77148a766a42e940
2024-09-09 15:33:37 +00:00
drh
a40f6eb80e Fix harmless compiler warnings in the vfstrace.c extension.
FossilOrigin-Name: f23954e604bf4da45f07194b54a4fe1c83002ab65d6c6f0ac095e88baba18547
2024-09-09 15:19:26 +00:00
drh
5600adf1b1 Move the vfstrace extension out of src/ over into ext/misc/ where it belongs.
Make it part of the standard build for the CLI.  Bring some of the vfstrace
output up-to-date.

FossilOrigin-Name: 055b97de8d2397987d72dbab1cde78ece2d1c066e95042b4ed6b7b36b2cf9006
2024-09-09 14:50:23 +00:00
drh
e6e49bfef2 Fix harmless compiler warnings in the percentile extension.
FossilOrigin-Name: c5557f281c6294b6db6682349d245feac7c6ce7f4f61356f486afdf186c566c4
2024-09-03 12:41:21 +00:00
drh
7c6f2880aa Fix possible NULL pointer dereference following OOM in the new error reporting
logic of the percentile extension.

FossilOrigin-Name: 7891a266c4425722ae8b9231397ef9e42e2432be9e6b70632dfaf9ff15300d2c
2024-09-02 21:59:31 +00:00
drh
ef7c692baf Make the percential extension easier to incorporate as a built-in on Windows
applications.

FossilOrigin-Name: 831e2be4117dc7f5113f66d3e484ca34e4405444ac7b0def12ee9a00608d40da
2024-09-02 17:27:10 +00:00
drh
da52f11250 Remove some debug/test code from percentile. Make the extension easier to
statically link.

FossilOrigin-Name: 6e5f146e274b210749dd8923a2da56905eb098b5a66699ff9130e3e51b1ff662
2024-09-02 14:46:56 +00:00
drh
d281889ac8 Improved error messages on percentile functions. More tests cases for
percentile and for ordered-set aggregates.

FossilOrigin-Name: e1bca168e70335fa2f9537632fd16e374c566a564fab4974c0b8f61cb63d08ce
2024-09-02 11:17:04 +00:00
drh
a955ec806a Change the name of the enabling compile-time macro to
SQLITE_ENABLE_ORDERED_SET_AGGREGATES.

FossilOrigin-Name: 3b1cdddf8339cc339ec74cd8be2bfa42e62b500048a444eb9e5d9817bc4702ae
2024-09-02 09:40:37 +00:00
drh
b9a6e42a55 Improved documentation of recent enhancements to the percentile extension.
FossilOrigin-Name: 51e7b4c9cf19a5986432a76c5fd30cef715c170a403d7b4304a8c5888c445a91
2024-09-01 23:47:20 +00:00