SQLite

Check-in [43aa7d2353]
Login

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

Overview
Comment:Fix an off-by-one error that causes a quoted empty string at the end of a CRNL-terminated line of CSV input to be misread by the shell. Cherrypick of [b5617e4fdadc4c].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | branch-3.8.0
Files: files | file ages | folders
SHA1: 43aa7d23538ef5e29e554b7da4d2e402e2111af0
User & Date: drh 2013-08-29 13:23:59.620
Context
2013-08-29
13:27
Increase the version number to 3.8.0.1. (check-in: 125b04de7b user: drh tags: branch-3.8.0)
13:23
Fix an off-by-one error that causes a quoted empty string at the end of a CRNL-terminated line of CSV input to be misread by the shell. Cherrypick of [b5617e4fdadc4c]. (check-in: 43aa7d2353 user: drh tags: branch-3.8.0)
13:21
In the query optimizer, when converting BETWEEN and LIKE/GLOB expressions into simpler forms for processing, be sure to transfer the LEFT JOIN markings. Fix for ticket [bc878246eafe0f52c]. Cherrypick of [caab361ebe]. (check-in: cb667449d0 user: drh tags: branch-3.8.0)
2013-08-28
13:33
Fix an off-by-one error that causes a quoted empty string at the end of a CRNL-terminated line of CSV input to be misread by the shell. (check-in: b5617e4fda user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/shell.c.
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
        if( pc==cQuote ){
          pc = 0;
          continue;
        }
      }
      if( (c==cSep && pc==cQuote)
       || (c=='\n' && pc==cQuote)
       || (c=='\n' && pc=='\r' && p->n>2 && p->z[p->n-2]==cQuote)
       || (c==EOF && pc==cQuote)
      ){
        do{ p->n--; }while( p->z[p->n]!=cQuote );
        p->cTerm = c;
        break;
      }
      if( pc==cQuote && c!='\r' ){







|







1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
        if( pc==cQuote ){
          pc = 0;
          continue;
        }
      }
      if( (c==cSep && pc==cQuote)
       || (c=='\n' && pc==cQuote)
       || (c=='\n' && pc=='\r' && p->n>=2 && p->z[p->n-2]==cQuote)
       || (c==EOF && pc==cQuote)
      ){
        do{ p->n--; }while( p->z[p->n]!=cQuote );
        p->cTerm = c;
        break;
      }
      if( pc==cQuote && c!='\r' ){