Title: TiDB Compatibility
Author: xuliwen
Published: <strong>2024 年 3 月 6 日</strong>
Last modified: 2025 年 8 月 11 日

---

搜索插件

![](https://ps.w.org/tidb-compatibility/assets/icon-256x256.png?rev=3046061)

# TiDB Compatibility

 作者：[xuliwen](https://profiles.wordpress.org/xuliwen/)

[下载](https://downloads.wordpress.org/plugin/tidb-compatibility.1.0.2.zip)

 * [详情](https://cn.wordpress.org/plugins/tidb-compatibility/#description)
 * [评价](https://cn.wordpress.org/plugins/tidb-compatibility/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/tidb-compatibility/#developers)

 [支持](https://wordpress.org/support/plugin/tidb-compatibility/)

## 描述

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.

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

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.

This plugin is entirely based on the method mentioned by @akramipro in the article,
and this solution works perfectly and addresses the issue. I’ve 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.

### Contribute

Contribute to this plugin on [github.com/pingcap/wordpress-tidb-plugin](https://github.com/pingcap/wordpress-tidb-plugin)

## 评价

![](https://secure.gravatar.com/avatar/801609f0c0abe81fae66192822c76c94bfe99eddf8460439edd98c3f53175273?
s=60&d=retro&r=g)

### 󠀁[Must have for TiDB users](https://wordpress.org/support/topic/must-have-for-tidb-users/)󠁿

 [Otto Kekäläinen](https://profiles.wordpress.org/ottok/) 2025 年 5 月 7 日

This plugin is a must-have if you are running TiDB as the database instead of MySQL/
MariaDB.

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/)

## 贡献者及开发者

「TiDB Compatibility」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ xuliwen ](https://profiles.wordpress.org/xuliwen/)
 *   [ it2911 ](https://profiles.wordpress.org/it2911/)

[帮助将「TiDB Compatibility」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/tidb-compatibility)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/tidb-compatibility/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/tidb-compatibility/)，或通过[RSS](https://plugins.trac.wordpress.org/log/tidb-compatibility/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/tidb-compatibility/)。

## 更新日志

#### 1.0.2

 * Update README, tags

#### 1.0.1

 * Update README, tags and compatibility info

## 额外信息

 *  版本 **1.0.2**
 *  最后更新：**10 月前**
 *  活跃安装数量 **70+**
 *  WordPress 版本 ** 4.7 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 6.8.1 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/tidb-compatibility/)
 * 标签
 * [database](https://cn.wordpress.org/plugins/tags/database/)[sql](https://cn.wordpress.org/plugins/tags/sql/)
 *  [高级视图](https://cn.wordpress.org/plugins/tidb-compatibility/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/tidb-compatibility/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/tidb-compatibility/reviews/)

## 贡献者

 *   [ xuliwen ](https://profiles.wordpress.org/xuliwen/)
 *   [ it2911 ](https://profiles.wordpress.org/it2911/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/tidb-compatibility/)