mirror of
				https://github.com/sqlite/sqlite.git
				synced 2025-11-03 16:53:36 +03:00 
			
		
		
		
	Change the ".dump" command in the command-line shell so that it COMMITs
if there are database corruption errors but invokes ROLLBACK on any other kind of error. FossilOrigin-Name: 473234632ff7617680ab151076153f5c1088e55b
This commit is contained in:
		@@ -974,7 +974,7 @@ static int run_table_dump_query(
 | 
			
		||||
  rc = sqlite3_prepare(p->db, zSelect, -1, &pSelect, 0);
 | 
			
		||||
  if( rc!=SQLITE_OK || !pSelect ){
 | 
			
		||||
    fprintf(p->out, "/**** ERROR: (%d) %s *****/\n", rc, sqlite3_errmsg(p->db));
 | 
			
		||||
    p->nErr++;
 | 
			
		||||
    if( (rc&0xff)!=SQLITE_CORRUPT ) p->nErr++;
 | 
			
		||||
    return rc;
 | 
			
		||||
  }
 | 
			
		||||
  rc = sqlite3_step(pSelect);
 | 
			
		||||
@@ -1001,7 +1001,7 @@ static int run_table_dump_query(
 | 
			
		||||
  rc = sqlite3_finalize(pSelect);
 | 
			
		||||
  if( rc!=SQLITE_OK ){
 | 
			
		||||
    fprintf(p->out, "/**** ERROR: (%d) %s *****/\n", rc, sqlite3_errmsg(p->db));
 | 
			
		||||
    p->nErr++;
 | 
			
		||||
    if( (rc&0xff)!=SQLITE_CORRUPT ) p->nErr++;
 | 
			
		||||
  }
 | 
			
		||||
  return rc;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user