#2000 作为firewall使用在mysql上的时候lock tables .. write过不了校验

This commit is contained in:
sunzhengfang
2017-09-28 11:09:13 +08:00
parent a524882bd8
commit b1dadc709d
@@ -104,6 +104,24 @@ public class MySqlResourceWallTest extends TestCase {
Assert.assertTrue(provider.checkValid(sql));
sql = "lock table dsdfsdf read";
result = provider.check(sql);
if (result.getViolations().size() > 0) {
Violation violation = result.getViolations().get(0);
System.out.println("error () : " + violation.getMessage());
}
Assert.assertTrue(provider.checkValid(sql));
sql = "lock table dsdfsdf read local";
result = provider.check(sql);
if (result.getViolations().size() > 0) {
Violation violation = result.getViolations().get(0);
System.out.println("error () : " + violation.getMessage());
}
Assert.assertTrue(provider.checkValid(sql));
}
}