Merge pull request #2014 from sunsun314/master

fix bug:LOCK TABLES table_name write 在mysql防火墙校验的时候会过不了校验
This commit is contained in:
高铁
2017-09-28 01:46:52 -05:00
committed by GitHub
2 changed files with 60 additions and 10 deletions
@@ -597,10 +597,12 @@ public class MySqlStatementParser extends SQLStatementParser {
stmt.setLockType(LockType.READ);
}
} else if (lexer.identifierEquals(WRITE)) {
lexer.nextToken();
stmt.setLockType(LockType.WRITE);
} else if (lexer.identifierEquals(FnvHash.Constants.LOW_PRIORITY)) {
lexer.nextToken();
acceptIdentifier(WRITE);
lexer.nextToken();
stmt.setLockType(LockType.LOW_PRIORITY_WRITE);
} else {
throw new ParserException("syntax error, expect READ or WRITE, actual " + lexer.token() + ", " + lexer.info());