feat:upgrade jsqlparser 4.9 and add timeout

This commit is contained in:
zhaoyingchao
2025-02-27 17:30:48 +08:00
parent 56cfddea60
commit acb9cef64e
2 changed files with 2 additions and 2 deletions

View File

@@ -225,7 +225,7 @@ public class SqlSelectHelper {
public static Select getSelect(String sql) {
Statement statement = null;
try {
statement = CCJSqlParserUtil.parse(sql);
statement = CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(20000));
} catch (JSQLParserException e) {
log.error("parse error, sql:{}", sql, e);
throw new RuntimeException(e);