9955 Commits

Author SHA1 Message Date
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
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
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
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
dan
826bebdb31 Add better test case for the issue with dropping RETURNING triggers when the schema is reset while preparing a statement.
FossilOrigin-Name: 6a9fdde109865b23888f099d066721404e8b853f3dacd55ce08c8bbda2491ec3
2025-11-13 17:42:55 +00:00
drh
237778289b Fix a problem in the EXISTS-to-JOIN optimization ([e33da6d5dc964db8]) so
that it works with nested WHERE and EXISTS statements.
[forum:/forumpost/0704c3c41e49631b|Forum post 0704c3c41e4]

FossilOrigin-Name: d1e901eddc25175174d0706238ae0c33bfa5569e0c2ba4f1164b7a9600203442
2025-11-13 11:36:48 +00:00
drh
a9136b45fa Continuing code cleanup. Various minor bug fixes. All legacy tests now
pass.  All planned features for ".mode" are implemented, at least at the
interface level, though some features are still no-ops.

FossilOrigin-Name: e5a81711d0076b447e5bd3206bc04d755a6229b9f4926f42260fcd01ecf3e5a2
2025-11-12 18:54:09 +00:00
drh
ed72bb3fa3 Add a new direct CLI testing script in test/modeA.clitest to demonstration
that can be done.  Rig this this to be run by test/shellB.test during normal
testing.

FossilOrigin-Name: 3107ebb9e1602fe5bed644c6f69426bebf307772e581b17a8fa3e50bd522e566
2025-11-12 13:46:11 +00:00
drh
3b847a4040 Rename QRF_STYLE_JsonLine to QRF_STYLE_JObject. Add new convenience modes
to the CLI and generally refactor and improve the ".mode" command.  Some
tests are failing, mostly due to changes in error message output and similar.

FossilOrigin-Name: 4c8109682e3a224fd8e015e73a9c1c7b6d56ad747d7ca7bc387bb92e1c98f731
2025-11-12 12:44:02 +00:00
drh
b43e8920d8 Minor refactoring of some field names in the sqlite3_qrf_spec object, to try
to make the names more intuitive, memorable, and succinct.

FossilOrigin-Name: 3450bc7eecb717abedbaeb56dc824e14eb35ed30322fe3dd3b4b1cbd5fd14c60
2025-11-11 18:07:42 +00:00
dan
0a416b9fd9 Merge trunk with this branch.
FossilOrigin-Name: d7d8d08f849b2caeef4f18244c4b594e4f66506ef00be47ab2dd4b53d3ab98e8
2025-11-11 17:06:24 +00:00
drh
7f947dbd6c Move the ".output" command into a separate subroutine. Enhance .output so
that it is able to capture output in a sqlite3_str object, then compare that
captured output we patterns to accomplish tests.

FossilOrigin-Name: ddd167044753f5215624fc9ee0e3657836c528f23a6a3e262401fd1b64cdbb21
2025-11-11 14:08:50 +00:00
drh
babac214d6 Bug fixes. All tests are now passing.
FossilOrigin-Name: a0fc99a3bdd12f9ac69511c1aea2bd9a3d5de593d44b4a732cfc8f48e0931c76
2025-11-11 00:21:26 +00:00
drh
0c4c0dbc7d Keep explicit NULL values in QRF_STYLE_Json output.
FossilOrigin-Name: cb07f3d441b0b2a3ebdfaa9456891a9c8e33fa07b967532a9edfaf6ff3163cb0
2025-11-10 22:05:42 +00:00
drh
dfeb788b0f Merge all the latest trunk improvements into the qrf branch.
FossilOrigin-Name: 1fc2298edc67cbaf1963ed858a36cab15f670c00779ace6b63bdd266b0dbaaf2
2025-11-10 20:11:36 +00:00