Changelog History
Page 4
-
v3.0.1 Changes
July 16, 2019- Add the
tidb_wait_split_region_finish_backoff
session variable to control the backoff time of splitting Regions #11166 - π Support automatically adjusting the auto-incremental ID allocation step based on the load, and the auto-adjustment scope of the step is 1000~2000000 #11006
- β Add the
ADMIN PLUGINS ENABLE
/ADMIN PLUGINS DISABLE
SQL statement to dynamically enable or disable plugins #11157 - β Add the session connection information in the audit plugin #11013
- Add optimizer hint
MAX_EXECUTION_TIME
, which places a limit N (a timeout value in milliseconds) on how long aSELECT
statement is permitted to execute before the server terminates it: #11026 - π Change the default behavior during the period of splitting Regions to wait for PD to finish scheduling #11166
- Prohibit Window Functions from being cached in Prepare Plan Cache to avoid incorrect results in some cases #11048
- Prohibit
ALTER
statements from modifying the definition of stored generated columns #11068 - Disallow changing virtual generated columns to stored generated columns #11068
- Disallow changing the generated column expression with indexes #11068
- π Support compiling TiDB on the ARM64 architecture #11150
- π Support modifying the collation of a database or a table, but the character set of the database/table has to be UTF-8 or utf8mb4 #11086
- π Fix the issue that an error is reported when the
SELECT
subquery in theUPDATE β¦ SELECT
statement fails to resolve the column in theUPDATE
expression #11252 - π Fix the panic issue that happens when a column is queried on multiple times and the returned result is NULL during point queries #11226
- π Fix the data race issue caused by non-thread safe
rand.Rand
when using theRAND
function #11169 - π Fix the bug that the memory usage of a SQL statement exceeds the threshold but the execution of this statement is not canceled in some cases when
oom-action="cancel"
is configured #11004 - π Fix the issue that when a query ends,
SHOW PROCESSLIST
shows that the memory usage is not0
because the memory usage of MemTracker was not correctly cleaned #10970 - π Fix the bug that the result of comparing integers and non-integers is not correct in some cases #11194
- π Fix the bug that the query result is not correct when the query on table partitions contains a predicate in explicit transactions #11196
- π Fix the DDL job panic issue because
infoHandle
might beNULL
#11022 - π Fix the issue that the query result is not correct because the queried column is not referenced in the subquery and is then wrongly pruned when running a nested aggregation query #11020
- π Fix the issue that the
Sleep
function does not respond to theKILL
statement in time #11028 - π Fix the issue that the
DB
andINFO
columns shown by theSHOW PROCESSLIST
command are incompatible with MySQL #11003 - π Fix the system panic issue caused by the
FLUSH PRIVILEGES
statement whenskip-grant-table=true
is configured #11027 - π Fix the issue that the primary key statistics collected by
FAST ANALYZE
are not correct when the table primary key is anUNSIGNED
integer #11099 - π Fix the issue that the "invalid key" error is reported by the
FAST ANALYZE
statement in some cases #11098 - π Fix the issue that the precision shown by the
SHOW CREATE TABLE
statement is incomplete whenCURRENT_TIMESTAMP
is used as the default value of the column and the decimal precision is specified #11088 - π Fix the issue that the function name is not in lowercase when window functions report an error to make it compatible with MySQL #11118
- π Fix the issue that TiDB fails to connect to TiKV and thus cannot provide service after the background thread of TiKV Client Batch gRPC panics #11101
- π Fix the issue that the variable is set incorrectly by
SetVar
because of the shallow copy of the string #11044 - π Fix the issue that the execution fails and an error is reported when the
INSERT β¦ ON DUPLICATE
statement is applied on table partitions #11231 - Pessimistic locking (experimental feature)
- Fix the issue that an incorrect result is returned because of the invalid lock on the row when point queries are run using the pessimistic locking and the returned data is empty #10976
- Fix the issue that the query result is not correct because
SELECT β¦ FOR UPDATE
does not use the correct TSO when using the pessimistic locking in the query #11015
- π Change the detection behavior from immediate conflict detection to waiting when an optimistic transaction meets a pessimistic lock to avoid worsening the lock conflict #11051
- Add the
-
v3.0.0
June 28, 2019 -
v3.0.0-rc.3
June 21, 2019 -
v3.0.0-rc.2 Changes
May 28, 2019β‘οΈ SQL Optimizer
- π Support Index Join in more scenarios #10540
- π Support exporting historical statistics #10291
- π Support the incremental
Analyze
operation on monotonically increasing index columns #10355 - Neglect the NULL value in the
Order By
clause #10488 - π Fix the wrong schema information calculation of the
UnionAll
logical operator when simplifying the column information #10384 - Avoid modifying the original expression when pushing down the
Not
operator #10363 - π Support the
dump
/load
correlation of histograms #10573 ### Execution Engine - π Handle virtual columns with a unique index properly when fetching duplicate rows in
batchChecker
#10370 - π Fix the scanning range calculation issue for the
CHAR
column #10124 - π Fix the issue of
PointGet
incorrectly processing negative numbers #10113 - π Merge
Window
functions with the same name to improve execution efficiency #9866 - π Allow the
RANGE
frame in aWindow
function to contain noOrderBy
clause #10496
Server
π Fix the issue that TiDB continuously creates a new connection to TiKV when a fault occurs in TiKV #10301 Make
tidb_disable_txn_auto_retry
affect all retryable errors instead of only write conflict errors #10339 π Allow DDL statements without parameters to be executed usingprepare
/execute
#10144 Add thetidb_back_off_weight
variable to control the backoff time #10266 Prohibit TiDB retrying non-automatically committed transactions in default conditions by setting the default value oftidb_disable_txn_auto_retry
toon
#10266 π Fix the database privilege judgment ofrole
inRBAC
#10261 π Support the pessimistic transaction model (experimental) #10297 π Reduce the wait time for handling lock conflicts in some cases #10006 π Make the Region cache able to visit follower nodes when a fault occurs in the leader node #10256 Add thetidb_low_resolution_tso
variable to control the number of TSOs obtained in batches and reduce the times of transactions obtaining TSO to adapt for scenarios where data consistency is not so strictly required #10428DDL
π Fix the uppercase issue of the charset name in the storage of the old version of TiDB #10272 π Support
preSplit
of table partition, which pre-allocates table Regions when creating a table to avoid write hotspots after the table is created #10221 π Fix the issue that TiDB incorrectly updates the version information in PD in some cases #10324 π Support modifying the charset and collation using theALTER DATABASE
statement #10393 π Support splitting Regions based on the index and range of the specified table to relieve hotspot issues #10203 Prohibit modifying the precision of the decimal column using thealter table
statement #10433 π Fix the restriction for expressions and functions in hash partition #10273 π Fix the issue that adding indexes in a table that contains partitions will in some cases cause TiDB panic #10475 Validate table information before executing the DDL to avoid invalid table schemas #10464 0οΈβ£ Enable hash partition by default; and enable range columns partition when there is only one column in the partition definition #9936 -
v3.0.0-rc.1 Changes
May 10, 2019β‘οΈ SQL Optimizer
- Improve the accuracy of cost estimates by using order correlation between columns; introduce a heuristic parameter
tidb_opt_correlation_exp_factor
to control the preference for index scans for scenarios when correlation cannot be directly used for estimation. #9839 - Match more prefix columns of the indexes when extracting access conditions of composite indexes if there are relevant columns in the filter #10053
- Use the dynamic programming algorithm to specify the execution order of join operations when the number of tables participating in the join is less than the value of
tidb_opt_join_reorder_threshold
. #8816 - π Match more prefix columns of the indexes in the inner tables that build the index join when using composite indexes as the access conditions #8471
- π Improve the accuracy of row count estimation for single-column indexes with NULL values #9474
- Specially handle
GROUP_CONCAT
when eliminating aggregate functions during the logical optimization phase to prevent incorrect executions #9967 - Properly push the filter down to child nodes of the join operator if the filter is a constant #9848
- Specially handle some functions such as
RAND()
when pruning columns during the logical optimization phase to prevent incompatibilities with MySQL #10064 - Support
FAST ANALYZE
, which speeds up statistics collection by sampling the region instead of scanning the entire region. This feature is controlled by the variabletidb_enable_fast_analyze
. #10258 - π Support SQL Plan Management, which ensures execution stability by performing execution plan binding for SQL statements. This feature is currently in beta and only supports bound execution plans for SELECT statements. It is not recommended to use it in the production environment. #10284 ### Execution Engine
- π Support tracking and controlling memory usage in three operators -
TableReader
,IndexReader
andIndexLookupReader
#10003 - π Support showing more information about coprocessor tasks in the slow log such as the number of tasks in coprocessor, the average/longest/90% of execution/waiting time and the addresses of the TiKVs which take the longest execution time or waiting time #10165
- π Support the prepared DDL statements with no placeholders #10144 ### Server
- Only allow the DDL owner to execute bootstrap when TiDB is started #10029
- Add the variable
tidb_skip_isolation_level_check
to prevent TiDB from reporting errors when setting the transaction isolation level to SERIALIZABLE #10065 - π Merge the implicit commit time and the SQL execution time in the slow log #10294
- π Support for SQL Roles (RBAC Privilege Management)
- π Fix the
ConnectionEvent
error from thewhitelist
plugin that makes TiDB exit #9889 - π Fix the issue of mistakenly adding read-only statements to the transaction history #9723
- π Improve
kill
statements to stop SQL execution and release resources more quickly #9844 - β Add a startup option
config-check
to check the validity of the configuration file #9855 - π Fix the validity check of inserting NULL fields when the strict SQL mode is disabled #10161 ### DDL
- Add the
pre_split_regions
option forCREATE TABLE
statements; this option supports pre-splitting the Table Region when creating a table to avoid write hot spots caused by lots of writes after the table creation #10138 - π Optimize the execution performance of some DDL statements #10170
- β Add the warning that full-text indexes are not supported for
FULLTEXT KEY
#9821 - π Fix the compatibility issue for the UTF8 and UTF8MB4 charsets in the old versions of TiDB #9820
- Fix the potential bug in
shard_row_id_bits
of a table #9868 - π Fix the bug that the column charset is not changed after the table charset is changed #9790
- π Fix a potential bug in
SHOW COLUMN
when usingBINARY
/BIT
as the column default value #9897 - π Fix the compatibility issue in displaying
CHARSET
/COLLATION
descriptions in theSHOW FULL COLUMNS
statement #10007 - π Fix the issue that the
SHOW COLLATIONS
statement only lists collations supported by TiDB #10186
- Improve the accuracy of cost estimates by using order correlation between columns; introduce a heuristic parameter
-
v3.0.0-beta.1 Changes
March 26, 2019β‘οΈ SQL Optimizer
- π Support calculating the Cartesian product by using
Sort Merge Join
#9032 - π Support Skyline Pruning, with some rules to prevent the execution plan from relying too heavily on statistics #9337
- π Support Window Functions
- β Add a type of statistic that indicates the order correlation between columns and the handle column #9315 ### SQL Execution Engine
- β Add built-in functions:
- β‘οΈ Optimize the Chunk size based on the query context, to reduce the execution time of SQL statements and resources consumption of the cluster #6489 ### Privilege management
- π Support
SET ROLE
andCURRENT_ROLE
#9581 - π Support
DROP ROLE
#9616 - π Support
CREATE ROLE
#9461 ### Server - β Add the
/debug/zip
HTTP interface to get information of the current TiDB instance #9651 - π Support the
show pump status
andshow drainer status
SQL statements to check the Pump or Drainer status 9456 - π Support modifying the Pump or Drainer status by using SQL statements #9789
- π Support adding HASH fingerprints to SQL text for easy tracking of slow SQL statements #9662
- β Add the
log_bin
system variable ("0" by default) to control the enabling state of binlog; only support checking the state currently #9343 - π Support managing the sending binlog strategy by using the configuration file #9864
- Support querying the slow log by using the
INFORMATION_SCHEMA.SLOW_QUERY
memory table #9290 - π Change the MySQL version displayed in TiDB from 5.7.10 to 5.7.25 #9553
- π² Unify the log format for easy collection and analysis by tools
- Add the
high_error_rate_feedback_total
monitoring item to record the difference between the actual data volume and the estimated data volume based on statistics #9209 - β Add the QPS monitoring item in the database dimension, which can be enabled by using a configuration item #9151 ### DDL
- Add the
ddl_error_count_limit
global variable ("512" by default) to limit the number of DDL task retries (If this number exceeds the limit, the DDL task is canceled) #9295 - π Support ALTER ALGORITHM
INPLACE
/INSTANT
#8811 - π Support the
SHOW CREATE VIEW
statement #9309 - π Support the
SHOW CREATE USER
statement #9240
- π Support calculating the Cartesian product by using
-
v3.0.0-beta Changes
January 18, 2019π New Features
- π Support View
- π Support Window Function
- π Support Range Partition
- π Support Hash Partition
β‘οΈ SQL Optimizer
- π Re-support the optimization rule of
AggregationElimination
#7676 - β‘οΈ Optimize the
NOT EXISTS
subquery and convert it to Anti Semi Join #7842 - Add the
tidb_enable_cascades_planner
variable to support the new Cascades optimizer. Currently, the Cascades optimizer is not yet fully implemented and is turned off by default #7879 - π Support using Index Join in transactions #7877
- π Optimize the constant propagation on the Outer Join, so that the filtering conditions related to the Outer table in the Join result can be pushed down through the Outer Join to the Outer table, reducing the useless calculation of the Outer Join and improving the execution performance #7794
- Adjust the optimization rule of Projection Elimination to the position after the Aggregation Elimination, to avoid redundant
Project
operators #7909 - β‘οΈ Optimize the
IFNULL
function and eliminate this function when the input parameter has a non-NULL attribute #7924 - Support building range for
_tidb_rowid
, to avoid full table scan and reduce cluster stress #8047 - Optimize the
IN
subquery to do the Inner Join after the aggregation, and add thetidb_opt_insubq_to_join_and_agg
variable to control whether to enable this optimization rule and open it by default #7531 - π Support using subqueries in the
DO
statement #8343 - β Add the optimization rule of Outer Join elimination to reduce unnecessary table scan and Join operations and improve execution performance #8021
- β‘οΈ Modify the Hint behavior of the
TIDB_INLJ
optimizer, and the optimizer will use the table specified in Hint as the Inner table of Index Join #8243 - π Use
PointGet
in a wide range so that it can be used when the execution plan cache of thePrepare
statement takes effect #8108 - β‘οΈ Introduce the greedy
Join Reorder
algorithm to optimize the join order selection when joining multiple tables #8394 - π Support View #8757
- π Support Window Function #8630
- β Return warning to the client when
TIDB_INLJ
is not in effect, to enhance usability #9037 - π Support deducing the statistics for filtered data based on filtering conditions and table statistics #7921
- π Improve the Partition Pruning optimization rule of Range Partition #8885
SQL Executor
- β‘οΈ Optimize the
Merge Join
operator to support the emptyON
condition #9037 - β‘οΈ Optimize the log and print the user variables used when executing the
EXECUTE
statement #7684 - β‘οΈ Optimize the log to print slow query information for the
COMMIT
statement #7951 - π Support the
EXPLAIN ANALYZE
feature to make the SQL tuning process easier #7827 - π Optimize the write performance of wide tables with many columns #7935
- Support
admin show next_row_id
#8242 - Add the
tidb_init_chunk_size
variable to control the size of the initial Chunk used by the execution engine #8480 - Improve
shard_row_id_bits
and cross-check the auto-increment ID #8936
Prepare
Statement- Prohibit adding the
Prepare
statement containing subqueries to the query plan cache to guarantee the query plan is correct when different user variables are input #8064 - β‘οΈ Optimize the query plan cache to guarantee the plan can be cached when the statement contains non-deterministic functions #8105
- β‘οΈ Optimize the query plan cache to guarantee the query plan of
DELETE
/UPDATE
/INSERT
can be cached #8107 - β‘οΈ Optimize the query plan cache to remove the corresponding plan when executing the
DEALLOCATE
statement #8332 - β‘οΈ Optimize the query plan cache to avoid the TiDB OOM issue caused by caching too many plans by limiting the memory usage #8339
- β‘οΈ Optimize the
Prepare
statement to support using the?
placeholder in theORDER BY
/GROUP BY
/LIMIT
clause #8206
Privilege Management
- β Add the privilege check for the
ANALYZE
statement #8486 - β Add the privilege check for the
USE
statement #8414 - β Add the privilege check for the
SET GLOBAL
statement #8837 - β Add the privilege check for the
SHOW PROCESSLIST
statement #7858
Server
- π Support the
Trace
feature #9029 - π Support the plugin framework #8788
- π Support using
unix_socket
and TCP simultaneously to connect to the database #8836 - π Support the
interactive_timeout
system variable #8573 - π Support the
wait_timeout
system variable #8346 - Support splitting a transaction into multiple transactions based on the number of statements using the
tidb_batch_commit
variable #8293 - π Support using the
ADMIN SHOW SLOW
statement to check slow logs #7785
Compatibility
- Support the
ALLOW_INVALID_DATES
SQL mode #9027 - π Improve
LoadData
fault-tolerance for the CSV file #9005 - π Support the MySQL 320 handshake protocol #8812
- π Support using the unsigned bigint column as the auto-increment column #8181
- π Support the
SHOW CREATE DATABASE IF NOT EXISTS
syntax #8926 - π€‘ Abandon the predicate pushdown operation when the filtering condition contains a user variable to improve the compatibility with MySQL's behavior of using user variables to mock the Window Function behavior #8412
DDL
- π Support fast recovery of mistakenly deleted tables #7937
- π Support adjusting the number of concurrencies of
ADD INDEX
dynamically #8295 - π Support changing the character set of tables or columns to
utf8
/utf8mb4
#8037 - π Change the default character set from
utf8
toutf8mb4
#7965 - π Support Range Partition #8011
-
v2.1.14 Changes
July 04, 2019- π Fix wrong query results caused by column pruning in some cases #11019
- π Fix the wrongly displayed information in
db
andinfo
columns ofshow processlist
#11000 - Fix the issue that
MAX_EXECUTION_TIME
as a SQL hint and global variable does not work in some cases #10999 - π Support automatically adjust the incremental step allocated by auto-increment ID based on the load #10997
- π Fix the issue that the
Distsql
memory information ofMemTracker
is not correctly cleaned when a query ends #10971 - β Add the
MEM
column in theinformation_schema.processlist
table to describe the memory usage of a query #10896 - Add the
max_execution_time
global system variable to control the maximum execution time of a query #10940 - π Fix the panic caused by using unsupported aggregate functions #10911
- β Add an automatic rollback feature for the last transaction when the
load data
statement fails #10862 - π Fix the issue that TiDB returns a wrong result in some cases when the
OOMAction
configuration item is set toCancel
#11016 - Disable the
TRACE
statement to avoid the TiDB panic issue #11039 - Add the
mysql.expr_pushdown_blacklist
system table that dynamically enables/disables pushing down specific functions to Coprocessor #10998 - Fix the issue that the
ANY_VALUE
function does not work in theONLY_FULL_GROUP_BY
mode #10994 - π Fix the incorrect evaluation caused by not doing a deep copy when evaluating the user variable of the string type #11043
-
v2.1.13 Changes
June 21, 2019- Add a feature to use
SHARD_ROW_ID_BITS
to scatter row IDs when the column contains anAUTO_INCREMENT
attribute to relieve the hotspot issue #10788 - π Optimize the lifetime of invalid DDL metadata to speed up recovering the normal execution of DDL operations after upgrading the TiDB cluster #10789
- π Fix the OOM issue in high concurrent scenarios caused by the failure to quickly release Coprocessor resources, resulted from the
execdetails.ExecDetails
pointer #10833 - β Add the
update-stats
configuration item to control whether to update statistics #10772 - β Add the following TiDB-specific syntax to support Region presplit to solve the hotspot issue:
- π Fix the panic issue caused by the
KILL
syntax in some cases #10879 - π Improve the compatibility with MySQL for
ADD_DATE
in some cases #10718 - π Fix the wrong estimation for the selectivity rate of the inner table selection in index join #10856
- Add a feature to use
-
v2.1.12 Changes
June 13, 2019- π Fix the issue caused by unmatched data types when using the index query feedback #10755
- π Fix the issue that the blob column is changed to the text column caused by charset altering in some cases #10745
- π Fix the issue that the
GRANT
operation in the transaction mistakenly reports βDuplicate Entryβ in some cases #10739 - π Improve the compatibility with MySQL of the following features
- π Change the column charset while changing the table charset #10714
- π Fix the overflow issue when converting a decimal to a float in some cases #10730
- π Fix the issue that some extremely large messages report the βgrpc: received message larger than maxβ error caused by inconsistent maximum sizes of messages sent/received by gRPC of TiDB and TiKV #10710
- π Fix the panic issue caused by
ORDER BY
not filtering NULL in some cases #10488 - π Fix the issue that values returned by the
UUID
function might be duplicate when multiple nodes exist #10711 - π Change the value returned by
CAST(-num as datetime)
fromerror
to NULL #10703 - π Fix the issue that an unsigned histogram meets signed ranges in some cases #10695
- π Fix the issue that an error is reported mistakenly for reading data when the statistics feedback meets the bigint unsigned primary key #10307
- π Fix the issue that the result of
Show Create Table
for partitioned tables is not correctly displayed in some cases #10690 - π Fix the issue that the calculation result of the
GROUP_CONCAT
aggregate function is not correct for some correlated subqueries #10670 - π Fix the issue that the result of
Show Create Table
for partitioned tables is not correctly displayed in some cases #10690