-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySql解析CreateProcedure出错 #903
Comments
大神指点下Mysql要怎么解析procedure和trigger。急着要解决这个问题啊~tks |
用在什么场景需要支持create procedure? |
我们工作用druid来做一个解析sql的项目。现在其他的sql语句解析都做好了,就剩下create procedure 和 create trigger 解析不了。@wenshao |
有什么办法解析Mysql的create procedure 和 create trigger吗?@wenshao |
@xhzq 我已经增加对mysql peocedure的支持了 |
大佬 postgresql的支持一下呗 |
sqlserver也同样报错啊,不支持下吗? |
发下复现异常的测试sql语句来 |
我看了下源码,发现MySqlStatementParser类里面没有实现parseCreateProcedure方法。而SQLStatementParser类里面parseCreateProcedure则是直接抛出一个异常。
public SQLStatement parseCreateProcedure() {
throw new ParserException("TODO " + lexer.token());
}
所以解析MySql的CreateProcedure每次都报错:
Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: TODO CREATE
at com.alibaba.druid.sql.parser.SQLStatementParser.parseCreateProcedure(SQLStatementParser.java:1302)
at com.test.TestProcedure_0709.main(TestProcedure_0709.java:23)
另外,MySql解析Trigger也会报错。
The text was updated successfully, but these errors were encountered: