- 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 5.1.2 Release Notes
Release Date: September 27, 2021
TiDB version: 5.1.2
Compatibility changes
TiDB
The following bug fixes change execution results, which might cause upgrade incompatibilities:
- Fix the issue that
greatest(datetime) union nullreturns empty string #26532 - Fix the issue that the
havingclause might not work correctly #26496 - Fix the wrong execution results that occur when the collations around the
betweenexpression are different #27146 - Fix the wrong execution results that occur when the column in the
group_concatfunction has a non-bin collation #27429 - Fix an issue that using a
count(distinct)expression on multiple columns returns wrong result when the new collation is enabled #27091 - Fix the result wrong that occurs when the argument of the
extractfunction is a negative duration #27236 - Fix the issue that inserting an invalid date does not report an error when the
SQL_MODEis 'STRICT_TRANS_TABLES' #26762 - Fix the issue that using an invalid default date does not report an error when the
SQL_MODEis 'NO_ZERO_IN_DATE' #26766
- Fix the issue that
Tools
TiCDC
- Set the compatible version from
5.1.0-alphato5.2.0-alpha#2659
- Set the compatible version from
Improvements
TiDB
- Trigger auto-analyze by histogram row count and increase the accuracy of this trigger action #24237
TiKV
PD
TiFlash
- Support the
DATE()function - Add Grafana panels for write throughput per instance
- Optimize the performance of the
leader-readprocess - Accelerate the process of canceling MPP tasks
- Support the
Tools
TiCDC
- Optimize memory management when the Unified Sorter is using memory to sort data #2553
- Optimize workerpool for fewer goroutines when concurrency is high #2211
- Reduce goroutine usage when a table's Region transfer away from a TiKV node #2284
- Add a global gRPC connection pool and share gRPC connections among KV clients #2534
- Prohibit operating TiCDC clusters across major and minor versions #2599
Dumpling
- Support backing up MySQL-compatible databases that do not support
START TRANSACTION ... WITH CONSISTENT SNAPSHOTandSHOW CREATE TABLE#309
- Support backing up MySQL-compatible databases that do not support
Bug fixes
TiDB
- Fix the potential wrong results of index hash join when the hash column is the
ENUMtype #27893 - Fix a batch client bug that recycle idle connection might block sending requests in some rare cases #27678
- Fix the issue that the overflow check of the
FLOAT64type is different with that of MySQL #23897 - Fix the issue that TiDB returns an
unknowerror while it should return thepd is timeouterror #26147 - Fix the wrong character set and collation for the
case whenexpression #26662 - Fix the potential
can not found column in Schema columnerror for MPP queries #28148 - Fix a bug that TiDB might panic when TiFlash is shutting down #28096
- Fix the issue of wrong range caused by using
enum like 'x%'#27130 - Fix the Common Table Expression (CTE) dead lock issue when used with IndexLookupJoin #27410
- Fix a bug that retryable deadlocks are incorrectly recorded into the
INFORMATION_SCHEMA.DEADLOCKStable #27400 - Fix the issue that the
TABLESAMPLEquery result from partitioned tables is not sorted as expected #27349 - Remove the unused
/debug/sub-optimal-planHTTP API #27265 - Fix a bug that the query might return wrong results when the hash partitioned table deals with unsigned data #26569
- Fix a bug that creating partition fails if
NO_UNSIGNED_SUBTRACTIONis set #26765 - Fix the issue that the
distinctflag is missing whenApplyis converted toJoin#26958 - Set a block duration for the newly recovered TiFlash node to avoid blocking queries during this time #26897
- Fix a bug that might occur when the CTE is referenced more than once #26212
- Fix a CTE bug when MergeJoin is used #25474
- Fix a bug that the
SELECT FOR UPDATEstatement does not correctly lock the data when a normal table joins a partitioned table #26251 - Fix the issue that the
SELECT FOR UPDATEstatement returns an error when a normal table joins a partitioned table #26250 - Fix the issue that
PointGetdoes not use the lite version of resolving lock #26562
- Fix the potential wrong results of index hash join when the hash column is the
TiKV
- Fix a panic issue that occurs after TiKV is upgraded from v3.x to later versions #10902
- Fix the potential disk full issue caused by corrupted snapshot files #10813
- Make the slow log of TiKV coprocessor only consider the time spent on processing requests #10841
- Drop log instead of blocking threads when the slogger thread is overloaded and the queue is filled up #10841
- Fix a panic issue that occurs when processing Coprocessor requests times out #10852
- Fix the TiKV panic issue that occurs when upgrading from a pre-5.0 version with Titan enabled #10842
- Fix the issue that TiKV of a newer version cannot be rolled back to v5.0.x #10842
- Fix the issue that TiKV might delete files before ingesting data to RocksDB #10438
- Fix the parsing failure caused by the left pessimistic locks #26404
PD
- Fix the issue that PD does not fix the down peers in time #4077
- Fix the issue that the replica count of the default placement rules stays constant after
replication.max-replicasis updated #3886 - Fix a bug that PD might panic when scaling out TiKV #3868
- Fix a bug that the hot Region scheduler cannot work when the cluster has the evict leader scheduler #3697
TiFlash
- Fix the issue of unexpected results when TiFlash fails to establish MPP connections
- Fix the potential issue of data inconsistency that occurs when TiFlash is deployed on multiple disks
- Fix a bug that MPP queries get wrong results when TiFlash server is under high load
- Fix a potential bug that MPP queries hang forever
- Fix the panic issue when operating store initialization and DDL simultaneously
- Fix a bug of incorrect results that occurs when queries contain filters like
CONSTANT,<,<=,>,>=, orCOLUMN - Fix the potential panic issue when
Snapshotis applied simultaneously with multiple DDL operations - Fix the issue that the store size in metrics is inaccurate under heavy writing
- Fix the potential issue that TiFlash cannot garbage-collect the delta data after running for a long time
- Fix the issue of wrong results when the new collation is enabled
- Fix the potential panic issue that occurs when resolving locks
- Fix a potential bug that metrics display wrong values
Tools
Backup & Restore (BR)
- Fix the issue that the average speed is not accurate during data backup and restore #1405
Dumpling
TiCDC
- Fix a bug that the JSON encoding might cause panic when processing a string type value that is
stringor[]byte#2758 - Reduce gRPC window size to avoid OOM #2673
- Fix a gRPC
keepaliveerror under high memory pressure #2202 - Fix a bug that an unsigned
tinyintcauses TiCDC to panic #2648 - Fix an empty value issue in TiCDC Open Protocol. An empty value is no longer output when there is no change in one transaction. #2612
- Fix a bug in DDL handling during manual restarts #2603
- Fix the issue that
EtcdWorker's snapshot isolation might be wrongly violated when managing the metadata #2559 - Fix a bug that multiple processors might write data to the same table when TiCDC is rescheduling the table #2230
- Fix a bug that changefeed might be reset unexpectedly when TiCDC gets the
ErrSchemaStorageTableMisserror #2422 - Fix a bug that changefeed cannot be removed when TiCDC gets the
ErrGCTTLExceedederror #2391 - Fix a bug that TiCDC fails to synchronize large tables to cdclog #1259 #2424
- Fix a bug that the JSON encoding might cause panic when processing a string type value that is
Was this page helpful?