diff options
author | drh <> | 2024-11-16 18:54:46 +0000 |
---|---|---|
committer | drh <> | 2024-11-16 18:54:46 +0000 |
commit | 70d390134cac808718e6d12df00172dec9fb290e (patch) | |
tree | 35bf973997c8468a4c29c3220cb9dfd5ab72c27a /src | |
parent | 18689b8fb28805cee499d913738a6822247c0c9c (diff) | |
download | sqlite-70d390134cac808718e6d12df00172dec9fb290e.tar.gz sqlite-70d390134cac808718e6d12df00172dec9fb290e.zip |
Call fflush() on ".echo" output from the shell, so that the output to
stdout is aligned with output to stderr.
FossilOrigin-Name: c38b9db3c4f71706a7d211424da64311e6e5daf64b224565a6d82d4b1a68e261
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 55fba9d82..26b6d73de 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -12237,7 +12237,10 @@ static int runOneSqlLine(ShellState *p, char *zSql, FILE *in, int startline){ } static void echo_group_input(ShellState *p, const char *zDo){ - if( ShellHasFlag(p, SHFLG_Echo) ) sqlite3_fprintf(p->out, "%s\n", zDo); + if( ShellHasFlag(p, SHFLG_Echo) ){ + sqlite3_fprintf(p->out, "%s\n", zDo); + fflush(p->out); + } } #ifdef SQLITE_SHELL_FIDDLE |