You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: [Question] If there is a comment at the end of the sql -- then the limit on the total number of queries set will be invalid.
Describe the problem
If there is a comment at the end of sql -- then the limit on the total number of queries set will be invalid.
Recurrence
Steps to reproduce the behavior:
Set the total number of queries to 1000
Find a table A with more than 1000 entries and execute the query select * form A --
All data will be queried. If export permission is given, all data should be exported.
Desired results
Even if -- is added to the sql at the end, do not comment out the limit for platform splicing.
In fact, executing select * form A -- where has the same effect.
Activity
Issues-translate-bot commentedon Apr 9, 2026
Title: [Question] If there is a comment at the end of the sql -- then the limit on the total number of queries set will be invalid.
Describe the problem
If there is a comment at the end of sql -- then the limit on the total number of queries set will be invalid.
Recurrence
Steps to reproduce the behavior:
Desired results
Even if -- is added to the sql at the end, do not comment out the limit for platform splicing.
In fact, executing select * form A -- where has the same effect.
dosubot commentedon Apr 9, 2026
Hi @xiaoxiaoadmin! I'm Dosu and I’m helping the Yearning team.
这个问题确认存在。根源在于 Yearning 在将 SQL 发送给 RPC 引擎执行前,没有对 SQL 中的注释进行清理,导致 RPC 引擎拼接的
LIMIT子句被--注释掉。执行流程大致是:
SELECT * FROM A --LIMIT 1000,变成SELECT * FROM A -- LIMIT 1000--之后的内容被数据库当作注释,LIMIT失效值得注意的是,Yearning 代码中其实已经有注释剥离的正则逻辑(支持
--单行注释和/* */多行注释),但目前只在GetFingerprint()中用于 SQL 指纹提取和 AI 建议功能 [2],并没有应用在查询执行路径上。可能的修复方向:
GetFingerprint()中的注释剥离逻辑清理 SQLLIMIT前先移除尾部注释LIMIT插入到注释之前/* */块注释理论上也有类似的绕过风险。To reply, just mention @dosu.
Docs are dead. Just use Dosu.