The data retrieved by SQL_CALC_FOUND_ROWS FOUND_ROWS() is incorrect

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: SQL_CALC_FOUND_ROWS FOUND_ROWS() 获取的数据不对

| username: Hacker_5YEF49J7

【TiDB Usage Environment】Production Environment
【TiDB Version】5.7.25-TiDB-v5.4.0
select SQL_CALC_FOUND_ROWS FOUND_ROWS() sum_cnt, t.Bill_Hdr_Id from bill_transport t where t.Operator_Id=‘314501865119404’;

sum_cnt is only 15
but it should be 400,000

| username: tidb菜鸟一只 | Original post link

tidb does not support this syntax. It will not report an error after enabling the tidb_enable_noop_functions variable, but the result will not be correct.