#1128 - Allow "2 word SQL" like TRUNCATE t, ANALYSE t etc

This commit is contained in:
rob bygrave
2017-09-13 21:40:17 +12:00
parent c7a7651602
commit b2e0271ce7
2 changed files with 34 additions and 10 deletions
@@ -20,6 +20,21 @@ public class TestSqlUpdateInTxn extends BaseTestCase {
assertThat(sqlUpdate.getSql()).isEqualTo(sql.trim());
}
@Test
public void test_twoWordSql() {
if (isH2()) {
// 2 word syntax ... means no automatic determination of the type of change
// and table effected (so no automatic L2 cache invalidation)
String sql = "CHECKPOINT SYNC";
SqlUpdate sqlUpdate = Ebean.createSqlUpdate(sql);
sqlUpdate.execute();
assertThat(sqlUpdate.getSql()).isEqualTo(sql.trim());
}
}
@Test
public void testSqlUpdateWithWhitespace() {