From: drh Date: Tue, 19 Aug 2014 19:28:00 +0000 (+0000) Subject: Improvements to output formatting with the ".trace" command in the X-Git-Tag: version-3.8.7~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b2590e44b422eb0445220624c2438d74d17ed06;p=thirdparty%2Fsqlite.git Improvements to output formatting with the ".trace" command in the command-line shell. FossilOrigin-Name: d09d63c07748839e9b778a769b183bdd614c6c13 --- diff --git a/manifest b/manifest index 963d794593..1735f35740 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Minor\schanges\sto\sdo\swith\sthe\sTcl\stea\sextension\spackage\sautoconf\ssystem. -D 2014-08-19T09:15:41.141 +C Improvements\sto\soutput\sformatting\swith\sthe\s".trace"\scommand\sin\sthe\ncommand-line\sshell. +D 2014-08-19T19:28:00.623 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -223,7 +223,7 @@ F src/random.c d10c1f85b6709ca97278428fd5db5bbb9c74eece F src/resolve.c 0ea356d32a5e884add23d1b9b4e8736681dd5697 F src/rowset.c a9c9aae3234b44a6d7c6f5a3cadf90dce1e627be F src/select.c ea48e891406ccdf748f3eb02893e056d134a0fea -F src/shell.c 41df1103617331e023301d943977f8c06bd1486f +F src/shell.c 728d2226594d356bf4fbdbdfd08538fd78fd06f3 F src/sqlite.h.in ed9d35990c61f0388ca6405706455c4095310553 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc @@ -1186,7 +1186,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 11a70e1ae7f05d06e4e09c9d20db0444b8881584 -R aa6c5df3344dab5b287c6351a237958f -U dan -Z b3667514ef51eabff2a360098e935ae4 +P f10a6111262ce6ee6984c64fa0e0023642eca27d +R 257d241ab9ebe5fc3f4654d7f2e169ae +U drh +Z 211a00cac8127ca939f7e6f32071c25c diff --git a/manifest.uuid b/manifest.uuid index a39201275a..1cf4ead3de 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f10a6111262ce6ee6984c64fa0e0023642eca27d \ No newline at end of file +d09d63c07748839e9b778a769b183bdd614c6c13 \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index 87b335fbb1..68478a19ba 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1899,7 +1899,11 @@ static FILE *output_file_open(const char *zFile){ */ static void sql_trace_callback(void *pArg, const char *z){ FILE *f = (FILE*)pArg; - if( f ) fprintf(f, "%s\n", z); + if( f ){ + int i = (int)strlen(z); + while( i>0 && z[i-1]==';' ){ i--; } + fprintf(f, "%.*s;\n", i, z); + } } /* @@ -2511,7 +2515,7 @@ static int do_meta_command(char *zLine, ShellState *p){ " (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x" " FROM sqlite_master UNION ALL" " SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) " - "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'" + "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' " "ORDER BY rowid", callback, &data, &zErrMsg ); @@ -3065,7 +3069,7 @@ static int do_meta_command(char *zLine, ShellState *p){ " (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x" " FROM sqlite_master UNION ALL" " SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) " - "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'" + "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' " "ORDER BY rowid", callback, &data, &zErrMsg );