mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Improvements to query invariants in fuzzcheck.
FossilOrigin-Name: 3a461f61b47e6ba6d5dcc2b7470ebde512b57bc68086f65050e07b06f42b7351
This commit is contained in:
@ -949,12 +949,15 @@ static int runDbSql(sqlite3 *db, const char *zSql, unsigned int *pBtsFlags){
|
||||
int nRow = 0;
|
||||
while( (rc = sqlite3_step(pStmt))==SQLITE_ROW ){
|
||||
nRow++;
|
||||
if( (*pBtsFlags)==BTS_SELECT && g.doInvariantChecks ){
|
||||
if( (*pBtsFlags)==BTS_SELECT
|
||||
&& g.doInvariantChecks
|
||||
&& !sqlite3_stmt_isexplain(pStmt)
|
||||
){
|
||||
int iCnt = 0;
|
||||
for(iCnt=0; iCnt<99999; iCnt++){
|
||||
rc = fuzz_invariant(db, pStmt, iCnt, nRow, &bCorrupt, eVerbosity);
|
||||
if( rc==SQLITE_DONE ) break;
|
||||
g.nInvariant++;
|
||||
if( rc!=SQLITE_ERROR ) g.nInvariant++;
|
||||
if( eVerbosity>0 ){
|
||||
if( rc==SQLITE_OK ){
|
||||
printf("invariant-check: ok\n");
|
||||
|
Reference in New Issue
Block a user