mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
In the command-line shell: When the ".import" command is creating a new
table using column names from the first row of CSV input, make sure double-quotes in the name are properly escaped. FossilOrigin-Name: 2e67a1c823c7003e7d2619c7d8b6db6ce046c527
This commit is contained in:
@@ -3171,7 +3171,7 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
char *zCreate = sqlite3_mprintf("CREATE TABLE %s", zTable);
|
||||
char cSep = '(';
|
||||
while( xRead(&sCtx) ){
|
||||
zCreate = sqlite3_mprintf("%z%c\n \"%s\" TEXT", zCreate, cSep, sCtx.z);
|
||||
zCreate = sqlite3_mprintf("%z%c\n \"%w\" TEXT", zCreate, cSep, sCtx.z);
|
||||
cSep = ',';
|
||||
if( sCtx.cTerm!=sCtx.cColSep ) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user