/ Check-in [ff213f2e]
Login

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

Overview
Comment:Merge fixes from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | auto-analyze
Files: files | file ages | folders
SHA1: ff213f2ef5bf96754a2264685d25546d8b5ccf0a
User & Date: drh 2017-02-20 13:11:07
Context
2017-02-22
19:49
Merge integrity_check and other improvements from trunk. check-in: fe073905 user: drh tags: auto-analyze
2017-02-20
13:11
Merge fixes from trunk. check-in: ff213f2e user: drh tags: auto-analyze
2017-02-18
22:52
Updated comments. No code changes. check-in: e842ad39 user: drh tags: auto-analyze
13:47
Add the SQLITE_BUG_COMPATIBLE_20160819 compile-time option to omit the error message when an unrecognized argument is provided to the VACUUM command. check-in: 49181427 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  5188   5188             utf8_printf(stderr,
  5189   5189                         "Error: CLI support for testctrl %s not implemented\n",
  5190   5190                         azArg[1]);
  5191   5191             break;
  5192   5192         }
  5193   5193       }
  5194   5194     }else
         5195  +#endif /* !defined(SQLITE_UNTESTABLE) */
  5195   5196   
  5196   5197     if( c=='t' && n>4 && strncmp(azArg[0], "timeout", n)==0 ){
  5197   5198       open_db(p, 0);
  5198   5199       sqlite3_busy_timeout(p->db, nArg>=2 ? (int)integerValue(azArg[1]) : 0);
  5199   5200     }else
  5200   5201   
  5201   5202     if( c=='t' && n>=5 && strncmp(azArg[0], "timer", n)==0 ){
................................................................................
  5224   5225       if( p->traceOut==0 ){
  5225   5226         sqlite3_trace_v2(p->db, 0, 0, 0);
  5226   5227       }else{
  5227   5228         sqlite3_trace_v2(p->db, SQLITE_TRACE_STMT, sql_trace_callback,p->traceOut);
  5228   5229       }
  5229   5230   #endif
  5230   5231     }else
  5231         -#endif /* !defined(SQLITE_UNTESTABLE) */
  5232   5232   
  5233   5233   #if SQLITE_USER_AUTHENTICATION
  5234   5234     if( c=='u' && strncmp(azArg[0], "user", n)==0 ){
  5235   5235       if( nArg<2 ){
  5236   5236         raw_printf(stderr, "Usage: .user SUBCOMMAND ...\n");
  5237   5237         rc = 1;
  5238   5238         goto meta_command_exit;

Changes to src/vacuum.c.

    94     94   ** not work if other processes are attached to the original database.
    95     95   ** And a power loss in between deleting the original and renaming the
    96     96   ** transient would cause the database file to appear to be deleted
    97     97   ** following reboot.
    98     98   */
    99     99   void sqlite3Vacuum(Parse *pParse, Token *pNm){
   100    100     Vdbe *v = sqlite3GetVdbe(pParse);
   101         -  int iDb = pNm ? sqlite3TwoPartName(pParse, pNm, pNm, &pNm) : 0;
   102         -  if( v && (iDb>=2 || iDb==0) ){
          101  +  int iDb = 0;
          102  +  if( v==0 ) return;
          103  +  if( pNm ){
          104  +#ifndef SQLITE_BUG_COMPATIBLE_20160819
          105  +    /* Default behavior:  Report an error if the argument to VACUUM is
          106  +    ** not recognized */
          107  +    iDb = sqlite3TwoPartName(pParse, pNm, pNm, &pNm);
          108  +    if( iDb<0 ) return;
          109  +#else
          110  +    /* When SQLITE_BUG_COMPATIBLE_20160819 is defined, unrecognized arguments
          111  +    ** to VACUUM are silently ignored.  This is a back-out of a bug fix that
          112  +    ** occurred on 2016-08-19 (https://www.sqlite.org/src/info/083f9e6270).
          113  +    ** The buggy behavior is required for binary compatibility with some
          114  +    ** legacy applications. */
          115  +    iDb = sqlite3FindDb(pParse->db, pNm);
          116  +    if( iDb<0 ) iDb = 0;
          117  +#endif
          118  +  }
          119  +  if( iDb!=1 ){
   103    120       sqlite3VdbeAddOp1(v, OP_Vacuum, iDb);
   104    121       sqlite3VdbeUsesBtree(v, iDb);
   105    122     }
   106    123     return;
   107    124   }
   108    125   
   109    126   /*