/ Check-in [2d2b3c49]
Login

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

Overview
Comment:Fix speedtest1.c so that in --explain mode it only outputs non-explain text for DDL statements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2d2b3c4951dc2b8317d5ba8b5cf72b1f4a6668f6
User & Date: drh 2013-12-21 17:14:58
Context
2013-12-22
20:44
Make sure the WhereLoop.aLTerm[] array is large enough when processing the skip-scan optimization. Fix for ticket [520070ec7fbaac]. check-in: 46d04059 user: drh tags: trunk
2013-12-21
17:14
Fix speedtest1.c so that in --explain mode it only outputs non-explain text for DDL statements. check-in: 2d2b3c49 user: drh tags: trunk
17:07
Avoid compiler warnings by only enabling sqlite3ErrName() when SQLITE_TEST is defined. check-in: 862228e5 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/speedtest1.c.

295
296
297
298
299
300
301

302
303
304
305

306
307
308
309
310
311
312
/* Print an SQL statement to standard output */
static void printSql(const char *zSql){
  int n = (int)strlen(zSql);
  while( n>0 && (zSql[n-1]==';' || isspace(zSql[n-1])) ){ n--; }
  if( g.bExplain ) printf("EXPLAIN ");
  printf("%.*s;\n", n, zSql);
  if( g.bExplain

   && (sqlite3_strglob("CREATE *", zSql)
     || sqlite3_strglob("DROP *", zSql)
     || sqlite3_strglob("ALTER *", zSql)
      )

  ){
    printf("%.*s;\n", n, zSql);
  }
}

/* Run SQL */
void speedtest1_exec(const char *zFormat, ...){







>
|
|
|

>







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
/* Print an SQL statement to standard output */
static void printSql(const char *zSql){
  int n = (int)strlen(zSql);
  while( n>0 && (zSql[n-1]==';' || isspace(zSql[n-1])) ){ n--; }
  if( g.bExplain ) printf("EXPLAIN ");
  printf("%.*s;\n", n, zSql);
  if( g.bExplain
#if SQLITE_VERSION_NUMBER>=3007010 
   && ( sqlite3_strglob("CREATE *", zSql)==0
     || sqlite3_strglob("DROP *", zSql)==0
     || sqlite3_strglob("ALTER *", zSql)==0
      )
#endif
  ){
    printf("%.*s;\n", n, zSql);
  }
}

/* Run SQL */
void speedtest1_exec(const char *zFormat, ...){