Merge remote-tracking branch 'upstream/master'

This commit is contained in:
wenshao
2014-10-28 17:17:01 +08:00
26 changed files with 191 additions and 66 deletions
@@ -64,13 +64,15 @@ public class Lexer {
/*
* anti sql injection
*/
private boolean allowComment = true;
private boolean allowComment = true;
private int varIndex = -1;
private int varIndex = -1;
protected CommentHandler commentHandler;
protected boolean hasComment = false;
protected boolean hasComment = false;
protected boolean endOfComment = false;
public Lexer(String input){
this(input, true);
@@ -1058,4 +1060,9 @@ public class Lexer {
pos = text.length();
this.token = Token.EOF;
}
public boolean isEndOfComment() {
return endOfComment;
}
}
@@ -184,7 +184,10 @@ public class SQLParser {
} else if (lexer.token() == Token.USER) {
alias = lexer.stringVal();
lexer.nextToken();
}
} else if (lexer.token() == Token.END) {
alias = lexer.stringVal();
lexer.nextToken();
}
switch (lexer.token()) {
case KEY: