- 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 4.0.13 Release Notes
Release date: May 28, 2021
TiDB version: 4.0.13
New Features
TiDB
Improvements
TiDB
- Avoid frequently reading the
mysql.stats_histograms
table if the cached statistics is up-to-date to avoid high CPU usage #24352
- Avoid frequently reading the
TiKV
PD
TiFlash
- Automatically clean archived data to free up disk space
Tools
Backup & Restore (BR)
TiCDC
Bug Fixes
TiDB
- Fix the panic issue that occurs when the
UPDATE
statement with a subquery updates the generated column #24658 - Fix the issue that causes duplicate query results when using the multi-column index for data reads #24634
- Fix the issue that causes wrong query result when using the
BIT
type constant as the divisor in the DIV expression #24266 - Fix the issue that the
NO_ZERO_IN_DATE
SQL mode does not take effect for the default column value set in DDL statements #24185 - Fix an issue which causes wrong query results when using
UNION
between aBIT
type column and anINTEGER
type column #24026 - Fix the issue that the
TableDual
plans are mistakenly created when comparing theBINARY
type and theCHAR
type #23917 - Fix the issue that the
insert ignore on duplicate
statement might unexpectedly delete table records #23825 - Fix the issue that the Audit plugin causes TiDB panic #23819
- Fix the issue that the
HashJoin
operator incorrectly processes the collation #23812 - Fix the issue of disconnection that occurs when
batch_point_get
incorrectly handles abnormal values in the pessimistic transaction #23778 - Fix the issue of inconsistent indexes that occurs when the
tidb_row_format_version
configuration value is set to1
and theenable_new_collation
value is set totrue
#23772 - Fix a bug that occurs when comparing the
INTEGER
type column with theSTRING
constant value #23705 - Fix the error that occurs when the
BIT
type column is passed into theapprox_percent
function #23702 - Fix a bug that causes TiDB to mistakenly report the
TiKV server timeout
error when executing TiFlash batch requests #23700 - Fix the issue that the
IndexJoin
operator returns wrong results on the prefix column index #23691 - Fix the issue which causes wrong query results because the collation on the
BINARY
type column is not properly handled #23598 - Fix the issue of query panic that occurs when the
UPDATE
statement contains the join query with theHAVING
clause #23575 - Fix the issue that causes TiFlash to return wrong results when using the
NULL
constant in the comparison expression #23474 - Fix the issue of wrong results when comparing the
YEAR
type column with theSTRING
constant #23335 - Fix the issue that
group_concat
panics whensession.group_concat_max_len
is set too small #23257 - Fix the issue of wrong query results that occurs when using the
BETWEEN
expression for theTIME
type column #23233 - Fix the issue of privilege check in the
DELETE
statements #23215 - Fix the issue that no error is reported when inserting invalid strings to the
DECIMAL
type column #23196 - Fix the issue of parsing error occurred when inserting data to the
DECIMAL
type columns #23152 - Fix the issue that the
USE_INDEX_MERGE
hint does not take effect #22924 - Fix a bug that the query returns wrong results when using
ENUM
orSET
columns in theWHERE
clause as an filter #22814 - Fix a bug that the query returns wrong results when using the clustered index and the new collation at the same time #21408
- Fix the panic that occurs when executing
ANALYZE
withenable_new_collation
enabled #21299 - Fix the issue that SQL views does not correctly handle the default roles associated with the SQL DEFINER #24531
- Fix the issue that cancelling DDL jobs gets stuck #24445
- Fix the issue that the
concat
function incorrectly handles the collation #24300 - Fix a bug that the query returns wrong results when the
SELECT
field has anIN
subquery and the subquery's outer side containsNULL
tuples #24022 - Fix a bug that TiFlash is chosen wrongly by the optimizer when
TableScan
is in descending order #23974 - Fix a bug that the
point_get
plan returns the column name that is inconsistent with that of MySQL #23970 - Fix the issue that executing the
show table status
statement on a database with a upper-cased name returns wrong results #23958 - Fix a bug that the users who do not have the
INSERT
andDELETE
privileges on a table at the same time can perform theREPLACE
operation #23938 - Fix the issue that the results of the
concat
/make_set
/insert
expressions are wrong because the collation is incorrectly handled #23878 - Fix the panic that occurs when executing a query on the table that has
RANGE
partitions #23689 - Fix the issue: In the cluster of an earlier version, if the
tidb_enable_table_partition
variable is set tofalse
, the tables that contain partitions are handled as non-partitioned tables. Executingbatch point get
queries on this table, when the cluster is upgraded to a later version, causes connection panic. #23682 - Fix the issue that when TiDB is configured to listen on TCP and UNIX sockets, the remote hosts over the TCP connection are not correctly validated for connection #23513
- Fix a bug that the non-default collation causes wrong query results #22923
- Fix a bug that the Coprocessor Cache panel of Grafana does not work #22617
- Fix the error that occurs when the optimizer accesses the statistic cache #22565
- Fix the panic issue that occurs when the
TiKV
- Fix a bug that TiKV cannot start if the
file_dict
file is not fully written into the disk that has been full #9963 - Limit TiCDC's scan speed at 128MB/s by default #9983
- Reduce the memory usage of TiCDC's initial scan #10133
- Support the back pressure for TiCDC's scan speed #10142
- Fix a potential OOM issue by avoiding unnecessary reads to get TiCDC old values #10031
- Fix a TiCDC OOM issue caused by reading old values #10197
- Add a timeout mechanism for S3 storages to avoid the client hanging without responses #10132
- Fix a bug that TiKV cannot start if the
TiFlash
- Fix the issue that number of
delta-merge-tasks
is not reported to Prometheus - Fix the TiFlash panic issue that occurs during
Segment Split
- Fix the issue that the
Region write Duration (write blocks)
panel in Grafana is shown in a wrong place - Fix the potential issue that the storage engine fails to remove data
- Fix the issue of incorrect results when casting the
TIME
type to theINTEGER
type - Fix a bug that the behavior of the
bitwise
operator is different from that of TiDB - Fix the issue of incorrect results when casting the
STRING
type to theINTEGER
type - Fix the issue that consecutive and fast writes might make TiFlash out of memory
- Fix the potential issue that the exception of null pointer might be raised during the table GC
- Fix the TiFlash panic issue that occurs when writing data to dropped tables
- Fix the TiFlash panic issue that occurs during BR restore
- Fix a bug that the weights of some characters are wrong when using the general CI collation
- Fix the potential issue that data will be lost in tombstoned tables
- Fix the issue of incorrect results when comparing the string which contains zero bytes
- Fix the issue that the logical function returns wrong results if the input column contains null constants
- Fix the issue that the logical function only accepts the numeric type
- Fix the issue of incorrect results that occurs when the timestamp value is
1970-01-01
and the timezone offset is negative - Fix the issue that hash value of
Decimal256
is not stable
- Fix the issue that number of
Tools
TiCDC
- Fix the deadlock issue caused by the flow control when the sorter's input channel has been blocked #1779
- Fix the issue that the TiKV GC safe point is blocked due to the stagnation of TiCDC changefeed checkpoint #1756
- Revert the update in
explicit_defaults_for_timestamp
which requires theSUPER
privilege when replicating data to MySQL #1749
TiDB Lightning
- Fix a bug that TiDB Lightning's TiDB-backend cannot load any data when autocommit is disabled
Was this page helpful?