{"id":225530,"date":"2024-03-06T08:00:00","date_gmt":"2024-03-06T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/tidb-compatibility\/"},"modified":"2025-08-11T16:23:00","modified_gmt":"2025-08-11T16:23:00","slug":"tidb-compatibility","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/tidb-compatibility\/","title":{"rendered":"TiDB Compatibility"},"content":{"rendered":"<p>TiDB is a high-performance database that is compatible with the MySQL protocol. Since MySQL has deprecated the SQL_CALC_FOUND_ROWS function, TiDB also has no intention of offering the SQL_CALC_FOUND_ROWS function. This leads to an error in WordPress when using TiDB, indicating that SQL_CALC_FOUND_ROWS is not supported, and submissions cannot be displayed correctly.<\/p>\n<p>WordPress is also currently working on this issue, but it seems that more time is needed. #47280 Remove usage of deprecated MySQL SQL_CALC_FOUND_ROWS from WP_Query<\/p>\n<p>This plugin solves the issue of TiDB not providing the SQL_CALC_FOUND_ROWS function. Once this plugin is activated, parts of WP_Query that use SQL_CALC_FOUND_ROWS will be replaced with the COUNT(*) function.<\/p>\n<p>This plugin is entirely based on the method mentioned by @akramipro in the article, and this solution works perfectly and addresses the issue. I\u2019ve turned this method into a plugin so that those using TiDB can easily resolve this problem. Many thanks to @akramipro for the excellent work, and I hope the official WordPress team can address this issue sooner.<\/p>\n<h3>Contribute<\/h3>\n<p>Contribute to this plugin on <a href=\"https:\/\/github.com\/pingcap\/wordpress-tidb-plugin\" rel=\"nofollow ugc\">github.com\/pingcap\/wordpress-tidb-plugin<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This plugin is an official tool provided by PingCAP, designed to solve compatibility issues between TiDB and WordPress.<\/p>\n","protected":false},"author":65,"featured_media":357455,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"TiDB Compatibility - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"This plugin is an official tool provided by PingCAP, designed to solve compatibility issues between TiDB and WordPress."},"footnotes":""},"categories":[1],"tags":[36,1362,53635],"class_list":["post-225530","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-database","tag-sql","tag-tidb"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/225530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=225530"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/225530\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/357455"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=225530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=225530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=225530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}