Title: TiDB Compatibility
Author: xuliwen
Published: <strong>March 6, 2024</strong>
Last modified: August 11, 2025

---

Search plugins

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

# TiDB Compatibility

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

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

 * [Details](https://wordpress.org/plugins/tidb-compatibility/#description)
 * [Reviews](https://wordpress.org/plugins/tidb-compatibility/#reviews)
 * [Development](https://wordpress.org/plugins/tidb-compatibility/#developers)

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

## Description

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)

## Reviews

![](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/) May 7, 2025

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

 [ Read all 1 review ](https://wordpress.org/support/plugin/tidb-compatibility/reviews/)

## Contributors & Developers

“TiDB Compatibility” is open source software. The following people have contributed
to this plugin.

Contributors

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

[Translate “TiDB Compatibility” into your language.](https://translate.wordpress.org/projects/wp-plugins/tidb-compatibility)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/tidb-compatibility/),
check out the [SVN repository](https://plugins.svn.wordpress.org/tidb-compatibility/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/tidb-compatibility/)
by [RSS](https://plugins.trac.wordpress.org/log/tidb-compatibility/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.2

 * Update README, tags

#### 1.0.1

 * Update README, tags and compatibility info

## Meta

 *  Version **1.0.2**
 *  Last updated **8 months ago**
 *  Active installations **70+**
 *  WordPress version ** 4.7 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 6.8.1 or higher **
 * Tags
 * [database](https://wordpress.org/plugins/tags/database/)[sql](https://wordpress.org/plugins/tags/sql/)
 *  [Advanced View](https://wordpress.org/plugins/tidb-compatibility/advanced/)

## Ratings

 5 out of 5 stars.

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

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

[See all reviews](https://wordpress.org/support/plugin/tidb-compatibility/reviews/)

## Contributors

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

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/tidb-compatibility/)