improve sqlparser

This commit is contained in:
Yako
2014-11-07 11:24:34 +08:00
parent bd2ccbc02f
commit a70258ac23
2 changed files with 46 additions and 4 deletions
@@ -357,9 +357,11 @@ public class MySqlLexer extends Lexer {
token = LITERAL_CHARS;
break;
} else {
initBuff(bufPos);
arraycopy(mark + 1, buf, 0, bufPos);
hasSpecial = true;
if (!hasSpecial) {
initBuff(bufPos);
arraycopy(mark + 1, buf, 0, bufPos);
hasSpecial = true;
}
putChar('\'');
continue;
}
@@ -378,7 +380,6 @@ public class MySqlLexer extends Lexer {
}
if (!hasSpecial) {
stringVal = "";
stringVal = subString(mark + 1, bufPos);
} else {
stringVal = new String(buf, 0, bufPos);