mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sqlwall
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user