You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At initialisation of sqlite3 db, sqlancer insert random number of different sql statement specified by
private static int mapActions(SQLite3GlobalState globalState, Action a) {
int nrPerformed = 0;
Randomly r = globalState.getRandomly();
switch (a) {
case CREATE_VIEW:
nrPerformed = r.getInteger(0, 2);
break;
case DELETE:
case DROP_VIEW:
case DROP_INDEX:
nrPerformed = r.getInteger(0, 0);
break;
case ALTER:
nrPerformed = 0;
break;
case EXPLAIN:
case CREATE_TRIGGER:
case DROP_TABLE:
nrPerformed = r.getInteger(0, 0);
break;
case VACUUM:
case CHECK_RTREE_TABLE:
nrPerformed = r.getInteger(0, 3);
break;
case INSERT:
nrPerformed = r.getInteger(0, globalState.getOptions().getMaxNumberInserts());
break;
case MANIPULATE_STAT_TABLE:
nrPerformed = r.getInteger(0, 5);
break;
case CREATE_INDEX:
nrPerformed = r.getInteger(0, 5);
break;
case VIRTUAL_TABLE_ACTION:
case UPDATE:
nrPerformed = r.getInteger(0, 30);
break;
case PRAGMA:
nrPerformed = r.getInteger(0, 20);
break;
case CREATE_TABLE:
case CREATE_VIRTUALTABLE:
case CREATE_RTREETABLE:
nrPerformed = 0;
break;
case TRANSACTION_START:
case REINDEX:
case ANALYZE:
case ROLLBACK_TRANSACTION:
case COMMIT:
default:
nrPerformed = r.getInteger(1, 10);
break;
}
return nrPerformed;
}
Is there any reason we don't generate statements such as CREATE_VIRTUALTABLE and ALTER during initialisation? By changing ALTER to be generated r.getInteger(1, 10) times, and add expected error for check constraints, we could generate more diverse statements.
The text was updated successfully, but these errors were encountered:
At initialisation of sqlite3 db, sqlancer insert random number of different sql statement specified by
Is there any reason we don't generate statements such as
CREATE_VIRTUALTABLE
andALTER
during initialisation? By changingALTER
to be generatedr.getInteger(1, 10)
times, and add expected error forcheck constraints
, we could generate more diverse statements.The text was updated successfully, but these errors were encountered: