-
Notifications
You must be signed in to change notification settings - Fork 32
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
发现这里应该是有问题的,这里判断sql语句有?就标识为参数,但是有一种情况,假如插入的值本身就有?的情况下,就会出现问题 #63
Comments
通用问题还是直接提到 TDengine 仓库可以比较快的有人响应 |
这个并不是通用问题,这个是驱动问题 |
不,这只是其中一部分实现,它后续还有处理的,不单单是用strings.Count(query, "?")来简单判断参数个数的,这样必然会出现bug |
@wenj91 欢迎提交pr |
https://github.com/wenj91/taos-driver/blob/320f402a7c3e3bf52028c88ba0d0274d3f3d4cdd/util_sql.go#L123-L235 |
我看着这部分实现,情况考虑的还是不够,我觉得这个应该由C接口来负责语法解析并返回参数数量 |
如果能由C接口返回更好,因为MySQL就这么做的 |
driver-go/taosSql/connection.go
Line 42 in 41787fd
例如:
create table if not exists MD5_fa0f7ac06608830346a51c03de15eaf2 using http_client_requests_seconds_sum tags("339ac2bfa5fd9d673a96f112ea0e738d","false","xxx","xx.com","xxxx","dev","127.0.0.1","xx-service","GET","APP","xxx","200","xxx","xxx","/uu/get?corpid={1}&corpsecret={2}")
这种情况是不是就会出现问题了
The text was updated successfully, but these errors were encountered: