SQLite

Check-in [1ed5e361ca]
Login

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

Overview
Comment:In the shell, make sure the ".log" command has at least one argument.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1ed5e361ca7bfa9226fec265704394e0f228f0c5
User & Date: drh 2011-03-23 11:16:22.642
Context
2011-03-23
17:10
Fix a bug in fts4 to do with matchinfo and deferred tokens. (check-in: 30d42dc66f user: dan tags: trunk)
11:16
In the shell, make sure the ".log" command has at least one argument. (check-in: 1ed5e361ca user: drh tags: trunk)
10:52
Fix a numbering issue in rtree6.test. Add a couple of extra tests. (check-in: 0b7668a71e user: dan tags: trunk)
Changes
Unified Diff Show Whitespace Changes Patch
Changes to src/shell.c.
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
      fprintf(stderr, "Error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
      rc = 1;
    }
  }else
#endif

  if( c=='l' && strncmp(azArg[0], "log", n)==0 && nArg>=1 ){
    const char *zFile = azArg[1];
    if( p->pLog && p->pLog!=stdout && p->pLog!=stderr ){
      fclose(p->pLog);
      p->pLog = 0;
    }
    if( strcmp(zFile,"stdout")==0 ){
      p->pLog = stdout;







|







1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
      fprintf(stderr, "Error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
      rc = 1;
    }
  }else
#endif

  if( c=='l' && strncmp(azArg[0], "log", n)==0 && nArg>=2 ){
    const char *zFile = azArg[1];
    if( p->pLog && p->pLog!=stdout && p->pLog!=stderr ){
      fclose(p->pLog);
      p->pLog = 0;
    }
    if( strcmp(zFile,"stdout")==0 ){
      p->pLog = stdout;