mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #3245 from ufo001sos002/master
issue #3240 visit(MySqlChecksumTableStatement x) 方法中 中文逗号问题
This commit is contained in:
@@ -87,6 +87,7 @@ import com.alibaba.druid.sql.ast.statement.SQLCreateProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLFetchStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLIfStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLLoopStatement;
|
||||
@@ -5542,4 +5543,33 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* FETCH [[NEXT] FROM] cursor_name INTO var_name [, var_name] ...
|
||||
*/
|
||||
public SQLFetchStatement parseFetch() {
|
||||
accept(Token.FETCH);
|
||||
|
||||
if (lexer.identifierEquals("NEXT")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.FROM);
|
||||
} else if (Token.FROM == lexer.token()) {
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
SQLFetchStatement stmt = new SQLFetchStatement();
|
||||
stmt.setCursorName(this.exprParser.name());
|
||||
|
||||
accept(Token.INTO);
|
||||
for (;;) {
|
||||
stmt.getInto().add(this.exprParser.name());
|
||||
if (lexer.token() == Token.COMMA) {
|
||||
lexer.nextToken();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return stmt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4412,7 +4412,7 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
@Override
|
||||
public boolean visit(MySqlChecksumTableStatement x) {
|
||||
print0(ucase ? "CHECKSUM TABLE " : "checksum table ");
|
||||
printAndAccept(x.getTables(), ",");
|
||||
printAndAccept(x.getTables(), ", ");
|
||||
return false;
|
||||
}
|
||||
} //
|
||||
|
||||
Reference in New Issue
Block a user