improve sqlwall

This commit is contained in:
Yako
2014-11-13 13:26:12 +08:00
parent 92ebbdee2f
commit aec444ea17
5 changed files with 38 additions and 38 deletions
@@ -56,7 +56,7 @@ public class SQLServerWallTest extends TestCase {
public void test_stuff() throws Exception {
Assert.assertFalse(WallUtils.isValidateSqlServer("SELECT * from table where version = @@version"));
Assert.assertFalse(WallUtils.isValidateSqlServer("SELECT 1 — comment"));
Assert.assertFalse(WallUtils.isValidateSqlServer("SELECT /*comment*/1"));
Assert.assertFalse(WallUtils.isValidateSqlServer("SELECT * from t where a=1 /* and b=1*/"));
Assert.assertFalse(WallUtils.isValidateSqlServer("WAITFOR DELAY ’0:0:5′ "));
Assert.assertFalse(WallUtils.isValidateSqlServer("BULK INSERT mydata FROM ‘c:boot.ini’;"));
}
@@ -22,7 +22,7 @@ import org.junit.Assert;
import com.alibaba.druid.wall.WallUtils;
public class WallMultiLineCommentTest extends TestCase {
private String sql = "select f1 from t /* xx */";
private String sql = "select f1 from t where a=1 /* and b=1 */";
public void testOracle() throws Exception {
Assert.assertFalse(WallUtils.isValidateOracle(sql));