/ Check-in [60b65e5e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an issue in the command-line shell with CSV import of rows with empty columns.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 60b65e5ee3828c2a814bf035b57b3e8681af9397
User & Date: drh 2013-06-30 20:24:26
Context
2013-07-01
10:38
Make a trivial comment fix in where.c. check-in: 0ffaab3b user: drh tags: trunk
2013-06-30
20:24
Fix an issue in the command-line shell with CSV import of rows with empty columns. check-in: 60b65e5e user: drh tags: trunk
2013-06-29
15:40
Fix the build of the command-line shell on windows. Windows uses "_pclose" rather than "pclose" as the pointer to the function that closes a popen pipe. check-in: b003b2b2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  1734   1734                   p->zFile, startLine, cQuote);
  1735   1735           p->z[p->n] = 0;
  1736   1736           p->cTerm = EOF;
  1737   1737           break;
  1738   1738         }
  1739   1739         csv_append_char(p, c);
  1740   1740         pc = c;
  1741         -    }      
         1741  +    }
  1742   1742     }else{
  1743         -    csv_append_char(p, c);
  1744         -    while( (c = fgetc(p->in))!=EOF && c!=cSep && c!='\n' ){
         1743  +    while( c!=EOF && c!=cSep && c!='\n' ){
  1745   1744         csv_append_char(p, c);
         1745  +      c = fgetc(p->in);
  1746   1746       }
  1747   1747       if( c=='\n' ){
  1748   1748         p->nLine++;
  1749   1749         if( p->n>1 && p->z[p->n-1]=='\r' ) p->n--;
  1750   1750       }
  1751   1751       p->z[p->n] = 0;
  1752   1752       p->cTerm = c;