mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Fix bug: Parse "national" keywords in DataType #3561
This commit is contained in:
@@ -2716,6 +2716,17 @@ public class SQLExprParser extends SQLParser {
|
||||
}
|
||||
}
|
||||
|
||||
if (typeNameHashCode == FnvHash.Constants.NATIONAL) {
|
||||
if (lexer.token == Token.IDENTIFIER) {
|
||||
String nationalName = lexer.stringVal();
|
||||
if ("varchar".equalsIgnoreCase(nationalName) || "char"
|
||||
.equalsIgnoreCase(nationalName)) {
|
||||
typeName = (" n" + lexer.stringVal().toLowerCase());
|
||||
lexer.nextToken();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isCharType(typeName)) {
|
||||
SQLCharacterDataType charType = new SQLCharacterDataType(typeName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user