1515
1616import sqlancer .DatabaseFacade ;
1717import sqlancer .DatabaseProvider ;
18+ import sqlancer .GlobalState ;
1819import sqlancer .IgnoreMeException ;
1920import sqlancer .Main .QueryManager ;
2021import sqlancer .Main .StateLogger ;
@@ -156,28 +157,17 @@ public Query getQuery(SQLite3GlobalState state) throws SQLException {
156157 private SQLite3StateToReproduce state ;
157158 private String databaseName ;
158159
159- public static class SQLite3GlobalState {
160+ public static class SQLite3GlobalState extends GlobalState {
160161
161- private Connection con ;
162162 private SQLite3Schema schema ;
163163 private SQLite3StateToReproduce state ;
164- private Randomly r ;
165- private MainOptions mainOptions ;
166164 private SQLite3Options sqliteOptions ;
167- private StateLogger logger ;
168- private QueryManager manager ;
169165
170- public Connection getConnection () {
171- return con ;
172- }
173166
174167 public SQLite3Schema getSchema () {
175168 return schema ;
176169 }
177170
178- public void setConnection (Connection con ) {
179- this .con = con ;
180- }
181171
182172 public void setSchema (SQLite3Schema schema ) {
183173 this .schema = schema ;
@@ -191,21 +181,6 @@ public SQLite3StateToReproduce getState() {
191181 return state ;
192182 }
193183
194- public Randomly getRandomly () {
195- return r ;
196- }
197-
198- public void setRandomly (Randomly r ) {
199- this .r = r ;
200- }
201-
202- public void setMainOptions (MainOptions mainOptions ) {
203- this .mainOptions = mainOptions ;
204- }
205-
206- public MainOptions getMainOptions () {
207- return mainOptions ;
208- }
209184
210185 public void setSqliteOptions (SQLite3Options sqliteOptions ) {
211186 this .sqliteOptions = sqliteOptions ;
@@ -215,22 +190,6 @@ public SQLite3Options getSqliteOptions() {
215190 return sqliteOptions ;
216191 }
217192
218- public void setLogger (StateLogger logger ) {
219- this .logger = logger ;
220- }
221-
222- public StateLogger getLogger () {
223- return logger ;
224- }
225-
226- public void setManager (QueryManager manager ) {
227- this .manager = manager ;
228- }
229-
230- public QueryManager getManager () {
231- return manager ;
232- }
233-
234193 }
235194
236195 private final SQLite3GlobalState globalState = new SQLite3GlobalState ();
@@ -250,7 +209,7 @@ public void generateAndTestDatabase(String databaseName, Connection con, StateLo
250209 globalState .setMainOptions (options );
251210 globalState .setSqliteOptions (sqliteOptions );
252211 globalState .setRandomly (r );
253- globalState .setLogger (logger );
212+ globalState .setStateLogger (logger );
254213 globalState .setManager (manager );
255214 this .state = (SQLite3StateToReproduce ) state ;
256215 globalState .setConnection (con );
0 commit comments