- Docs Home
- About TiDB
- Quick Start
- Develop
- Overview
- Quick Start
- Build a TiDB Cluster in TiDB Cloud (Developer Tier)
- CRUD SQL in TiDB
- Build a Simple CRUD App with TiDB
- Example Applications
- Connect to TiDB
- Design Database Schema
- Write Data
- Read Data
- Transaction
- Optimize
- Troubleshoot
- Reference
- Cloud Native Development Environment
- Third-party Support
- Deploy
- Software and Hardware Requirements
- Environment Configuration Checklist
- Plan Cluster Topology
- Install and Start
- Verify Cluster Status
- Test Cluster Performance
- Migrate
- Overview
- Migration Tools
- Migration Scenarios
- Migrate from Aurora
- Migrate MySQL of Small Datasets
- Migrate MySQL of Large Datasets
- Migrate and Merge MySQL Shards of Small Datasets
- Migrate and Merge MySQL Shards of Large Datasets
- Migrate from CSV Files
- Migrate from SQL Files
- Migrate from One TiDB Cluster to Another TiDB Cluster
- Migrate from TiDB to MySQL-compatible Databases
- Advanced Migration
- Integrate
- Overview
- Integration Scenarios
- Maintain
- Monitor and Alert
- Troubleshoot
- TiDB Troubleshooting Map
- Identify Slow Queries
- Analyze Slow Queries
- SQL Diagnostics
- Identify Expensive Queries Using Top SQL
- Identify Expensive Queries Using Logs
- Statement Summary Tables
- Troubleshoot Hotspot Issues
- Troubleshoot Increased Read and Write Latency
- Save and Restore the On-Site Information of a Cluster
- Troubleshoot Cluster Setup
- Troubleshoot High Disk I/O Usage
- Troubleshoot Lock Conflicts
- Troubleshoot TiFlash
- Troubleshoot Write Conflicts in Optimistic Transactions
- Troubleshoot Inconsistency Between Data and Indexes
- Performance Tuning
- Tuning Guide
- Configuration Tuning
- System Tuning
- Software Tuning
- SQL Tuning
- Overview
- Understanding the Query Execution Plan
- SQL Optimization Process
- Overview
- Logic Optimization
- Physical Optimization
- Prepare Execution Plan Cache
- Control Execution Plans
- Tutorials
- TiDB Tools
- Overview
- Use Cases
- Download
- TiUP
- Documentation Map
- Overview
- Terminology and Concepts
- Manage TiUP Components
- FAQ
- Troubleshooting Guide
- Command Reference
- Overview
- TiUP Commands
- TiUP Cluster Commands
- Overview
- tiup cluster audit
- tiup cluster check
- tiup cluster clean
- tiup cluster deploy
- tiup cluster destroy
- tiup cluster disable
- tiup cluster display
- tiup cluster edit-config
- tiup cluster enable
- tiup cluster help
- tiup cluster import
- tiup cluster list
- tiup cluster patch
- tiup cluster prune
- tiup cluster reload
- tiup cluster rename
- tiup cluster replay
- tiup cluster restart
- tiup cluster scale-in
- tiup cluster scale-out
- tiup cluster start
- tiup cluster stop
- tiup cluster template
- tiup cluster upgrade
- TiUP DM Commands
- Overview
- tiup dm audit
- tiup dm deploy
- tiup dm destroy
- tiup dm disable
- tiup dm display
- tiup dm edit-config
- tiup dm enable
- tiup dm help
- tiup dm import
- tiup dm list
- tiup dm patch
- tiup dm prune
- tiup dm reload
- tiup dm replay
- tiup dm restart
- tiup dm scale-in
- tiup dm scale-out
- tiup dm start
- tiup dm stop
- tiup dm template
- tiup dm upgrade
- TiDB Cluster Topology Reference
- DM Cluster Topology Reference
- Mirror Reference Guide
- TiUP Components
- PingCAP Clinic Diagnostic Service
- TiDB Operator
- Dumpling
- TiDB Lightning
- TiDB Data Migration
- About TiDB Data Migration
- Architecture
- Quick Start
- Deploy a DM cluster
- Tutorials
- Advanced Tutorials
- Maintain
- Cluster Upgrade
- Tools
- Performance Tuning
- Manage Data Sources
- Manage Tasks
- Export and Import Data Sources and Task Configurations of Clusters
- Handle Alerts
- Daily Check
- Reference
- Architecture
- Command Line
- Configuration Files
- OpenAPI
- Compatibility Catalog
- Secure
- Monitoring and Alerts
- Error Codes
- Glossary
- Example
- Troubleshoot
- Release Notes
- Backup & Restore (BR)
- Point-in-Time Recovery
- TiDB Binlog
- TiCDC
- Dumpling
- sync-diff-inspector
- TiSpark
- Reference
- Cluster Architecture
- Key Monitoring Metrics
- Secure
- Privileges
- SQL
- SQL Language Structure and Syntax
- SQL Statements
ADD COLUMN
ADD INDEX
ADMIN
ADMIN CANCEL DDL
ADMIN CHECKSUM TABLE
ADMIN CHECK [TABLE|INDEX]
ADMIN SHOW DDL [JOBS|QUERIES]
ADMIN SHOW TELEMETRY
ALTER DATABASE
ALTER INDEX
ALTER INSTANCE
ALTER PLACEMENT POLICY
ALTER TABLE
ALTER TABLE COMPACT
ALTER TABLE SET TIFLASH MODE
ALTER USER
ANALYZE TABLE
BACKUP
BATCH
BEGIN
CHANGE COLUMN
COMMIT
CHANGE DRAINER
CHANGE PUMP
CREATE [GLOBAL|SESSION] BINDING
CREATE DATABASE
CREATE INDEX
CREATE PLACEMENT POLICY
CREATE ROLE
CREATE SEQUENCE
CREATE TABLE LIKE
CREATE TABLE
CREATE USER
CREATE VIEW
DEALLOCATE
DELETE
DESC
DESCRIBE
DO
DROP [GLOBAL|SESSION] BINDING
DROP COLUMN
DROP DATABASE
DROP INDEX
DROP PLACEMENT POLICY
DROP ROLE
DROP SEQUENCE
DROP STATS
DROP TABLE
DROP USER
DROP VIEW
EXECUTE
EXPLAIN ANALYZE
EXPLAIN
FLASHBACK TABLE
FLUSH PRIVILEGES
FLUSH STATUS
FLUSH TABLES
GRANT <privileges>
GRANT <role>
INSERT
KILL [TIDB]
LOAD DATA
LOAD STATS
MODIFY COLUMN
PREPARE
RECOVER TABLE
RENAME INDEX
RENAME TABLE
REPLACE
RESTORE
REVOKE <privileges>
REVOKE <role>
ROLLBACK
SAVEPOINT
SELECT
SET DEFAULT ROLE
SET [NAMES|CHARACTER SET]
SET PASSWORD
SET ROLE
SET TRANSACTION
SET [GLOBAL|SESSION] <variable>
SHOW ANALYZE STATUS
SHOW [BACKUPS|RESTORES]
SHOW [GLOBAL|SESSION] BINDINGS
SHOW BUILTINS
SHOW CHARACTER SET
SHOW COLLATION
SHOW [FULL] COLUMNS FROM
SHOW CONFIG
SHOW CREATE PLACEMENT POLICY
SHOW CREATE SEQUENCE
SHOW CREATE TABLE
SHOW CREATE USER
SHOW DATABASES
SHOW DRAINER STATUS
SHOW ENGINES
SHOW ERRORS
SHOW [FULL] FIELDS FROM
SHOW GRANTS
SHOW INDEX [FROM|IN]
SHOW INDEXES [FROM|IN]
SHOW KEYS [FROM|IN]
SHOW MASTER STATUS
SHOW PLACEMENT
SHOW PLACEMENT FOR
SHOW PLACEMENT LABELS
SHOW PLUGINS
SHOW PRIVILEGES
SHOW [FULL] PROCESSSLIST
SHOW PROFILES
SHOW PUMP STATUS
SHOW SCHEMAS
SHOW STATS_HEALTHY
SHOW STATS_HISTOGRAMS
SHOW STATS_META
SHOW STATUS
SHOW TABLE NEXT_ROW_ID
SHOW TABLE REGIONS
SHOW TABLE STATUS
SHOW [FULL] TABLES
SHOW [GLOBAL|SESSION] VARIABLES
SHOW WARNINGS
SHUTDOWN
SPLIT REGION
START TRANSACTION
TABLE
TRACE
TRUNCATE
UPDATE
USE
WITH
- Data Types
- Functions and Operators
- Overview
- Type Conversion in Expression Evaluation
- Operators
- Control Flow Functions
- String Functions
- Numeric Functions and Operators
- Date and Time Functions
- Bit Functions and Operators
- Cast Functions and Operators
- Encryption and Compression Functions
- Locking Functions
- Information Functions
- JSON Functions
- Aggregate (GROUP BY) Functions
- Window Functions
- Miscellaneous Functions
- Precision Math
- Set Operations
- List of Expressions for Pushdown
- TiDB Specific Functions
- Clustered Indexes
- Constraints
- Generated Columns
- SQL Mode
- Table Attributes
- Transactions
- Garbage Collection (GC)
- Views
- Partitioning
- Temporary Tables
- Cached Tables
- Character Set and Collation
- Placement Rules in SQL
- System Tables
mysql
- INFORMATION_SCHEMA
- Overview
ANALYZE_STATUS
CLIENT_ERRORS_SUMMARY_BY_HOST
CLIENT_ERRORS_SUMMARY_BY_USER
CLIENT_ERRORS_SUMMARY_GLOBAL
CHARACTER_SETS
CLUSTER_CONFIG
CLUSTER_HARDWARE
CLUSTER_INFO
CLUSTER_LOAD
CLUSTER_LOG
CLUSTER_SYSTEMINFO
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
DATA_LOCK_WAITS
DDL_JOBS
DEADLOCKS
ENGINES
INSPECTION_RESULT
INSPECTION_RULES
INSPECTION_SUMMARY
KEY_COLUMN_USAGE
METRICS_SUMMARY
METRICS_TABLES
PARTITIONS
PLACEMENT_POLICIES
PROCESSLIST
REFERENTIAL_CONSTRAINTS
SCHEMATA
SEQUENCES
SESSION_VARIABLES
SLOW_QUERY
STATISTICS
TABLES
TABLE_CONSTRAINTS
TABLE_STORAGE_STATS
TIDB_HOT_REGIONS
TIDB_HOT_REGIONS_HISTORY
TIDB_INDEXES
TIDB_SERVERS_INFO
TIDB_TRX
TIFLASH_REPLICA
TIKV_REGION_PEERS
TIKV_REGION_STATUS
TIKV_STORE_STATUS
USER_PRIVILEGES
VARIABLES_INFO
VIEWS
METRICS_SCHEMA
- UI
- TiDB Dashboard
- Overview
- Maintain
- Access
- Overview Page
- Cluster Info Page
- Top SQL Page
- Key Visualizer Page
- Metrics Relation Graph
- SQL Statements Analysis
- Slow Queries Page
- Cluster Diagnostics
- Monitoring Page
- Search Logs Page
- Instance Profiling
- Session Management and Configuration
- FAQ
- CLI
- Command Line Flags
- Configuration File Parameters
- System Variables
- Storage Engines
- Telemetry
- Errors Codes
- Table Filter
- Schedule Replicas by Topology Labels
- FAQs
- Release Notes
- All Releases
- Release Timeline
- TiDB Versioning
- TiDB Installation Packages
- v6.2
- v6.1
- v6.0
- v5.4
- v5.3
- v5.2
- v5.1
- v5.0
- v4.0
- v3.1
- v3.0
- v2.1
- v2.0
- v1.0
- Glossary
TiDB 5.2.4 Release Notes
Release Date: April 26, 2022
TiDB version: 5.2.4
Compatibility change(s)
TiDB
- Change the default value of the system variable
tidb_analyze_version
from2
to1
#31748
- Change the default value of the system variable
TiKV
- Add
raft-log-compact-sync-interval
to control the time interval ("2s"
by default) to compact unnecessary Raft logs #11404 - Change the default value of
raft-log-gc-tick-interval
from"10s"
to"3s"
#11404 - When
storage.flow-control.enable
is set totrue
, the value ofstorage.flow-control.hard-pending-compaction-bytes-limit
overwrites that ofrocksdb.(defaultcf|writecf|lockcf).hard-pending-compaction-bytes-limit
#11424
- Add
Tools
TiDB Lightning
- Change the default value of
regionMaxKeyCount
from 1_440_000 to 1_280_000, to avoid too many empty Regions after data import #30018
- Change the default value of
Improvements
TiKV
- Transfer the leadership to CDC observer to reduce latency jitter #12111
- Reduce the TiCDC recovery time by reducing the number of the Regions that require the Resolve Locks step #11993
- Update the proc filesystem (procfs) to v0.12.0 #11702
- Speed up the Garbage Collection (GC) process by increasing the write batch size when performing GC to Raft logs #11404
- Increase the speed of inserting SST files by moving the verification process to the
Import
thread pool from theApply
thread pool #11239
Tools
TiCDC
- Change the default value of Kafka Sink
partition-num
to 3 so that TiCDC distributes messages across Kafka partitions more evenly #3337 - Reduce the time for the KV client to recover when a TiKV store is down #3191
- Add a
Lag analyze
panel in Grafana #4891 - Expose configuration parameters of the Kafka producer to make them configurable in TiCDC #4385
- Add the exponential backoff mechanism for restarting a changefeed #3329
- Reduce the count of "EventFeed retry rate limited" logs #4006
- Set the default value of
max-message-bytes
to 10M #4041 - Add more Prometheus and Grafana monitoring metrics and alerts, including
no owner alert
,mounter row
,table sink total row
, andbuffer sink total row
#4054 #1606 - Support multiple Kubernetes clusters in Grafana dashboards #4665
- Add catch-up ETA (Estimated Time of Arrival) to the
changefeed checkpoint
monitoring metric #5232
- Change the default value of Kafka Sink
Bug fixes
TiDB
- Fix wrong range calculation results for Nulleq function on Enum values #32428
- Fix the issue that INDEX HASH JOIN returns the
send on closed channel
error #31129 - Fix the issue that concurrent column type change causes inconsistency between the schema and the data #31048
- Fix the issue of potential data index inconsistency in optimistic transaction mode #30410
- Fix the issue that a SQL operation is canceled when its JSON type column joins its
CHAR
type column #29401 - Fix the issue that window functions might return different results when using a transaction or not #29947
- Fix the issue that the
Column 'col_name' in field list is ambiguous
error is reported unexpectedly when a SQL statement contains natural join #25041 - Fix the issue that the length information is wrong when casting
Decimal
toString
#29417 - Fix the issue that the
GREATEST
function returns inconsistent results due to different values oftidb_enable_vectorized_expression
(set toon
oroff
) #29434 - Fix wrong results of deleting data of multiple tables using
left join
#31321 - Fix a bug that TiDB may dispatch duplicate tasks to TiFlash #32814
- Fix the MPP task list empty error when executing a query #31636
- Fix wrong results of index join caused by an innerWorker panic #31494
- Fix the issue that executing the
INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
statement gets panic #28078 - Fix wrong query results due to the optimization of
Order By
#30271 - Fix the wrong result that might occur when performing
JOIN
onENUM
type columns #27831 - Fix the panic when using the
CASE WHEN
function on theENUM
data type #29357 - Fix wrong results of the
microsecond
function in vectorized expressions #29244 - Fix the issue that the window function causes TiDB to panic instead of reporting an error #30326
- Fix the issue that the Merge Join operator gets wrong results in certain cases #33042
- Fix the issue that TiDB gets a wrong result when a correlated subquery returns a constant #32089
- Fix the issue that TiDB writes wrong data due to the wrong encoding of the
ENUM
orSET
column #32302 - Fix the issue that the
MAX
orMIN
function on theENUM
orSET
column returns a wrong result when the new collation is enabled in TiDB #31638 - Fix the issue that the IndexHashJoin operator does not exit successfully #31062
- Fix the issue that TiDB might read wrong data when a table has a virtual column #30965
- Fix the issue that the setting of the log level does not take effect on the slow query log #30309
- Fix the issue that partitioned tables cannot fully use indexes to scan data in some cases #33966
- Fix the issue that the background HTTP service of TiDB might not exit successfully and makes the cluster in an abnormal state #30571
- Fix the issue that TiDB might unexpectedly output many logs of failed authentication #29709
- Fix the issue that the system variable
max_allowed_packet
does not take effect #31422 - Fix the issue that the
REPLACE
statement incorrectly changes other rows when the auto ID is out of range #29483 - Fix the issue that the slow query log cannot output log normally and might consume too much memory #32656
- Fix the issue that the result of NATURAL JOIN might include unexpected columns #24981
- Fix the issue that using
ORDER BY
andLIMIT
together in one statement might output wrong results if a prefix-column index is used to query data #29711 - Fix the issue that the DOUBLE type auto-increment column might be changed when the optimistic transaction retries #29892
- Fix the issue that the STR_TO_DATE function cannot handle the preceding zero of the microsecond part correctly #30078
- Fix the issue that TiDB gets the wrong result when using TiFlash to scan tables with empty range although TiFlash does not support reading tables with empty range yet #33083
TiKV
- Fix a bug that stale messages cause TiKV to panic #12023
- Fix the issue of intermittent packet loss and out of memory (OOM) caused by the overflow of memory metrics #12160
- Fix the potential panic issue that occurs when TiKV performs profiling on Ubuntu 18.04 #9765
- Fix the issue that tikv-ctl returns an incorrect result due to its wrong string match #12329
- Fix a bug that replica reads might violate the linearizability #12109
- Fix a bug that TiKV might panic if it has been running for 2 years or more #11940
- Fix the issue of QPS drop when flow control is enabled and
level0_slowdown_trigger
is set explicitly #11424 - Fix the panic issue that occurs when the cgroup controller is not mounted #11569
- Fix possible metadata corruption caused by Region merge on a lagging Region peer #11526
- Fix the issue that the latency of Resolved TS increases after TiKV stops operating #11351
- Fix a panic issue that occurs when Region merge, ConfChange, and Snapshot happen at the same time in extreme conditions #11475
- Fix a bug that tikv-ctl cannot return the correct Region-related information #11393
- Fix the issue of negative sign when the decimal divide result is zero #29586
- Fix the issue that retrying prewrite requests in the pessimistic transaction mode might cause the risk of data inconsistency in rare cases #11187
- Fix a memory leak caused by monitoring data of statistics threads #11195
- Fix the issue that the average latency of the by-instance gRPC requests is inaccurate in TiKV metrics #11299
- Fix the panic issue caused by deleting snapshot files when the peer status is
Applying
#11746 - Fix a bug that TiKV cannot delete a range of data (which means the internal command
unsafe_destroy_range
is executed) when the GC worker is busy #11903 - Fix the issue that deleting an uninitialized replica might cause an old replica to be recreated #10533
- Fix the issue that TiKV cannot detect the memory lock when TiKV performs a reverse table scan #11440
- Fix the deadlock issue that happens occasionally when coroutines run too fast #11549
- Fix the issue that destroying a peer might cause high latency #10210
- Fix the issue that TiKV panics and destroys peers unexpectedly because the target Region to be merged is invalid #12232
- Fix the TiKV panic issue that occurs when the target peer is replaced with the peer that is destroyed without being initialized when merging a Region #12048
- Fix the TiKV panic issue that occurs when applying snapshot is aborted #11618
- Fix a bug that TiKV cannot correctly calculate the number of snapshots being sent when the operator execution fails #11341
PD
TiFlash
- Fix a bug that MPP tasks might leak threads forever #4238
- Fix the issue that the result of
IN
is incorrect in multi-value expressions #4016 - Fix the issue that the date format identifies
'\n'
as an invalid separator #4036 - Fix the potential query error after adding columns under heavy read workload #3967
- Fix the bug that invalid storage directory configurations lead to unexpected behaviors #4093
- Fix the bug that some exceptions are not handled properly #4101
- Fix the bug that the
STR_TO_DATE()
function incorrectly handles leading zeros when parsing microseconds #3557 - Fix the issue that casting
INT
toDECIMAL
might cause overflow #3920 - Fix the wrong result that occurs when casting
DATETIME
toDECIMAL
#4151 - Fix the overflow that occurs when casting
FLOAT
toDECIMAL
#3998 - Fix the issue that the
CastStringAsReal
behavior is inconsistent in TiFlash and in TiDB or TiKV #3475 - Fix the issue that the
CastStringAsDecimal
behavior is inconsistent in TiFlash and in TiDB or TiKV #3619 - Fix the issue that TiFlash might return the
EstablishMPPConnection
error after it is restarted #3615 - Fix the issue that obsolete data cannot be reclaimed after setting the number of TiFlash replicas to 0 #3659
- Fix potential data inconsistency when widening the primary key column with the primary key being
handle
#3569 - Fix possible parsing errors when an SQL statement contains extremely long nested expressions #3354
- Fix possible wrong results when a query contains the
where <string>
clause #3447 - Fix possible wrong results when
new_collations_enabled_on_first_bootstrap
is enabled #3388, #3391 - Fix the panic issue that occurs when TLS is enabled #4196
- Fix the panic issue that occurs when the memory limit is enabled #3902
- Fix the issue that TiFlash crashes occasionally when an MPP query is stopped #3401
- Fix the unexpected error of
Unexpected type of column: Nullable(Nothing)
#3351 - Fix possible metadata corruption caused by Region merge on a lagging Region peer #4437
- Fix the issue that a query containing
JOIN
might be hung if an error occurs #4195 - Fix possible wrong results returned for MPP queries due to incorrect execution plans #3389
Tools
Backup & Restore (BR)
- Fix the issue that BR fails to back up RawKV #32607
TiCDC
- Fix the issue that default values cannot be replicated #3793
- Fix a bug that sequence is incorrectly replicated in some cases #4563
- Fix a bug that a TiCDC node exits abnormally when a PD leader is killed #4248
- Fix a bug that MySQL sink generates duplicated
replace
SQL statements whenbatch-replace-enable
is disabled #4501 - Fix the issue of panic and data inconsistency that occurs when outputting the default column value #3929
- Fix the issue that
mq sink write row
does not have monitoring data #3431 - Fix the issue that replication cannot be performed when
min.insync.replicas
is smaller thanreplication-factor
#3994 - Fix the potential panic issue that occurs when a replication task is removed #3128
- Fix the bug that HTTP API panics when the required processor information does not exist #3840
- Fix the issue of potential data loss caused by inaccurate checkpoint #3545
- Fix the potential issue that the deadlock causes a replication task to get stuck #4055
- Fix the TiCDC panic issue that occurs when manually cleaning the task status in etcd #2980
- Fix the issue that special comments in DDL statements cause the replication task to stop #3755
- Fix the issue of replication stop caused by the incorrect configuration of
config.Metadata.Timeout
#3352 - Fix the issue that the service cannot be started because of a timezone issue in the RHEL release #3584
- Fix the issue that
stopped
changefeeds resume automatically after a cluster upgrade #3473 - Fix the issue of overly frequent warnings caused by MySQL sink deadlock #2706
- Fix the bug that the
enable-old-value
configuration item is not automatically set totrue
on Canal and Maxwell protocols #3676 - Fix the issue that Avro sink does not support parsing JSON type columns #3624
- Fix the negative value error in the changefeed checkpoint lag #3010
- Fix the OOM issue in the container environment #1798
- Fix the memory leak issue after processing DDLs #3174
- Fix the issue that changefeed gets stuck when tables are repeatedly scheduled in the same node #4464
- Fix a bug that querying status through open API may be blocked when the PD node is abnormal #4778
- Fix incorrect metrics caused by owner changes #4774
- Fix a stability problem in workerpool used by Unified Sorter #4447
- Fix the issue that the
cached region
monitoring metric is negative #4300
TiDB Lightning
- Fix the issue of wrong import result that occurs when TiDB Lightning does not have the privilege to access the
mysql.tidb
table #31088 - Fix the checksum error "GC life time is shorter than transaction duration" #32733
- Fix a bug that TiDB Lightning may not delete the metadata schema when some import tasks do not contain source files #28144
- Fix the issue that TiDB Lightning does not report errors when the S3 storage path does not exist #28031 #30709
- Fix an error that occurs when iterating more than 1000 keys on GCS #30377
- Fix the issue of wrong import result that occurs when TiDB Lightning does not have the privilege to access the
Was this page helpful?