From: drh Date: Sun, 30 Jun 2013 20:24:26 +0000 (+0000) Subject: Fix an issue in the command-line shell with CSV import of rows with X-Git-Tag: version-3.8.0~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0a64dc75a8f43ad94d3320e88ed86409a4108bc;p=thirdparty%2Fsqlite.git Fix an issue in the command-line shell with CSV import of rows with empty columns. FossilOrigin-Name: 60b65e5ee3828c2a814bf035b57b3e8681af9397 --- diff --git a/manifest b/manifest index f306a3d59f..f2533c8211 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sthe\sbuild\sof\sthe\scommand-line\sshell\son\swindows.\s\sWindows\suses\s"_pclose"\nrather\sthan\s"pclose"\sas\sthe\spointer\sto\sthe\sfunction\sthat\scloses\sa\spopen\spipe. -D 2013-06-29T15:40:22.929 +C Fix\san\sissue\sin\sthe\scommand-line\sshell\swith\sCSV\simport\sof\srows\swith\nempty\scolumns. +D 2013-06-30T20:24:26.524 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -217,7 +217,7 @@ F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50 F src/resolve.c 89f9003e8316ee3a172795459efc2a0274e1d5a8 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 F src/select.c 91b62654caf8dfe292fb8882715e575d34ad3874 -F src/shell.c 0587c18fd0005c7cec40e6769c6f8b17061873b7 +F src/shell.c c8cd06e6b66250a3ea0149c4edec30de14f57b6f F src/sqlite.h.in 0a87152a6dde55381afb8f1cf37f337b2f32fd06 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0 F src/sqlite3ext.h d936f797812c28b81b26ed18345baf8db28a21a5 @@ -1098,7 +1098,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 338826ef3f8a209b14f8d42370855cab9ac9ed45 -R a5feb81be6db0ace45fe893e87967b80 +P b003b2b2b6ddbfc6ec508b47904e6d095c5f6940 +R 39a21efdf5f6a4e71061941f354e0089 U drh -Z 1844d5f1a9688e9a7b52dc56712541f6 +Z 6274137a1e64ba528f94c3f6862f706c diff --git a/manifest.uuid b/manifest.uuid index 30327c88f7..cb84db8b9e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b003b2b2b6ddbfc6ec508b47904e6d095c5f6940 \ No newline at end of file +60b65e5ee3828c2a814bf035b57b3e8681af9397 \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index f9455efc6b..79548fa1e4 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1738,11 +1738,11 @@ static char *csv_read_one_field(CSVReader *p){ } csv_append_char(p, c); pc = c; - } + } }else{ - csv_append_char(p, c); - while( (c = fgetc(p->in))!=EOF && c!=cSep && c!='\n' ){ + while( c!=EOF && c!=cSep && c!='\n' ){ csv_append_char(p, c); + c = fgetc(p->in); } if( c=='\n' ){ p->nLine++;