druid MySqlStatementParser does not support begin statement

67up9zun  于 2021-11-27  发布在  Java
关注(0)|答案(1)|浏览(306)

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)

l7wslrjt

l7wslrjt1#

"begin;" 这个是sql语句么,我用一个正常的sql语句不拨错

相关问题