version:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.19</version>
</dependency>
code:SQLStatementParser parser = SQLParserUtils.createSQLStatementParser("begin;", "mysql");; List<SQLStatement> sqlStatements = parser.parseStatementList();
exception:at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:287) at com.alibaba.druid.sql.parser.SQLParser.accept(SQLParser.java:295) at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseBlock(MySqlStatementParser.java:1301) at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseStatementListDialect(MySqlStatementParser.java:1128) at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:517) at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:171)
1条答案
按热度按时间l7wslrjt1#
"begin;" 这个是sql语句么,我用一个正常的sql语句不拨错