- 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
- 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)
- 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 COLUMNADD INDEXADMINADMIN CANCEL DDLADMIN CHECKSUM TABLEADMIN CHECK [TABLE|INDEX]ADMIN SHOW DDL [JOBS|QUERIES]ADMIN SHOW TELEMETRYALTER DATABASEALTER INDEXALTER INSTANCEALTER PLACEMENT POLICYALTER TABLEALTER TABLE COMPACTALTER USERANALYZE TABLEBACKUPBATCHBEGINCHANGE COLUMNCOMMITCHANGE DRAINERCHANGE PUMPCREATE [GLOBAL|SESSION] BINDINGCREATE DATABASECREATE INDEXCREATE PLACEMENT POLICYCREATE ROLECREATE SEQUENCECREATE TABLE LIKECREATE TABLECREATE USERCREATE VIEWDEALLOCATEDELETEDESCDESCRIBEDODROP [GLOBAL|SESSION] BINDINGDROP COLUMNDROP DATABASEDROP INDEXDROP PLACEMENT POLICYDROP ROLEDROP SEQUENCEDROP STATSDROP TABLEDROP USERDROP VIEWEXECUTEEXPLAIN ANALYZEEXPLAINFLASHBACK TABLEFLUSH PRIVILEGESFLUSH STATUSFLUSH TABLESGRANT <privileges>GRANT <role>INSERTKILL [TIDB]LOAD DATALOAD STATSMODIFY COLUMNPREPARERECOVER TABLERENAME INDEXRENAME TABLEREPLACERESTOREREVOKE <privileges>REVOKE <role>ROLLBACKSELECTSET DEFAULT ROLESET [NAMES|CHARACTER SET]SET PASSWORDSET ROLESET TRANSACTIONSET [GLOBAL|SESSION] <variable>SHOW ANALYZE STATUSSHOW [BACKUPS|RESTORES]SHOW [GLOBAL|SESSION] BINDINGSSHOW BUILTINSSHOW CHARACTER SETSHOW COLLATIONSHOW [FULL] COLUMNS FROMSHOW CONFIGSHOW CREATE PLACEMENT POLICYSHOW CREATE SEQUENCESHOW CREATE TABLESHOW CREATE USERSHOW DATABASESSHOW DRAINER STATUSSHOW ENGINESSHOW ERRORSSHOW [FULL] FIELDS FROMSHOW GRANTSSHOW INDEX [FROM|IN]SHOW INDEXES [FROM|IN]SHOW KEYS [FROM|IN]SHOW MASTER STATUSSHOW PLACEMENTSHOW PLACEMENT FORSHOW PLACEMENT LABELSSHOW PLUGINSSHOW PRIVILEGESSHOW [FULL] PROCESSSLISTSHOW PROFILESSHOW PUMP STATUSSHOW SCHEMASSHOW STATS_HEALTHYSHOW STATS_HISTOGRAMSSHOW STATS_METASHOW STATUSSHOW TABLE NEXT_ROW_IDSHOW TABLE REGIONSSHOW TABLE STATUSSHOW [FULL] TABLESSHOW [GLOBAL|SESSION] VARIABLESSHOW WARNINGSSHUTDOWNSPLIT REGIONSTART TRANSACTIONTABLETRACETRUNCATEUPDATEUSEWITH
- 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_STATUSCLIENT_ERRORS_SUMMARY_BY_HOSTCLIENT_ERRORS_SUMMARY_BY_USERCLIENT_ERRORS_SUMMARY_GLOBALCHARACTER_SETSCLUSTER_CONFIGCLUSTER_HARDWARECLUSTER_INFOCLUSTER_LOADCLUSTER_LOGCLUSTER_SYSTEMINFOCOLLATIONSCOLLATION_CHARACTER_SET_APPLICABILITYCOLUMNSDATA_LOCK_WAITSDDL_JOBSDEADLOCKSENGINESINSPECTION_RESULTINSPECTION_RULESINSPECTION_SUMMARYKEY_COLUMN_USAGEMETRICS_SUMMARYMETRICS_TABLESPARTITIONSPLACEMENT_POLICIESPROCESSLISTREFERENTIAL_CONSTRAINTSSCHEMATASEQUENCESSESSION_VARIABLESSLOW_QUERYSTATISTICSTABLESTABLE_CONSTRAINTSTABLE_STORAGE_STATSTIDB_HOT_REGIONSTIDB_HOT_REGIONS_HISTORYTIDB_INDEXESTIDB_SERVERS_INFOTIDB_TRXTIFLASH_REPLICATIKV_REGION_PEERSTIKV_REGION_STATUSTIKV_STORE_STATUSUSER_PRIVILEGESVIEWS
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
- 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
- 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_histogramstable 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
UPDATEstatement 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
BITtype constant as the divisor in the DIV expression #24266 - Fix the issue that the
NO_ZERO_IN_DATESQL 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
UNIONbetween aBITtype column and anINTEGERtype column #24026 - Fix the issue that the
TableDualplans are mistakenly created when comparing theBINARYtype and theCHARtype #23917 - Fix the issue that the
insert ignore on duplicatestatement might unexpectedly delete table records #23825 - Fix the issue that the Audit plugin causes TiDB panic #23819
- Fix the issue that the
HashJoinoperator incorrectly processes the collation #23812 - Fix the issue of disconnection that occurs when
batch_point_getincorrectly handles abnormal values in the pessimistic transaction #23778 - Fix the issue of inconsistent indexes that occurs when the
tidb_row_format_versionconfiguration value is set to1and theenable_new_collationvalue is set totrue#23772 - Fix a bug that occurs when comparing the
INTEGERtype column with theSTRINGconstant value #23705 - Fix the error that occurs when the
BITtype column is passed into theapprox_percentfunction #23702 - Fix a bug that causes TiDB to mistakenly report the
TiKV server timeouterror when executing TiFlash batch requests #23700 - Fix the issue that the
IndexJoinoperator returns wrong results on the prefix column index #23691 - Fix the issue which causes wrong query results because the collation on the
BINARYtype column is not properly handled #23598 - Fix the issue of query panic that occurs when the
UPDATEstatement contains the join query with theHAVINGclause #23575 - Fix the issue that causes TiFlash to return wrong results when using the
NULLconstant in the comparison expression #23474 - Fix the issue of wrong results when comparing the
YEARtype column with theSTRINGconstant #23335 - Fix the issue that
group_concatpanics whensession.group_concat_max_lenis set too small #23257 - Fix the issue of wrong query results that occurs when using the
BETWEENexpression for theTIMEtype column #23233 - Fix the issue of privilege check in the
DELETEstatements #23215 - Fix the issue that no error is reported when inserting invalid strings to the
DECIMALtype column #23196 - Fix the issue of parsing error occurred when inserting data to the
DECIMALtype columns #23152 - Fix the issue that the
USE_INDEX_MERGEhint does not take effect #22924 - Fix a bug that the query returns wrong results when using
ENUMorSETcolumns in theWHEREclause 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
ANALYZEwithenable_new_collationenabled #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
concatfunction incorrectly handles the collation #24300 - Fix a bug that the query returns wrong results when the
SELECTfield has anINsubquery and the subquery's outer side containsNULLtuples #24022 - Fix a bug that TiFlash is chosen wrongly by the optimizer when
TableScanis in descending order #23974 - Fix a bug that the
point_getplan returns the column name that is inconsistent with that of MySQL #23970 - Fix the issue that executing the
show table statusstatement on a database with a upper-cased name returns wrong results #23958 - Fix a bug that the users who do not have the
INSERTandDELETEprivileges on a table at the same time can perform theREPLACEoperation #23938 - Fix the issue that the results of the
concat/make_set/insertexpressions are wrong because the collation is incorrectly handled #23878 - Fix the panic that occurs when executing a query on the table that has
RANGEpartitions #23689 - Fix the issue: In the cluster of an earlier version, if the
tidb_enable_table_partitionvariable is set tofalse, the tables that contain partitions are handled as non-partitioned tables. Executingbatch point getqueries 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_dictfile 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-tasksis 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
TIMEtype to theINTEGERtype - Fix a bug that the behavior of the
bitwiseoperator is different from that of TiDB - Fix the issue of incorrect results when casting the
STRINGtype to theINTEGERtype - 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-01and the timezone offset is negative - Fix the issue that hash value of
Decimal256is 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_timestampwhich requires theSUPERprivilege 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
What’s on this page
Was this page helpful?