Skip to content

Commit

Permalink
替换掉mongo使用load命令执行返回的true
Browse files Browse the repository at this point in the history
  • Loading branch information
woshiyanghai committed Aug 16, 2023
1 parent b9f3247 commit 8de0349
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sql/engines/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def exec_cmd(self, sql, db_name=None, slave_ok=""):
_re_msg.append(_line)

msg = "\n".join(_re_msg)
msg = msg.replace('true\n','') #替换掉当语句长度超过4000使用load命令执行js 后多余返回的true
except Exception as e:
logger.warning(f"mongo语句执行报错,语句:{sql}{e}错误信息{traceback.format_exc()}")
finally:
Expand Down

0 comments on commit 8de0349

Please sign in to comment.