mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
#2000 作为firewall使用在mysql上的时候lock tables .. write过不了校验
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user