execute(sql);
}
private void execute(String sql) throws SQLException {
String expected = null;
SQLException e = null;
for (Statement s : dbs) {
try {
boolean result = s.execute(sql);
if (result) {
String data = getResult(s.getResultSet());
if (expected == null) {
expected = data;
} else {
assertEquals(sql, expected, data);
}
}
} catch (AssertionError e2) {
e = new SQLException(e2.getMessage());
} catch (SQLException e2) {
// ignore now, throw at the end
e = e2;
}
}