From: drh <> Date: Sat, 13 Dec 2025 00:13:40 +0000 (+0000) Subject: Back out the --compat option from the CLI. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce43bf85fa957c7ca96182c47c55f8cc5122aa32;p=thirdparty%2Fsqlite.git Back out the --compat option from the CLI. FossilOrigin-Name: 850d5dbfb0f1eacd1e5213759810ec7e5eba4fcc0b2718dabccd5b269b126f1c --- diff --git a/manifest b/manifest index fd79919a70..0436699d8e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Get\sthe\s.testcase\sand\s.check\scommands\sworking\sin\sthe\sCLI. -D 2025-12-12T18:22:07.934 +C Back\sout\sthe\s--compat\soption\sfrom\sthe\sCLI. +D 2025-12-13T00:13:40.858 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -737,7 +737,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c 8d53771eb51a4ab5f970150c3a70969d8db79cd04a8774c2d296bbcf471a0dd0 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 344518c1bba9c4636bf651b7642304abd2e7075ba35feb4bae42a51e5efe991f -F src/shell.c.in f725bbdc4583c3728922b92281ccc44892c7b35bb665195ee7ca7d2374ecc7b4 +F src/shell.c.in 000a5c12e353b59b0a9276a7ff577804ba98f663528f818b91f8d25ea639fdee F src/sqlite.h.in 706cacea5308b0244fb6cec92e08310fb427a125375c64137cc1f878ae4cf5c0 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 5d5330f5f8461f5ce74960436ddcfa53ecd09c2b8b23901e22ae38aec3243998 @@ -1610,16 +1610,16 @@ F test/sharedA.test 64bdd21216dda2c6a3bd3475348ccdc108160f34682c97f2f51c19fc0e21 F test/sharedB.test 1a84863d7a2204e0d42f2e1606577c5e92e4473fa37ea0f5bdf829e4bf8ee707 F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304 -F test/shell1.test 00b86323fdbd4faaa739b68d5570fc298ebd6ea6c03b1258daf5e99a56a8b572 -F test/shell2.test 9d55aa53ca36c6889dedf5a23d849793afbd2dbe62d512ce066cb293a8a66a88 -F test/shell3.test 840192774cc4edf7653520c0434a311c7477b9bc324abbc7bd2887915792fa8c +F test/shell1.test da4901c88f3a1db2acd39381ed260a0fe3c706bbc170b695fcbe6cb3eb6f7ab0 +F test/shell2.test f563798603950345a98f2a630d4ea746fc0063919a3dac917475d4e2166acbd7 +F test/shell3.test 603b448e917537cf77be0f265c05c6f63bc677c63a533c8e96aae923b56f4a0e F test/shell4.test e25580a792b7b54560c3a76b6968bd8189261f38979fe28e6bc6312c5db280db F test/shell5.test 145a9474bab6d80b6ee452b83135507b25275d53b0936aab76520f007ac4d9dc F test/shell6.test e3b883b61d4916b6906678a35f9d19054861123ad91b856461e0a456273bdbb8 F test/shell7.test 43fd8e511c533bab5232e95c7b4be93b243451709e89582600d4b6e67693d5c3 F test/shell8.test 641cf21a99c59404c24e3062923734951c4099a6b6b6520de00cf7a1249ee871 F test/shell9.test 8742a5b390cdcef6369f5aa223e415aa4255a4129ef249b177887dc635a87209 -F test/shellA.test afbe388ca4c9f7239808ff8dfc6da5c3573dae7a3120f1dcc3d127a0c5e44de5 +F test/shellA.test 05cdaafa1f79913654487ce3aefa038d4106245d58f52e02faf506140a76d480 F test/shellB.test de879b1ea7c25daf1a06b2c882b45a5d002e6580c81c57169ce47084cc6afb6b F test/shmlock.test 9f1f729a7fe2c46c88b156af819ac9b72c0714ac6f7246638a73c5752b5fd13c F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3 @@ -2184,8 +2184,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 4e6e551c89c4f18299b3d60369f439e80f2fe2b0e70199f649821b1dbf20c668 -R 45ff11e2e11683b7a57e94205e0a1b3b +P 1ca31e1a297c0d53d068afb658ce6602887cda0f3eaf42cd629c4d1b7204f0b0 +R cf0d7b71ff1f31fdee2bbe0931020fd5 U drh -Z 269e8ff8cb00c409106cfe616c6f8090 +Z b8e82ce5183ee7bea000d8d3bf76900c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 3750dbb604..3126c25310 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1ca31e1a297c0d53d068afb658ce6602887cda0f3eaf42cd629c4d1b7204f0b0 +850d5dbfb0f1eacd1e5213759810ec7e5eba4fcc0b2718dabccd5b269b126f1c diff --git a/src/shell.c.in b/src/shell.c.in index 989024e873..86f41dc865 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -1256,7 +1256,6 @@ typedef struct Mode { typedef struct ShellState ShellState; struct ShellState { sqlite3 *db; /* The database */ - int iCompat; /* Compatibility date YYYYMMDD */ u8 openMode; /* SHELL_OPEN_NORMAL, _APPENDVFS, or _ZIPFILE */ u8 doXdgOpen; /* Invoke start/open/xdg-open in output_reset() */ u8 nEqpLevel; /* Depth of the EQP output graph */ @@ -1648,14 +1647,13 @@ static void modeChange(ShellState *p, unsigned char eMode){ } /* -** Set the mode to the default according to p->iCompat. It assumed -** that the mode has already been freed and zeroed prior to calling -** this routine. +** Set the mode to the default. It assumed that the mode has +** already been freed and zeroed prior to calling this routine. */ static void modeDefault(ShellState *p){ p->mode.spec.iVersion = 1; p->mode.autoExplain = 1; - if( p->iCompat>=20251115 && (stdin_is_interactive || stdout_is_console) ){ + if( stdin_is_interactive || stdout_is_console ){ modeChange(p, MODE_TTY); }else{ modeChange(p, MODE_BATCH); @@ -8675,7 +8673,7 @@ static void parseDotCmdArgs(const char *zLine, ShellState *p){ shell_check_oom(z); szLine = strlen(z); while( szLine>0 && IsSpace(z[szLine-1]) ) szLine--; - if( szLine>0 && z[szLine-1]==';' && p->iCompat>=20251115 ){ + if( szLine>0 && z[szLine-1]==';' ){ szLine--; while( szLine>0 && IsSpace(z[szLine-1]) ) szLine--; } @@ -12357,7 +12355,6 @@ static const char zOptions[] = " -box set output mode to 'box'\n" " -cmd COMMAND run \"COMMAND\" before reading stdin\n" " -column set output mode to 'column'\n" - " -compat YYYYMMDD set default options for date YYYYMMDD\n" " -csv set output mode to 'csv'\n" #if !defined(SQLITE_OMIT_DESERIALIZE) " -deserialize open the database using sqlite3_deserialize()\n" @@ -12441,11 +12438,6 @@ static void verify_uninitialized(void){ */ static void main_init(ShellState *p) { memset(p, 0, sizeof(*p)); -#if defined(COMPATIBILITY_DATE) - p->iCompat = COMPATIBILITY_DATE; -#else - p->iCompat = 20251116; -#endif p->pAuxDb = &p->aAuxDb[0]; p->shellFlgs = SHFLG_Lookaside; sqlite3_config(SQLITE_CONFIG_LOG, shellLog, p); @@ -12700,11 +12692,6 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ exit(1); } stdout_tty_width = n; - }else if( cli_strcmp(z,"-compat")==0 ){ - data.iCompat = atoi(cmdline_option_value(argc, argv, ++i)); - modeFree(&data.mode); - memset(&data.mode, 0, sizeof(data.mode)); - modeDefault(&data); }else if( cli_strcmp(z,"-utf8")==0 ){ }else if( cli_strcmp(z,"-no-utf8")==0 ){ }else if( cli_strcmp(z,"-no-rowid-in-view")==0 ){ @@ -13021,8 +13008,6 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ /* already handled */ }else if( cli_strcmp(z,"-screenwidth")==0 ){ i++; - }else if( cli_strcmp(z,"-compat")==0 ){ - i++; }else if( cli_strcmp(z,"-utf8")==0 ){ /* already handled */ }else if( cli_strcmp(z,"-no-utf8")==0 ){ diff --git a/test/shell1.test b/test/shell1.test index c5715784c3..d90ca52bed 100644 --- a/test/shell1.test +++ b/test/shell1.test @@ -48,7 +48,7 @@ do_test shell1-1.1.1b { } {1 1} # error on extra options do_test shell1-1.1.2 { - catchcmd "-compat 20250101 test.db \"select+3\" \"select+4\"" "" + catchcmd "test.db \"select+3\" \"select+4\"" "" } {0 {3 4}} # error on extra options @@ -182,7 +182,7 @@ do_test shell1-1.17.1 { catchcmd {-- --db "CREATE TABLE T(c1);"} } {0 {}} do_test shell1-1.17.2 { - catchcmd {-compat 20250101 -- --db "SELECT name from sqlite_schema;"} + catchcmd {-- --db "SELECT name from sqlite_schema;"} } {0 T} forcedelete ./--db diff --git a/test/shell2.test b/test/shell2.test index 5d8e67d662..3f60041769 100644 --- a/test/shell2.test +++ b/test/shell2.test @@ -85,7 +85,7 @@ SELECT * FROM foo;} # NB. whitespace is important do_test shell2-1.4.2 { forcedelete foo.db - catchcmd "-compat 20250101 -echo foo.db" {CREATE TABLE foo(a); + catchcmd "-echo foo.db" {CREATE TABLE foo(a); INSERT INTO foo(a) VALUES(1); SELECT * FROM foo;} } {0 {CREATE TABLE foo(a); diff --git a/test/shell3.test b/test/shell3.test index 5d7e311b96..6bb49f5c3d 100644 --- a/test/shell3.test +++ b/test/shell3.test @@ -109,7 +109,7 @@ do_test shell3-2.7 { # Run combinations of odd identifiers, comments, semicolon placement do_test shell3-3.1 { forcedelete foo.db - set rc [ catchcmd "foo.db -compat 20250101" {CREATE TABLE t1(" + set rc [ catchcmd "foo.db" {CREATE TABLE t1(" a--. " --x ); CREATE TABLE t2("a[""b""]"); diff --git a/test/shellA.test b/test/shellA.test index 45e5e2c911..3b28c921c3 100644 --- a/test/shellA.test +++ b/test/shellA.test @@ -126,10 +126,10 @@ do_test shellA-2.2 { exec {*}$CLI -noinit test.db --quote {.mode -v} } {/*.mode quote* --escape auto*/} do_test shellA-2.3 { - exec {*}$CLI -noinit -compat 20250101 test.db --quote --escape SYMBOL {.mode} + exec {*}$CLI -noinit test.db --quote --escape SYMBOL {.mode} } {.mode quote --escape symbol} do_test shellA-2.4 { - exec {*}$CLI -noinit -compat 20250101 test.db --quote --escape OFF {.mode} + exec {*}$CLI -noinit test.db --quote --escape OFF {.mode} } {.mode quote --escape off}