#1263·Yearning

[问题] 如果 sql 最后有注释 --,那么设置的查询总条数限制就失效了

作者: xiaoxiaoadmin创建于 2026年4月9日更新于 2026年4月28日

Description of the problem If there is a comment -- at the end of the SQL statement, the set limit for the total number of rows will be invalid. Reproducibility The steps to reproduce this behavior are as follows:

  1. Set the total number of rows to 1000.
  2. Find a table A with more than 1000 rows and execute the query select * from A --.
  3. All data will be queried, and if the export permission is granted, all data can be exported. Expected result Even if there is a -- at the end of the SQL statement, the platform-merged limit should not be commented out. In fact, executing select * from A -- where has the same effect.

内容来源: cookieY/Yearning