use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest53 method test_false.
public void test_false() throws Exception {
WallProvider provider = new MySqlWallProvider();
Assert.assertFalse(//
provider.checkValid("select * from t limit 0,0"));
Assert.assertEquals(1, provider.getTableStats().size());
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest53 method test_true.
public void test_true() throws Exception {
WallProvider provider = new MySqlWallProvider();
provider.getConfig().setLimitZeroAllow(true);
Assert.assertTrue(//
provider.checkValid("select * from t limit 0,0"));
Assert.assertEquals(1, provider.getTableStats().size());
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest55 method test_true_2.
public void test_true_2() throws Exception {
WallProvider provider = new MySqlWallProvider();
Assert.assertTrue(//
provider.checkValid("SELECT USER() FROM X"));
Assert.assertEquals(1, provider.getTableStats().size());
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest55 method test_true.
public void test_true() throws Exception {
WallProvider provider = new MySqlWallProvider();
Assert.assertTrue(//
provider.checkValid("SELECT USER()"));
Assert.assertEquals(0, provider.getTableStats().size());
}
use of com.alibaba.druid.wall.WallProvider in project druid by alibaba.
the class MySqlWallTest55 method test_true_1.
public void test_true_1() throws Exception {
WallProvider provider = new MySqlWallProvider();
Assert.assertTrue(//
provider.checkValid("SELECT USER() FROM DUAL"));
Assert.assertEquals(1, provider.getTableStats().size());
}
Aggregations