- 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 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 TABLE SET TIFLASH MODEALTER 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>ROLLBACKSAVEPOINTSELECTSET 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_PRIVILEGESVARIABLES_INFOVIEWS
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.9 Release Notes
Release date: December 21, 2020
TiDB version: 4.0.9
Compatibility Changes
TiDB
- Deprecate the
enable-streamingconfiguration item #21055
- Deprecate the
TiKV
- Reduce I/O and mutex contention when encryption at rest is enabled. The change is backwardly incompatible. If users need to downgrade the cluster to a version earlier than v4.0.9,
security.encryption.enable-file-dictionary-logmust be disabled and TiKV must be restarted before the downgrade. #9195
- Reduce I/O and mutex contention when encryption at rest is enabled. The change is backwardly incompatible. If users need to downgrade the cluster to a version earlier than v4.0.9,
New Features
TiFlash
- Support storing the latest data of the storage engine on multiple disks (experimental)
TiDB Dashboard
- Support displaying and sorting by all fields in the SQL Statements page #749
- Support zooming and panning the topology graph #772
- Support displaying the disk usage information in the SQL Statements and Slow Queries pages #777
- Support exporting list data in the SQL Statements and Slow Queries pages #778
- Support customizing the Prometheus address #808
- Add a page for cluster statistics #815
- Add more time-related fields in the Slow Queries details #810
Improvements
TiDB
- Avoid the (index) merge join in a heuristical way when converting equal conditions to other conditions #21146
- Differentiate the types of user variables #21107
- Support setting the
GOGCvariable in the configuration file #20922 - Make the dumped binary time (
TimestampandDatetime) more compatible with MySQL #21135 - Provide an error message for statements that use the
LOCK IN SHARE MODEsyntax #21005 - Avoid outputting unnecessary warnings or errors when folding constants in shortcut-able expressions #21040
- Raise an error when preparing the
LOAD DATAstatement #21199 - Ignore the attribute of the integer zero-fill size when changing the integer column types #20986
- Add the executor-related runtime information of DML statements in the result of
EXPLAIN ANALYZE#21066 - Disallow multiple updates on the primary key in a singe SQL statements #21113
- Add a monitoring metric for the connection idle time #21301
- Temporarily enable the slow log when the
runtime/tracetool is running #20578
TiKV
- Add the tag to trace the source of the
splitcommand #8936 - Support dynamically changing the
pessimistic-txn.pipelinedconfiguration #9100 - Reduce the impact on performance when running Backup & Restore and TiDB Lightning #9098
- Add monitoring metrics for the ingesting SST errors #9096
- Prevent the leader from being hibernated when some peers still need to replicate logs #9093
- Increase the success rate of the pipelined pessimistic locking #9086
- Change the default value of
apply-max-batch-sizeandstore-max-batch-sizeto1024#9020 - Add the
max-background-flushesconfiguration item #8947 - Disable
force-consistency-checksby default to improve performance #9029 - Offload the queries on the Region size from
pd heartbeat workertosplit check worker#9185
- Add the tag to trace the source of the
PD
TiDB Dashboard
TiFlash
- Reduce the latency of replica reads
- Refine TiFlash's error messages
- Limit the memory usage of cache data when the data volume is huge
- Add a monitoring metric for the number of coprocessor tasks being handled
Tools
Backup & Restore (BR)
- Disallow the ambiguous
--checksum falseargument in the command line, which does not correctly disable checksum. Only--checksum=falseis accepted. #588 - Support changing the PD configuration temporarily so that PD can recover the original configuration after BR accidentally exists #596
- Support analyzing tables after restore #622
- Retry for the
read index not readyandproposal in merging modeerrors #626
- Disallow the ambiguous
TiCDC
- Add an alert for enabling TiKV's Hibernate Region feature #1120
- Reduce memory usage in the schema storage #1127
- Add the feature of unified sorter, which accelerates replication when the data size of the incremental scan is large (experimental) #1122
- Support configuring the maximum message size and the maximum message batch in the TiCDC Open Protocol message (only for Kafka sink) #1079
Dumpling
- Retry dumping data on failed chunks #182
- Support configuring both the
-Fand-rarguments at the same time #177 - Exclude system databases in
--filterby default #194 - Support the
--transactional-consistencyparameter and support rebuilding MySQL connections during retry #199 - Support using the
-c,--compressparameter to specify the compression algorithm used by Dumpling. An empty string means no compression. #202
TiDB Lightning
- Filter out all system schemas by default #459
- Support setting a default value for the auto-random primary key for the Local-backend or Importer-backend #457
- Use range properties to make the range split more precise in Local-backend #422
- Support a human-readable format (such as "2.5 GiB") in
tikv-importer.region-split-size,mydumper.read-block-size,mydumper.batch-size, andmydumper.max-region-size#471
TiDB Binlog
- Exit the Drainer process with the non-zero code if the upstream PD is down or if applying DDL or DML statements to the downstream fails #1012
Bug Fixes
TiDB
- Fix the issue of incorrect results when using a prefix index with the
ORcondition #21287 - Fix a bug that might cause panic when automatic retry is enabled #21285
- Fix a bug that occurs when checking partition definition according to column type #21273
- Fix a bug that the value type of the partition expression is not consistent with the partition column type #21136
- Fix a bug that the hash-type partition does not check whether the partition name is unique #21257
- Fix the wrong results returned after inserting a value of the non-
INTtype into the hash partitioned table #21238 - Fix the unexpected error when using index join in the
INSERTstatement in some cases #21249 - Fix the issue that the
BigIntunsigned column value in theCASE WHENoperator is incorrectly converted to theBigIntsigned value #21236 - Fix a bug that index hash join and index merge join do not consider collation #21219
- Fix a bug that the partitioned table does not consider collation in the
CREATE TABLEandSELECTsyntax #21181 - Fix the issue that the query result of
slow_querymight miss some rows #21211 - Fix the issue that
DELETEmight not delete data correctly when the database name is not in a pure lower representation #21206 - Fix a bug that causes schema change after DML operations #21050
- Fix the bug that the coalesced column cannot be queried when using join #21021
- Fix the wrong results of some semi-join queries #21019
- Fix the issue that the table lock does not take effect on the
UPDATEstatement #21002 - Fix the issue of stack overflow that occurs when building the recursive view #21001
- Fix the unexpected result returned when performing index merge join operations on outer join #20954
- Fix the issue that sometimes a transaction that has an undetermined result might be treated as failed #20925
- Fix the issue that
EXPLAIN FOR CONNECTIONcannot show the last query plan #21315 - Fix the issue that when Index Merge is used in a transaction with the Read Committed isolation level, the result might be incorrect #21253
- Fix the auto-ID allocation failure caused by the transaction retry after the write conflict #21079
- Fix the issue that JSON data cannot be correctly imported to TiDB using
LOAD DATA#21074 - Fix the issue that the default value of newly added
Enum-type columns is incorrect #20998 - Fix the issue that the
adddatefunction inserts invalid characters #21176 - Fix the issue that the wrong
PointGetplan generated in some situations causes wrong results #21244 - Ignore the conversion of daylight saving time in the
ADD_DATEfunction to be compatible with MySQL #20888 - Fix a bug that prevents inserting strings with trailing spaces that exceed
varcharorchar's length constraint #21282 - Fix a bug that does not converting the integer from
[1, 69]to[2001, 2069]or from[70, 99]to[1970, 1999]when comparingintwithyear#21283 - Fix the panic caused by the overflowing result of the
sum()function when calculating theDoubletype field #21272 - Fix a bug that
DELETEfails to add lock on the unique key #20705 - Fix a bug that snapshot reads hits the lock cache #21539
- Fix an issue of potential memory leak after reading a lot of data in a long-lived transaction #21129
- Fix the issue that omitting the table alias in a subquery will have a syntax error returned #20367
- Fix the issue that when the argument of the
INfunction in a query is the time type, the query might return an incorrect result #21290
- Fix the issue of incorrect results when using a prefix index with the
TiKV
- Fix the issue that Coprocessor might return wrong results when there are more than 255 columns #9131
- Fix the issue that Region Merge might cause data loss during network partition #9108
- Fix the issue that the
ANALYZEstatement might cause panic when using thelatin1character set #9082 - Fix the wrong results returned when converting the numeric type to the time type #9031
- Fix a bug that TiDB Lightning fails to ingest SST files to TiKV with the Importer-backend or Local-backend when Transparent Data Encryption (TDE) is enabled #8995
- Fix the invalid
advertise-status-addrvalue (0.0.0.0) #9036 - Fix the issue that an error is returned indicating that a key exists when this key is locked and deleted in a committed transaction #8930
- Fix the issue that the RocksDB cache mapping error causes data corruption #9029
- Fix a bug that Follower Read might return stale data after the leader is transferred #9240
- Fix the issue that stale old values might be read in the pessimistic lock #9282
- Fix a bug that replica read might get stale data after the leader transfer #9240
- Fix the issue of TiKV crash that occurs when receiving
SIGPROFafter profiling #9229
PD
TiDB Dashboard
TiFlash
- Fix the issue that
INFORMATION_SCHEMA.CLUSTER_HARDWAREmight contain the information of disks that are not in use - Fix the issue that the estimate on memory usage of Delta Cache is smaller than the actual usage
- Fix the memory leak caused by thread information statistics
- Fix the issue that
Tools
Backup & Restore (BR)
- Fix the failure caused by special characters in S3 secret access keys #617
TiCDC
- Fix the issue that multiple owners might exist when the owner campaign key is deleted #1104
- Fix a bug that TiCDC might fail to continue replicating data when a TiKV node crashes or recovers from a crash. This bug only exists in v4.0.8. #1198
- Fix the issue that the metadata is repeatedly flushed to etcd before a table is initialized #1191
- Fix an issue of replication interruption caused by early GC or the latency of updating
TableInfowhen the schema storage caches TiDB tables #1114 - Fix the issue that the schema storage costs too much memory when DDL operations are frequent #1127
- Fix the goroutine leak when a changefeed is paused or stopped #1075
- Increase the maximum retry timeout to 600 seconds in Kafka producer to prevent replication interruption caused by the service or network jitter in the downstream Kafka #1118
- Fix a bug that the Kafka batch size does not take effect #1112
- Fix a bug that some tables' row change might be lost when the network between TiCDC and PD has jitter and when there are paused changefeeds being resumed at the same time #1213
- Fix a bug that the TiCDC process might exit when the network between TiCDC and PD is not stable #1218
- Use a singleton PD client in TiCDC and fix a bug that TiCDC closes PD client by accident which causes replication block #1217
- Fix a bug that the TiCDC owner might consume too much memory in the etcd watch client #1224
Dumpling
- Fix the issue that Dumpling might get blocked when its connection to the MySQL database server is closed #190
TiDB Lightning
Was this page helpful?