/ Check-in [020b5e90]
Login

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

Overview
Comment:Fix a bug in the command-line shell logic that attempts to continue with a ".dump" even after encountering database corruption.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:020b5e90f950a42299074ff770612b9e68850d95
User & Date: drh 2012-04-16 17:22:30
Context
2012-04-17
09:09
Add an undocumented and possibly ephemeral ".breakpoint" command to the command-line shell, to call a no-op routine on which it is convenient to set a symbolic debugger breakpoint. check-in: 8e2363ad user: drh tags: trunk
2012-04-16
17:22
Fix a bug in the command-line shell logic that attempts to continue with a ".dump" even after encountering database corruption. check-in: 020b5e90 user: drh tags: trunk
2012-04-14
13:25
In the unix VFS, always set every open file to close-on-exec using either O_CLOEXEC at open (preferred) or FD_CLOEXEC in an ioctl after opening. Before this changes, many files were done this way, but not all. check-in: 9efbeb11 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.

1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
    if( zErr ){
      fprintf(p->out, "/****** %s ******/\n", zErr);
      sqlite3_free(zErr);
      zErr = 0;
    }
    zQ2 = malloc( len+100 );
    if( zQ2==0 ) return rc;
    sqlite3_snprintf(sizeof(zQ2), zQ2, "%s ORDER BY rowid DESC", zQuery);
    rc = sqlite3_exec(p->db, zQ2, dump_callback, p, &zErr);
    if( rc ){
      fprintf(p->out, "/****** ERROR: %s ******/\n", zErr);
    }else{
      rc = SQLITE_CORRUPT;
    }
    sqlite3_free(zErr);







|







1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
    if( zErr ){
      fprintf(p->out, "/****** %s ******/\n", zErr);
      sqlite3_free(zErr);
      zErr = 0;
    }
    zQ2 = malloc( len+100 );
    if( zQ2==0 ) return rc;
    sqlite3_snprintf(len+100, zQ2, "%s ORDER BY rowid DESC", zQuery);
    rc = sqlite3_exec(p->db, zQ2, dump_callback, p, &zErr);
    if( rc ){
      fprintf(p->out, "/****** ERROR: %s ******/\n", zErr);
    }else{
      rc = SQLITE_CORRUPT;
    }
    sqlite3_free(zErr);