- 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.1.4 Release Notes
Release Date: February 22, 2022
TiDB version: 5.1.4
Compatibility changes
TiDB
- Change the default value of the system variable
tidb_analyze_version
from2
to1
#31748 - Since v5.1.4, if TiKV is configured with
storage.enable-ttl = true
, the requests from TiDB are rejected, because the TTL feature of TiKV only supports the RawKV mode #27303
- Change the default value of the system variable
Tools
TiCDC
- Set the default value of
max-message-bytes
to 10M #4041
- Set the default value of
Improvements
TiDB
TiKV
PD
- Speed up the exit process of schedulers #4146
TiFlash
- Support pushing down
ADDDATE()
andDATE_ADD()
to TiFlash - Support pushing down
INET6_ATON()
andINET6_NTOA()
to TiFlash - Support pushing down
INET_ATON()
andINET_NTOA()
to TiFlash - Increase the max supported depth of an expression or a plan tree in a DAG request from
100
to200
- Support pushing down
Tools
TiCDC
- Add the exponential backoff mechanism for restarting a changefeed. #3329
- Reduce the replication latency when replicating many tables #3900
- Add metrics for observing the remaining time of incremental scan #2985
- Reduce the count of "EventFeed retry rate limited" logs #4006
- 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 - Optimize rate limiting control on TiKV reloads to reduce gPRC congestion during changefeed initialization #3110
- Reduce the time for the KV client to recover when a TiKV store is down #3191
Bug fixes
TiDB
- Fix a memory leak bug that occurs when the system variable
tidb_analyze_version
is set to2
#32499 - Fix the issue that the
MaxDays
andMaxBackups
configurations do not take effect for the slow log #25716 - Fix the issue that executing the
INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
statement gets panic #28078 - Fix the wrong result that might occur when performing
JOIN
onENUM
type columns #27831 - Fix the issue that INDEX HASH JOIN returns the
send on closed channel
error #31129 - Fix the issue that using the
BatchCommands
API might block sending TiDB requests to TiKV in some rare cases #32500 - Fix the issue of potential data index inconsistency in optimistic transaction mode #30410
- Fix the issue that window functions might return different results when using a transaction or not #29947
- Fix the issue that the length information is wrong when casting
Decimal
toString
#29417 - Fix the issue that the
GREATEST
function returns incorrect result that occurs when setting thetidb_enable_vectorized_expression
vectorized expression tooff
#29434 - Fix the issue that the optimizer might cache invalid plans for
join
in some cases #28087 - Fix wrong results of the
microsecond
andhour
functions in vectorized expressions #29244 #28643 - Fix the TiDB panic when executing the
ALTER TABLE.. ADD INDEX
statement in some cases #27687 - Fix a bug that the availability detection of MPP node does not work in some corner cases #3118
- Fix the
DATA RACE
issue when assigningMPP task ID
#27952 - Fix the
INDEX OUT OF RANGE
error for a MPP query after deleting an emptydual table
#28250 - Fix the issue of false positive error log
invalid cop task execution summaries length
for MPP queries #1791 - Fix the issue that SET GLOBAL tidb_skip_isolation_level_check=1 doesn't affect new session settings #27897
- Fix a memory leak bug that occurs when the system variable
TiKV
- Fix a bug that TiKV cannot delete a range of data (
unsafe_destroy_range
cannot be executed) when the GC worker is busy #11903 - Fix the issue that destroying a peer might cause high latency #10210
- Fix a bug that the
any_value
function returns a wrong result when regions are empty #11735 - Fix the issue that deleting an uninitialized replica might cause an old replica to be recreated #10533
- Fix the metadata corruption issue when
Prepare Merge
is triggered after a new election is finished but the isolated peer is not informed #11526 - Fix the deadlock issue that happens occasionally when coroutines run too fast #11549
- Fix the potential deadlock and memory leak issues when profiling flame graphs #11108
- Fix the rare data inconsistency issue when retrying a prewrite request in pessimistic transactions #11187
- Fix a bug that the configuration
resource-metering.enabled
does not work #11235 - Fix the issue that some coroutines leak in
resolved_ts
#10965 - Fix the issue of reporting false "GC can not work" alert under low write flow #9910
- Fix a bug that tikv-ctl cannot return the correct Region-related information #11393
- Fix the issue that a down TiKV node causes the resolved timestamp to lag #11351
- Fix a panic issue that occurs when Region merge, ConfChange, and Snapshot happen at the same time in extreme conditions #11475
- Fix the issue that TiKV cannot detect the memory lock when TiKV performs a reverse table scan #11440
- Fix the issue of negative sign when the decimal divide result is zero #29586
- Fix a memory leak caused by the monitoring data of statistics threads #11195
- Fix the issue of TiCDC panic that occurs when the downstream database is missing #11123
- Fix the issue that TiCDC adds scan retries frequently due to the Congest error #11082
- Fix the issue that batch messages are too large in Raft client implementation #9714
- Collapse some uncommon storage-related metrics in Grafana dashboard #11681
- Fix a bug that TiKV cannot delete a range of data (
PD
- Fix a bug that the schedule generated by the region scatterer might decrease the number of peers #4565
- Fix the issue that Region statistics are not affected by
flow-round-by-digit
#4295 - Fix slow leader election caused by stucked region syncer #3936
- Support that the evict leader scheduler can schedule regions with unhealthy peers #4093
- Fix the issue that the cold hotspot data cannot be deleted from the hotspot statistics #4390
- Fix a panic issue that occurs after the TiKV node is removed #4344
- Fix the issue that the scheduling operator cannot fail fast because the target store is down #3353
TiFlash
- Fix the issue that the
str_to_date()
function incorrectly handles leading zeros when parsing microseconds - Fix the TiFlash crash problem when the memory limit is enabled
- Fix the issue that when an input time is earlier than 1970-01-01 00:00:01 UTC, the behavior of
unix_timestamp
is inconsistent with that of TiDB or MySQL - Fix the potential data inconsistency caused by widening the primary key column when the primary key is handle
- Fix the overflow bug and the issue of reporting
Can't compare
error when comparing data in theDECIMAL
data type - Fix the unexpected error of
3rd arguments of function substringUTF8 must be constants.
- Fix the issue that TiFlash fails to start on platforms without the
nsl
library - Fix the overflow bug when casting data to the
DECIMAL
data type - Fix the issue that the
castStringAsReal
behavior is inconsistent in TiFlash and in TiDB/TiKV - Fix the issue that TiFlash might return the
EstablishMPPConnection
error after it is restarted - Fix the issue that obsolete data cannot be reclaimed after setting the number of TiFlash replicas to 0
- Fix the issue that the
CastStringAsDecimal
behavior is inconsistent in TiFlash and in TiDB/TiKV - Fix the issue that queries with the
where <string>
clause return wrong results - Fix the issue that TiFlash might panic when an MPP query is stopped
- Fix the unexpected error of
Unexpected type of column: Nullable(Nothing)
- Fix the issue that the
Tools
TiCDC
- Fix a bug that MySQL sink generates duplicated
replace
SQL statements ifbatch-replace-enable
is disabled #4501 - Fix the issue that the
cached region
monitoring metric is negative #4300 - 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 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 issue that special comments in DDL statements cause the replication task to stop #3755
- Fix a bug that EtcdWorker might hang the owner and processor #3750
- Fix the issue that
stopped
changefeeds resume automatically after a cluster upgrade #3473 - Fix the issue that default values cannot be replicated #3793
- Fix data inconsistency caused by TiCDC default value padding exceptions #3918 #3929
- Fix a bug that an owner gets stuck when a PD leader shuts down and transfers to a new node #3615
- Fix the TiCDC panic issue that occurs when manually cleaning the task status in etcd #2980
- Fix the issue that the service cannot be started because of a timezone issue in the RHEL release #3584
- 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 TiCDC replication interruption issue when multiple TiKVs crash or during a forced restart #3288
- Fix the memory leak issue after processing DDLs #3174
- Fix the issue that changefeed does not fail fast enough when the ErrGCTTLExceeded error occurs #3111
- Fix the issue that TiCDC replication task might terminate when the upstream TiDB instance unexpectedly exits #3061
- Fix the issue that TiCDC process might panic when TiKV sends duplicate requests to the same Region #2386
- Fix the issue that Kafka may send excessively large messages by setting the default value of
max-message-bytes
to10M
#3081 - Fix the issue that TiCDC sync task might pause when an error occurs during writing a Kafka message #2978
- Fix a bug that MySQL sink generates duplicated
Backup & Restore (BR)
TiDB Binlog
- Fix the issue that DBaaS importing CSV fails with InvalidRange if CSV file size is about 256MB and
strict-format
istrue
#27763
- Fix the issue that DBaaS importing CSV fails with InvalidRange if CSV file size is about 256MB and
TiDB Lightning
Was this page helpful?