/ Check-in [73fafd21]
Login

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

Overview
Comment:Make sure the .import command strips newlines off the end of the last field in each line imported. Ticket #1348 (CVS 2578)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 73fafd2148b8cd0f92747fca03e3df5778e1070f
User & Date: drh 2005-08-05 18:50:52
Context
2005-08-11
01:25
Add 2005 open source award badge and news announcement. (CVS 2579) check-in: 8e007f8c user: drh tags: trunk
2005-08-05
18:50
Make sure the .import command strips newlines off the end of the last field in each line imported. Ticket #1348 (CVS 2578) check-in: 73fafd21 user: drh tags: trunk
2005-08-02
21:42
Comment out the use of memory high-water marks when not compiling with SQLITE_MEMDEBUG. (CVS 2577) check-in: fb7a258f user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/shell.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
....
1089
1090
1091
1092
1093
1094
1095

1096
1097
1098
1099
1100
1101
1102
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.122 2005/02/23 12:35:41 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
................................................................................
          i++;
          if( i<nCol ){
            azCol[i] = &z[nSep];
            z += nSep-1;
          }
        }
      }

      if( i+1!=nCol ){
        fprintf(stderr,"%s line %d: expected %d columns of data but found %d\n",
           zFile, lineno, nCol, i+1);
        zCommit = "ROLLBACK";
        break;
      }
      for(i=0; i<nCol; i++){







|







 







>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
....
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.123 2005/08/05 18:50:52 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
................................................................................
          i++;
          if( i<nCol ){
            azCol[i] = &z[nSep];
            z += nSep-1;
          }
        }
      }
      *z = 0;
      if( i+1!=nCol ){
        fprintf(stderr,"%s line %d: expected %d columns of data but found %d\n",
           zFile, lineno, nCol, i+1);
        zCommit = "ROLLBACK";
        break;
      }
      for(i=0; i<nCol; i++){