mirror of
				https://github.com/sqlite/sqlite.git
				synced 2025-11-03 16:53:36 +03:00 
			
		
		
		
	Fix a problem in the shell when importing CSV files. If the leftmost field of the first row in the CSV file was both zero bytes in size and unquoted, no data was imported.
FossilOrigin-Name: 856d44a206d82e96265103556dedda39ca3602b1
This commit is contained in:
		@@ -2431,6 +2431,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
 | 
			
		||||
    }
 | 
			
		||||
    nByte = strlen30(zSql);
 | 
			
		||||
    rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
 | 
			
		||||
    csv_append_char(&sCsv, 0);    /* To ensure sCsv.z is allocated */
 | 
			
		||||
    if( rc && sqlite3_strglob("no such table: *", sqlite3_errmsg(db))==0 ){
 | 
			
		||||
      char *zCreate = sqlite3_mprintf("CREATE TABLE %s", zTable);
 | 
			
		||||
      char cSep = '(';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user