TiDB 8.5.4 Release Notes
Release date: November 27, 2025
TiDB version: 8.5.4
Quick access: Quick start | Production deployment
Features
Support redistributing data of a specific table (experimental) #63260 @bufferflies
PD automatically schedules data to be distributed as evenly as possible across all TiKV nodes in a cluster. However, this automatic scheduling focuses on the cluster as a whole. In some cases, even if the cluster-wide data distribution is balanced, the data of a specific table might still be unevenly distributed across TiKV nodes.
Starting from v8.5.4, you can use the
SHOW TABLE DISTRIBUTIONstatement to check how the data of a specific table is distributed across all TiKV nodes. If the data distribution is unbalanced, you can use theDISTRIBUTE TABLEstatement to redistribute the table's data (experimental) to improve load balancing.Note that redistributing the data of a specific table is a one-time task with a timeout limit. If the distribution task is not completed before the timeout, it will automatically exit.
For more information, see documentation.
Support
ANALYZEembedded in DDL statements #57948 @terry1purcell @AilinKidThis feature applies to the following types of DDL statements:
- DDL statements that create new indexes:
ADD INDEX - DDL statements that reorganize existing indexes:
MODIFY COLUMNandCHANGE COLUMN
When this feature is enabled, TiDB automatically runs an
ANALYZE(statistics collection) operation before the new or reorganized index becomes visible to users. This prevents inaccurate optimizer estimates and potential plan changes caused by temporarily unavailable statistics after index creation or reorganization.For more information, see documentation.
- DDL statements that create new indexes:
Support creating global indexes on non-unique columns of partitioned tables #58650 @Defined2014 @mjonss
Starting from v8.3.0, you can create global indexes on unique columns of partitioned tables in TiDB to improve query performance. However, creating global indexes on non-unique columns was not supported. Starting from v8.5.4, TiDB removes this restriction, enabling you to create global indexes on non-unique columns of partitioned tables, which enhances the usability of global indexes.
For more information, see documentation.
Support gracefully shutting down TiFlash #10266 @gengliqi
When shutting down a TiFlash server, TiFlash now lets currently running MPP tasks continue for a configurable timeout duration, while rejecting new MPP task requests. The default timeout duration is 600 seconds, and you can adjust it using the
flash.graceful_wait_shutdown_timeoutconfiguration item.- If all running MPP tasks finish before the timeout duration expires, TiFlash shuts down immediately.
- If there are still unfinished MPP tasks when the timeout duration expires, TiFlash shuts down forcibly.
For more information, see documentation.
Introduce a new TiCDC architecture option for improved performance, scalability, and stability #442 @CharlesCheung96
This new architecture redesigns TiCDC core components and optimizes its data processing workflows, while maintaining compatibility with the configuration, usage, and APIs of the classic TiCDC architecture.
When configured to use this new architecture, TiCDC achieves near-linear scalability and can replicate millions of tables with lower resource consumption. It also reduces changefeed latency and delivers more stable performance in scenarios with high write workloads, frequent DDL operations, and cluster scaling. Note that the new architecture currently has some initial limitations.
To use the new architecture, set the TiCDC configuration item
newarchtotrue.For more information, see documentation.
Compatibility changes
System variables
Change the default value of the
tidb_mpp_store_fail_ttlsystem variable from60sto0s. This means TiDB no longer needs to wait before sending queries to newly started TiFlash nodes, as delays are no longer necessary to prevent query failures. #61826 @gengliqiStarting from v8.5.4, the
tidb_replica_readsystem variable only takes effect on read-only SQL statements. This change improves data read safety and reduces overlaps with other features. #62856 @you06Add the following system variables:
tidb_opt_enable_no_decorrelate_in_select: controls whether to decorrelate subqueries in theSELECTlist. The default value isOFF. #51116 @terry1purcelltidb_opt_enable_semi_join_rewrite: controls whether to rewriteEXISTSsubqueries. The default value isOFF. #44850 @terry1purcelltidb_stats_update_during_ddl: controls whether to enable the embedded Analyze for DDL. The default value isOFF. #57948 @terry1purcell @AilinKid
Configuration parameters
Deprecate the following TiKV configuration items and replace them with the new
gc.auto-compactionconfiguration group, which controls automatic compaction behavior. #18727 @v01dstar- Deprecated configuration items:
region-compact-check-interval,region-compact-check-step,region-compact-min-tombstones,region-compact-tombstones-percent,region-compact-min-redundant-rows, andregion-compact-redundant-rows-percent. - New configuration items:
gc.auto-compaction.check-interval,gc.auto-compaction.tombstone-num-threshold,gc.auto-compaction.tombstone-percent-threshold,gc.auto-compaction.redundant-rows-threshold,gc.auto-compaction.redundant-rows-percent-threshold, andgc.auto-compaction.bottommost-level-force.
- Deprecated configuration items:
Add a TiFlash configuration item
flash.graceful_wait_shutdown_timeout, which controls the maximum wait time when shutting down a TiFlash server. The default value is600seconds. During this period, TiFlash continues running unfinished MPP tasks but does not accept new ones. If all running MPP tasks finish before this timeout, TiFlash shuts down immediately; otherwise, it is forcibly shut down after the wait time expires. #10266 @gengliqi
MySQL compatibility
Starting from v8.5.4, TiDB aligns its behavior with MySQL when inserting data into a DECIMAL column: if the number of decimal places exceeds the column's defined scale, TiDB automatically truncates the extra digits and inserts the truncated data successfully, regardless of how many extra decimal places there are. In earlier TiDB versions, if the number of decimal places in the inserted DECIMAL value exceeded 72, the insertion fails and returns an error. For more information, see Connect to TiDB using JDBC.
Improvements
TiDB
- Support applying the
semi_join_rewritehint to Semi Joins inINsubqueries #58829 @qw4990 - Optimize the estimation strategy when the
tidb_opt_ordering_index_selectivity_ratiosystem variable takes effect #62817 @terry1purcell - Adjust the optimizer selection logic to make newly created indexes more likely to be chosen in certain scenarios #57948 @terry1purcell
- Optimize the query estimation logic for columns with a small number of distinct values (NDV) #61792 @terry1purcell
- Optimize the estimation strategy for Index Join queries that include
LIMIT OFFSET#45077 @qw4990 - Optimize the out-of-range estimation strategy when statistics are not collected in time #58068 @terry1purcell
- Add the
backoffmetric to the Performance Overview > SQL Execute Time Overview panel in Grafana to facilitate debugging #61441 @dbsid - Add statement ID information to the audit log plugin #63525 @YangKeao
- Support applying the
TiKV
- Change the log level of certain automatically recoverable errors in the BR module from
ERRORtoWARNto reduce unnecessary alerts #18493 @YuJuncen - Change the log level of certain TiKV errors from
ERRORtoWARNto reduce unnecessary alerts #18745 @exit-code-1 - Split the GC check process in the Raft module into two phases to improve the efficiency of garbage collection for redundant MVCC versions in Regions #18695 @v01dstar
- Calculate MVCC redundancy based on GC safe points and RocksDB statistics to improve the efficiency and accuracy of compaction #18697 @v01dstar
- Change the GC handling logic for Region MVCC to be executed by GC worker threads, unifying the overall GC processing logic #18727 @v01dstar
- Optimize the calculation method of the default gRPC thread pool size by making it dynamically calculated based on total CPU quota instead of a fixed value, avoiding performance bottlenecks caused by insufficient gRPC threads #18613 @LykxSassinator
- Optimize the tail latency of async snapshot and write operations in environments with a large number of SST files #18743 @Connor1996
- Change the log level of certain automatically recoverable errors in the BR module from
PD
- Reduce unnecessary error logs #9370 @bufferflies
- Upgrade the Golang version from 1.23.0 to 1.23.12 and update related dependencies #9788 @JmPotato
- Support scattering Regions at the table level to achieve balanced distribution across
scatter-roleandenginedimensions #8986 @bufferflies
TiFlash
- Skip unnecessary data reads to improve
TableScanperformance #9875 @gengliqi - Optimize
TableScanperformance on wide tables with many columns and sparse data (that is, lots ofNULLor empty values) in TiFlash #10361 @JaySon-Huang - Reduce TiFlash CPU overhead caused by adding vector indexes in clusters with many tables #10357 @Lloyd-Pottiger
- Minimize unnecessary log output when processing useless Raft commands to reduce log volume #10467 @JaySon-Huang
- Improve
TableScanperformance on small partitioned tables in TiFlash #10487 @JaySon-Huang
- Skip unnecessary data reads to improve
Tools
TiDB Data Migration (DM)
- Support case-insensitive matching when retrieving the upstream
GTID_MODE#12167 @OliverS929
- Support case-insensitive matching when retrieving the upstream
Bug fixes
TiDB
- Fix the issue that the
use indexhint does not take effect whentidb_isolation_read_enginesis set totiflash#60869 @Lloyd-Pottiger - Fix the issue that
max_execution_timedoes not take effect forSELECT FOR UPDATEstatements #62960 @ekexium - Fix the issue that row count estimates across months or years can be significantly overestimated #50080 @terry1purcell
- Fix the issue that the handling of
Decimaltypes in prepared statements is inconsistent with MySQL #62602 @ChangRui-Ryan - Fix the issue that the short path in the
TRUNCATE()function is incorrectly processed #57608 @xzhangxian1008 - Fix the issue that spilled files might not be fully deleted when the
Out Of Quota For Local Temporary Spaceerror is triggered #63216 @xzhangxian1008 - Fix the issue that queries using regular expressions against
INFORMATION_SCHEMAtables might return incorrect results #62347 @River2000i - Fix the issue that TiDB does not return an error when it fails to get a timestamp from PD #58871 @joechenrh
- Fix the issue that query results differ between the owner TiDB and non-owner TiDB instances during executing
MODIFY COLUMNstatements #60264 @tangenta - Fix the issue that
ADMIN ALTER DDL JOBSstatements display incorrect parameter values after dynamically modifying parameters #63201 @fzzf678 - Fix the issue that the GC safe point does not advance when adding an index within a transaction #62424 @wjhuang2016
- Fix the issue that ingesting excessively large SST files into L0 triggers flow control #63466 @CbcWestwolf
- Fix the issue that global sorting is blocked when the CPU-to-memory ratio is 1:2 #60951 @wjhuang2016
- Fix the issue that pending Distributed eXecution Framework (DXF) tasks cannot be canceled when the number of tasks exceeds 16 #63896 @D3Hunter
- Fix the issue that after the DXF task is canceled, other tasks fail to exit #63927 @D3Hunter
- Fix the issue that enabling the
Applyoperator concurrency (tidb_enable_parallel_apply = on) causes plan generation failure due to a missing clone implementation #59863 @hawkingrei - Fix the issue that using the
ATAN2function might produce incorrect results #60093 @guo-shaoge - Fix the issue that
select 1 from dualcannot use the instance-level plan cache #63075 @time-and-fate - Fix the issue that changing the join order might cause the planner to fail #61715 @hawkingrei
- Fix the issue that using the
set_varhint with bindings prevents variables from being restored to their original settings #59822 @wddevries - Fix the issue that setting
ONLY_FULL_GROUP_BYto a negative value causes validation failure #62617 @AilinKid - Fix the issue that the
ONLY_FULL_GROUP_BYcheck is case-insensitive #62672 @AilinKid - Fix the issue that the DP join order algorithm might generate an incorrect plan #63353 @winoros
- Fix the issue that rewriting an outer join to an inner join might produce incorrect results #61327 @hawkingrei
- Fix the issue that executing certain queries might cause an internal panic #58600 @Defined2014
- Fix the issue that the global index might read incorrect data during certain
ALTER PARTITIONoperations #64084 @mjonss - Fix the issue that the global index might return incorrect results in some cases #61083 @Defined2014
- Fix the issue that
character_set_resultstruncates incorrect characters instead of replacing them #61085 @xhebox - Fix the issue that running
ADD COLUMNandUPDATEstatements concurrently might cause errors #60047 @L-maple - Fix the issue that Merge Join might omit filter conditions when calculating costs #62917 @qw4990
- Fix the issue that the
PD
- Fix the issue that the PD Client retry strategy is not initialized correctly #9013 @rleungx
- Fix the issue that the TSO HTTP API
/configand/membersreturn incorrect results #9797 @lhy1024 - Fix the incorrect error handling logic of TSO Follower Proxy #9188 @Tema
- Fix the issue that splitting buckets still works even after bucket reporting is disabled #9726 @bufferflies
- Fix the issue that the Resource Manager incorrectly allocates tokens, causing queries to be stuck #9455 @JmPotato
- Fix the issue that Placement Rules do not take effect after PD leader switches #9602 @okJiang
- Fix the issue that PD might fail to parse large numeric values in scientific notation, which consequently causes some TTL-related configurations to not take effect #9343 @lhy1024
TiFlash
- Fix the issue that queries might fail when queried columns contain a large number of
NULLvalues #10340 @Lloyd-Pottiger - Fix the issue that TiFlash generates inflated statistics for RU consumption #10380 @JinheLin
- Fix the issue that TiFlash might encounter OOM when slow queries exist under the disaggregated storage and compute architecture #10278 @JaySon-Huang
- Fix the issue that TiFlash might retry indefinitely when a network partition occurs between TiFlash and S3 under the disaggregated storage and compute architecture #10424 @JaySon-Huang
- Fix the issue that the
FLOOR()andCEIL()functions might return incorrect results when their parameters are of theDECIMALtype #10365 @ChangRui-Ryan
- Fix the issue that queries might fail when queried columns contain a large number of
Tools
Backup & Restore (BR)
- Fix the issue that zstd compression in log backup does not take effect, causing the output to remain uncompressed #18836 @3pointer
- Fix the issue that the flush operation occasionally becomes slow when backing up data to Azure Blob Storage #18410 @YuJuncen
- Fix the issue that
log truncatemight occur when file deletion fails #63358 @YuJuncen - Fix the issue that setting
--checksumtofalseduring backup might cause thecountcolumn in themysql.stats_metatable to become0after restore #60978 @Leavrth - Reduce the possibility of BR failing to restore data from S3-compatible storage services when the bandwidth limits on these services are enabled #18846 @kennytm
- Fix the issue that
log backup observermight lose the observation on a Region, causing the log backup progress to fail to advance #18243 @Leavrth - Fix the issue that causes
restore pointcreation to fail when backed-up tables include certain special schemas #63663 @RidRisR
TiCDC
- Fix a panic that could occur when configuring a column-type partition dispatcher that includes virtual columns #12241 @wk989898
- Fix a panic that could occur when closing the DDL puller #12244 @wk989898
- Support filtering unsupported DDL types through the
ignore-txn-start-tsparameter in thefilterconfiguration #12286 @asddongmen - Fix the issue that changefeed tasks might get stuck when using Azure Blob Storage as the downstream #12277 @zurakutsia
- Fix the issue that
DROP FOREIGN KEYDDL is not replicated to the downstream #12328 @3AceShowHand - Fix the issue that TiCDC might panic when encountering rollback and prewrite entries during Region subscription #19048 @3AceShowHand
- Fix the issue that assertion errors in TiKV might cause TiCDC to panic #18498 @tharanga