/ Check-in [d3dad06f]
Login

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

Overview
Comment:Add the ".imposter off" variant of the ".imposter" dot-command in the CLI.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d3dad06ff1b163040c54dd215f30d6669cc2bc339001a362605f26f06eddf98c
User & Date: drh 2018-04-23 18:38:48
Context
2018-04-23
20:04
Fix a formatting issue in the TreeView output for bare expression lists. check-in: a6356817 user: drh tags: trunk
18:38
Add the ".imposter off" variant of the ".imposter" dot-command in the CLI. check-in: d3dad06f user: drh tags: trunk
17:43
The ".selecttrace 0x2000" command causes just the top-level parse tree to be displayed, after all transformations, and showing the EQP iSelectId at each level. check-in: ca34c2dd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  6116   6116   #ifndef SQLITE_UNTESTABLE
  6117   6117     if( c=='i' && strncmp(azArg[0], "imposter", n)==0 ){
  6118   6118       char *zSql;
  6119   6119       char *zCollist = 0;
  6120   6120       sqlite3_stmt *pStmt;
  6121   6121       int tnum = 0;
  6122   6122       int i;
  6123         -    if( nArg!=3 ){
  6124         -      utf8_printf(stderr, "Usage: .imposter INDEX IMPOSTER\n");
         6123  +    if( !(nArg==3 || (nArg==2 && sqlite3_stricmp(azArg[1],"off")==0)) ){
         6124  +      utf8_printf(stderr, "Usage: .imposter INDEX IMPOSTER\n"
         6125  +                          "       .imposter off\n");
  6125   6126         rc = 1;
  6126   6127         goto meta_command_exit;
  6127   6128       }
  6128   6129       open_db(p, 0);
         6130  +    if( nArg==2 ){
         6131  +      sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->db, "main", 0, 1);
         6132  +      goto meta_command_exit;
         6133  +    }
  6129   6134       zSql = sqlite3_mprintf("SELECT rootpage FROM sqlite_master"
  6130   6135                              " WHERE name='%q' AND type='index'", azArg[1]);
  6131   6136       sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
  6132   6137       sqlite3_free(zSql);
  6133   6138       if( sqlite3_step(pStmt)==SQLITE_ROW ){
  6134   6139         tnum = sqlite3_column_int(pStmt, 0);
  6135   6140       }