-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
修复mongodb不能执行长sql的问题 #1556
修复mongodb不能执行长sql的问题 #1556
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1556 +/- ##
==========================================
- Coverage 76.84% 76.79% -0.06%
==========================================
Files 91 91
Lines 14309 14320 +11
==========================================
+ Hits 10996 10997 +1
- Misses 3313 3323 +10
Continue to review full report at Codecov.
|
sql/engines/mongo.py
Outdated
else: | ||
cmd = "{mongo} --quiet -u {user} -p '{password}' {host}:{port}/{auth_db} <<\\EOF\nrs.slaveOk();{sql}\nEOF".format( | ||
mongo=mongo, user=self.user, password=self.password, host=self.host, port=self.port, db_name=db_name, sql=sql, auth_db=auth_db) | ||
logger.debug(cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码扫描说这个有可能把密码打印出来, 不过应该还好哈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@fancy-lee 已经改了,你看看行吗。如果有不合理的地方,麻烦帮忙指出或修改 |
目测没有问题 |
@czxin788 这里又引出了来个新的bug,也可能是后面加执行影响行数的代码没有测试到,就是用load执行完了,返回结果默认会加一个true |
问题详情见:
fix: #1552