Commit Graph

9970 Commits

Author SHA1 Message Date
drh
1debc25ef8 Test cases and documentation tweaks.
FossilOrigin-Name: cc9e47a205883aedf24b5e85e8e0499567f514780e3e6ec58069a39ea6270133
2025-12-10 15:50:23 +00:00
drh
9bf37cc3eb Add the nTitleLimit option to QRF. Also change "line" style so that it
uses zColumnSep as the divider between the title and the value.

FossilOrigin-Name: d67a299c86ff80ed67857d2546b0edaf852cb23dbfbc15e24793d1c4860a2e50
2025-12-10 15:24:46 +00:00
drh
4a33eed6e9 Remove #ifdefs intended to make SQLite compatible with Windows RT. WinRT
was short-lived and has been discontinued for a long time.

FossilOrigin-Name: 108691a3cb2f296f0ede06c34271ee185f299bfd76e97a1bd06c730a28d94ff4
2025-12-06 19:56:40 +00:00
drh
4ddf151841 New test cases to cover the "--quote relaxed" feature.
FossilOrigin-Name: d00d9556edc198d49cf9aa2f14e46bb5b1021ef0622aee1fa4ae585ed9a13a98
2025-12-06 11:35:30 +00:00
drh
5fb9d599ed Update test cases to work with the new box format and with --quote relaxed.
FossilOrigin-Name: e3f442d08f455e0aa260cc8db4922a5f611e17afe71b0bb251328ab4b3ad46ca
2025-12-06 11:02:14 +00:00
drh
14706ff98d Minor adjustment to the zipfile.test script so that it works on Windows.
FossilOrigin-Name: 7bb633df97678b98515e603c5154ffc5b54055cff187d74a2c5d010e5b3720d1
2025-12-05 15:09:42 +00:00
drh
5ef150c223 Merge all the latest trunk enhancements and fixes into the temp-trigger-refs
branch.

FossilOrigin-Name: 8e8a27c77aa0ea5891968231e13a8caeade48b817419bbf6eda18ad217f1df63
2025-12-04 11:20:01 +00:00
dan
ab63da3f1c Fix a problem that could occur when a scalar subquery had both a DISTINCT and OFFSET clause. First reported by [forum:41bd7af485 | forum post 41bd7af485].
FossilOrigin-Name: 496bbff910b73775b16c1ccb95dadf37416d3f3032722a1140f2a9134666d7f1
2025-12-03 14:39:25 +00:00
drh
d9b165b27a Fix recently added test cases for Windows.
FossilOrigin-Name: bccc0d65b0fb617f6c8eb111b6717d3ad419f80d3495dc5c6a69ccd0771b3d9d
2025-12-03 02:48:36 +00:00
drh
25ca71daac Improvements to the ".schema indent" logic.
[forum:/forumpost/c8136b1bd0|Forum post 2025-12-02T19:04:04Z].

FossilOrigin-Name: 71ea7f38ffd0648c58713d8be5d2f5536f926ec21a0adc3c2a8a9a7ba8ea3826
2025-12-02 19:55:39 +00:00
drh
a0a63a0408 New test cases for QRF
FossilOrigin-Name: e49c63e31888c6787ab13f736d58ff985a24c3f98b475e05c30e8b244afffb80
2025-12-02 18:37:49 +00:00
dan
d200379aff Fix a problem with ALTER TABLE DROP COLUMN commands where the column being dropped is the rightmost in table and is immediately preceded by a comment containing a "," character.
FossilOrigin-Name: c872bd1ee7b219e055f40e43766e4ed6bc2d2ca8cb92577cd3560f4173b1f257
2025-12-02 14:43:59 +00:00
dan
928276043b Merge latest trunk changes into this branch.
FossilOrigin-Name: 230fd5533e07ec36f1938f34153c9ef97a7acd6604d023b56dfc5269ca6173c2
2025-12-01 17:22:35 +00:00
drh
cee98b4ced Handle empty string values in columnar modes without NULL pointer
dereferences.

FossilOrigin-Name: 7927dbc5ebc76233325e45bd24181dbc5c3636e271f9352cf530f41dad6ba66d
2025-11-29 18:18:15 +00:00
drh
110d452cad Fix a CLI test case due to a change in error message text.
FossilOrigin-Name: cf45d534d63878b00d949234e81cf9c67db7d7067bbac2fd5cd1780463fcce06
2025-11-27 10:57:06 +00:00
drh
95f643c27d Do not omit the beginning and ending margins when setting bBorder to QRF_Off,
except when the margins need to be squeezed to fit.  Those extra margins give
a more pleasing appearance, and also make the output the same as psql.

FossilOrigin-Name: 2892aaeed9f55ad87791491068493c2e530eeff4194d156f16745d185760797c
2025-11-26 21:56:55 +00:00
drh
9286439c4a In QRF, if the horizontal alignment is QRF_ALIGN_Auto, then use right
alignment for numeric values and left alignment for everything else.

FossilOrigin-Name: 5fdedc69b1ac05bcdc40ee30c1473be75d3afe89e031d750c8fc3dcfa9846d5b
2025-11-26 17:23:11 +00:00
drh
80c1010f88 Add the bBorder option to the QRF spec. Reflect this in the -border
option on the TCL format method, and the --border option to ".mode"
in the CLI.  Also add the "psql" mode to the CLI.

FossilOrigin-Name: 02cbeb69884cd884d9b1b5f59c4168a3dc24b1a5aecc6967586c0be350b10574
2025-11-26 16:21:56 +00:00
drh
059b8d9c04 Tweak testrunner.tcl to allow it to use more cores.
FossilOrigin-Name: 71b916d4de7a4611f6ada597bfd58b59cab18e3a732de17c92b7346ecff31c04
2025-11-26 00:41:20 +00:00
drh
d1b133cd16 When "testrunner.tcl status -d N" is run but the test database is not yet
available, it enters a wait loop until the testing begins.

FossilOrigin-Name: 7abc25ff3b24b11c171e715ae96c8e97651d340b7a8bb8125a73902e1ad881ab
2025-11-25 23:59:31 +00:00
dan
0e2d839f0e Fix a typo in fts3/4 debugging code allowing 'maxpendinXY' to act as a synonym for 'maxpending=' in special INSERT statements.
FossilOrigin-Name: 5af554337af3052a5fd734c05883700dd42d140d99d41154b60e1a0f559e5023
2025-11-25 15:11:34 +00:00
drh
b24048ddce Omit the unused bTextNull flag from the QRF spec object.
FossilOrigin-Name: 4bbf176a87b1bedcce0359b70bbf6831a1e458d48c91dcba49f5e00bb38ecaa1
2025-11-25 10:53:39 +00:00
drh
94b621a15a Add the --blob-quote option to the ".mode" command in the CLI.
FossilOrigin-Name: 76a986b10d284b25915a07b7150ef1b85f4ef7d48d4e5315b13e7d1532cb97f1
2025-11-24 18:31:13 +00:00
drh
4aadef3370 Add the QRF_BLOB_Size encoding for BLOBs in QRF.
FossilOrigin-Name: bafff695d34202377b937cb4ca9f8a7611ae286d9ab927e6c71faa3cd99496e5
2025-11-24 16:46:08 +00:00
drh
f63bc3a922 New test case for bSplitColumn in QRF.
FossilOrigin-Name: 6d01f9f49eef5f7d4bddadc458691b6ca36e277bae1d4b43b60a128a44e3faca
2025-11-23 10:55:38 +00:00
drh
c4190338c5 Add "split" mode in the CLI. Fix CLI commands given on the command line
so that they honor --once in prior commands.

FossilOrigin-Name: 2530f04d1bb02b800fda83544f5b5dcd42f52b3e56ad625cd03b40e42f24ac6b
2025-11-22 23:34:53 +00:00
drh
946857cfee In QRF, change the name of the bWrapSnglCol flag to bSplitColumn.
Similar changes to the TCL interface.

FossilOrigin-Name: 76512b3b80fdcaae22340cde0b69857e2a4d7e86a63c6759465bd8a0bcbf82bc
2025-11-22 21:34:33 +00:00
drh
f4197be567 Implementation of bWrapSnglCol in QRF.
FossilOrigin-Name: 4bbd3f7ead50c0babd7843f58972e2e1762a84866cc4ed88a2a74375b13da11c
2025-11-22 00:38:17 +00:00
drh
081a877211 Add the bWrapSnglCol flag to the QRF spec, though it is not yet documented
and does not yet work.  Fix column output so that it omits trailing space.

FossilOrigin-Name: a858027fc92727c680b7e984303df7f9e0a2d90c860c547176f290b113a69390
2025-11-21 20:10:12 +00:00
drh
873cd21ec3 Enhance ALTER TABLE to support adding and removing NOT NULL and CHECK
constraints.

FossilOrigin-Name: 895498e4431e02cff65a5d96db22f0b0cb9c96aedf1e3cdcdeb3c34c6fec432b
2025-11-21 14:15:56 +00:00
drh
ac16642cc4 Fix the QRF so that it omits the closing text from styles "json" and "jobject"
when the result set it empty.

FossilOrigin-Name: e1ba175124be83da4db6d5d4e583b9b3b7dcb82e983c6f185d590469dcdc3139
2025-11-21 11:00:29 +00:00
drh
1073985be7 Test cases for the fix in the prior check-in.
FossilOrigin-Name: 4d41bee75eda51251121c8e3903f47941116e5182238a03f41a593c47efb6fcf
2025-11-20 22:46:27 +00:00
dan
3a4c9daa5c Strip unterminated "--" comments from the end of constraints added using ALTER TABLE ADD CONSTRAINT or ADD NOT NULL.
FossilOrigin-Name: c73ab47b0250c01f1ffa6e506793769744ebeb8ca7edbb78de9a08db2037d6de
2025-11-19 11:31:59 +00:00
dan
b2029ca07d Avoid a segfault that could follow an OOM in an ALTER TABLE statement.
FossilOrigin-Name: 0e4c2b889edbe801bb8ff29bbdb0b3139bdc85e696ccdf5bf51d7e5f9fdde961
2025-11-18 19:48:39 +00:00
drh
ec047587e3 Merge the latest trunk changes into the alter-table-constraints branch.
FossilOrigin-Name: 31d7aeeaef20ac42c3c395dbaf7a8225ac718256a4cbeb7c198d1c7361766b1b
2025-11-18 19:36:45 +00:00
drh
074b753bca Merge the latest trunk enhancements into the temp-trigger-refs branch.
FossilOrigin-Name: 0957f4c9c45dc2f4543021cf739bfcc940da6e5fc05b7a4e8721b8c02861bfd9
2025-11-18 19:34:11 +00:00
drh
f639befec8 New subcomponent, the Query Result Formatter (QRF), that formats query
results for display to humans on a fixed-width font terminal.  Rework the
CLI to make use of the QRF.  Renovate the .mode command of the CLI.  Also
incorporate the QRF into the TCL interface as the "format" method.

FossilOrigin-Name: 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa
2025-11-18 17:49:48 +00:00
drh
fef2233090 Add the SQLITE_LIMIT_PARSER_DEPTH value for sqlite3_limit(). This isn't
something that many applications will need, but it is useful for testing.

FossilOrigin-Name: 8f0b07f36159225c476f756f8f9b35c75783bc8bed43b578f4d1055fa800ecc9
2025-11-18 14:48:33 +00:00
drh
53794ab541 The -textjsonb option is on by default in the standard non-batch mode of
the CLI.  New fast screening test for JSONB.

FossilOrigin-Name: fd09f934d64ec07fd56f1b80ab05dafb28b605d5802ff5758eea17d8ad24e3cc
2025-11-17 18:51:55 +00:00
drh
234d2e51ac CLI comes up in legacy "list" mode if neither stdin or stdout are a tty, or
if "--compat 20251114" or earlier is specified, or if "--batch" is used.
New modes "batch" and "tty" select either legacy "list" mode or the newer
"qbox" mode with limits.
Make CVS output compatible with legacy.  Break out ".import" into a separate
subroutine in anticipation of forthcoming improvements.  General code
cleanup.

FossilOrigin-Name: f6bfcea9a01493af182e9aa0d35df6f81bf9e36220df79139afa287fa43d9aa3
2025-11-17 16:44:13 +00:00
drh
02268693c3 Fix test cases impacted by the use of ~/.sqliterc
FossilOrigin-Name: 8fc05faef91186429c6c710991fd736b1df9a9af946c29d207db2518d6436b38
2025-11-17 00:15:14 +00:00
drh
4d91527aa5 Fix a bug in ".show". Adjust test cases for the new default mode.
FossilOrigin-Name: 2aebd7bfecaaf1f75b52b05a0d3009fc0dc61289ae666d24cb4e3ddfaf251645
2025-11-16 23:06:45 +00:00
drh
f4870a2b51 Improved --safe mode defenses. Fix a test case error.
FossilOrigin-Name: eacc9db80de8baa878ebdc3a054538c8998db9a2e46720c0d8b109d62a0cac29
2025-11-16 01:34:01 +00:00
drh
18c7b4d651 Columnar formats respond to --screenwidth restrictions by removing
cell padding.

FossilOrigin-Name: cbe233ca131118692fd4a84d8fcf0dfca926fa935f66cfb718c235d54084de3d
2025-11-15 12:09:13 +00:00
drh
7a0d5bdd29 Improve columnar layout in QRF so that it correctly deals with control
characters, and especially tabs.

FossilOrigin-Name: 0650e2b83170b44c1ba944259a96d41e1a14a57004d4f1f80dc5640ae837a81e
2025-11-15 00:23:09 +00:00
drh
c2b9896e50 Enforce the --charlimit constraint in QRF.
FossilOrigin-Name: c25f8fdedd8d68e3551a445e24e1c60e105e18f9cf8f1badcbb77a58974f3381
2025-11-14 21:40:20 +00:00
drh
d5ee8aa625 Fix various bugs and compiler warnings. All tests now passing on linux, mac,
and windows.  More testing needed, though.

FossilOrigin-Name: 2220cb70c2f1ee30dcdf917a20feacdfcb3789433d0645fea626fd4c5cf0d099
2025-11-14 13:07:45 +00:00
drh
c4f198bfc4 Merge all the latest trunk enhancements into the qrf branch.
FossilOrigin-Name: 97b06e58ed128a1d60b89437ddf0ad80df528b8dbfdb6a7637374fc1ab4ddb10
2025-11-14 02:27:58 +00:00
drh
c37fcdd5d1 Improvements to --titles handling in the .mode command. Fix shell1 test
cases having to do with quoting of NULL values in "tcl" mode.

FossilOrigin-Name: 0fef770bd654b8ba8011b0bb610128058e75e8444f86c51e7ea59a6f2625a3fc
2025-11-14 02:22:39 +00:00
dan
8b34ce7d61 Add an OOM test case for the issue with dropping RETURNING triggers when the schema is reset while preparing a statement that uses an eponymous vtab.
FossilOrigin-Name: dc569288dd63754269e14be7a9937c882531685a3e9caec25f86ec8c01eb9583
2025-11-13 18:02:22 +00:00