TiDB 8.5.6 Release Notes
Release date: April 14, 2026
TiDB version: 8.5.6
Quick access: Quick start | Production deployment
Features
Performance
Foreign key checks now support shared locks #66154 @you06
In pessimistic transactions, when you run
INSERTorUPDATEon a child table with foreign key constraints, foreign key checks lock the corresponding parent table rows with exclusive locks by default. In high-concurrency write scenarios on the child table, if many transactions access the same parent table rows, severe lock contention can occur.Starting from v8.5.6, you can set the
tidb_foreign_key_check_in_shared_locksystem variable toONto let foreign key checks use shared locks on the parent table, thereby reducing lock contention and improving concurrent write performance on the child table.For more information, see documentation.
Stability
The feature of setting the maximum limit on resource usage for background tasks of resource control becomes generally available (GA) #56019 @glorv
TiDB resource control can identify and lower the priority of background tasks. In certain scenarios, you might want to limit the resource consumption of background tasks, even when resources are available. Starting from v8.4.0, you can use the
UTILIZATION_LIMITparameter to set the maximum percentage of resources that background tasks can consume. Each node will keep the resource usage of all background tasks below this percentage. This feature enables precise control over resource consumption for background tasks, further enhancing cluster stability.In v8.5.6, this feature is generally available (GA).
For more information, see documentation.
Observability
Support defining multi-dimensional, fine-grained trigger rules for slow query logs #62959, #64010 @zimulala
Before v8.5.6, the main way to identify slow queries in TiDB is to set the
tidb_slow_log_thresholdsystem variable. This mechanism provides only coarse-grained control over slow query log triggering because it applies globally at the instance level and does not support fine-grained control at the session or SQL level. In addition, it supports only one trigger condition, execution time (Query_time), which cannot meet the need to capture slow query logs more precisely in complex scenarios.Starting from v8.5.6, TiDB enhances slow query log control. You can use the
tidb_slow_log_rulessystem variable to define multi-dimensional slow query log output rules at the instance, session, and SQL levels, based on conditions such asQuery_time,Digest,Mem_max, andKV_total. You can usetidb_slow_log_max_per_secto limit the number of log entries written per second, and use theWRITE_SLOW_LOGhint to force slow query logging for specific SQL statements. This enables more flexible and fine-grained control over slow query logs.For more information, see documentation.
The Top SQL page in TiDB Dashboard now supports collecting and displaying TiKV network traffic and logical I/O metrics #62916 @yibin87
In earlier versions, TiDB Dashboard identified Top SQL queries based only on CPU-related metrics, making it difficult to identify performance bottlenecks related to network or storage access in complex scenarios.
Starting from v8.5.6, you can enable TiKV Network IO collection (multi-dimensional) in the Top SQL settings to view metrics such as
Network BytesandLogical IO Bytesfor TiKV nodes. You can also analyze these metrics across multiple dimensions, includingBy Query,By Table,By DB, andBy Region, helping you identify resource hotspots more comprehensively.For more information, see documentation.
SQL
Support column-level privilege management #61706 @CbcWestwolf @fzzf678
Before v8.5.6, TiDB privilege control covers the database and table levels and does not support granting or revoking privileges on specific columns, unlike MySQL. As a result, you cannot restrict users to access only a subset of sensitive columns in a table.
Starting from v8.5.6, TiDB supports column-level privilege management. You can use the
GRANTandREVOKEstatements to manage privileges on specific columns. TiDB performs privilege checks based on column-level privileges during query processing and execution plan construction, enabling finer-grained access control and better support for sensitive data isolation and the principle of least privilege.For more information, see documentation.
Support using table aliases in the
FOR UPDATE OFclause #63035 @cryo-zdBefore v8.5.6, when a
SELECT ... FOR UPDATE OF <table>statement references a table alias in the locking clause, TiDB might fail to resolve the alias correctly and return thetable not existserror even if the alias is valid.Starting from v8.5.6, TiDB supports using table aliases in the
FOR UPDATE OFclause. TiDB can now correctly resolve locking targets from theFROMclause, including aliased tables, ensuring that row locks take effect as expected. This improves MySQL compatibility and makesSELECT ... FOR UPDATE OFstatements more stable and reliable in queries that use table aliases.For more information, see documentation.
DB operations
Support specifying the maximum number of nodes for Distributed eXecution Framework (DXF) tasks #58944 @tangenta @D3Hunter
Before v8.5.6, TiDB does not provide a way to limit the number of nodes used by a distributed execution task. When you want to control resource usage for DXF, TiDB does not provide a dedicated option to constrain the maximum node count.
Starting from v8.5.6, TiDB introduces the
tidb_max_dist_task_nodessystem variable to specify the maximum number of TiDB nodes used by a DXF task, enabling better resource control and workload-based tuning.For more information, see documentation.
Data Migration
Compatibility changes
For TiDB clusters newly deployed in v8.5.5 (that is, not upgraded from versions earlier than v8.5.4), you can smoothly upgrade to v8.5.6. Most changes in v8.5.6 are safe for routine upgrades, but this release also includes several MySQL compatibility changes, system variable updates, configuration parameter updates, and deprecated features. Before upgrading, make sure to carefully review this section.
MySQL compatibility
- Starting from v8.5.6, TiDB supports a MySQL-compatible column-level privilege management mechanism. You can grant or revoke
SELECT,INSERT,UPDATE, andREFERENCESprivileges for specific columns at the table level. For more information, see Column-Level Privilege Management. - Starting from v8.5.6, TiDB supports using table aliases in the
FOR UPDATE OFclause. To maintain backward compatibility, you can still reference the base table name when an alias is defined, but this triggers a warning recommending the use of an explicit alias. For more information, seeSELECT. - Starting from v8.5.6, Dumpling supports exporting data from MySQL 8.4 by adopting the updated MySQL binary log terminology. #53082 @dveeden
- Starting from v8.5.6, TiDB Data Migration (DM) supports MySQL 8.4 as an upstream data source by adapting to the new terminology and version detection logic introduced in this version. #11020 @dveeden
System variables
Configuration parameters
Deprecated features
- Starting from v8.5.6, statistics Version 1 (
tidb_analyze_version = 1) is deprecated and will be removed in a future release. It is recommended that you use statistics Version 2 (tidb_analyze_version = 2) and migrate existing objects that use statistics Version 1 to Version 2 for more accurate statistics. - Starting from v8.5.6, the TiDB Lightning Web Interface is deprecated and will be removed in v8.5.7. The web UI build has been broken since v8.4.0. Use the CLI or the
IMPORT INTOstatement instead. If this affects your workflow, comment on #67697.
Improvements
TiDB
- Improve plan selection for queries with
INpredicates on index prefix columns. TiDB can now use merge sort to preserve order forORDER BY ... LIMITqueries, reducing unnecessary scans and improving performance. #63449 #34882 @time-and-fate - Improve slow query log readability by outputting non-printable prepared statement arguments as hexadecimal values #65383 @dveeden
- Add
cluster_idtomysql.tidb, enabling external tools to determine whether two TiDB instances belong to the same cluster #59476 @YangKeao
- Improve plan selection for queries with
TiKV
- Introduce a load-based compaction mechanism, which detects MVCC read overhead and prioritizes compaction for Regions with higher read cost to improve query performance #19133 @mittalrishabh
- Optimize the stale range cleanup logic during cluster scale-out and scale-in operations by deleting stale keys directly instead of cleaning them up through SST file ingestion, thereby reducing the impact on online request latency #18042 @LykxSassinator
- Support collecting TiKV network traffic and logical I/O metrics for Top SQL, which helps you diagnose SQL performance issues more accurately #18815 @yibin87
PD
- Return
404instead of200when deleting a non-existent label #10089 @lhy1024 - Reduce unnecessary error logs #9370 @bufferflies
- Return
Tools
TiDB Data Migration (DM)
- Add foreign key causal dependency support in DM syncer to ensure parent-to-child execution order of row changes in multi-worker scenarios #12350 @OliverS929
Bug fixes
TiDB
- Fix the issue that upgrading from
release-8.5-20250606-v8.5.2to the upstreamrelease-8.5might skip the PITR metadata upgrade and cause PITR operations to fail #66994 @fzzf678 - Fix the issue that after executing
EXCHANGE PARTITION, non-unique global indexes or nullable unique global indexes on non-clustered partitioned tables might become inconsistent and return incomplete results #65289 @mjonss - Fix the issue that
KILL QUERYmight incorrectly terminate idle connections #65447 @gengliqi - Fix the issue that the value of
tidb_service_scopeis not converted to lowercase when set #66749 @D3Hunter - Fix the issue that affinity tables are not displayed after TiDB restarts #66284 @lcwangchao
- Fix the issue that the Stats Healthy metric displays inaccurately because system tables are not excluded from the stats cache #64080 @0xPoe
- Fix the issue that statistics might not be updated due to abnormal updates of
modify_count#65426 @0xPoe - Fix the issue that a pessimistic transaction might be unexpectedly rolled back due to a keep-alive mechanism failure when its first statement acquires locks in fair locking mode #66571 @MyonKeminta
- Fix the issue that upgrading from
TiKV
- Fix the memory leak issue in crossbeam skiplist #19285 @ekexium
- Fix the issue that global indexes on non-unique columns of partitioned tables might become inconsistent and return incorrect results in some cases #19262 @mjonss
- Fix the issue that stalled coprocessor snapshot retrieval might occupy unified read pool workers until request deadlines expire, delaying other read requests #18491 @AndreMouche
- Fix the issue that follower reads might remain blocked on disk-full TiKV nodes by rejecting read-index requests on disk-full followers #19201 @glorv
- Fix the issue that resolved-ts task backlogs might cause OOM when the resolved-ts worker is busy #18359 @overvenus
- Fix the issue that long-tail follower read latency might occur during leader transfer by retrying read-index requests earlier and adding a dedicated retry interval setting #18417 @gengliqi
- Fix the rare data inconsistency issue when retrying a prewrite request in pessimistic transactions #11187 @wk989898
PD
- Fix a panic issue that might occur when executing
DISTRIBUTE TABLEin scenarios with a large number of Merge Region operators #10293 @bufferflies - Fix the issue that configuring Store Limit might not take effect immediately #10108 @okJiang
- Fix a panic issue that might occur when executing
TiFlash
- Fix a potential data inconsistency issue between TiFlash and TiKV after executing a DDL statement to remove the
NOT NULLconstraint of a column #10680 @JaySon-Huang - Fix the issue that the Raft throughput metric in the Grafana dashboard might display an abnormally large value #10701 @CalvinNeo
- Fix the issue that the Join result might be incorrect when the Runtime Filter is enabled and the Join Keys have inconsistent data types #10699 @ChangRui-Ryan
- Fix a potential data inconsistency issue between TiFlash and TiKV after executing a DDL statement to remove the
Tools
Backup & Restore (BR)
- Fix the issue that
flush_tsmight be0in log backup #19406 @YuJuncen - Fix the issue that BR might fail during multipart uploads when accessing Google Cloud Storage via Amazon S3-compatible APIs with S3-style credentials, due to a missing Content-Length header #19352 @Leavrth
- Fix the issue that the BR
restore pointmight remain stuck in thewaiting for schema info finishes reloadingstate for a long time and then fail due to timeout after 15 minutes #66110 @kennytm - Fix the issue that BR cannot correctly pre-split Regions when restoring tables with the
SHARD_ROW_ID_BITS,PRE_SPLIT_REGIONS, andmerge_optionattributes #65060 @JoyC-dev
- Fix the issue that
TiCDC
- Fix the issue that changefeeds might repeatedly create invalid dispatchers after the server restarts #4452 @wlwilliamx
- Fix the issue that TiCDC fails to replicate table renaming operations correctly when the upstream TiDB version is v8.1.x or earlier #4392 @lidezhu
- Fix the issue that TiKV might crash during data scanning when TiCDC is enabled #19404 @wk989898
- Support Azure Managed Identity authentication for Azure Blob Storage and fix the issue that uploads to cloud storage might get stuck #3093 @wlwilliamx
TiDB Data Migration (DM)
- Fix the issue that DM does not advance the global checkpoint position after an upstream binlog file rotation #12339 @OliverS929
- Fix the issue that, when processing updates on tables with foreign key constraints in safe mode, DM might still incorrectly trigger foreign key cascades and cause unintended data deletion even if the primary key or unique key is not modified #12350 @OliverS929
- Fix the issue that DM validator incorrectly returns validation errors when processing
UNSIGNEDcolumns #12178 @OliverS929