]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add the SQLITE_SHELL_EDITION compile-time option, which if set to a
authordrh <>
Thu, 16 Jul 2026 23:55:15 +0000 (23:55 +0000)
committerdrh <>
Thu, 16 Jul 2026 23:55:15 +0000 (23:55 +0000)
date number of the form YYYYMMDD will try to configure the defaults
to be similar to the latest release at or prior to that date.

FossilOrigin-Name: 6924895d2cbc50971d8da1810423ad15c638dabc31b4f1083dd6076e20492ef4

manifest
manifest.uuid
src/shell.c.in

index 2902dac1356d93e8f190e9b02f7e9a2d2ca3cb35..b3a06aaa885d858407d64ec8447b25084dba45ef 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Relax\sthe\srestrictions\son\sreordering\stables\sin\svtab\squeries\sthat\soccur\sto\sthe\sright\sof\sa\sLEFT\sor\sCROSS\sJOIN\sbut\sare\snot\sactually\sthe\sRHS\sof\ssaid\sjoin.
-D 2026-07-16T13:17:34.525
+C Add\sthe\sSQLITE_SHELL_EDITION\scompile-time\soption,\swhich\sif\sset\sto\sa\ndate\snumber\sof\sthe\sform\sYYYYMMDD\swill\stry\sto\sconfigure\sthe\sdefaults\nto\sbe\ssimilar\sto\sthe\slatest\srelease\sat\sor\sprior\sto\sthat\sdate.
+D 2026-07-16T23:55:15.551
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -743,7 +743,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c 54395ee97eb710e695202d4112cf2b1c1c7767a57afcea745df71abb1c917768
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c f553420eaf5c72a49cef786621eea79dd8c4411671839fb05250bb49ca74a0a0
-F src/shell.c.in fe97e39eb81ba39d0407e3284e76a7629fc39e37526b74720b20cd2dad0f2e55
+F src/shell.c.in ce9ef76da7cc153afaa6aa233a155be885859f41c803a20bdc42d1c628b8ccab
 F src/sqlite.h.in 2101a2b494cbc282d0dc1c3f631c4fb83060c52876cc9d7615b091ad66d932b1
 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
 F src/sqlite3ext.h 0efd4723bad9124ea1f581d9f1ea0254ac1c6f3e5fb29e4f3dcf36c72485a456
@@ -2215,9 +2215,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
 F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
 F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P 4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062 7df34b446edb2e6826f504a9fed13631817ac03e1423539fc4c28efe7ec485e0
-R 96cb8d87026f44ed7e5edbb91b716f2b
-T +closed 7df34b446edb2e6826f504a9fed13631817ac03e1423539fc4c28efe7ec485e0
-U dan
-Z 332a0a20f228f27dab0699eaa88cec22
+P 9062c79fc273d9e59090ea475e7d2abaf33c7cfe9948cbfb92b979a6ed31a37f
+R 962f8f7981b575eb8d2ef8e19f91d63a
+U drh
+Z 10ca7fd768bd6c7b1db171f45c9c110e
 # Remove this line to create a well-formed Fossil manifest.
index 97e82a477b0cc1e9756fca83b4d1b41e151a4b60..83d1ffb12a124faf8d207d69869201566eb2b8f9 100644 (file)
@@ -1 +1 @@
-9062c79fc273d9e59090ea475e7d2abaf33c7cfe9948cbfb92b979a6ed31a37f
+6924895d2cbc50971d8da1810423ad15c638dabc31b4f1083dd6076e20492ef4
index 4554fb162a569405ac28d14ebdea9c0ec6aed5ba..6a73f2e8449b4314fd554a6adbbc178f7fe6e3e9 100644 (file)
@@ -320,6 +320,16 @@ INCLUDE ../ext/recover/sqlite3recover.c
 # include SHELL_STRINGIFY(SQLITE_SHELL_EXTSRC)
 #endif
 
+/*
+** Set the SQLITE_SHELL_EDITION to a YYYYMMDD date string and the
+** code will attempt to use defaults for the prompt and for the
+** initial output mode (and maybe other feature) that were for
+** the most recent version not newer than the specified date.
+*/
+#ifndef SQLITE_SHELL_EDITION
+# define SQLITE_SHELL_EDITION 99991231  /* Use the latest if unspecified */
+#endif
+
 #if defined(SQLITE_ENABLE_SESSION)
 /*
 ** State information for a single open session
@@ -965,7 +975,9 @@ static const char *shellPromptAppDef(int c){
   switch( c ){
     /* The default main prompt string */
     case 1:
-#if   defined(SQLITE_PS1)
+#if   SQLITE_SHELL_EDITION<20260423
+      return "sqlite> ";  /* Legacy prompt for backwards compatibility */
+#elif defined(SQLITE_PS1)
       return SQLITE_PS1;
 #else
       if( shellNoColor() ){
@@ -977,7 +989,9 @@ static const char *shellPromptAppDef(int c){
 
     /* The default continuation prompt string */
     case 2:
-#if   defined(SQLITE_PS2)
+#if   SQLITE_SHELL_EDITION<20260423
+      return "   ...> ";  /* Legacy continuation prompt */
+#elif defined(SQLITE_PS2)
       return SQLITE_PS2;
 #else
       if( shellNoColor() ){
@@ -2207,7 +2221,9 @@ static void modeChange(ShellState *p, unsigned char eMode){
 static void modeDefault(ShellState *p){
   p->mode.spec.iVersion = 2;
   p->mode.autoExplain = 1;
-  if( stdin_is_interactive || stdout_is_console ){
+  if( (stdin_is_interactive || stdout_is_console)
+   && SQLITE_SHELL_EDITION>=20260409
+  ){
     modeChange(p, MODE_TTY);
   }else{
     modeChange(p, MODE_BATCH);