mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
In the command-line shell for CSV import, if the lines are \r\n terminated
and the last field is blank, make sure an empty string and not a "\r" string is imported. FossilOrigin-Name: 9c2e7612cd137895e13ee872e668ce1216719d85
This commit is contained in:
@@ -1893,7 +1893,7 @@ static char *csv_read_one_field(CSVReader *p){
|
||||
}
|
||||
if( c=='\n' ){
|
||||
p->nLine++;
|
||||
if( p->n>1 && p->z[p->n-1]=='\r' ) p->n--;
|
||||
if( p->n>0 && p->z[p->n-1]=='\r' ) p->n--;
|
||||
}
|
||||
p->cTerm = c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user