- 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.0.4 Release Notes
Release Date: September 27, 2021
TiDB version: 5.0.4
Compatibility changes
TiDB
- Fix the issue that executing
SHOW VARIABLESin a new session is slow. This fix reverts some changes made in #19341 and might cause compatibility issues. #24326 - Change the default value of the
tidb_stmt_summary_max_stmt_countvariable from200to3000#25873
- The following bug fixes change execution results, which might cause upgrade incompatibilities:
- Fix the issue that TiDB returns wrong result when the children of
UNIONcontain theNULLvalue #26559 - Fix the issue that
greatest(datetime) union nullreturns empty string #26532 - Fix the issue that the behavior of the
last_dayfunction is incompatible in SQL mode #26000 - 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 a bug on the query range of prefix index #26029
- Fix the issue that the
LOAD DATAstatement might abnormally import non-utf8 data #25979 - Fix the issue that
insert ignore on duplicate updatemight insert wrong data when the secondary index has the same column with the primary key #25809 - Fix the issue that
insert ignore duplicate updatemight insert wrong data when a partitioned table has a clustered index #25846 - Fix the issue that the query result might be wrong when the key is the
ENUMtype in point get or batch point get #24562 - Fix the wrong result that occurs when dividing a
BIT-type value #23479 - Fix the issue that the results of
preparedstatements and direct queries might be inconsistent #22949 - Fix the issue that the query result might be wrong when a
YEARtype is compared with a string or an integer type #23262
- Fix the issue that TiDB returns wrong result when the children of
- Fix the issue that executing
Feature enhancements
TiDB
- Support setting
tidb_enforce_mpp=1to ignore the optimizer estimation and forcibly use the MPP mode #26382
- Support setting
TiKV
- Support changing TiCDC configurations dynamically #10645
PD
- Add OIDC-based SSO support for TiDB Dashboard #3884
TiFlash
- Support the
HAVING()function in DAG requests - Support the
DATE()function - Add Grafana panels for write throughput per instance
- Support the
Improvements
TiDB
- Trigger auto-analyze based on the histogram row count #24237
- Stop sending requests to a TiFlash node for a period if the node has failed and restarted before #26757
- Increase the
split regionupper limit to makesplit tableandpresplitmore stable #26657 - Support retry for MPP queries #26483
- Check the availability of TiFlash before launching MPP queries #1807
- Support the stable result mode to make the query result more stable #26084
- Support the MySQL system variable
init_connectand its associated features #18894 - Thoroughly push down the
COUNT(DISTINCT)aggregation function in the MPP mode #25861 - Print log warnings when the aggregation function cannot be pushed down in
EXPLAINstatements #25736 - Add error labels for
TiFlashQueryTotalCounterin Grafana dashboard #25327 - Support getting the MVCC data of a clustered index table through a secondary index by HTTP API #24209
- Optimize the memory allocation of
preparedstatement in parser #24371
TiKV
- Handle read ready and write ready separately to reduce read latency #10475
- Reduce the size of Resolved TS messages to save network bandwidth #2448
- Drop log instead of blocking threads when the slogger thread is overloaded and the queue is filled up #10841
- Make the slow log of TiKV coprocessor only consider the time spent on processing requests #10841
- Make prewrite as idempotent as possible to reduce the chance of undetermined errors #10587
- Avoid the false "GC can not work" alert under low write flow #10662
- Make the database to be restored always match the original cluster size during backup. #10643
- Ensure that the panic output is flushed to the log #9955
PD
- Improve the performance of synchronizing Region information between PDs #3993
Tools
Dumpling
- Support backing up MySQL-compatible databases that do not support the
START TRANSACTION ... WITH CONSISTENT SNAPSHOTor theSHOW CREATE TABLEsyntax #309
- Support backing up MySQL-compatible databases that do not support the
TiCDC
- Optimize memory management when Unified Sorter is using memory to sort #2553
- Prohibit operating TiCDC clusters across major or minor versions #2598
- Reduce the goroutine usage when a table's Regions are all transferred away from a TiKV node #2284
- Remove
file sorter#2326 - Always pull the old values from TiKV and the output is adjusted according to
enable-old-value#2301 - Improve the error message returned when a PD endpoint misses the certificate #1973
- Optimize workerpool for fewer goroutines when concurrency is high #2211
- Add a global gRPC connection pool and share gRPC connections among KV clients #2533
Bug Fixes
TiDB
- Fix the issue that TiDB might panic when querying a partitioned table and the partition key has the
IS NULLcondition #23802 - Fix the issue that the overflow check of the
FLOAT64type is different with that of MySQL #23897 - Fix the wrong character set and collation for the
case whenexpression #26662 - Fix the issue that committing pessimistic transactions might cause write conflicts #25964
- Fix a bug that the index keys in a pessimistic transaction might be repeatedly committed #26359 #10600
- Fix the issue that TiDB might panic when resolving the async commit locks #25778
- Fix a bug that a column might not be found when using
INDEX MERGE#25045 - Fix a bug that
ALTER USER REQUIRE SSLclears users'authentication_string#25225 - Fix a bug that the value of the
tidb_gc_scan_lock_modeglobal variable on a new cluster shows "PHYSICAL" instead of the actual default mode "LEGACY" #25100 - Fix the bug that the
TIKV_REGION_PEERSsystem table does not show the correctDOWNstatus #24879 - Fix the issue of memory leaks that occurs when HTTP API is used #24649
- Fix the issue that views do not support
DEFINER#24414 - Fix the issue that
tidb-server --helpexits with the code2#24046 - Fix the issue that setting the global variable
dml_batch_sizedoes not take effect #24709 - Fix the issue that using
read_from_storageand partitioned table at the same time causes an error #20372 - Fix the issue that TiDB panics when executing the projection operator #24264
- Fix the issue that statistics might cause queries to panic #24061
- Fix the issue that using the
approx_percentilefunction on aBITcolumn might panic #23662 - Fix the issue that the metrics on the Coprocessor Cache panel in Grafana are wrong #26338
- Fix the issue that concurrently truncating the same partition causes DDL statements to stuck #26229
- Fix the issue of wrong query results that occurs when the session variable is used as the
GROUP BYitem #27106 - Fix the wrong implicit conversion between
VARCHARand timestamp when joining tables #25902 - Fix the wrong results in associated subquery statements #27233
- Fix the issue that TiDB might panic when querying a partitioned table and the partition key has the
TiKV
- Fix the potential disk full issue caused by corrupted snapshot files #10813
- Fix the TiKV panic issue that occurs when upgrading from a pre-5.0 version with Titan enabled #10843
- Fix the issue that TiKV of a newer version cannot be rolled back to v5.0.x #10843
- Fix the TiKV panic issue that occurs when upgrading from a pre-5.0 version to a 5.0 version or later. If a cluster was upgraded from TiKV v3.x with Titan enabled before the upgrade, this cluster might encounter the issue. #10774
- Fix the parsing failure caused by the left pessimistic locks #26404
- Fix the panic that occurs when calculating duration on certain platforms #10571
- Fix the issue that the keys of
batch_get_commandin Load Base Split are unencoded #10542
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 the scheduling conflict issue that occurs when multiple schedulers are running at same time #3807
- Fix the issue that the scheduler might appear again even if it has been deleted #2572
TiFlash
- Fix the potential panic issue that occurs when running table scan tasks
- Fix the potential memory leak issue that occurs when executing MPP tasks
- Fix a bug that TiFlash raises the
duplicated regionerror when handling DAQ requests - Fix the issue of unexpected results when executing the aggregation functions
COUNTorCOUNT DISTINCT - Fix the potential panic issue that occurs when executing MPP tasks
- Fix a potential bug that TiFlash cannot restore data when deployed on multiple disks
- Fix the potential panic issue that occurs when deconstructing
SharedQueryBlockInputStream - Fix the potential panic issue that occurs when deconstructing
MPPTask - Fix the issue of unexpected results when TiFlash fails to establish MPP connections
- Fix the potential panic issue that occurs when resolving locks
- Fix the issue that the store size in metrics is inaccurate under heavy writing
- Fix a bug of incorrect results that occurs when queries contain filters like
CONSTANT,<,<=,>,>=, orCOLUMN - Fix the potential issue that TiFlash cannot garbage-collect the delta data after running for a long time
- Fix a potential bug that metrics display wrong values
- Fix the potential issue of data inconsistency that occurs when TiFlash is deployed on multiple disks
Tools
Dumpling
- Fix the issue that the execution of
show table statusis stuck in MySQL 8.0.3 or a later version #322
- Fix the issue that the execution of
TiCDC
- Fix the issue of process panic that occurs when encoding the data types such as
mysql.TypeString, mysql.TypeVarString, mysql.TypeVarcharinto JSON #2758 - Fix a data inconsistency issue that occurs because multiple processors might write data to the same table when this table is being re-scheduled #2417
- Decrease the gRPC window size to avoid the OOM that occurs when TiCDC captures too many Regions #2724
- Fix the error that the gRPC connection is frequently broken when the memory pressure is high #2202
- Fix a bug that causes TiCDC to panic on the unsigned
TINYINTtype #2648 - Fix the issue that TiCDC Open Protocol outputs an empty value when inserting a transaction and deleting data of the same row in the upstream #2612
- Fix a bug that DDL handling fails when a changefeed starts at the finish TS of a schema change #2603
- Fix the issue that irresponsive downstreams interrupt the replication task in old owner until the task times out #2295
- Fix a bug in metadata management #2558
- Fix the issue of data inconsistency that occurs after the TiCDC owner switch #2230
- Fix the issue that outdated capture might appear in the output of the
capture listcommand #2388 - Fix the
ErrSchemaStorageTableMisserror that occurs when the DDL Job duplication is encountered in the integrated test #2422 - Fix the bug that a changefeed cannot be removed if the
ErrGCTTLExceedederror occurs #2391 - Fix a bug that replicating large tables to cdclog fails #1259 #2424
- Fix the CLI backward compatibility issue #2373
- Fix the issue of insecure concurrent access to the map in
SinkManager#2299 - Fix the issue of potential DDL loss when the owner crashes when executing DDL statements #1260
- Fix the issue that the lock is resolved immediately after a Region is initialized #2188
- Fix the issue of extra partition dispatching that occurs when adding a new partitioned table #2263
- Fix the issue that TiCDC keeps warning on removed changefeeds #2156
- Fix the issue of process panic that occurs when encoding the data types such as
Was this page helpful?