add sql wall support

This commit is contained in:
温少
2012-03-15 23:09:35 +08:00
parent 5ddff762bd
commit f238b25361
10 changed files with 1509 additions and 39 deletions
@@ -0,0 +1,16 @@
package com.alibaba.druid.bvt.filter.wall;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.filter.wall.WallUtils;
public class OracleWallTest extends TestCase {
public void testWall() throws Exception {
Assert.assertFalse(WallUtils.isValidateOracle("select f1, f2 from t union select 1, 2"));
Assert.assertFalse(WallUtils.isValidateOracle("select * from TAB"));
}
}
@@ -33,7 +33,7 @@ public class OnlineOracleTest3 extends TestCase {
}
public void test_connect() throws Exception {
execute("select * from session_roles");
executeQuery("select * from TAB");
}
public void executeQuery(String sql) throws SQLException {