/ Check-in [442e816b]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Do not use sqlite3_column_decltype() in the CLI if it is compiled with SQLITE_OMIT_DECLTYPE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 442e816b5fed80ebeb58c7c0ab9c2ef999bf488519bf5da670e9cec477034540
User & Date: drh 2018-03-17 16:26:36
Context
2018-03-19
16:06
Improved ".selecttrace" output formatting. No changes in non-debug code. check-in: 30704d2a user: drh tags: trunk
2018-03-17
16:26
Do not use sqlite3_column_decltype() in the CLI if it is compiled with SQLITE_OMIT_DECLTYPE. check-in: 442e816b user: drh tags: trunk
2018-03-16
23:59
Detect corruption in the form of the sqlite_sequence table pointing to the wrong type of btree. check-in: 525deb7a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  2282   2282       sqlite3_stmt *pStmt = pArg->pStmt;
  2283   2283       char z[100];
  2284   2284       nCol = sqlite3_column_count(pStmt);
  2285   2285       raw_printf(out, "%-36s %d\n", "Number of output columns:", nCol);
  2286   2286       for(i=0; i<nCol; i++){
  2287   2287         sqlite3_snprintf(sizeof(z),z,"Column %d %nname:", i, &x);
  2288   2288         utf8_printf(out, "%-36s %s\n", z, sqlite3_column_name(pStmt,i));
         2289  +#ifndef SQLITE_OMIT_DECLTYPE
  2289   2290         sqlite3_snprintf(30, z+x, "declared type:");
  2290   2291         utf8_printf(out, "%-36s %s\n", z, sqlite3_column_decltype(pStmt, i));
  2291         -  #ifdef SQLITE_ENABLE_COLUMN_METADATA
         2292  +#endif
         2293  +#ifdef SQLITE_ENABLE_COLUMN_METADATA
  2292   2294         sqlite3_snprintf(30, z+x, "database name:");
  2293   2295         utf8_printf(out, "%-36s %s\n", z, sqlite3_column_database_name(pStmt,i));
  2294   2296         sqlite3_snprintf(30, z+x, "table name:");
  2295   2297         utf8_printf(out, "%-36s %s\n", z, sqlite3_column_table_name(pStmt,i));
  2296   2298         sqlite3_snprintf(30, z+x, "origin name:");
  2297   2299         utf8_printf(out, "%-36s %s\n", z, sqlite3_column_origin_name(pStmt,i));
  2298         -  #endif
         2300  +#endif
  2299   2301       }
  2300         -    }
         2302  +  }
  2301   2303   
  2302   2304     displayStatLine(pArg, "Memory Used:",
  2303   2305        "%lld (max %lld) bytes", SQLITE_STATUS_MEMORY_USED, bReset);
  2304   2306     displayStatLine(pArg, "Number of Outstanding Allocations:",
  2305   2307        "%lld (max %lld)", SQLITE_STATUS_MALLOC_COUNT, bReset);
  2306   2308     if( pArg->shellFlgs & SHFLG_Pagecache ){
  2307   2309       displayStatLine(pArg, "Number of Pcache Pages Used:",