TiDB is an open source distributed HTAP database compatible with the MySQL protocol

Overview

LICENSE Language Build Status Go Report Card GitHub release GitHub release date CircleCI Status Coverage Status GoDoc

What is TiDB?

TiDB ("Ti" stands for Titanium) is an open-source NewSQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It is MySQL compatible and features horizontal scalability, strong consistency, and high availability.

  • Horizontal Scalability

    TiDB expands both SQL processing and storage by simply adding new nodes. This makes infrastructure capacity planning both easier and more cost-effective than traditional relational databases which only scale vertically.

  • MySQL Compatible Syntax

    TiDB acts like it is a MySQL 5.7 server to your applications. You can continue to use all of the existing MySQL client libraries, and in many cases, you will not need to change a single line of code in your application. Because TiDB is built from scratch, not a MySQL fork, please check out the list of known compatibility differences.

  • Distributed Transactions

    TiDB internally shards table into small range-based chunks that we refer to as "Regions". Each Region defaults to approximately 100 MiB in size, and TiDB uses an optimized Two-phase commit to ensure that Regions are maintained in a transactionally consistent way.

  • Cloud Native

    TiDB is designed to work in the cloud -- public, private, or hybrid -- making deployment, provisioning, operations, and maintenance simple.

    The storage layer of TiDB, called TiKV, is a Cloud Native Computing Foundation (CNCF) Graduated project. The architecture of the TiDB platform also allows SQL processing and storage to be scaled independently of each other in a very cloud-friendly manner.

  • Minimize ETL

    TiDB is designed to support both transaction processing (OLTP) and analytical processing (OLAP) workloads. This means that while you may have traditionally transacted on MySQL and then Extracted, Transformed and Loaded (ETL) data into a column store for analytical processing, this step is no longer required.

  • High Availability

    TiDB uses the Raft consensus algorithm to ensure that data is highly available and safely replicated throughout storage in Raft groups. In the event of failure, a Raft group will automatically elect a new leader for the failed member, and self-heal the TiDB cluster without any required manual intervention. Failure and self-healing operations are also transparent to applications.

For more details and latest updates, see TiDB docs and release notes.

Community

You can join these groups and chats to discuss and ask TiDB related questions:

In addition, you may enjoy following:

For support, please contact PingCAP.

Quick start

To start using TiDB

See Quick Start Guide.

To start developing TiDB

See Get Started chapter of TiDB Dev Guide.

Contributing

The community repository hosts all information about the TiDB community, including how to contribute to TiDB, how TiDB community is governed, how special interest groups are organized, etc.

contribution-map

Contributions are welcomed and greatly appreciated. See Contribution to TiDB for details on typical contribution workflows. For more contributing information, click on the contributor icon above.

Adopters

View the current list of in-production TiDB adopters here.

Case studies

Architecture

architecture

License

TiDB is under the Apache 2.0 license. See the LICENSE file for details.

Acknowledgments

Issues
  • privilege: fix `REVOKE` privilege check incompatibility with MySQL (#13014)

    privilege: fix `REVOKE` privilege check incompatibility with MySQL (#13014)

    cherry-pick #13014 to release-3.0


    What problem does this PR solve?

    Originally, execute REVOKE query demand user have SuperPriv, which is incompatibility with MySQL in such case.

    create user u1;
    create user u2;
    grant select on *.* to u1 with grant option.
    grant select on *.* to u2;
    // login as u1
    revoke select on *.* from u2;
    

    TiDB will return error, MySQL is ok.

    What is changed and how it works?

    change privilege check for REVOKE like GRANT. If a user has grant option on some object like table or db, he can revoke privilege on these object from other users.

    Check List

    Tests

    • Unit test

    Code changes

    Side effects

    • Increased code complexity

    Related changes

    • Need to cherry-pick to the release branch

    Release note

    • fix privilege check for REVOKE
    type/compatibility status/LGT2 type/bug-fix component/privilege status/can-merge 
    opened by sre-bot 418
  • planner: Implement PointGet in TryFastPlan for range/list paritition table

    planner: Implement PointGet in TryFastPlan for range/list paritition table

    What problem does this PR solve?

    Issue Number: related to #24476, #24150

    Problem Summary:

    • planner: Implement PointGet in TryFastPlan for range/list paritition table. Will implement BatchGet in the next PR.

    What is changed and how it works?

    What's Changed:

    • Change the tryPointGetPlan logic. Let it permit other types of partition table other than hash partition table. Add logic to locate partition table.

    How it Works:

    • After getting paris variable, we use it to locate the partition where data point lies.

    Check List

    Tests

    • Unit test

    Side effects

    • N/A

    Release note

    • planner: Implement PointGet in TryFastPlan for range/list paritition table
    type/enhancement status/LGT2 sig/planner sig/execution sig/sql-infra size/XL 
    opened by zhuo-zhi 144
  • Release 4.0

    Release 4.0

    What problem does this PR solve?

    Issue Number: close #xxx

    Problem Summary:

    What is changed and how it works?

    Proposal: xxx

    What's Changed:

    How it Works:

    Related changes

    • PR to update pingcap/docs/pingcap/docs-cn:
    • Need to cherry-pick to the release branch

    Check List

    Tests

    • Unit test
    • Integration test
    • Manual test (add detailed scripts or steps below)
    • No code

    Side effects

    • Performance regression
      • Consumes more CPU
      • Consumes more MEM
    • Breaking backward compatibility

    Release note

    sig/planner first-time-contributor do-not-merge/work-in-progress needs-rebase size/XXL 
    opened by alex-quan-001 81
  • Add PROXY protocol support

    Add PROXY protocol support

    Add PROXY protocol V1 and V2 support.

    usage: tidb-server --proxy-protocol-networks "*" --proxy-protocol-header-timeout 5

    Add --proxy-protocol-networks command parameter for PROXY protocol enable or disable. If you want to limit HAProxy server IP range, you can set --proxy-protocol-networks parameter to a CIDRs and split by ",". For example:

    tidb-server --proxy-protocol-networks "192.168.1.0/24,192.168.2.0/24"

    For more information about PROXY protocol please refer https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt

    proposal contribution status/LGT2 
    opened by blacktear23 72
  • test leak in TestInfo

    test leak in TestInfo

    FAIL:TestInfo

    Bug Report

    Please answer these questions before submitting your issue. Thanks!

    1. What did you do? If possible, provide a recipe for reproducing the error. https://internal.pingcap.net/idc-jenkins/blue/rest/organizations/jenkins/pipelines/tidb_ghpr_unit_test/runs/24373/nodes/84/log/?start=0
    [2020-02-17T03:08:06.587Z] === RUN   TestInfo
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.308 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.TestInfo\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain_test.go:150\ntesting.tRunner\n\t/usr/local/go/src/testing/testing.go:909"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.311 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.314 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.318 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.321 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.324 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.327 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.587Z] [2020/02/17 11:08:01.330 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.334 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.337 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.340 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.343 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.346 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] [2020/02/17 11:08:01.349 +08:00] [ERROR] [syncer.go:199] ["close session failed"] [] [stack="github.com/pingcap/tidb/ddl/util.(*schemaVersionSyncer).Done\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/ddl/util/syncer.go:199\ngithub.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop\n\t/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:485"]
    [2020-02-17T03:08:06.588Z] {"level":"warn","ts":"2020-02-17T11:08:01.350+0800","caller":"clientv3/retry_interceptor.go:61","msg":"retrying of unary invoker failed","target":"endpoint://client-516b5633-69d2-49d2-a3a5-8ed7da21c073/localhost:1525069566242647020","attempt":0,"error":"rpc error: code = NotFound desc = etcdserver: requested lease not found"}
    [2020-02-17T03:08:06.588Z] --- FAIL: TestInfo (2.75s)
    [2020-02-17T03:08:06.588Z]     leaktest.go:143: Test TestInfo check-count 50 appears to have leaked: github.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop(0xc0006026c0, 0x2faf080)
    [2020-02-17T03:08:06.588Z]         	/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:469 +0x269
    [2020-02-17T03:08:06.588Z]         created by github.com/pingcap/tidb/domain.(*Domain).Init
    [2020-02-17T03:08:06.588Z]         	/home/jenkins/agent/workspace/[email protected]/go/src/github.com/pingcap/tidb/domain/domain.go:696 +0x59c
    [2020-02-17T03:08:06.588Z] FAIL
    
    1. What did you expect to see?

    2. What did you see instead?

    3. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

    type/bug component/test severity/minor 
    opened by wjhuang2016 71
  • tidb: support a plan cache for prepared statements

    tidb: support a plan cache for prepared statements

    Since prepared statements are compiled and optimized whenever they are executed, there is a room to reduce the execution time of the prepared statements.

    In order to do that we can compile a prepared statement once and reuse the compiled plan by converting parameter expressions to deferred ones, which are evaluated as late as possible, and storing the plan to a cache.

    The implentation has some limitations:

    • the prepared statements with limit expressions are not cached
    • the statistics related to the cache are not supported
    • on-demand methods for invalidating the cache are not supported
    type/enhancement type/performance contribution status/LGT2 
    opened by dbjoa 68
  • executor,kv: support timebounded staleness transaction

    executor,kv: support timebounded staleness transaction

    Signed-off-by: yisaer [email protected]

    What problem does this PR solve?

    Issue Number: ref https://github.com/pingcap/tidb/issues/19817

    Problem Summary: Support time bounded staleness transaction.

    What is changed and how it works?

    What's Changed: Support time bounded staleness transaction by:

    1. maintaining resolveTS for each store in an extra goroutine.
    2. support time-bounded staleness transaction in executeBegin

    Check List

    Tests

    • Unit test

    I have tested it with https://github.com/tikv/tikv/pull/9791, it seems work well.

    Release note

    • No release note
    status/LGT2 sig/execution status/can-merge sig/sql-infra size/XXL 
    opened by Yisaer 65
  • expression: optimize function IN using hashmap

    expression: optimize function IN using hashmap

    PCP #12970

    What problem does this PR solve?

    optimize function IN using hashmap according to #12970

    What is changed and how it works?

    have implemented InInt currently, will continue to implement other IN functions.

    Check List

    Tests

    • Unit test

    Side effects

    • Increased code complexity
    contribution status/LGT2 component/expression status/can-merge 
    opened by js00070 64
  • table: fix zero date in different sqlmode

    table: fix zero date in different sqlmode

    What problem does this PR solve?

    Issue Number: close #19892, #19634

    Problem Summary:

    What is changed and how it works?

    What's Changed:

    How it Works:

    Related changes

    • PR to update pingcap/docs/pingcap/docs-cn:

    Check List

    Tests

    • Unit test
    • Integration test
    • Manual test (add detailed scripts or steps below)

    Side effects

    Release note

    • The same behavior of NO_ZERO_DATE and NO_ZERO_IN_DATE to MySQL's in INSERT/UPDATE statement
    contribution status/LGT2 component/expression sig/execution status/can-merge needs-cherry-pick-4.0 
    opened by 9547 63
  • *: modify the switch to control global stats

    *: modify the switch to control global stats

    What problem does this PR solve?

    sub-PR for the PR #22472

    Problem Summary:

    We modify the switch to control global-stats.

    Use tidb_partition_prune_mode to control global-stats. There are two modes:

    • static
      • do not use global stats
    • dynamic
      • try to use global stats
      • if not, use pseudo stats

    design doc: link

    Related changes

    • PR to update pingcap/docs/pingcap/docs-cn:
    • Need to cherry-pick to the release branch

    Check List

    Tests

    • Unit test
    • Integration test
    • Manual test (add detailed scripts or steps below)
    • No code

    Side effects

    • Performance regression
      • Consumes more CPU
      • Consumes more MEM
    • Breaking backward compatibility

    Release note

    • No release note
    status/LGT2 sig/planner component/statistics sig/execution sig/sql-infra size/L 
    opened by rebelice 62
Releases(v5.0.6)
  • v5.0.6(Dec 30, 2021)

    Bug fixes

    • Fix the panic that might occur when DML and DDL statements are executed concurrently #30940
    • Fix the TiDB panic when executing the ALTER TABLE.. ADD INDEX statement in some cases #27687
    • Fix the issue that the enforce-mpp configuration does not take effect in v5.0.4 #29252
    • Fix the TiDB panic when inserting invalid date values concurrently #25393
    • Fix the unexpected can not found column in Schema column error for queries in the MPP mode #30980
    • Fix the unexpected index out of range error when the planner is doing join reorder #24095
    • Fix the wrong result of CONCAT(IFNULL(TIME(3)) #29498
    • Fix wrong results of GREATEST and LEAST when passing in unsigned BIGINT arguments #30101
    • Fix the issue that a SQL operation is canceled when its JSON type column joins its CHAR type column #29401
    • Fix the data inconsistency issue caused by incorrect usage of lazy existence check and untouched key optimization #30410
    • Fix the issue that window functions might return different results when using a transaction or not #29947
    • Fix the issue that the SQL statements that contain cast(integer as char) union string return wrong results #29513
    • Fix the issue that the Column 'col_name' in field list is ambiguous error is reported unexpectedly when a SQL statement contains natural join #25041
    • Fix the issue that the index out of range [1] with length 1 error is reported when a SQL statement evaluates an aggregation result on the result of join in some cases #1978
    Source code(tar.gz)
    Source code(zip)
  • v4.0.16(Dec 17, 2021)

    Improvements

    • Upgrade the Grafana version from 7.5.7 to 7.5.11

    Bug fixes

    • Fix the query panic caused by overflow in the statistics module when converting a range to points for cost estimation #23625
    • Fix wrong results of the control functions (such as IF and CASE WHEN) when using the ENUM type data as parameters of such functions #23114
    • Fix the issue that the GREATEST function returns inconsistent results due to different values of tidb_enable_vectorized_expression (on or off) #29434
    • Fix the panic when applying index join on prefix indexes in some cases #24547
    • Fix the issue that planner might cache invalid plans for join in some cases #28087
    • Fix a bug that TiDB cannot insert null into a non-null column when sql_mode is empty #11648
    • Fix the wrong result type of the GREATEST and LEAST functions #29019
    • Fix the privilege check fail error when performing the grant and revoke operations to grant and revoke global level privileges #29675
    • Fix the panic when using the CASE WHEN function on the ENUM data type #29357
    • Fix wrong results of the microsecond function in vectorized expressions #29244
    • Fix wrong results of the hour function in vectorized expression #28643
    • Fix the issue that optimistic transaction conflicts might cause transactions to block each other #11148
    • Fix the issue of incomplete log information from the auto analyze result #29188
    • Fix the issue that using an invalid default date does not report an error when the SQL_MODE is 'NO_ZERO_IN_DATE' #26766
    • Fix the issue that the Coprocessor Cache panel in Grafana does not display metrics. Now, Grafana displays the number of hits/miss/evict #26338
    • Fix the issue that concurrently truncating the same partition causes DDL statements to stuck #26229
    • Fix the issue that when the CONCAT function has a negative float type argument, the last digit of the argument number is chopped in the result #29417
    • Fix the issue of an extra column in the query result when NATURAL JOIN is used to join multiple tables #29481
    • Fix the issue that TopN is wrongly pushed down to indexPlan when IndexScan uses a prefix index #29711
    • Fix the issue that retrying transactions with the auto-increment columns of DOUBLE type causes data corruption #29892
    Source code(tar.gz)
    Source code(zip)
  • v5.1.3(Dec 3, 2021)

  • v5.0.5(Dec 2, 2021)

  • v5.2.3(Dec 2, 2021)

  • v5.3.0(Nov 29, 2021)

    Improvements

    • Show the affected SQL statements in the debug log when the coprocessor encounters a lock, which is helpful in diagnosing problems #27718
    • Support showing the size of the backup and restore data when backing up and restoring data in the SQL logical layer #27247
    • Improve the default collection logic of ANALYZE when tidb_analyze_version is 2, which accelerates collection and reduces resource overhead
    • Introduce the ANALYZE TABLE table_name COLUMNS col_1, col_2, ... , col_n syntax. The syntax allows collecting statistics only on a portion of the columns in wide tables, which improves the speed of statistics collection

    Bug Fixes

    • Fix an error that occurs during execution caused by the wrong execution plan. The wrong execution plan is caused by the shallow copy of schema columns when pushing down the aggregation operators on partitioned tables. #27797 #26554
    • Fix the issue that plan-cache cannot detect changes of unsigned flags #28254
    • Fix the wrong partition pruning when the partition function is out of range #28233
    • Fix the issue that planner might cache invalid plans for join in some cases #28087
    • Fix wrong index hash join when hash column type is enum #27893
    • Fix a batch client bug that recycling idle connection might block sending requests in some rare cases #27688
    • Fix the TiDB Lightning panic issue when it fails to perform checksum on a target cluster #27686
    • Fix wrong results of the date_add and date_sub functions in some cases #27232
    • Fix wrong results of the hour function in vectorized expression #28643
    • Fix the authenticating issue when connecting to MySQL 5.1 or an older client version #27855
    • Fix the issue that auto analyze might be triggered out of the specified time when a new index is added #28698
    • Fix a bug that setting any session variable invalidates tidb_snapshot #28683
    • Fix a bug that BR is not working for clusters with many missing-peer regions #27534
    • Fix the unexpected error like tidb_cast to Int32 is not supported when the unsupported cast is pushed down to TiFlash #23907
    • Fix the issue that DECIMAL overflow is missing in the %s value is out of range in '%s'error message #27964
    • Fix a bug that the availability detection of MPP node does not work in some corner cases #3118
    • Fix the DATA RACE issue when assigning MPP task ID #27952
    • Fix the INDEX OUT OF RANGE error for a MPP query after deleting an empty dual table. #28250
    • Fix the issue of false positive error log invalid cop task execution summaries length for MPP queries #1791
    • Fix the issue of error log cannot found column in Schema column for MPP queries #28149
    • Fix the issue that TiDB might panic when TiFlash is shuting down #28096
    • Remove the support for insecure 3DES (Triple Data Encryption Algorithm) based TLS cipher suites #27859
    • Fix the issue that Lightning connects to offline TiKV nodes during pre-check and causes import failures #27826
    • Fix the issue that pre-check cost too much time when importing many files to tables #27605
    • Fix the issue that rewriting expressions makes between infer wrong collation #27146
    • Fix the issue that group_concat function did not consider the collation #27429
    • Fix the result wrong that occurs when the argument of the extract function is a negative duration #27236
    • Fix the issue that creating partition fails if NO_UNSIGNED_SUBTRACTION is set #26765
    • Avoid expressions with side effects in column pruning and aggregation pushdown #27106
    • Remove useless gRPC logs #24190
    • Limit the valid decimal length to fix precision-related issues #3091
    • Fix the issue of a wrong way to check for overflow in plus expression #26977
    • Fix the issue of data too long error when dumping statistics from the table with new collation data #27024
    • Fix the issue that the retried transactions' statements are not included in TIDB_TRX #28670
    • Fix the wrong default value of the plugin_dir configuration 28084
    Source code(tar.gz)
    Source code(zip)
  • v5.2.2(Oct 29, 2021)

    Improvements

    • Show the affected SQL statements in the debug log when the coprocessor encounters a lock, which is helpful in diagnosing problems #27718
    • Support showing the size of the backup and restore data when backing up and restoring data in the SQL logical layer #27247

    Bug Fixes

    • Fix the issue that plan-cache cannot detect changes of unsigned flags #28254
    • Fix the wrong partition pruning when the partition function is out of range #28233
    • Fix the issue that planner may cache invalid plans for join in some cases #28087
    • Fix wrong index hash join when hash column type is enum #27893
    • Fix a batch client bug that recycling idle connection may block sending requests in some rare cases #27688
    • Fixed the TiDB Lightning panic issue when it fails to perform checksum on a target cluster #27686
    • Fix wrong results of the date_add and date_sub functions in some cases #27232
    • Fix wrong results of the hour function in vectorized expression #28643
    • Fix the authenticating issue when connecting to MySQL 5.1 or an older client version #27855
    • Fix the issue that auto analyze might be triggered out of the specified time when a new index is added #28698
    • Fix a bug that setting any session variable can make tidb_snapshot unwork #28683
    • Fix a bug that BR is not working for clusters with many missing-peer regions #27534
    • Fix the unexpected error like tidb_cast to Int32 is not supported when the unsupported cast is pushed down to TiFlash #23907
    • Fix the issue that DECIMAL overflow is missing in the %s value is out of range in '%s'error message #27964
    • Fix a bug that the availability detection of MPP node does not work in some corner cases #3118
    • Fix theDATA RACE issue when assigningMPP task ID #27952
    • Fix the INDEX OUT OF RANGE error for a MPP query after deleting an empty dual table. #28250
    • Fix the issue of false positive error log invalid cop task execution summaries length for MPP queries #1791
    • Fix the issue of error log can not found column in Schema column for MPP queries #28149
    • Fix the issue that TiDB might crash when TiFlash shuts down #28096
    • Remove the support for insecure 3DES (Triple Data Encryption Algorithm) based TLS ciphersuites #27859
    • Fix the issue that Lightning connects to offline TiKV nodes during pre-check and causes import failures #27826
    • Fix the issue that pre-check cost too much time when importing many files to tables #27605
    • Fix the issue that rewriting expressions makes between infer wrong collation #27146
    • Fix the issue that group_concat function did not consider the collation #27429
    • Fix the issue that extract function gives wrong results when argument is a negative duration #27236
    • Fix the issue that creating partition fails if NO_UNSIGNED_SUBTRACTION is set #26765
    • Avoid expressions with side effects in column pruning and aggregation pushdown #27106
    • Remove useless GRPC log in production #24190
    • Limit the valid decimal length to fix precision-related issues #3091
    • Fix the issue of a wrong way to check for overflow in plus expression #26977
    • Fix the issue of data too long error when dumping statistics from the table with new collation data #27024
    • Fix the issue that the retried transactions' statements are not included in TIDB_TRX #28670
    Source code(tar.gz)
    Source code(zip)
  • v5.1.2(Sep 27, 2021)

    Improvements

    • Trigger auto-analyze by histogram row count, increase the accuracy of this trigger action #24237
    • Push down mod() to TiFlash, increase the query performance. #2318

    Bug Fixes

    • Fix the potential wrong results of index hash join when the hash column is in the ENUM type #27893
    • Fix a batch client bug that recycle idle connection may block sending requests in some rare cases #27678
    • Fix the compatibility issue of the overflow check by keeping the same logic as MySQL #23897
    • Fix the issue that TiDB returns an unknow error while it should return the pd is timeout error #26147
    • Fix the error of the case when function caused by the wrong charset and collation #26662
    • Fix the issue that greatest(datetime) union null returns an empty string #26532
    • Fix the potential can not found column in Schema column error for MPP queries #28148
    • Fix a bug that TiDB may panic when TiFlash is shutting down #28096
    • Fix the issue of wrong range caused by using enum like 'x%' #27130
    • Fix the issue that the between expression infers wrong collation. #27146
    • 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.DEADLOCKS table #27400
    • Fix a bug that GROUP_CONCAT function does not consider the collation #27429
    • Fix a bug that the COUNT(DISTINCT) function on multiple columns returns wrong results when New Collation is on #27091
    • Fix an issue that the TABLESAMPLE query result from partitioned tables is not sorted as expected #27349
    • Fix a bug that the EXTRACT function returns wrong results when the argument is a negative duration #27236
    • Remove the unused /debug/sub-optimal-plan HTTP API #27265
    • Fix the issue that a wrong selection is pushed down when the HAVING condition is used in the aggregate function #26496
    • Fix a bug that the query may return wrong results when the hash partition table deals with unsigned data #26569
    • Fix the unexpected behavior when casting an invalid string to DATE #26762
    • Fix a bug that creating partition fails if NO_UNSIGNED_SUBTRACTION is set #26765
    • Fix the issue that the distinct flag is missing when Apply is converted to Join #26958
    • Fix the issue that NO_ZERO_IN_DATE does not work on the default values #26766
    • 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 UPDATE' statement does not correctly lock the data when a normal table joins a partition table #26251
    • Fix the issue that the 'SELECT FOR UPDATE' statement returns an error when a normal table joins a partition table #26250
    • Fix the issue that PointGet does not use the lite version of resolve lock #26562
    Source code(tar.gz)
    Source code(zip)
  • v5.0.4(Sep 27, 2021)

    Compatibility Changes

    • Fix the issue that executing SHOW VARIABLES in 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_count variable from 200 to 3000 #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 UNION contain the NULL value #26559
      • Fix the issue that greatest(datetime) union null returns empty string #26532
      • Fix the issue that the behavior of the last_day function is incompatible in SQL mode #26000
      • Fix the issue that the having clause might not work correctly #26496
      • Fix the wrong execution results that occur when the collations around the between expression are different #27146
      • Fix the wrong execution results that occur when the column in the group_concat function 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 extract function is a negative duration #27236
      • Fix the issue that inserting an invalid date does not report an error when the SQL_MODE is 'STRICT_TRANS_TABLES' #26762
      • Fix the issue that using an invalid default date does not report an error when the SQL_MODE is 'NO_ZERO_IN_DATE' #26766
      • Fix a bug on the query range of prefix index #26029
      • Fix the issue that the LOAD DATA statement might abnormally import non-utf8 data #25979
      • Fix the issue that insert ignore on duplicate update might insert wrong data when the secondary index has the same column with the primary key #25809
      • Fix the issue that insert ignore duplicate update might 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 ENUM type 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 prepared statements and direct queries might be inconsistent #22949
      • Fix the issue that the query result might be wrong when a YEAR type is compared with a string or an integer type #23262

    Feature enhancements

    • Support setting tidb_enforce_mpp=1 to ignore the optimizer estimation and forcibly use the MPP mode #26382

    Improvements

    • 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 region upper limit to make split table and presplit more 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_connect and 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 EXPLAIN statements #25736
      • Add error labels for TiFlashQueryTotalCounter in 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 prepared statement in parser #24371

    Bug Fixes

    • Fix the issue that TiDB might panic when querying a partitioned table and the partition key has the IS NULL condition #23802
      • Fix the issue that the overflow check of the FLOAT64 type is different with that of MySQL #23897
      • Fix the wrong character set and collation for the case when expression #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 SSL clears users' authentication_string #25225
      • Fix a bug that the value of the tidb_gc_scan_lock_mode global variable on a new cluster shows "PHYSICAL" instead of the actual default mode "LEGACY" #25100
      • Fix the bug that the TIKV_REGION_PEERS system table does not show the correct DOWN status #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 --help exits with the code 2 #24046
      • Fix the issue that setting the global variable dml_batch_size does not take effect #24709
      • Fix the issue that using read_from_storage and 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_percentile function on a BIT column 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 BY item #27106
      • Fix the wrong implicit conversion between VARCHAR and timestamp when joining tables #25902
      • Fix the wrong results in associated subquery statements #27233
    Source code(tar.gz)
    Source code(zip)
  • v4.0.15(Sep 27, 2021)

    Compatibility changes

    • Fix the issue that executing SHOW VARIABLES in a new session is slow. This fix reverts some changes made in #21045 and might cause compatibility issues. #24326

    Improvements

    • Trigger auto-analyze based on the histogram row count #26706

    Bug fixes

    • Fix a bug that collation is incorrectly set for binary literals when building range 26455
    • Fix the issue of wrong character set and collation for the case when expression #26671
    • Fix the "index out of range" error that occurs when a query includes both GROUP BY and UNION 26553
    • Fix the issue that TiDB might fail to send requests if TiKV has tombstone stores #25849
    • Fix the issue of unexpected behavior when casting the invalid string to DATE #27935
    • Fix the issue that column information is missed when converting the Apply operator to Join #27282
    • Fix a bug that the count distinct result on multiple columns is wrong when the new collation is enabled #27830
    • Fix the result wrong that occurs when the argument of the extract function is a negative duration #27236
    • Fix the wrong execution results that occur when the column in the group_concat function has a non-bin collation #27429
    • Fix the wrong execution results that occur when the collations around the between expression are different #27146
    • Fix the issue that greatest(datetime) union null returns empty string #26564
    • Fix the issue that the having clause might not work correctly #26496
    • Remove the undocumented /debug/sub-optimal-plan HTTP API #27264
    Source code(tar.gz)
    Source code(zip)
  • v5.2.1(Sep 9, 2021)

    Bug Fixes

    • Fix an error that occurs during execution caused by the wrong execution plan. The wrong execution plan is caused by the shallow copy of schema columns when pushing down the aggregation operators on partitioned tables. #27797 #26554
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0(Aug 27, 2021)

    Improvements

    • Support pushing down the built-in function json_unquote() to TiKV #24415
    • Support removing the union branch from the dual table #25614
    • Optimize the aggregate operator's cost factor #25241
    • Allow the MPP outer join to choose the build table based on the table row count #25142
    • Support balancing the MPP query workload among different TiFlash nodes based on Regions #24724
    • Support invalidating stale Regions in the cache after the MPP query is executed #24432
    • Improve the MySQL compatibility of the built-in functionstr_to_date for the format specifiers %b/%M/%r/%T #25767
    • Fix the issue that inconsistent binding caches might be created in multiple TiDB after recreating different bindings for the same query #26015
    • Fix the issue that the existing bindings cannot be loaded into cache after upgrade #23295
    • Support ordering the result of SHOW BINDINGS by (original_sql, update_time) #26139
    • Improve the logic of query optimization when bindings exist, and reduce optimization times of a query #26141
    • Support completing the garbage collection automatically for the bindings in the "deleted" status #26206
    • Support showing whether a binding is used for query optimization in the result of EXPLAIN VERBOSE #26930
    • Add a new status variation last_plan_binding_update_time to view the timestamp corresponding to the binding cache in the current TiDB instance #26340
    • Support reporting an error when starting binding evolution or running admin evolve bindings to ban the baseline evolution (currently disabled in the on-premises TiDB version because it is an experimental feature) affecting other features #26333

    Bug Fixes

    • Fix the issue that an incorrect result is returned when using merge join on the SET type column #25669
    • Fix the data corruption issue in the IN expression's arguments #25591
    • Avoid the sessions of GC being affected by global variables #24976
    • Fix the panic issue that occurs when using limit in the window function queries #25344
    • Fix the wrong value returned when querying a partitioned table using Limit #24636
    • Fix the issue that IFNULL does not correctly take effect on the ENUM or SET type column #24944
    • Fix the wrong results caused by changing the count in the join subqueries to first_row #24865
    • Fix the query hang issue that occurs when ParallelApply is used under the TopN operator #24930
    • Fix the issue that more results than expected are returned when executing SQL statements using multi-column prefix indexes #24356
    • Fix the issue that the <=> operator cannot correctly take effect #24477
    • Fix the data race issue of the parallel Apply operator #23280
    • Fix the issue that the index out of range error is reported when sorting the IndexMerge results of the PartitionUnion operator #23919
    • Fix the issue that setting the tidb_snapshot variable to an unexpectedly large value might damage the transaction isolation #25680
    • Fix the issue that the ODBC-styled constant (for example, {d '2020-01-01'}) cannot be used as the expression #25531
    • Fix the issue that SELECT DISTINCT converted to Batch Get causes incorrect results #25320
    • Fix the issue that backing off queries from TiFlash to TiKV cannot be triggered #23665 #24421
    • Fix the index-out-of-range error that occurs when checking only_full_group_by #23839)
    • Fix the issue that the result of index join in correlated subqueries is wrong #25799
    Source code(tar.gz)
    Source code(zip)
  • v5.1.1(Jul 30, 2021)

    Compatibility changes

    • For TiDB clusters upgrade from v4.0 to v5.1, the default value of tidb_multi_statement_mode is OFF. It is recommended to use the multi-statement feature of your client library instead. See the documentation on tidb_multi_statement_mode for details. #25751
    • Change the default value of the tidb_stmt_summary_max_stmt_count variable from 200 to 3000 #25874
    • Require the SUPER privilege to access the table_storage_stats table #26352
    • Require the SELECT privilege on mysql.user to access the information_schema.user_privileges table to show other user's privileges #26311
    • Require the CONFIG privilege to access the information_schema.cluster_hardware table #26297
    • Require the PROCESS privilege to access the information_schema.cluster_info table #26297
    • Require the PROCESS privilege to access the information_schema.cluster_load table #26297
    • Require the PROCESS privilege to access the information_schema.cluster_systeminfo table #26297
    • Require the PROCESS privilege to access the information_schema.cluster_log table #26297
    • Require the CONFIG privilege to access the information_schema.cluster_config table #26150

    Improvements

    • Announce the general availability (GA) of the Stale Read feature
    • Avoid allocation for paramMarker to speed up data insertion #26076
    • Support the stable result mode to make the query results more stable #25995
    • Support pushing down the built-in function json_unquote() to TiKV #26265
    • Support retrying MPP queries #26480
    • Change the LOCK record into the PUT record for the index keys using point get or batch point get for UPDATE reads #26225
    • Forbid creating views from stale queries #26200
    • Thoroughly push down the COUNT(DISTINCT) aggregation function in the MPP mode #26194
    • Check the availability of TiFlash before launching MPP queries #26192
    • Do not allow setting the read timestamp to a future time #25763
    • Print log warnings when aggregation functions cannot be pushed down in EXPLAIN statements #25737
    • Add the statements_summary_evicted table to record the evicted count information of a cluster #25587
    • Improve the MySQL compatibility of the built-in function str_to_date for the format specifiers %b/%M/%r/%T #25768

    Bug fixes

    • Fix the data loss issue that might occur when changing the column type with tidb_enable_amend_pessimistic_txn=on #26203
    • Fix the issue that the behavior of the last_day function is incompatible in the SQL mode #26001
    • Fix the panic issue that might occur when LIMIT is on top of window functions #25344
    • Fix the issue that committing pessimistic transactions might cause write conflict #25964
    • Fix the issue that the result of index join in correlated subqueries is wrong #25799
    • Fix a bug that the successfully committed optimistic transactions might report commit errors #10468
    • Fix the issue that an incorrect result is returned when using merge join on the SET type column #25669
    • Fix a bug that the index keys in a pessimistic transaction might be repeatedly committed #26359
    • Fix the risk of integer overflow when the optimizer is locating partitions #26227
    • Fix the issue that invalid values might be written when casting DATE to timestamp #26292
    • Fix the issue that the Coprocessor Cache metrics are not displayed on Grafana #26338
    • Fix the issue of annoying logs caused by telemetry #25760 #25785
    • Fix a bug on the query range of prefix index #26029
    • Fix the issue that concurrently truncating the same partition hangs DDL executions #26229
    • Fix the issue of duplicate ENUM items #25955
    • Fix a bug that the CTE iterator is not correctly closed #26112
    • Fix the issue that the LOAD DATA statement might abnormally import non-utf8 data #25979
    • Fix the panic issue that might occur when using the window function on the unsigned integer columns #25956
    • Fix the issue that TiDB might panic when resolving async commit locks #25778
    • Fix the issue that Stale Read is not fully compatible with the PREPARE statements #25800
    • Fix the issue that the ODBC-styled constant (for example, {d '2020-01-01'}) cannot be used as the expression #25531
    • Fix an error that occurs when running TiDB alone #25555
    Source code(tar.gz)
    Source code(zip)
  • v4.0.14(Jul 27, 2021)

    Compatibility changes

    • Change the default value of tidb_multi_statement_mode from WARN to OFF in v4.0. It is recommended to use the multi-statement feature of your client library instead. See the documentation on tidb_multi_statement_mode for details. #25749
    • Upgrade Grafana dashboard from v6.1.16 to v7.5.7 to solve two security vulnerabilities. See the Grafana blog post for details.
    • Change the default value of the tidb_stmt_summary_max_stmt_count variable from 200 to 3000 #25872

    Improvements

    • Change the LOCK record into the PUT record for the index keys using point get or batch point get for UPDATE reads #26223
    • Support the MySQL system variable init_connect and its associated features #26031
    • Support the stable result mode to make the query results more stable #26003
    • Support pushing down the built-in function json_unquote() to TiKV #25721
    • Make the SQL Plan Management (SPM) not affected by the character set #23295

    Bug fixes

    • Fix the issue that the SELECT result is incompatible with MySQL when joining a subquery with a WHERE clause evaluated to false #24865
    • Fix the calculation error of the ifnull function that occurs when the argument is the ENUM or SET type #24944
    • Fix the wrong aggregate pruning in some cases #25202
    • Fix the incorrect result of the merge join operation that might occur when the column is the SET type #25669
    • Fix the issue that TiDB returns wrong results for cartesian join #25591
    • Fix the panic issue that occurs when SELECT ... FOR UPDATE works on a join operation and the join uses a partitioned table #20028
    • Fix the issue that the cached prepared plan is incorrectly used for point get #24741
    • Fix the issue that the LOAD DATA statement can abnormally import non-utf8 data #25979
    • Fix a potential memory leak issue that occurs when accessing the statistics via an HTTP API #24650
    • Fix a security issue that occurs when executing the ALTER USER statement #25225
    • Fix a bug that the TIKV_REGION_PEERS table cannot correctly handle the DOWN status #24879
    • Fix the issue that invalid strings are not truncated when parsing DateTime #22231
    • Fix the issue that the select into outfile statement might have no result when the column type is YEAR #22159
    • Fix the issue that the query result might be wrong when NULL is in the UNION subquery #26532
    • Fix the issue that the projection operator in execution might cause panic in some cases #26534
    Source code(tar.gz)
    Source code(zip)
  • v5.0.3(Jul 2, 2021)

    Compatibility Changes

    • After a v4.0 cluster is upgraded to v5.0 or a later version (dev or v5.1), the default value of the tidb_multi_statement_mode variable changes from WARN to OFF
    • TiDB is now compatible with MySQL 5.7's noop variable innodb_default_row_format #23541

    Improvements

    • Support pushing down the TopN operator to TiFlash #25162
    • Support pushing down the built-in function json_unquote() to TiKV #24415
    • Support removing the union branch from the dual table #25614
    • Support pushing down the built-in function replace() to TiFlash #25565
    • Support pushing down the built-in functions unix_timestamp(), concat(), year(), day(), datediff(), datesub(), and concat_ws() to TiFlash #25564
    • Optimize the aggregate operator's cost factor #25241
    • Support pushing down the Limit operator to TiFlash #25159
    • Support pushing down the built-in function str_to_date to TiFlash #25148
    • Allow the MPP outer join to choose the build table based on the table row count #25142
    • Support pushing down the built-in functions left(), right(), and abs() to TiFlash #25133
    • Support pushing down the Broadcast Cartesian join to TiFlash #25106
    • Support pushing down the Union All operator to TiFlash #25051
    • Support balancing the MPP query workload among different TiFlash nodes based on Regions #24724
    • Support invalidating stale Regions in the cache after the MPP query is executed #24432
    • Improve the MySQL compatibility of the built-in function str_to_date for the format specifiers %b/%M/%r/%T #25767

    Bug Fixes

    • Fix the issue that an incorrect result is returned when using merge join on the SET type column #25669
    • Fix the data corruption issue in the IN expression's arguments #25591
    • Avoid the sessions of GC being affected by global variables #24976
    • Fix the panic issue that occurs when using limit in the window function queries #25344
    • Fix the wrong value returned when querying a partitioned table using Limit #24636
    • Fix the issue that IFNULL does not correctly take effect on the ENUM or SET type column #24944
    • Fix the wrong results caused by changing the count in the join subqueries to first_row #24865
    • Fix the query hang issue that occurs when ParallelApply is used under the TopN operator #24930
    • Fix the issue that more results than expected are returned when executing SQL statements using multi-column prefix indexes #24356
    • Fix the issue that the <=> operator cannot correctly take effect #24477
    • Fix the data race issue of the parallel Apply operator #23280
    • Fix the issue that the index out of range error is reported when sorting the IndexMerge results of the PartitionUnion operator #23919
    • Fix the issue that setting the tidb_snapshot variable to an unexpectedly large value might damage the transaction isolation #25680
    • Fix the issue that the ODBC-styled constant (for example, {d '2020-01-01'}) cannot be used as the expression #25531
    • Fix the issue that SELECT DISTINCT converted to Batch Get causes incorrect results #25320
    • Fix the issue that backing off queries from TiFlash to TiKV cannot be triggered #23665 #24421
    • Fix the index-out-of-range error that occurs when checking only_full_group_by #23839)
    • Fix the issue that queries with TABLESAMPLE on an empty table returns unexpected rows #25257
    • Fix the issue that the result of index join in correlated subqueries is wrong #25799
    Source code(tar.gz)
    Source code(zip)
  • v5.1.0(Jun 24, 2021)

    Improvements

    • Support the built-in function VITESS_HASH() #23915
    • Support pushing down data of the enumerated type to TiKV to improve performance when using enumerated types in WHERE clauses #23619
    • Optimize the calculation of Window Function to solve TiDB OOM problems when paging data with ROW_NUMBER() #23807
    • Optimize the calculation of UNION ALL to solve the TiDB OOM problems when using UNION ALL to join a large number of SELECT statements #21441
    • Optimize the dynamic mode of partitioned tables to improve performance and stability #24150
    • Fix the Region is Unavailable issue that occurs in multiple scenarios project#62
    • Fix multiple Region is Unavailable issues that might occur in frequent scheduling situations
    • Fix Region is Unavailable issue that might occur in some high stress write situations
    • Avoid frequently reading the mysql.stats_histograms table if the cached statistics is up-to-date to avoid high CPU usage #24317

    Bug Fixes

    • Fix the issue that the execution result of project elimination might be wrong when the projection result is empty #23887
    • Fix the issue of wrong query results when a column contains NULL values in some cases #23891
    • Forbid generating MPP plans when the scan contains virtual columns #23886
    • Fix the wrong reuse of PointGet and TableDual in Plan Cache #23187 #23144 #23304 #23290
    • Fix the error that occurs when the optimizer builds the IndexMerge plan for clustered indexes #23906
    • Fix the type inference of the BIT-type errors #23832
    • Fix the issue that some optimizer hints do not take effect when the PointGet operator exists #23570
    • Fix the issue that DDL operations might fail when rolling back due to an error #23893
    • Fix the issue that the index range of the binary literal constant is incorrectly built #23672
    • Fix the potential wrong results of the IN clause in some cases #23889
    • Fix the wrong results of some string functions #23759
    • Users now need both INSERT and DELETE privileges on a table to perform REPLACE operations #23909
    • Users now need both INSERT and DELETE privileges on a table to perform REPLACE operations #24070
    • Fix the wrong TableDual plans caused by incorrectly comparing binaries and bytes#23846
    • Fix the panic issue caused by using the prefix index and index join in some cases #24547 #24716 #24717
    • Fix the issue that the prepared plan cache of point get is incorrectly used by the point get statement in the transaction #24741
    • Fix the issue of writing the wrong prefix index value when the collation is ascii_bin or latin1_bin #24569
    • Fix the issue that the ongoing transaction might be interrupted by the GC worker #24591
    • Fix a bug that the point query might get wrong on the clustered index when new-collation is enabled but new-row-format is disabled #24541
    • Refactor the conversion of partition keys for shuffle hash join #24490
    • Fix the panic issue that occurs when building the plan for queries that contain the HAVING clause #24045
    • Fix the issue that the column pruning improvement causes the Apply and Join operators' results to go wrong #23887
    • Fix a bug that the primary lock fallen back from async commit cannot be resolved #24384
    • Fix a GC issue of statistics that might cause duplicated fm-sketch records #24357
    • Avoid unnecessary pessimistic rollback when the pessimistic locking receives the ErrKeyExists error #23799
    • Fix the issue that numeric literals cannot be recognized when the sql_mode contains ANSI_QUOTES #24429
    • Forbid statements such as INSERT INTO table PARTITION (<partitions>) ... ON DUPLICATE KEY UPDATE to read data from non-listed partitions #24746
    • Fix the potential index out of range error when a SQL statement contains both GROUP BY and UNION #24281
    • Fix the issue that the CONCAT function incorrectly handles the collation #24296
    • Fix the issue that the collation_server global variable does not take effect in new sessions #24156
    Source code(tar.gz)
    Source code(zip)
  • v5.0.2(Jun 9, 2021)

    Improvements

    • Avoid frequently reading the mysql.stats_histograms table if the cached statistics is up-to-date to avoid high CPU usage #24317

    Bug Fixes

    • Fix the panic issue caused by using the prefix index and index join in some cases #24547 #24716 #24717
    • Fix the issue that the prepared plan cache of point get is incorrectly used by the point get statement in the transaction #24741
    • Fix the issue of writing the wrong prefix index value when the collation is ascii_bin or latin1_bin #24569
    • Fix the issue that the ongoing transaction might be interrupted by the GC worker #24591
    • Fix a bug that the point query might get wrong on the clustered index when new-collation is enabled but new-row-format is disabled #24541
    • Refactor the conversion of partition keys for shuffle hash join #24490
    • Fix the panic issue that occurs when building the plan for queries that contain the HAVING clause #24045
    • Fix the issue that the column pruning improvement causes the Apply and Join operators' results to go wrong #23887
    • Fix a bug that the primary lock fallen back from async commit cannot be resolved #24384
    • Fix a GC issue of statistics that might cause duplicated fm-sketch records #24357
    • Avoid unnecessary pessimistic rollback when the pessimistic locking receives the ErrKeyExists error #23799
    • Fix the issue that numeric literals cannot be recognized when the sql_mode contains ANSI_QUOTES #24522
    • Forbid statements such as INSERT INTO table PARTITION (<partitions>) ... ON DUPLICATE KEY UPDATE to read data from non-listed partitions #24746
    • Fix the potential index out of range error when a SQL statement contains both GROUP BY and UNION #24281
    • Fix the issue that the CONCAT function incorrectly handles the collation #24296
    • Fix the issue that the collation_server global variable does not take effect in new sessions #24156
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0-alpha(Jun 7, 2021)

  • v4.0.13(May 27, 2021)

    New Features

    • Support changing an AUTO_INCREMENT column to an AUTO_RANDOM one #24608
    • Add the infoschema.client_errors_summary tables to help users keep track of the errors that have been returned to clients #23267

    Improvements

    • Avoid frequently reading the mysql.stats_histograms table if the cached statistics is up-to-date to avoid high CPU usage #24352

    Bug Fixes

    • Fix the panic issue that occurs when the UPDATE statement 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 BIT type constant as the divisor in the DIV expression #24266
    • Fix the issue that the NO_ZERO_IN_DATE SQL 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 UNION between a BIT type column and an INTEGER type column #24026
    • Fix the issue that the TableDual plans are mistakenly created when comparing the BINARY type and the CHAR type #23917
    • Fix the issue that the insert ignore on duplicate statement might unexpectedly delete table records #23825
    • Fix the issue that the Audit plugin causes TiDB panic #23819
    • Fix the issue that the HashJoin operator incorrectly processes the collation #23812
    • Fix the issue of disconnection that occurs when batch_point_get incorrectly handles abnormal values in the pessimistic transaction #23778
    • Fix the issue of inconsistent indexes that occurs when the tidb_row_format_version configuration value is set to 1 and the enable_new_collation value is set to true #23772
    • Fix a bug that occurs when comparing the INTEGER type column with the STRING constant value #23705
    • Fix the error that occurs when the BIT type column is passed into the approx_percent function #23702
    • Fix a bug that causes TiDB to mistakenly report the TiKV server timeout error when executing TiFlash batch requests #23700
    • Fix the issue that the IndexJoin operator returns wrong results on the prefix column index #23691
    • Fix the issue which causes wrong query results because the collation on the BINARY type column is not properly handled #23598
    • Fix the issue of query panic that occurs when the UPDATE statement contains the join query with the HAVING clause #23575
    • Fix the issue that causes TiFlash to return wrong results when using the NULL constant in the comparison expression #23474
    • Fix the issue of wrong results when comparing the YEAR type column with the STRING constant #23335
    • Fix the issue that group_concat panics when session.group_concat_max_len is set too small #23257
    • Fix the issue of wrong query results that occurs when using the BETWEEN expression for the TIME type column #23233
    • Fix the issue of privilege check in the DELETE statements #23215
    • Fix the issue that no error is reported when inserting invalid strings to the DECIMAL type column #23196
    • Fix the issue of parsing error occurred when inserting data to the DECIMAL type columns #23152
    • Fix the issue that the USE_INDEX_MERGE hint does not take effect #22924
    • Fix a bug that the query returns wrong results when using ENUM or SET columns in the WHERE clause 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 ANALYZE with enable_new_collation enabled #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 concat function incorrectly handles the collation #24300
    • Fix a bug that the query returns wrong results when the SELECT field has an IN subquery and the subquery's outer side contains NULL tuples #24022
    • Fix a bug that TiFlash is chosen wrongly by the optimizer when TableScan is in descending order #23974
    • Fix a bug that the point_get plan returns the column name that is inconsistent with that of MySQL #23970
    • Fix the issue that executing the show table status statement on a database with a upper-cased name returns wrong results #23958
    • Fix a bug that the users who do not have the INSERT and DELETE privileges on a table at the same time can perform the REPLACE operation #23938
    • Fix the issue that the results of the concat/make_set/insert expressions are wrong because the collation is incorrectly handled #23878
    • Fix the panic that occurs when executing a query on the table that has RANGE partitions #23689
    • Fix the issue: In the cluster of an earlier version, if the tidb_enable_table_partition variable is set to false, the tables that contain partitions are handled as non-partitioned tables. Executing batch point get queries 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
    Source code(tar.gz)
    Source code(zip)
  • v5.1.0-alpha(May 24, 2021)

  • v5.0.1(Apr 23, 2021)

    Bug Fixes

    • Fix the issue that the execution result of project elimination might be wrong when the projection result is empty #24093
    • Fix the issue of wrong query results when a column contains NULL values in some cases #24063
    • Forbid generating MPP plans when the scan contains virtual columns #24058
    • Fix the wrong reuse of PointGet and TableDual in Plan Cache #24043
    • Fix the error that occurs when the optimizer builds the IndexMerge plan for clustered indexes #24042
    • Fix the type inference of the BIT-type errors #24027
    • Fix the issue that some optimizer hints do not take effect when the PointGet operator exists #23685
    • Fix the issue that DDL operations might fail when rolling back due to an error #24080
    • Fix the issue that the index range of the binary literal constant is incorrectly built #24041
    • Fix the potential wrong results of the IN clause in some cases #24023
    • Fix the wrong results of some string functions #23879
    • Users now need both INSERT and DELETE privileges on a table to perform REPLACE operations #23939
    • Fix the performance regression when executing the point query #24070
    • Fix the wrong TableDual plans caused by incorrectly comparing binaries and bytes #23918
    Source code(tar.gz)
    Source code(zip)
  • v5.0.0(Apr 7, 2021)

    Compatibility changes

    System variables

    • Add the tidb_executor_concurrency system variable to control the concurrency of multiple operators. The previous tidb_*_concurrency settings (such as tidb_projection_concurrency) still take effect but with a warning when you use them.

    • Add the tidb_skip_ascii_check system variable to specify whether to skip the ASCII validation check when the ASCII character set is written. This default value is OFF.

    • Add the tidb_enable_strict_double_type_check system variable to determine whether the syntax like double(N) can be defined in the table schema. This default value is OFF.

    • Change the default value of tidb_dml_batch_size from 20000 to 0. This means that batch DML statements are no longer used by default in LOAD/INSERT INTO SELECT .... Instead, large transactions are used to comply with the strict ACID semantics.

      Note:

      The scope of the variable is changed from session to global, and the default value is changed from 20000 to 0. If the application relies on the original default value, you need to use the set global statement to modify the variable to the original value after the upgrade.

    • Control temporary tables’ syntax compatibility using the tidb_enable_noop_functions system variable. When this variable value is OFF, the CREATE TEMPORARY TABLE syntax returns an error.

    • Add the following system variables to directly control the garbage collection-related parameters:

    • Change the default value of enable-joint-consensus from false to true, which enables the Joint Consensus feature by default.

    • Change the value of tidb_enable_amend_pessimistic_txn from 0 or 1 to ON or OFF.

    • Change the default value of tidb_enable_clustered_index from OFF to INT_ONLY with the following new meanings:

      • OFF: clustered index is enabled. Adding or deleting non-clustered indexes is supported.
      • ON: clustered index is disabled. Adding or deleting non-clustered indexes is supported.
      • INT_ONLY: the default value. The behavior is consistent with that before v5.0. You can control whether to enable clustered index for the INT type together with alter-primary-key = false.

      Note:

      The INT_ONLY value of tidb_enable_clustered_index in 5.0 GA has the same meaning as the OFF value in 5.0 RC. After upgrading from a 5.0 RC cluster with the OFF setting to 5.0 GA, it will be displayed as INT_ONLY.

    Configuration file parameters

    • Add the index-limit configuration item for TiDB to be compatible with MySQL’s limit on the maximum number of indexes. If the index setting exceeds the default value of this configuration item, when the table schema is re-imported into MySQL, an error is reported. This item’s value defaults to 64 and ranges between [64,64*8].

    • Add the enable-enum-length-limit configuration item for TiDB to be compatible and consistent with MySQL’s ENUM/SET length (ENUM length < 255). The default value is true.

    • Replace the pessimistic-txn.enable configuration item with the tidb_txn_mode environment variable.

    • Replace the performance.max-memory configuration item with performance.server-memory-quota

    • Replace the tikv-client.copr-cache.enable configuration item with tikv-client.copr-cache.capacity-mb. If the item’s value is 0.0, this feature is disabled. If the item’s value is greater than 0.0, this feature is enabled. Its default value is 1000.0.

    • Replace the rocksdb.auto-tuned configuration item with rocksdb.rate-limiter-auto-tuned.

    • Delete the raftstore.sync-log configuration item. By default, written data is forcibly spilled to the disk. Before v5.0, you can explicitly disable raftstore.sync-log. Since v5.0, the configuration value is forcibly set to true.

    • Change the default value of the gc.enable-compaction-filter configuration item from false to true.

    • Change the default value of the enable-cross-table-merge configuration item from false to true.

    • Change the default value of the rate-limiter-auto-tuned configuration item from false to true.

    New features

    SQL

    List partitioning (Experimental)

    User document

    With the list partitioning feature, you can effectively query and maintain tables with a large amount of data.

    With this feature enabled, partitions and how data is distributed among partitions are defined according to the PARTITION BY LIST(expr) PARTITION part_name VALUES IN (...) expression. The partitioned tables’ data set supports at most 1024 distinct integer values. You can define the values using the PARTITION ... VALUES IN (...) clause.

    To enable list partitioning, set the session variable tidb_enable_list_partition to ON.

    List COLUMNS partitioning (Experimental)

    User document

    List COLUMNS partitioning is a variant of list partitioning. You can use multiple columns as partition keys. Besides the integer data type, you can also use the columns in the string, DATE, and DATETIME data types as partition columns.

    To enable List COLUMNS partitioning, set the session variable tidb_enable_list_partition to ON.

    Invisible indexes

    User document, #9246

    When you tune performance or select optimal indexes, you can set an index to be Visible or Invisible by using SQL statements. This setting can avoid performing resource-consuming operations, such as DROP INDEX and ADD INDEX.

    To modify the visibility of an index, use the ALTER INDEX statement. After the modification, the optimizer decides whether to add this index to the index list based on the index visibility.

    EXCEPT and INTERSECT operators

    User document, #18031

    The INTERSECT operator is a set operator, which returns the intersection of the result sets of two or more queries. To some extent, it is an alternative to the Inner Join operator.

    The EXCEPT operator is a set operator, which combines the result sets of two queries and returns elements that are in the first query result but not in the second.

    Transaction

    User document, #18005

    In the pessimistic transaction mode, if the tables involved in a transaction contain concurrent DDL operations or SCHEMA VERSION changes, the system automatically updates the transaction's SCHEMA VERSION to the latest to ensure the successful transaction commit, and to avoid that the client receives the Information schema is changed error when the transaction is interrupted by DDL operations or SCHEMA VERSION changes.

    This feature is disabled by default. To enable the feature, modify the value of tidb_enable_amend_pessimistic_txn system variable. This feature is introduced in v4.0.7 and has the following issues fixed in v5.0:

    • The compatibility issue that occurs when TiDB Binlog executes Add Column operations
    • The data inconsistency issue that occurs when using the feature together with the unique index
    • The data inconsistency issue that occurs when using the feature together with the added index

    Currently, this feature still has the following incompatibility issues:

    • Transaction’s semantics might change when there are concurrent transactions
    • Known compatibility issue that occurs when using the feature together with TiDB Binlog
    • Incompatibility with Change Column

    Character set and collation

    Security

    User document, #18566

    To meet security compliance requirements (such as General Data Protection Regulation, or GDPR), the system supports desensitizing information (such as ID and credit card number) in the output error messages and logs, which can avoid leaking sensitive information.

    TiDB supports desensitizing the output log information. To enable this feature, use the following switches:

    • The global variable tidb_redact_log. Its default value is 0, which means that desensitization is disabled. To enable desensitization for tidb-server logs, set the variable value to 1.
    • The configuration item security.redact-info-log. Its default value is false, which means that desensitization is disabled. To enable desensitization for tikv-server logs, set the variable value to true.
    • The configuration item security.redact-info-log. Its default value is false, which means that desensitization is disabled. To enable desensitization for pd-server logs, set the variable value to true.
    • The configuration item security.redact_info_log for tiflash-server and security.redact-info-log for tiflash-learner. Their default values are both false, which means that desensitization is disabled. To enable desensitization for tiflash-server and tiflash-learner logs, set the values of both variables to true.

    This feature is introduced in v5.0. To use the feature, enable the system variable and all configuration items above.

    Performance optimization

    MPP architecture

    User document

    TiDB introduces the MPP architecture through TiFlash nodes. This architecture allows multiple TiFlash nodes to share the execution workload of large join queries.

    When the MPP mode is on, TiDB determines whether to send a query to the MPP engine for computation based on the calculation cost. In the MPP mode, TiDB distributes the computation of table joins to each running TiFlash node by redistributing the join key during data calculation (Exchange operation), and thus accelerates the calculation. Furthermore, with the aggregation computing feature that TiFlash has already supported, TiDB can pushdown the computation of a query to the TiFlash MPP cluster. Then the distributed environment can help accelerate the entire execution process and dramatically increase the speed of analytic queries.

    In the TPC-H 100 benchmark test, TiFlash MPP delivers significant processing speed over analytic engines of traditional analytic databases and SQL on Hadoop. With this architecture, you can perform large-scale analytic queries directly on the latest transaction data, with a higher performance than traditional offline analytic solutions. According to the benchmark, with the same cluster resource, TiDB 5.0 MPP shows 2 to 3 times of speedup over Greenplum 6.15.0 and Apache Spark 3.1.1, and some queries have 8 times better performance.

    Currently, the main features that the MPP mode does not support are as follows (For details, refer to Use TiFlash):

    • Table partitioning
    • Window Function
    • Collation
    • Some built-in functions
    • Reading data from TiKV
    • OOM spill This conversation was marked as resolved by yikeke Show conversation
    • Union
    • Full Outer Join

    Clustered index

    User document, #4841

    When you are designing table structures or analyzing database behaviors, it is recommended to use the clustered index feature if you find that some columns with primary keys are often grouped and sorted, queries on these columns often return a certain range of data or a small amount of data with different values, and the corresponding data does not cause read or write hotspot issues.

    Clustered indexes, also known as index-organized tables in some database management systems, is a storage structure associated with the data of a table. When creating a clustered index, you can specify one or more columns from the table as the keys for the index. TiDB stores these keys in a specific structure, which allows TiDB to quickly and efficiently find the rows associated with the keys, thus improves the performance of querying and writing data.

    When the clustered index feature is enabled, the TiDB performance improves significantly (for example in the Sysbench test, the read and write performance of TiDB, with clustered index enabled, improves by 58.1%) in the following cases:

    • When data is inserted, the clustered index reduces one write of the index data from the network.
    • When a query with an equivalent condition only involves the primary key, the clustered index reduces one read of index data from the network.
    • When a query with a range condition only involves the primary key, the clustered index reduces multiple reads of index data from the network.
    • When a query with an equivalent or range condition involves the primary key prefix, the clustered index reduces multiple reads of index data from the network.

    Each table can either use a clustered or non-clustered index to sort and store data. The differences of these two storage structures are as follows:

    • When creating a clustered index, you can specify one or more columns in the table as the key value of the index. A clustered index sorts and stores the data of a table according to the key value. Each table can have only one clustered index. If a table has a clustered index, it is called a clustered index table. Otherwise, it is called a non-clustered index table.
    • When you create a non-clustered index, the data in the table is stored in an unordered structure. You do not need to explicitly specify the key value of the non-clustered index, because TiDB automatically assigns a unique ROWID to each row of data. During a query, the ROWID is used to locate the corresponding row. Because there are at least two network I/O operations when you query or insert data, the performance is degraded compared with clustered indexes.

    When table data is modified, the database system automatically maintains clustered indexes and non-clustered indexes for you.

    All primary keys are created as non-clustered indexes by default. You can create a primary key as a clustered index or non-clustered index in either of the following two ways:

    It is recommended that users use the CLUSTERED and NON-CLUSTERED usage, deliberately leaving out INT_ONLY

    • Specify the keyword CLUSTERED | NONCLUSTERED in the statement when creating a table, then the system creates the table in the specified way. The syntax is as follows:
    CREATE TABLE `t` (`a` VARCHAR(255), `b` INT, PRIMARY KEY (`a`, `b`) CLUSTERED);
    

    Or

    CREATE TABLE `t` (`a` VARCHAR(255) PRIMARY KEY CLUSTERED, `b` INT);
    

    You can execute the statement SHOW INDEX FROM tbl-name to query whether a table has a clustered index.

    • Configure the system variable tidb_enable_clustered_index to control the clustered index feature. Supported values are ON, OFF, and INT_ONLY.
      • ON: Indicates that the clustered index feature is enabled for all types of primary keys. Adding and dropping non-clustered indexes are supported.
      • OFF: Indicates that the clustered index feature is disabled for all types of primary keys. Adding and dropping non-clustered indexes are supported.
      • INT_ONLY: The default value. If the variable is set to INT_ONLY and alter-primary-key is set to false, the primary keys which consist of single integer columns are created as clustered indexes by default. The behavior is consistent with that of TiDB v5.0 and earlier versions.

    If a CREATE TABLE statement contains the keyword CLUSTERED | NONCLUSTERED, the statement overrides the configuration of the system variable and the configuration item.

    You are recommended to use the clustered index feature by specifying the keyword CLUSTERED | NONCLUSTERED in statements. In this way, it is more flexible for TiDB to use all data types of clustered and non-clustered indexes in the system at the same time as required.

    It is not recommended to use tidb_enable_clustered_index = INT_ONLY, because INT_ONLY is temporarily used to make this feature compatible and will be deprecated in the future.

    Limitations for the clustered index are as follows:

    • Mutual conversion between clustered indexes and non-clustered indexes is not supported.
    • Dropping clustered indexes is not supported.
    • Adding, dropping, and altering clustered indexes using ALTER TABLE statements are not supported.
    • Reorganizing and re-creating a clustered index is not supported.
    • Enabling or disabling indexes is not supported, which means the invisible index feature is not effective for clustered indexes.
    • Creating a UNIQUE KEY as a clustered index is not supported.
    • Using the clustered index feature together with TiDB Binlog is not supported. After TiDB Binlog is enabled, TiDB only supports creating a single integer primary key as a clustered index. TiDB Binlog does not replicate data changes of existing tables with clustered indexes to the downstream.
    • Using the clustered index feature together with the attributes SHARD_ROW_ID_BITS and PRE_SPLIT_REGIONS is not supported.
    • If the cluster is upgraded to a later version then rolls back, you need to downgrade newly-added tables by exporting table data before the rollback and importing the data after the rollback. Other tables are not affected.

    Async Commit

    User document, #8316

    The client of the database will wait for the database system to complete the transaction commit in two phases (2PC) synchronously. The transaction returns the result to the client after the first phase commit is successful, and the system executes the second phase commit operation in the background asynchronously to reduce the transaction commit latency. If the transaction write involves only one Region, the second phase is omitted directly, and the transaction becomes a one-phase commit.

    After the Async Commit feature is enabled, with the same hardware and configuration, when Sysbench is set to test the Update index with 64 threads, the average latency decreases by 41.7% from 12.04ms to 7.01ms.

    When Async Commit feature is enabled, to reduce one network interaction latency and improve the performance of data writes, database application developers are recommended to consider reducing the consistency of transactions from linear consistency to causal consistency. The SQL statement to enable causal consistency is START TRANSACTION WITH CAUSAL CONSISTENCY.

    After the causal consistency is enabled, with the same hardware and configuration, when Sysbench is set to test oltp_write_only with 64 threads, the average latency decreased by 5.6% from 11.86ms to 11.19ms.

    After the consistency of transactions is reduced from the linear consistency to causal consistency, if there is no interdependence between multiple transactions in the application, the transactions do not have a globally consistent order.

    The Async Commit feature is enabled by default for newly created v5.0 clusters.

    This feature is disabled by default for clusters upgraded from earlier versions to v5.0. You can enable this feature by executing the set global tidb_enable_async_commit = ON; and set global tidb_enable_1pc = ON; statements.

    The limitation for the Async Commit feature is as follows:

    • Direct downgrade is not supported.

    Enable the Coprocessor cache feature by default

    User document, #18028

    In 5.0 GA, the Coprocessor cache feature is enabled by default. After this feature is enabled, to reduce the latency of reading data, TiDB caches the calculation results of the operators pushed down to tikv-server in tidb-server.

    To disable the Coprocessor cache feature, you can modify the capacity-mb configuration item of tikv-client.copr-cache to 0.0.

    Improve the execution performance of delete * from table where id <? Limit ? statement

    #18028

    The p99 performance of the delete * from table where id <? limit ? statement is improved by 4 times.

    Optimize load base split strategy to solve the performance problem that data cannot be split in some small table hotspot read scenarios

    #18005

    Improve stability

    Optimize the performance jitter issue caused by imperfect scheduling

    #18005

    Enable the GC Compaction Filter feature by default to reduce GC’s consumption of CPU and I/O resources

    User document, #18009

    When TiDB performs garbage collection (GC) and data compaction, partitions occupy CPU and I/O resources. Overlapping data exists during the execution of these two tasks.

    To reduce GC’s consumption of CPU and I/O resources, the GC Compaction Filter feature combines these two tasks into one and executes them in the same task. This feature is enabled by default. You can disable it by configuring gc.enable-compaction-filter = false.

    Ensure that the execution plans are unchanged as much as possible to avoid performance jitter

    User document

    SQL Binding supports the INSERTREPLACEUPDATEDELETE statements

    When tuning performance or maintaining the database, if you find that the system performance is unstable due to unstable execution plans, you can select a manually optimized SQL statement according to your judgement or tested by EXPLAIN ANALYZE. You can bind the optimized SQL statement to the SQL statement to be executed in the application code to ensure stable performance.

    When manually binding SQL statements using the SQL BINDING statement, you need to ensure that the optimized SQL statement has the same syntax as the original SQL statement.

    You can view the manually or automatically bound execution plan information by running the SHOW {GLOBAL | SESSION} BINDINGS command. The output is the same as that of versions earlier than v5.0.

    Automatically capture and bind execution plans

    When upgrading TiDB, to avoid performance jitter, you can enable the baseline capturing feature to allow the system to automatically capture and bind the latest execution plan and store it in the system table. After TiDB is upgraded, you can export the bound execution plan by running the SHOW GLOBAL BINDING command and decide whether to delete these plans.

    This feature is disbled by default. You can enable it by modifying the server or setting the tidb_capture_plan_baselines global system variable to ON. When this feature is enabled, the system fetches the SQL statements that appear at least twice from the Statement Summary every bind-info-lease (the default value is 3s), and automatically captures and binds these SQL statements.

    Improve stability of TiFlash queries

    Add a system variable tidb_allow_fallback_to_tikv to fall back queries to TiKV when TiFlash fails. The default value is OFF.

    Optimize the memory management module to reduce system OOM risks

    Track the memory usage of aggregate functions. This feature is enabled by default. When SQL statements with aggregate functions are executed, if the total memory usage of the current query exceeds the threshold set by mem-quota-query, the system automatically performs operations defined by oom-action.

    Diagnostics

    User document

    During the troubleshooting of SQL performance issues, detailed diagnostic information is needed to determine the causes of performance issues. Before TiDB 5.0, the information collected by the EXPLAIN statements was not detailed enough. The root causes of the issues can only be determined based on log information, monitoring information, or even on guess, which might be inefficient.

    In TiDB v5.0, the following improvements are made to help you troubleshoot performance issues more efficiently:

    • Support using the EXPLAIN ANALYZE statement to analyze all DML statements to show the actual performance plans and the execution information of each operator. #18056
    • Support using the EXPLAIN FOR CONNECTION statement to check the real-time status of all the SQL statements being executed. For example, you can use the statement to check the execution duration of each operator and the number of processed rows. #18233
    • Provide more details about the operator execution in the output of the EXPLAIN ANALYZE statement, including the number of RPC requests sent by operators, the duration of resolving lock conflicts, network latency, the scanned volume of deleted data in RocksDB, and the hit rate of RocksDB caches. #18663
    • Support automatically recording the detailed execution information of SQL statements in the slow log. The execution information in the slow log is consistent with the output information of the EXPLAIN ANALYZE statement, which includes the time consumed by each operator, the number of processed rows, and the number of sent RPC requests. #15009

    Telemetry

    TiDB adds cluster usage metrics in telemetry, such as the number of data tables, the number of queries, and whether new features are enabled.

    To learn more about details and how to disable this behavior, refer to telemetry.

    Source code(tar.gz)
    Source code(zip)
  • v4.0.12(Apr 2, 2021)

    Improvements

    • Refine the output information of the EXPLAIN statement for the batch cop mode #23164
    • Add the warning information for expressions that cannot be pushed to the storage layer in the output of the EXPLAIN statement #23020
    • Migrate a part of the DDL package code from Execute/ExecRestricted to the safe API (2) #22935
    • Migrate a part of the DDL package code from Execute/ExecRestricted to the safe API (1) #22929
    • Add optimization-time and wait-TS-time into the slow log #22918
    • Support querying partition_id from the infoschema.partitions table #22489
    • Add last_plan_from_binding to help the users know whether a SQL statement's execution plan is matched with the hints in the binding #21430
    • Scatter truncated tables without the pre-split option #22872
    • Add three format specifiers for the str_to_date expression #22812
    • Record the PREPARE execution failure as Failed Query OPM in the metrics monitor #22672
    • Do not report errors for the PREPARE execution if tidb_snapshot is set #22641

    Bug Fixes

    • Fix the issue that the get variable expression goes wrong when the session variable is hexadecimal literals#23372
    • Fix the issue that wrong collation is used when creating the fast execution plan for the Enum or Set type #23292
    • Fix the possible wrong result of the nullif expression when it is used with is-null #23279
    • Fix the issue that the auto-analysis is triggered outside its time range #23219
    • Fix the issue that the CAST function might ignore errors for the point get plan #23211
    • Fix a bug that prevents SPM from taking effect when CurrentDB is empty #23209
    • Fix the issue of possible wrong table filters for the IndexMerge plan #23165
    • Fix the issue of unexpected NotNullFlag in the returning types of the NULL constant #23135
    • Fix a bug that collation might not be handled by the text type #23092
    • Fix the issue that the range partition might incorrectly handle the IN expression #23074
    • Fix the issue that after marking a TiKV store as tombstone, starting new TiKV stores with different StoreIDs with the same IP address and port keeps returning the StoreNotMatch error #23071
    • Do not adjust the INT type when it is NULL and compared with YEAR #22844
    • Fix the issue of lost connection when loading data on tables with the auto_random column #22736
    • Fix the issue of DDL hangover when the DDL operation meets panic in the cancelling path #23297
    • Fix the wrong key range of index scan when comparing the YEAR column with NULL #23104
    • Fix the issue that a successfully created view is failed to use #23083
    Source code(tar.gz)
    Source code(zip)
  • v4.0.11(Feb 26, 2021)

    New Features

    • Support the utf8_unicode_ci and utf8mb4_unicode_ci collations #22558

    Improvements

    • Reorder inner joins that are simplified from outer joins #22402
    • Support multiple clusters in Grafana dashboards #22534
    • Add a workaround for the issue of multiple statements #22468
    • Divide the metrics of slow query into internal and general #22405
    • Add interface for utf8_unicode_ci and utf8mb4_unicode_ci collations #22099

    Bug Fixes

    • Fix the issue of abnormal unicode_ci constant propagation #22614
    • Fix the issue that might causes wrong collation and coercibility #22602
    • Fix the issue that might cause wrong collation results #22599
    • Fix the issue of constant substitution for different collations #22582
    • Fix a bug that the like function might return wrong result when using collation #22531
    • Fix the issue of incorrect duration type inference in least and greatest functions #22580
    • Fix a bug that occurs when the like function handles a single character wildcard (_) followed by a multiple character wildcard (%) #22575
    • Fix the error of type inference when comparing TiDB's built-in functions (least and greatest) #22562
    • Fix a bug that makes the like function get the wrong result if the pattern string is a unicode string #22529
    • Fix a bug that the point get query does not get the snapshot data when the @@tidb_snapshot variable is set #22527
    • Fix the potential panic that occurs when generating hints from joins #22518
    • Fix the issue that strings are incorrectly converted to the BIT type #22420
    • Fix the index out of range error that occurs when inserting values to the tidb_rowid column #22359
    • Fix a bug that the cached plan is incorrectly used #22353
    • Fix the runtime panic in the WEIGHT_STRING function when the length of the binary/char string is too large #22332
    • Fix the issue that the generated column is incorrectly used when argument numbers are invalid #22174
    • Correctly set the process information before building the execution plan #22148
    • Fix the issue of inaccurate runtime statistics of IndexLookUp #22136
    • Add cache for the memory usage information when the cluster is deployed in a container #22116
    • Fix the issue that the execution plan is incorrectly decoded #22022
    • Report errors for using invalid window specifications #21976
    • Throw errors when the PREPARE statement is nested with EXECUTE, DEALLOCATE or PREPARE #21972
    • Fix the issue that no error is reported when the INSERT IGNORE statement is used on a non-existing partition #21971
    • Unify the encoding of EXPLAIN results and slow log #21964
    • Fix the issue of unknown column in join when using the aggregate operator #21957
    • Fix the wrong type inference in the ceiling function #21936
    • Fix the issue that the Double type column ignores its decimal #21916
    • Fix the issue that the correlated aggregation is calculated in subqueries #21877
    • Report errors for the JSON object with key length >= 65536 #21870
    • Fix the issue that the dyname function is incompatible with MySQL #21850
    • Fix the issue that the to_base64 function returns NULL when the input data is too long #21813
    • Fix the failure of comparing multiple fields in the subquery #21808
    • Fix the issue that occurs when comparing the float type in JSON #21785
    • Fix the issue that occurs when comparing the types of JSON objects #21718
    • Fix the issue that the coercibility value of the cast function is incorrectly set #21714
    • Fix an unexpected panic when using the IF function #21711
    • Fix the issue that the NULL result returned from JSON search is incompatible with MySQL #21700
    • Fix the issue that occurs when checking the only_full_group_by mode using ORDER BY and HAVING #21697
    • Fix the issue that the units of Day and Time are incompatible with MySQL #21676
    • Fix the issue that LEAD and LAG's default value cannot adapt to the field type #21665
    • Perform a check to ensure that the LOAD DATA statement can only load data into base tables #21638
    • Fix the issue that occurs when addtime and subtime functions handle invalid arguments #21635
    • Change the round rule for approximate values to "round to the nearest even number" #21628
    • Fix the issue that WEEK() does not recognize @@GLOBAL.default_week_format until it has been explicitly read #21623
    Source code(tar.gz)
    Source code(zip)
  • v4.0.10(Jan 15, 2021)

    Improvements

    • Make the size limit of transaction entries configurable #21843

    Bug Fixes

    • Fix a concurrency bug that might cause the batch client timeout #22336
    • Avoid duplicate bindings caused by concurrent baseline capture #22295
    • Make the baseline capture work when the log level is 'debug' #22293
    • Correct GC locks when Region merge occurs during scanning and resolving locks #22267
    • Return correct results for user variables of the datetime type #22143
    • Avoid using index merge when there are multiple table filters #22124
    • Fix the wrong precision issue in TiFlash caused by the prepare plan cache #21960
    • Fix a bug that the schema change causes incorrect results #21596
    • Avoid unnecessary column flag changes incurred by ALTER TABLE #21474
    • Set the database name for table aliases of query blocks used in optimizer hints #21380
    • Generate the proper hint for IndexHashJoin/IndexMergeJoin #21020
    Source code(tar.gz)
    Source code(zip)
  • v5.0.0-rc(Jan 12, 2021)

    New Features

    • Support collation utf8mb4_unicode_ci and utf8_unicode_ci
    • Support error/info log desensitization
    • Support Invisible Indexes
    • Support Async commit. Async Commit is an optimization that reduces commit latency, by returning success to the user when all prewrites have succeeded. (Experimental)
    • Support clustered Index. Clustered indexes provide TiDB the ability to organize tables in a way that can improve the performance of certain queries. (Experimental)
    • Support LIST PARTITION and LIST COLUMNS PARTITION table (Experimental)
    • Improve the Accuracy and Robustness of Index Selection (Experimental)

    Improvements

    • Improve the executor runtime information collection
    • Optimize the Performance of Bulk Deletion
    Source code(tar.gz)
    Source code(zip)
  • v3.0.20(Dec 25, 2020)

    Compatibility Change

    • Deprecate the enable-streaming configuration item #21054

    Improvements

    • Raise an error when preparing the LOAD DATA statement #21222

    Bug Fixes

    • Fix the resolved txn status cache for pessimistic transactions. #21706
    • Fix the issue of inaccurate statistics that occurs when querying INFORMATION_SCHEMA.TIDB_HOT_REGIONS #21319
    • Fix the issue that DELETE might not delete data correctly when the database name is not in a pure lower representation #21205
    • Fix the issue of stack overflow that occurs when building the recursive view #21000
    • Fix the issue of goroutine leak in TiKV client #20863
    • Fix the wrong default zero value for the year type #20828
    • Fix the issue of goroutine leak in index lookup join #20791
    • Fix the issue that executing INSERT SELECT FOR UPDATE returns the malformed packet in the pessimistic transaction #20681
    • Fix the unknown time zone 'posixrules' #20605
    • Fix the issue that occurs when converting the unsigned integer type to the bit type #20362
    • Fix the corrupted default value of the bit type column #20339
    • Fix the potentially incorrect results when one of the equal condition is the Enum or Set type #20296
    • Fix a wrong behavior of != any() #20061
    • Fix the issue that type conversion in BETWEEN...AND... returns invalid results #21503
    • Fix a compatibility issue with the ADDDATE function #21008
    • Set the correct default value for newly added Enum column #20999
    • Fix the result of SQL statements like SELECT DATE_ADD('2007-03-28 22:08:28',INTERVAL "-2.-2" SECOND) to be compatible with MySQL #20627
    • Fix the incorrect default value when modifying the column type #20532
    • Fix the issue that the timestamp function gets wrong result when the input argument is the float or decimal type #20469
    • Fix a potential deadlock issue in statistics #20424
    • Fix the issue that the overflown float type data is inserted #20251
    Source code(tar.gz)
    Source code(zip)
  • v4.0.9(Dec 21, 2020)

    Compatibility Changes

    • Deprecate the enable-streaming configuration item #21055

    Improvements

    • 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 GOGC variable in the configuration file #20922
    • Make the dumped binary time (Timestamp and Datetime) more compatible with MySQL #21135
    • Provide an error message for statements that use the LOCK IN SHARE MODE syntax #21005
    • Avoid outputting unnecessary warnings or errors when folding constants in shortcut-able expressions #21040
    • Raise an error when preparing the LOAD DATA statement #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/trace tool is running #20578

    Bug Fixes

    • Fix the issue that incorrect result is returned for indeterministic function when executing a prepared point-get update with "prepared plan cache" is disabled #21883
    • Fix the issue of incorrect results when using a prefix index with the OR condition #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-INT type into the hash partitioned table #21238
    • Fix the unexpected error when using index join in the INSERT statement in some cases #21249
    • Fix the issue that the BigInt unsigned column value in the CASE WHEN operator is incorrectly converted to the BigInt signed 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 TABLE and SELECT syntax #21181
    • Fix the issue that the query result of slow_query might miss some rows #21211
    • Fix the issue that DELETE might 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 UPDATE statement #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 CONNECTION cannot 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 adddate function inserts invalid characters #21176
    • Fix the issue that the wrong PointGet plan generated in some situations causes wrong results #21244
    • Ignore the conversion of daylight saving time in the ADD_DATE function to be compatible with MySQL #20888
    • Fix a bug that prevents inserting strings with trailing spaces that exceed varchar or char'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 comparing int with year #21283
    • Fix the panic caused by the overflowing result of the sum() function when calculating the Double type field #21272
    • Fix a bug that DELETE fails 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
    Source code(tar.gz)
    Source code(zip)
  • v4.0.8(Oct 30, 2020)

    New Features

    • Support the new aggregate function APPROX_PERCENTILE #20197

    Improvements

    • Prioritize low-selectivity indexes in the greedy search procedure of Selectivity() #20154
    • Record more RPC runtime information in Coprocessor runtime statistics #19264
    • Speed up parsing the slow log to improve query performance #20556
    • Wait for timeout execution plans during the plan binding stage to record more debug information when the SQL optimizer is verifying potential new plans #20530
    • Add the execution retry time in the slow log and the slow query result #20495 #20494
    • Add the table_storage_stats system table #20431
    • Add the RPC runtime statistical information for the INSERT/UPDATE/REPLACE statement #20430
    • Add the operator information in the result of EXPLAIN FOR CONNECTION #20384
    • Adjust the TiDB error log to the DEBUG level for the client connection/disconnection activities #20321
    • Add monitoring metrics for Coprocessor Cache #20293
    • Add the runtime information of pessimistic lock keys #20199
    • Add two extra sections of time consumption information in the runtime information and trace span #20187
    • Add the runtime information of transaction commit in the slow log #20185
    • Disable the index merge join #20599
    • Add the ISO 8601 and timezone supports for temporal string literals #20670

    Bug Fixes

    • Fix the unexpected panic that occurs when using partitioned tables #20565
    • Fix the wrong result of outer join when filtering the outer side using index merge join #20427
    • Fix the issue that the NULL value is returned when converting data to the BIT type if the data is too long #20363
    • Fix the corrupted default value for the BIT type column #20340
    • Fix the overflow error that might occur when converting the BIT type to the INT64 type #20312
    • Fix the possible wrong result of the propagate column optimization for the hybrid type column #20297
    • Fix the panic that might occur when storing outdated plans from the plan cache #20246
    • Fix the bug that the returned result is mistakenly truncated if FROM_UNIXTIME and UNION ALL are used together #20240
    • Fix the issue that wrong results might be returned when the Enum type value is converted to the Float type #20235
    • Fix the possible panic of RegionStore.accessStore #20210
    • Fix the wrong result returned when sorting the maximum unsigned integer in BatchPointGet #20205
    • Fix the bug that the coercibilities of Enum and Set are wrong #20364
    • Fix an issue of ambiguous YEAR conversion #20292
    • Fix the issue of wrong reported result that occurs when the KV duration panel contains store0 #20260
    • Fix the issue that the Float type data is mistakenly inserted regardless of the out of range error #20252
    • Fix the bug that the generated column does not handle bad NULL values #20216
    • Fix the inaccurate error information for the YEAR type data that is out of range #20170
    • Fix the unexpected invalid auto-id error that might occur during the pessimistic transaction retry #20134
    • Fix the issue that the constraint is not checked when using ALTER TABLE to change the Enum/Set type #20046
    • Fix the wrong runtime information of cop tasks recorded when multiple operators are used for concurrency #19947
    • Fix the issue that read-only system variables cannot be explicitly selected as the session variables #19944
    • Fix the issue that the duplicate ORDER BY condition might cause sub-optimal execution plans #20333
    • Fix the issue that the generated metric profile might fail if the font size exceeds the maximum allowable value #20637
    Source code(tar.gz)
    Source code(zip)
  • v4.0.7(Sep 29, 2020)

    Improvements

    • Add more runtime information for the join operator #20093
    • Add the hit ratio information of coprocessor cache in EXPLAIN ANALYZE #19972
    • Support pushing down the ROUND function to TiFlash #19967
    • Add the default value of CMSketch for ANALYZE #19927
    • Refine error message desensitization #20004
    • Accept connections from clients using connectors from MySQL 8.0 #19959

    Bug Fixes

    • Fix a vectorization bug from and/or/COALESCE caused by shortcut #20092
    • Fix the issue that plan digests are the same when the cop task stores are of different types #20076
    • Fix the wrong behavior of the != any() function #20062
    • Fix the query error that occurs when the slow-log file does not exist #20051
    • Fix the issue that Region requests continue to retry when the context is canceled #20031
    • Fix the issue that querying the time type of the cluster_slow_query table in streaming request might result in an error #19943
    • Fix the issue that DML statements using case when might cause schema change #20095
    • Fix the issue that the prev_stmt information in slow log is not desensitized #20048
    • Fix the issue that tidb-server does not release the table lock when it exits abnormally #20020
    • Fix the incorrect error message that occurs when inserting data of the ENUM and SET type #19950
    • Fix the wrong behavior of the IsTrue function in some situations #19903
    • Fix the issue that the CLUSTER_INFO system table might not work normally after PD is scaled in or out #20026
    • Avoid unnecessary warnings or errors when folding constants in control expressions #19910
    • Update the method of updating statistics to avoid Out of Memory (OOM) #20013
    Source code(tar.gz)
    Source code(zip)
Owner
PingCAP
The team behind TiDB TiKV, an open source MySQL compatible NewSQL HTAP database
PingCAP
This example shows how to estimate pi, using generated random numbers that uniformly distributed.

php-estimatepi This example shows how to estimate pi, using generated random numbers that uniformly distributed. Every pair of numbers produced will b

Oğuzhan Cerit 1 Nov 26, 2021
A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.

Motan Overview Motan is a cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services. Related

Weibo R&D Open Source Projects 5.8k Jan 12, 2022
A PHP 5.3+ and PHP 7.3 framework for OpenGraph Protocol

Opengraph Test with Atoum cd Opengraph/ curl -s https://getcomposer.org/installer | php php composer.phar install --dev ./vendor/atoum/atoum/bin/atoum

Axel Etcheverry 89 Dec 1, 2021
A PHP implementation of the Unleash protocol aka Feature Flags in GitLab.

A PHP implementation of the Unleash protocol aka Feature Flags in GitLab. This implementation conforms to the official Unleash standards and implement

Dominik Chrástecký 2 Aug 18, 2021
An implementation of the Minecraft: Bedrock Edition protocol in PHP

BedrockProtocol An implementation of the Minecraft: Bedrock Edition protocol in PHP This library implements all of the packets in the Minecraft: Bedro

PMMP 54 Jan 10, 2022
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 14 Jul 25, 2021
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 14 Jul 25, 2021
Spotweb is a decentralized usenet community based on the Spotnet protocol.

Spotweb is a decentralized usenet community based on the Spotnet protocol. Spotweb requires an operational webserver with PHP5.6 installed, it

Spotweb 382 Jan 18, 2022
A simple social groups compatible with ActivityPub.

A simple social groups compatible with ActivityPub.

wxw.moe 9 Jan 9, 2022
Spotweb is a decentralized usenet community based on the Spotnet protocol.

Spotweb Spotweb is a decentralized usenet community based on the Spotnet protocol. Spotweb requires an operational webserver with PHP5.6 installed, it

[sCRiPTz-TEAM] 2 Nov 29, 2021
> Create e-wallet, send money, withdraw and check balance all via USSD protocol

Mobile Money USSD solution Create e-wallet, send money, withdraw and check balance all via USSD protocol Create e-wallet Step 1 Step 2 Step 3 Step 4 S

Emmanuel HAKORIMANA 1 Nov 3, 2021
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Give our package a Star to support us ⭐ ?? Inst

Binshops 224 Jan 10, 2022
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code. Installation You can instal

BinarCode 84 Jan 9, 2022
Algolia Search integration for Magento 1 - compatible with versions from 1.6.x to 1.9.x

Algolia Search for Magento 1.6+ End of Support ?? The Algolia Magento 1 extension has reached End of Life regarding support and maintenance. We do not

Algolia 163 Jan 16, 2022
[ONLY Magento 2.0.x Compatible] Code samples for Magento developers

Synopsis This project is a collection of samples to demonstrate technologies introduced in Magento 2. You will find the most simple extension along wi

Magento 43 Jan 13, 2022
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers. For Magento 2.0.x, 2.1.x, 2.2.x

MagePal :: Magento Extensions 294 Jan 8, 2022
Algolia Search integration for Magento 2 - compatible with versions from 2.3.x to 2.4.x

Algolia Search for Magento 2 ?? Need help? Check out our Technical Troubleshooting Guide. For feedback, bug reporting, or unresolved issues with the e

Algolia 135 Jan 3, 2022
Faker-driven, configuration-based, platform-agnostic, locale-compatible data faker tool

Masquerade Faker-driven, platform-agnostic, locale-compatible data faker tool Point Masquerade to a database, give it a rule-set defined in YAML and M

elgentos ecommerce solutions 190 Jan 7, 2022
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

TARS - A Linux Foundation Project TARS Foundation Official Website TARS Project Official Website WeChat Group: TARS01 WeChat Offical Account: TarsClou

THE TARS FOUNDATION PROJECTS 9.3k Jan 13, 2022