Fossil

Check-in [592c6725]
Login

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

Overview
Comment:Take over some latest bug-fixes (one security-related) from SQLite trunk's command-line shell
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:592c6725195e11f27e12493e1809932f4f747c2bf96cc79eeb682e81a1be8231
User & Date: jan.nijtmans 2018-06-08 09:40:18
Context
2018-06-08
09:41
Upgrade dirent to latest version (1.23.2, May 8, 2018) check-in: 1eee6c70 user: jan.nijtmans tags: trunk
09:40
Take over some latest bug-fixes (one security-related) from SQLite trunk's command-line shell check-in: 592c6725 user: jan.nijtmans tags: trunk
2018-06-07
13:38
In the timeline graph, avoid drawing risers to the top for timewarp nodes. check-in: e8066719 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

 10065  10065   static void explain_data_prepare(ShellState *p, sqlite3_stmt *pSql){
 10066  10066     const char *zSql;               /* The text of the SQL statement */
 10067  10067     const char *z;                  /* Used to check if this is an EXPLAIN */
 10068  10068     int *abYield = 0;               /* True if op is an OP_Yield */
 10069  10069     int nAlloc = 0;                 /* Allocated size of p->aiIndent[], abYield */
 10070  10070     int iOp;                        /* Index of operation in p->aiIndent[] */
 10071  10071   
 10072         -  const char *azNext[] = { "Next", "Prev", "VPrev", "VNext", "SorterNext",
 10073         -                           "NextIfOpen", "PrevIfOpen", 0 };
        10072  +  const char *azNext[] = { "Next", "Prev", "VPrev", "VNext", "SorterNext", 0 };
 10074  10073     const char *azYield[] = { "Yield", "SeekLT", "SeekGT", "RowSetRead",
 10075  10074                               "Rewind", 0 };
 10076  10075     const char *azGoto[] = { "Goto", 0 };
 10077  10076   
 10078  10077     /* Try to figure out if this is really an EXPLAIN statement. If this
 10079  10078     ** cannot be verified, return early.  */
 10080  10079     if( sqlite3_column_count(pSql)!=8 ){
................................................................................
 10470  10469             sqlite3_free(zEQP);
 10471  10470           }
 10472  10471           if( pArg->autoEQP>=AUTOEQP_trigger && triggerEQP==0 ){
 10473  10472             sqlite3_db_config(db, SQLITE_DBCONFIG_TRIGGER_EQP, 0, 0);
 10474  10473             /* Reprepare pStmt before reactiving trace modes */
 10475  10474             sqlite3_finalize(pStmt);
 10476  10475             sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
        10476  +          if( pArg ) pArg->pStmt = pStmt;
 10477  10477           }
 10478  10478           restore_debug_trace_modes();
 10479  10479         }
 10480  10480   
 10481  10481         if( pArg ){
 10482  10482           pArg->cMode = pArg->mode;
 10483  10483           if( pArg->autoExplain ){
................................................................................
 12782  12782   ** Implementation of .ar "eXtract" command. 
 12783  12783   */
 12784  12784   static int arExtractCommand(ArCommand *pAr){
 12785  12785     const char *zSql1 = 
 12786  12786       "SELECT "
 12787  12787       " ($dir || name),"
 12788  12788       " writefile(($dir || name), %s, mode, mtime) "
 12789         -    "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)";
        12789  +    "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)"
        12790  +    " AND name NOT GLOB '*..[/\\]*'";
 12790  12791   
 12791  12792     const char *azExtraArg[] = { 
 12792  12793       "sqlar_uncompress(data, sz)",
 12793  12794       "data"
 12794  12795     };
 12795  12796   
 12796  12797     sqlite3_stmt *pSql = 0;