Releases: pingcap/tidb
Releases · pingcap/tidb
tidb-server v2.0.10
- Fix the possible issue caused by canceling a DDL job #8513
- Fix the issue that the
ORDER BY
andUNION
clauses cannot quote the column including a table name #8514 - Fix the issue that the
UNCOMPRESS
function does not judge the incorrect input length #8607 - Fix the issue encountered by
ANSI_QUOTES SQL_MODE
when upgrading TiDB #8575 - Fix the issue that
SELECT
returns the wrong result in some cases #8570 - Fix the possible issue that TiDB cannot exit when it receives the exit signal #8501
- Fix the issue that
IndexLookUpJoin
returns the wrong result in some cases #8508 - Avoid pushing down the filter containing
GetVar
orSetVar
#8454 - Fix the issue that the result length of the
UNION
clauses is incorrect in some cases #8491 - Fix the issue of
PREPARE FROM @var_name
#8488 - Fix the panic issue when dumping statistics information in some cases #8464
- Fix the statistics estimation issue of point queries in some cases #8493
- Fix the panic issue when the returned default
enum
value is a string #8476 - Fix the issue that too much memory is consumed in the scenario of wide tables #8467
- Fix the issue encountered when Parser incorrectly formats the mod opcode #8431
- Fix the panic issue caused by adding foreign key constraints in some cases #8421 #8410
- Fix the issue that the
YEAR
column type incorrectly converts the zero value #8396 - Fix the panic issue occurred when the argument of the
VALUES
function is not a column #8404 - Disable Plan Cache for statements containing subqueries #8395
tidb-server v2.1.1
SQL Optimizer/Executor
- Fix the round error of the negative date #8574
- Fix the issue that the
uncompress
function does not check the data length #8606 - Reset bind arguments of the
prepare
statement after theexecute
command is executed #8652 - Support automatically collecting the statistics information of a partition table #8649
- Fix the wrongly configured integer type when pushing down the
abs
function #8628 - Fix the data race on the JSON column #8660
Server
- Fix the issue that the transaction obtained TSO is incorrect when PD breaks down #8567
- Fix the bootstrap failure caused by the statement that does not conform to ANSI standards #8576
- Fix the issue that incorrect parameters are used in transaction retries #8638
DDL
- Change the default character set and collation of tables into
utf8mb4
#8590 - Add the
ddl_reorg_batch_size
variable to control the speed of adding indexes #8614 - Make the character set and collation options content in DDL case-insensitive #8611
- Fix the issue of adding indexes for generated columns #8655
tidb-server v2.1.0
Upgrade caveat
- TiDB 2.1 does not support downgrading to v2.0.x or earlier due to the adoption of the new storage engine
- Parallel DDL is enabled in TiDB 2.1, so the clusters with TiDB version earlier than 2.0.1 cannot upgrade to 2.1 using rolling update. You can choose either of the following two options:
- Stop the cluster and upgrade to 2.1 directly
- Roll update to 2.0.1 or later 2.0.x versions, and then roll update to the 2.1 version
- If you upgrade from TiDB 2.0.6 or earlier to TiDB 2.1, make sure if there is any ongoing DDL operation, especially the time consuming
Add Index
operation, because the DDL operations slow down the upgrading process.
SQL Optimizer
- Optimize the selection range of
Index Join
to improve the execution performance - Optimize the selection of outer table for
Index Join
and use the table with smaller estimated value of Row Count as the outer table - Optimize Join Hint
TIDB_SMJ
so that Merge Join can be used even without proper index available - Optimize Join Hint
TIDB_INLJ
to specify the Inner table to Join - Optimize correlated subquery, push down Filter, and extend the index selection range, to improve the efficiency of some queries by orders of magnitude
- Support using Index Hint and Join Hint in the
UPDATE
andDELETE
statement - Support pushing down more functions:
ABS
/CEIL
/FLOOR
/IS TRUE
/IS FALSE
- Optimize the constant folding algorithm for the
IF
andIFNULL
built-in functions - Optimize the output of the
EXPLAIN
statement and use hierarchy structure to show the relationship between operators
SQL executor
- Refactor all the aggregation functions and improve execution efficiency of the
Stream
andHash
aggregation operators - Implement the parallel
Hash Aggregate
operators and improve the computing performance by 350% in some scenarios - Implement the parallel
Project
operators and improve the performance by 74% in some scenarios - Read the data of the Inner table and Outer table of
Hash Join
concurrently to improve the execution performance - Optimize the execution speed of the
REPLACE INTO
statement and increase the performance nearly by 10 times - Optimize the memory usage of the time data type and decrease the memory usage of the time data type by fifty percent
- Optimize the point select performance and improve the point select efficiency result of Sysbench by 60%
- Improve the performance of TiDB on inserting or updating wide tables by 20 times
- Support configuring the memory upper limit of a single statement in the configuration file
- Optimize the execution of Hash Join, if the Join type is Inner Join or Semi Join and the inner table is empty, return the result without reading data from the outer table
- Support using the
EXPLAIN ANALYZE
statement to check the runtime statistics including the execution time and the number of returned rows of each operator
Statistics
- Support enabling auto ANALYZE statistics only during certain period of the day
- Support updating the table statistics automatically according to the feedback of the queries
- Support configuring the number of buckets in the histogram using the
ANALYZE TABLE WITH BUCKETS
statement - Optimize the Row Count estimation algorithm using histogram for mixed queries of equality query and range queries
Expressions
- Support following built-in function:
json_contains
json_contains_path
encode/decode
Server
- Support queuing the locally conflicted transactions within tidb-server instance to optimize the performance of conflicted transactions
- Support Server Side Cursor
- Add the HTTP API
- Scatter the distribution of table Regions in the TiKV cluster
- Control whether to open the
general log
- Support modifying the log level online
- Check the TiDB cluster information
- Add the
auto_analyze_ratio
system variables to contorl the ratio of Analyze - Add the
tidb_retry_limit
system variable to control the automatic retry times of transactions - Add the
tidb_disable_txn_auto_retry
system variable to control whether the transaction retries automatically - Support using
admin show slow
statement to obtain the slow queries - Add the
tidb_slow_log_threshold
environment variable to set the threshold of slow log automatically - Add the
tidb_query_log_max_len
environment variable to set the length of the SQL statement to be truncated in the log dynamically
DDL
- Support the parallel execution of the add index statement and other statements to avoid the time consuming add index operation blocking other operations
- Optimize the execution speed of
ADD INDEX
and improve it greatly in some scenarios - Support the
select tidb_is_ddl_owner()
statement to facilitate deciding whether TiDB isDDL Owner
- Support the
ALTER TABLE FORCE
syntax - Support the
ALTER TABLE RENAME KEY TO
syntax - Add the table name and database name in the output information of
admin show ddl jobs
- Support using the
ddl/owner/resign
HTTP interface to release the DDL owner and start electing a new DDL owner
Compatibility
- Support more MySQL syntaxes
- Make the
BIT
aggregate function support theALL
parameter - Support the
SHOW PRIVILEGES
statement - Support the
CHARACTER SET
syntax in theLOAD DATA
statement - Support the
IDENTIFIED WITH
syntax in theCREATE USER
statement - Support the
LOAD DATA IGNORE LINES
statement - The
Show ProcessList
statement returns more accurate information
tidb-server v2.0.9
- Fix the issue caused by the empty statistics histogram #7927
- Fix the panic issue of the
UNION ALL
statement in some cases #7942 - Fix the stack overflow issue caused by wrong DDL Jobs #7959
- Add the slow log for the
Commit
operation #7983 - Fix the panic issue caused by the too large
Limit
value #8004 - Support specifying the
utf8mb4
character set in theUSING
clause #8048 - Make the
TRUNCATE
built-in function support parameters of unsigned integer type #8069 - Fix the selectivity estimation issue of the primary key for the statistics module in some cases #8150
- Add the
Session
variable to control whether_tidb_rowid
is allowed to be written in #8126 - Fix the panic issue of
PhysicalProjection
in some cases #8154 - Fix the unstable results of the
Union
statement in some cases #8168 - Fix the issue that
NULL
is not returned byvalues
in the non-Insert
statement #8179 - Fix the issue that the statistics module cannot clear the outdated data in some cases #8184
- Make the maximum allowed running time for a transaction a configurable option 8209
- Fix the wrong comparison algorithm of
expression rewriter
in some cases #8288 - Eliminate the extra columns generated by the
UNION ORDER BY
statement #8307 - Support the
admin show next_row_id
statement #8274 - Fix the escape issue of special characters in the
Show Create Table
statement #8321 - Fix the unexpected errors in the
UNION
statement in some cases #8318 - Fix the issue that canceling a DDL job causes no rollback of a schema in some cases #8312
- Change
tidb_max_chunk_size
to a global variable #8333 - Add an upper bound to the
Scan
command of ticlient, to avoid overbound scan #8309, #8310
tidb-server v2.1.0-rc.5
SQL Optimizer
- Fix the issue that
IndexReader
reads the wrong handle in some cases #8132 - Fix the issue occurred while the
IndexScan Prepared
statement usesPlan Cache
#8055 - Fix the issue that the result of the
Union
statement is unstable #8165
SQL Execution Engine
- Improve the performance of TiDB on inserting or updating wide tables #8024
- Support the unsigned
int
flag in theTruncate
built-in function #8068 - Fix the error occurred while converting JSON data to the decimal type #8109
- Fix the error occurred when you
Update
the float type #8170
Statistics
- Fix the incorrect statistics issue during point queries in some cases #8035
- Fix the selectivity estimation of statistics for primary key in some cases #8149
- Fix the issue that the statistics of deleted tables are not cleared up for a long period of time #8182
Server
- Improve the readability of logs and make logs better
- Fix the error occurred when obtaining the table data of
infoschema.profiling
#8096 - Replace the unix socket with the pumps client to write binlogs #8098
- Add the threshold value for the
tidb_slow_log_threshold
environment variable, which dynamically sets the slow log #8094 - Add the original length of a SQL statement truncated while the
tidb_query_log_max_len
environment variable dynamically sets logs 8200 - Add the
tidb_opt_write_row_id
environment variable to control whether to allow writing_tidb_rowid
#8218 - Add an upper bound to the
Scan
command of ticlient, to avoid overbound scan #8081, #8247
DDL
- Fix the issue that executing DDL statements in transactions encounters an error in some cases #8056
- Fix the issue that executing
truncate table
in partition tables does not take effect #8103 - Fix the issue that the DDL operation does not roll back correctly after being cancelled in some cases #8057
- Add the
admin show next_row_id
command to return the next available row ID #8268
tidb-server v2.1.0-rc.4
SQL Optimizer
- Fix the issue that column pruning of
UnionAll
is incorrect in some cases #7941 - Fix the issue that the result of the
UnionAll
operator is incorrect in some cases #8007
SQL Execution Engine
- Fix the precision issue of the
AVG
function #7874 - Support using the
EXPLAIN ANALYZE
statement to check the runtime statistics including the execution time and the number of returned rows of each operator during the query execution process #7925 - Fix the panic issue of the
PointGet
operator when a column of a table appears multiple times in the result set #7943 - Fix the panic issue caused by too large values in the
Limit
subclause #8002 - Fix the panic issue during the execution process of the
AddDate
/SubDate
statement in some cases #8009
Statistics
- Fix the issue of judging the prefix of the histogram low-bound of the combined index as out of range #7856
- Fix the memory leak issue caused by statistics collecting #7873
- Fix the panic issue when the histogram is empty #7928
- Fix the issue that the histogram bound is out of range when the statistics is being uploaded #7944
- Limit the maximum length of values in the statistics sampling process #7982
Server
- Refactor Latch to avoid misjudgment of transaction conflicts and improve the execution performance of concurrent transactions #7711
- Fix the panic issue caused by collecting slow queries in some cases #7874
- Fix the panic issue when
ESCAPED BY
is an empty string in theLOAD DATA
statement #8005 - Complete the “coprocessor error” log information #8006
Compatibility
- Set the
Command
field of theSHOW PROCESSLIST
result toSleep
when the query is empty #7839
Expressions
- Fix the constant folding issue of the
SYSDATE
function #7895 - Fix the issue that
SUBSTRING_INDEX
panics in some cases #7897
DDL
tidb-server v2.0.8
Improvements
- Slow down the AUTO_INCREMENT ID increasing speed when the
Update
statement does not modify the corresponding AUTO_INCREMENT column #7846
Bug fixes
- Quickly create a new etcd session to recover the service when the PD leader goes down #7810
- Fix the issue that the time zone is not considered when the default value of the
DateTime
type is calculated #7672 - Fix the issue that
duplicate key update
inserts values incorrectly in some conditions #7685 - Fix the issue that the predicate conditions of
UnionScan
are not pushed down #7726 - Fix the issue that the time zone is not correctly handled when you add the
TIMESTAMP
index #7812 - Fix the memory leak issue caused by the statistics module in some conditions #7864
- Fix the issue that the results of
ANALYZE
cannot be obtained in some abnormal conditions #7871 - Do not fold the function
SYSDATE
, to ensure the returned results are correct #7894 - Fix the
substring_index
panic issue in some conditions #7896 - Fix the issue that
OUTER JOIN
is mistakenly converted toINNER JOIN
in some conditions #7899
tidb-server v2.1.0-rc.3
SQL Optimizer
- Fix the incorrect result issue when a statement contains embedded
LEFT OUTER JOIN
#7689 - Enhance the optimization rule of predicate pushdown on the
JOIN
statement #7645 - Fix the optimization rule of predicate pushdown for the
UnionScan
operator #7695 - Fix the issue that the unique key property of the
Union
operator is not correctly set #7680 - Enhance the optimization rule of constant folding #7696
- Optimize the data source in which the filter is null after propagation to table dual #7756
SQL Execution Engine
- Optimize the performance of read requests in a transaction #7717
- Optimize the cost of allocating Chunk memory in some executors #7540
- Fix the "index out of range" panic caused by the columns where point queries get all NULL values #7790
Server
- Fix the issue that the memory quota in the configuration file does not take effect #7729
- Add the
tidb_force_priority
system variable to set the execution priority for each statement #7694 - Support using the
admin show slow
statement to obtain the slow query log #7785
Compatibility
- Fix the issue that the result of
charset/collation
is incorrect ininformation_schema.schemata
#7751 - Fix the issue that the value of the
hostname
system variable is empty #7750
Expressions
- Support the
init_vecter
argument in theAES_ENCRYPT
/AES_DECRYPT
built-in function #7425 - Fix the issue that the result of
Format
is incorrect in some expressions #7770 - Support the
JSON_LENGTH
built-in function #7739 - Fix the incorrect result issue when casting the unsigned integer type to the decimal type #7792
DML
- Fix the issue that the result of the
INSERT … ON DUPLICATE KEY UPDATE
statement is incorrect while updating the unique key #7675
DDL
- Fix the issue that the index value is not converted between time zones when you create a new index on a new column of the timestamp type #7724
- Support appending new values for the enum type #7767
- Support creating an etcd session quickly, which improves the cluster availability after network isolation #7774
tidb-server v2.1.0-rc.2
SQL Optimizer
- Put forward a proposal of the next generation Planner #7543
- Improve the optimization rules of constant propagation #7276
- Enhance the computing logic of
Range
to enable it to handle multipleIN
orEQUAL
conditions simultaneously #7577 - Fix the issue that the estimation result of
TableScan
is incorrect whenRange
is empty #7583 - Support the
PointGet
operator for theUPDATE
statement #7586 - Fix the panic issue during the process of executing the
FirstRow
aggregate function in some conditions #7624
SQL Execution Engine
- Fix the potential
DataRace
issue when theHashJoin
operator encounters an error #7554 - Make the
HashJoin
operator read the inner table and build the hash table simultaneously #7544 - Optimize the performance of Hash aggregate operators #7541
- Optimize the performance of Join operators #7493, #7433
- Fix the issue that the result of
UPDATE JOIN
is incorrect when the Join order is changed #7571 - Improve the performance of Chunk’s iterator #7585
Statistics
- Fix the issue that the auto Analyze work repeatedly analyzes the statistics #7550
- Fix the statistics update error that occurs when there is no statistics change #7530
- Use the RC isolation level and low priority when building
Analyze
requests #7496 - Support enabling statistics auto-analyze on certain period of a day #7570
- Fix the panic issue when logging the statistics information #7588
- Support configuring the number of buckets in the histogram using the
ANALYZE TABLE WITH BUCKETS
statement #7619 - Fix the panic issue when updating an empty histogram #7640
- Update
information_schema.tables.data_length
using the statistics information #7657
Server
- Add Trace related dependencies #7532
- Enable the
mutex profile
feature of Golang #7512 - The
Admin
statement requires theSuper_priv
privilege #7486 - Forbid users to
Drop
crucial system tables #7471 - Switch from
juju/errors
topkg/errors
#7151 - Complete the functional prototype of SQL Tracing #7016
- Remove the goroutine pool #7564
- Support viewing the goroutine information using the
USER1
signal #7587 - Set the internal SQL to high priority while TiDB is started #7616
- Use different labels to filter internal SQL and user SQL in monitoring metrics #7631
- Store the top 30 slow queries in the last week to the TiDB server #7646
- Put forward a proposal of setting the global system time zone for the TiDB cluster #7656
- Enrich the error message of “GC life time is shorter than transaction duration” #7658
- Set the global system time zone when starting the TiDB cluster #7638
Compatibility
- Add the unsigned flag for the
Year
type #7542 - Fix the issue of configuring the result length of the
Year
type in thePrepare
/Execute
mode #7525 - Fix the issue of inserting zero timestamp in the
Prepare
/Execute
mode #7506 - Fix the error handling issue of the integer division #7492
- Fix the compatibility issue when processing
ComStmtSendLongData
#7485 - Fix the error handling issue during the process of converting string to integer #7483
- Optimize the accuracy of values in the
information_schema.columns_in_table
table #7463 - Fix the compatibility issue when writing or updating the string type of data using the MariaDB client #7573
- Fix the compatibility issue of aliases of the returned value #7600
- Fix the issue that the
NUMERIC_SCALE
value of the float type is incorrect in theinformation_schema.COLUMNS
table #7602 - Fix the issue that Parser reports an error when the single line comment is empty #7612
Expressions
- Check the value of
max_allowed_packet
in theinsert
function #7528 - Support the built-in function
json_contains
#7443 - Support the built-in function
json_contains_path
#7596 - Support the built-in function
encode/decode
#7622 - Fix the issue that some time related functions are not compatible with the MySQL behaviors in some cases #7636
- Fix the compatibility issue of parsing the time type of data in string #7654
- Fix the issue that the time zone is not considered when computing the default value of the
DateTime
data #7655
DML
- Set correct
last_insert_id
in theInsertOnDuplicateUpdate
statement #7534 - Reduce the cases of updating the
auto_increment_id
counter #7515 - Optimize the error message of
Duplicate Key
#7495 - Fix the
insert...select...on duplicate key update
issue #7406 - Support the
LOAD DATA IGNORE LINES
statement #7576
DDL
- Add the DDL job type and the current schema version information in the monitor #7472
- Complete the design of the
Admin Restore Table
feature #7383 - Fix the issue that the default value of the
Bit
type exceeds 128 #7249 - Fix the issue that the default value of the
Bit
type cannot beNULL
#7604 - Reduce the interval of checking
CREATE TABLE/DATABASE
in the DDL queue #7608 - Use the
ddl/owner/resign
HTTP interface ro release the DDL owner and start electing a new owner #7649
TiKV Go Client
- Support the issue that the
Seek
operation only obtainsKey
#7419
Table Partition (Experimental)
tidb-server v2.0.7
New Feature
- Add the
PROCESSLIST
table ininformation_schema
#7286
Improvements
- Collect more details about SQL statement execution and output the information in the
SLOW QUERY
log #7364 - Drop the partition information in
SHOW CREATE TABLE
#7388 - Improve the execution efficiency of the
ANALYZE
statement by setting it to the RC isolation level and low priority #7500 - Speed up adding a unique index #7562
- Add an option of controlling the DDL concurrency #7563
Bug Fixes
- Fix the issue that
USE INDEX(
PRIMARY)
cannot be used in a table whose primary key is an integer #7298 - Fix the issue that
Merge Join
andIndex Join
output incorrect results when the inner row isNULL
#7301 - Fix the issue that
Join
outputs an incorrect result when the chunk size is set too small #7315 - Fix the panic issue caused by a statement of creating a table involving
range column
#7379 - Fix the issue that
admin check table
mistakenly reports an error of a time-type column #7457 - Fix the issue that the data with a default value
current_timestamp
cannot be queried using the=
condition #7467 - Fix the issue that the zero-length parameter inserted by using the
ComStmtSendLongData
command is mistakenly parsed to NULL #7508 - Fix the issue that
auto analyze
is repeatedly executed in specific scenarios #7556 - Fix the issue that the parser cannot parse a single line comment ended with a newline character #7635