/ Check-in [d474195a]
Login

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

Overview
Comment:Update maxRow size after shrinking the row buffer (CSV).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | csv_ext
Files: files | file ages | folders
SHA1:d474195a997b9d94bea8976738c942662f7c4751
User & Date: shaneh 2009-11-05 04:14:30
Context
2009-11-05
04:14
Update maxRow size after shrinking the row buffer (CSV). Closed-Leaf check-in: d474195a user: shaneh tags: csv_ext
04:01
Removed line limit on rows. check-in: ec08b15f user: shaneh tags: csv_ext
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/csv/csv.c.

155
156
157
158
159
160
161

162


163
164
165
166
167
168
169
    while( pCSV->zRow[n] ){ n++; }
    if( (n>0) && ((pCSV->zRow[n-1]=='\n') || (pCSV->zRow[n-1]=='\r')) ){
      pCSV->zRow[n-1] = '\n'; /* uniform line ending */
      pCSV->zRow[n] = '\0';
      bEol = -1;
    }
  }

  if( bShrink ){ pCSV->zRow = realloc( pCSV->zRow, n+1 ); }


  return bEol ? pCSV->zRow : 0;
}


/* 
** CSV virtual table module xCreate method.
*/







>
|
>
>







155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
    while( pCSV->zRow[n] ){ n++; }
    if( (n>0) && ((pCSV->zRow[n-1]=='\n') || (pCSV->zRow[n-1]=='\r')) ){
      pCSV->zRow[n-1] = '\n'; /* uniform line ending */
      pCSV->zRow[n] = '\0';
      bEol = -1;
    }
  }
  if( bShrink ){ 
    pCSV->zRow = realloc( pCSV->zRow, n+1 ); 
    pCSV->maxRow = n+1;
  }
  return bEol ? pCSV->zRow : 0;
}


/* 
** CSV virtual table module xCreate method.
*/