Fossil SCM
Add the ".eqp" dot-command to the ".help" output in the command-line shell. Fix CSV import issue, reported via the mailing list, in the shell when the file to be imported ends with an empty line.
Commit
3467da7901347838741eb1fec95c3826cc2d24cc
Parent
00e4fedd85751b3…
1 file changed
+2
-1
+2
-1
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1577,10 +1577,11 @@ | ||
| 1577 | 1577 | ".databases List names and files of attached databases\n" |
| 1578 | 1578 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1579 | 1579 | " If TABLE specified, only dump tables matching\n" |
| 1580 | 1580 | " LIKE pattern TABLE.\n" |
| 1581 | 1581 | ".echo on|off Turn command echo on or off\n" |
| 1582 | + ".eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN\n" | |
| 1582 | 1583 | ".exit Exit this program\n" |
| 1583 | 1584 | ".explain ?on|off? Turn output mode suitable for EXPLAIN on or off.\n" |
| 1584 | 1585 | " With no args, it turns EXPLAIN on.\n" |
| 1585 | 1586 | ".headers on|off Turn display of headers on or off\n" |
| 1586 | 1587 | ".help Show this message\n" |
| @@ -2551,11 +2552,11 @@ | ||
| 2551 | 2552 | if( i<nCol-1 && sCsv.cTerm!=sCsv.cSeparator ){ |
| 2552 | 2553 | fprintf(stderr, "%s:%d: expected %d columns but found %d - " |
| 2553 | 2554 | "filling the rest with NULL\n", |
| 2554 | 2555 | sCsv.zFile, startLine, nCol, i+1); |
| 2555 | 2556 | i++; |
| 2556 | - while( i<nCol ){ sqlite3_bind_null(pStmt, i); i++; } | |
| 2557 | + while( i<=nCol ){ sqlite3_bind_null(pStmt, i); i++; } | |
| 2557 | 2558 | } |
| 2558 | 2559 | } |
| 2559 | 2560 | if( sCsv.cTerm==sCsv.cSeparator ){ |
| 2560 | 2561 | do{ |
| 2561 | 2562 | csv_read_one_field(&sCsv); |
| 2562 | 2563 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1577,10 +1577,11 @@ | |
| 1577 | ".databases List names and files of attached databases\n" |
| 1578 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1579 | " If TABLE specified, only dump tables matching\n" |
| 1580 | " LIKE pattern TABLE.\n" |
| 1581 | ".echo on|off Turn command echo on or off\n" |
| 1582 | ".exit Exit this program\n" |
| 1583 | ".explain ?on|off? Turn output mode suitable for EXPLAIN on or off.\n" |
| 1584 | " With no args, it turns EXPLAIN on.\n" |
| 1585 | ".headers on|off Turn display of headers on or off\n" |
| 1586 | ".help Show this message\n" |
| @@ -2551,11 +2552,11 @@ | |
| 2551 | if( i<nCol-1 && sCsv.cTerm!=sCsv.cSeparator ){ |
| 2552 | fprintf(stderr, "%s:%d: expected %d columns but found %d - " |
| 2553 | "filling the rest with NULL\n", |
| 2554 | sCsv.zFile, startLine, nCol, i+1); |
| 2555 | i++; |
| 2556 | while( i<nCol ){ sqlite3_bind_null(pStmt, i); i++; } |
| 2557 | } |
| 2558 | } |
| 2559 | if( sCsv.cTerm==sCsv.cSeparator ){ |
| 2560 | do{ |
| 2561 | csv_read_one_field(&sCsv); |
| 2562 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1577,10 +1577,11 @@ | |
| 1577 | ".databases List names and files of attached databases\n" |
| 1578 | ".dump ?TABLE? ... Dump the database in an SQL text format\n" |
| 1579 | " If TABLE specified, only dump tables matching\n" |
| 1580 | " LIKE pattern TABLE.\n" |
| 1581 | ".echo on|off Turn command echo on or off\n" |
| 1582 | ".eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN\n" |
| 1583 | ".exit Exit this program\n" |
| 1584 | ".explain ?on|off? Turn output mode suitable for EXPLAIN on or off.\n" |
| 1585 | " With no args, it turns EXPLAIN on.\n" |
| 1586 | ".headers on|off Turn display of headers on or off\n" |
| 1587 | ".help Show this message\n" |
| @@ -2551,11 +2552,11 @@ | |
| 2552 | if( i<nCol-1 && sCsv.cTerm!=sCsv.cSeparator ){ |
| 2553 | fprintf(stderr, "%s:%d: expected %d columns but found %d - " |
| 2554 | "filling the rest with NULL\n", |
| 2555 | sCsv.zFile, startLine, nCol, i+1); |
| 2556 | i++; |
| 2557 | while( i<=nCol ){ sqlite3_bind_null(pStmt, i); i++; } |
| 2558 | } |
| 2559 | } |
| 2560 | if( sCsv.cTerm==sCsv.cSeparator ){ |
| 2561 | do{ |
| 2562 | csv_read_one_field(&sCsv); |
| 2563 |