- 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 RC.2 Release Notes
Release date: May 15, 2020
TiDB version: 4.0.0-rc.2
Compatibility Changes
TiDB
- Remove the size limit for a single transaction (100 MB) when TiDB Binlog is enabled. Now the size limit for a transaction is 10 GB. However, if TiDB Binlog is enabled and the downstream is Kafka, configure the
txn-total-size-limitparameter according to the message size limit of 1 GB in Kafka #16941 - Change the behavior from querying the default time range to returning an error and requesting a specified time range if the time range is not specified when querying the
CLUSTER_LOGtable #17003 - If the unsupported
sub-partitionorlinear hashoption is specified when creating the partitioned table using theCREATE TABLEstatement, the normal table is created rather than the partitioned table with the options ignored #17197
- Remove the size limit for a single transaction (100 MB) when TiDB Binlog is enabled. Now the size limit for a transaction is 10 GB. However, if TiDB Binlog is enabled and the downstream is Kafka, configure the
TiKV
- Move the encryption-related configuration to the security-related configuration, which means changing
[encryption]in the TiKV configuration file to[security.encryption]#7810
- Move the encryption-related configuration to the security-related configuration, which means changing
Tools
TiDB Lightning
- Change the default SQL mode to
ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USERwhen importing data to improve compatibility #316 - Disallow accessing the PD or TiKV port in the tidb-backend mode #312
- Print the log information to the tmp file by default, and print the path of the tmp file when TiDB Lightning is started #313
- Change the default SQL mode to
Important Bug Fixes
TiDB
- Fix the issue that the wrong partition is chosen when the
WHEREclause has only one equivalent condition #17054 - Fix the issue of wrong results caused by building the incorrect Index range when the
WHEREclause only contains the string column #16660 - Fix the panic issue that occurs when executing the
PointGetquery in the transaction after theDELETEoperation #16991 - Fix the issue that the GC worker might encounter the deadlock when an error occurs #16915
- Avoid the unnecessary RegionMiss retry when the TiKV response is slow but not down #16956
- Change the log level in the client in the handshake phase of the MySQL protocol to
DEBUGto solve the problem that interferes with log output #16881 - Fix the issue that the Region is not pre-split according to the
PRE_SPLIT_REGIONSinformation defined by the table after theTRUNCATEoperation #16776 - Fix the issue of soaring goroutine caused by retry when TiKV is unavailable during the second phase of the two-phase commit #16876
- Fix the panic issue of statement execution when some expressions cannot be pushed down #16869
- Fix the wrong execution result of the IndexMerge operation on the partitioned table #17124
- Fix the performance reduction of
wide_tablecaused by the mutex contention of Memory Trackers #17234
- Fix the issue that the wrong partition is chosen when the
TiFlash
- Fix the issue that the system cannot start normally after the upgrade if the name of the database or table contains special characters
New Features
TiDB
- Add support for the
BACKUPandRESTOREcommands to back up and restore data #16960 - Support pre-checking the data volume in a single Region before commit and pre-splitting the Region when the data volume exceeds the threshold #16959
- Add the new
LAST_PLAN_FROM_CACHEvariable with aSessionscope to indicate whether the last executed statement hits the plan cache #16830 - Support recording the
Cop_timeinformation in slow log and theSLOW_LOGtable #16904 - Add in Grafana more metrics that monitor the memory status of Go Runtime #16928
- Support outputting the
forUpdateTSandRead Consistencyisolation level information in General Log #16946 - Support collapsing duplicate requests of resolving locks in TiKV Region #16925
- Support using the
SET CONFIGstatement to modify the configuration of PD/TiKV nodes #16853 - Support the
auto_randomoption in theCREATE TABLEstatement #16813 - Allocate TaskID for the DistSQL request to help TiKV better schedule and process requests #17155
- Support displaying the version information of the TiDB server after logging into the MySQL client #17187
- Support the
ORDER BYclause in theGROUP_CONCATfunction #16990 - Support displaying the
Plan_from_cacheinformation in slow log to indicate whether the statement hits plan cache #17121 - Add the feature that TiDB Dashboard can display the capacity information of TiFlash multi-disk deployment
- Add the feature of querying the TiFlash log using SQL statements in Dashboard
- Add support for the
TiKV
- Support encryption debugging for tikv-ctl, so that tikv-ctl can be used to operate and manage the cluster when the encryption storage is enabled #7698
- Support encrypting the lock column family in snapshots #7712
- Use the heatmap in the Grafana dashboard for Raftstore latency summary to better diagnose the jitter issue #7717
- Support setting the upper limit for the size of the gRPC message #7824
- Add in Grafana dashboard the encryption-related monitoring metrics #7827
- Support Application-Layer Protocol Negotiation (ALPN) #7825
- Add more statistics about Titan #7818
- Support using the task ID provided by the client as the identifier in the unified read pool to avoid that the priority of a task is lowered by another task in the same transaction #7814
- Improve the performance of the
batch insertrequest #7718
PD
- Eliminate the speed limit of removing peers when making a node offline #2372
TiFlash
- Change the name of the Count graph of Read Index in Grafana to Ops
- Optimize the data for opening file descriptors when the system load is low to reduce system resource consumption
- Add the capacity-related configuration parameter to limit the the data storage capacity
Tools
Bug Fixes
TiDB
- Improve the logic that determines whether to use vectorization for expression execution in multiple operators #16383
- Fix the issue that the
IndexMergehint fails to check the database name correctly #16932 - Forbid truncating the sequence object #17037
- Fix the issue that the
INSERT/UPDATE/ANALYZE/DELETEstatements can be performed on a sequence object #16957 - Fix the issue that the internal SQL statements in the bootstrap phase are not correctly marked as internal queries in the Statement Summary table #17062
- Fix the error that occurs when a filter condition supported by TiFlash but not by TiKV is pushed down to the
IndexLookupJoinoperator #17036 - Fix the concurrency issue of the
LIKEexpression that might occur after the collation is enabled #16997 - Fix the issue that the
LIKEfunction cannot correctly build theRangequery index after the collation is enabled #16783 - Fix the issue that a wrong value is returned when executing
@@LAST_PLAN_FROM_CACHEafter thePlan Cachestatement is triggered #16831 - Fix the issue that
TableFilteron the index is missed when calculating candidate paths forIndexMerge#16947 - Fix the issue that a physical query plan cannot be generated when using the
MergeJoinhint and theTableDualoperator exists #17016 - Fix the wrong capitalization of the values in the
Stmt_Typecolumn of the Statement Summary table #17018 - Fix the issue that the
Permission Deniederror is reported because the service cannot be started when different users use the sametmp-storage-path#16996 - Fix the issue that the
NotNullFlagresult type is incorrectly set for an expression whose result type is determined by multiple input columns, such asCASE WHEN#16995 - Fix the issue that the green GC might leave unresolved locks when dirty stores exist #16949
- Fix the issue that the green GC might leave unresolved locks when encountering a single key with multiple different locks #16948
- Fix the issue of inserting a wrong value in the
INSERT VALUEstatement because a sub-query refers to a parent query column #16952 - Fix the issue of incorrect results when using the
ANDoperator on theFloatvalue #16666 - Fix the wrong information of the
WAIT_TIMEfield in the expensive log #16907 - Fix the issue that the
SELECT FOR UPDATEstatement cannot be recorded in the slow log in the pessimistic transaction mode #16897 - Fix the wrong result that occurs when executing
SELECT DISTINCTon a column of theEnumorSettype #16892 - Fix the display error of
auto_random_basein theSHOW CREATE TABLEstatement #16864 - Fix the incorrect value of
string_valuein theWHEREclause #16559 - Fix the issue that the error message of the
GROUP BYwindow function is inconsistent with that of MySQL #16165 - Fix the issue that the
FLASH TABLEstatement fails to execute when the database name contains the uppercase letter #17167 - Fix the inaccurate memory tracing of the Projection executor #17118
- Fix the issue of incorrect time filtering of the
SLOW_QUERYtable in different time zones #17164 - Fix the panic issue that occurs when
IndexMergeis used with the virtual generated column #17126 - Fix the capitalization issue of the
INSTRandLOCATEfunction #17068 - Fix the issue that the
tikv server timeouterror is reported frequently after thetidb_allow_batch_copconfiguration is enabled #17161 - Fix the issue that the result of performing
XORoperation on the Float type is inconsistent with that of MySQL 8.0 #16978 - Fix the issue that no error is reported when the unsupported
ALTER TABLE REORGANIZE PARTITIONstatement is executed #17178 - Fix the issue that an error is reported when
EXPLAIN FORMAT="dot" FOR CONNECTION IDencounters an unsupported plan #17160 - Fix the record issue of the prepared statement in the
EXEC_COUNTcolumn of the Statement Summary table #17086 - Fix the issue that the value is not validated when setting the Statement Summary system variable #17129
- Fix the issue that an error is reported if an overflow value is used to query the
UNSIGNED BIGINTprimary key when the plan cache is enabled #17120 - Fix the incorrect QPS display by the machine instance and request type on the Grafana TiDB Summary dashboard #17105
TiKV
- Fix the issue that many empty Regions are generated after restoration #7632
- Fix the panic issue of Raftstore when receiving out-of-order read index responses #7370
- Fix the issue that an invalid storage or coprocessor read pool configuration might not be rejected when the unified thread pool is enabled #7513
- Fix the panic issue of the
joinoperation when the TiKV server is shut down #7713 - Fix the issue that no result is returned when searching TiKV slow logs via diagnostics API #7776
- Fix the issue that notable memory fragmentation is generated when the TiKV node is running for a long time #7556
- Fix the issue that the SQL statement fails to execute when an invalid date is stored #7268
- Fix the issue that the backup data cannot be restored from GCS #7739
- Fix the issue that KMS key ID is not validated during encryption at rest #7719
- Fix the underlying correctness issue of the Coprocessor in compilers of different architecture #7714 #7730
- Fix the
snapshot ingestionerror when encrytion is enabled #7815 - Fix the
Invalid cross-device linkerror when rewriting the configuration file #7817 - Fix the issue of wrong toml format when writing the configuration file to an empty file #7817
- Fix the issue that a destroyed peer in Raftstore can still process requests #7836
PD
- Fix the
404issue that occurs when using theregion keycommand in pd-ctl #2399 - Fix the issue that the monitor metrics of TSO and ID allocation are missing from the Grafana dashboard #2405
- Fix the issue that pd-recover is not included in the Docker image #2406
- Parse the path of data directory to an absolute path to fix the issue that TiDB Dashboard might not correctly display PD information #2420
- Fix the issue that there is no default output when using the
scheduler config shuffle-region-schedulercommand in pd-ctl #2416
- Fix the
TiFlash
- Fix the issue that the wrong information of used capacity is report in some scenarios
Tools
TiDB Binlog
TiCDC
- Fix the issue of using the wrong time zone when the
TZenvironment variable is not set #512 - Fix the issue that the owner does not clean up the resources when the server exits because some errors are not handled correctly #528
- Fix the issue that TiCDC might be stuck when reconnecting to TiKV #531
- Optimize the memory usage when initializing the table schema #534
- Use the
watchmode to monitor the replication status changes and perform quasi-real-time updates to reduce replication delay #481
- Fix the issue of using the wrong time zone when the
Backup & Restore (BR)
- Fix the issue that inserting data might trigger the
duplicate entryerror after BR restores a table with theauto_randomattribute #241
- Fix the issue that inserting data might trigger the
Was this page helpful?