Releases: pingcap/tidb
Releases · pingcap/tidb
tidb-server v2.1.0-rc.5
SQL Optimizer
- Fix the issue that
IndexReaderreads the wrong handle in some cases #8132 - Fix the issue occurred while the
IndexScan Preparedstatement usesPlan Cache#8055 - Fix the issue that the result of the
Unionstatement is unstable #8165
SQL Execution Engine
- Improve the performance of TiDB on inserting or updating wide tables #8024
- Support the unsigned
intflag in theTruncatebuilt-in function #8068 - Fix the error occurred while converting JSON data to the decimal type #8109
- Fix the error occurred when you
Updatethe 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_thresholdenvironment variable, which dynamically sets the slow log #8094 - Add the original length of a SQL statement truncated while the
tidb_query_log_max_lenenvironment variable dynamically sets logs 8200 - Add the
tidb_opt_write_row_idenvironment variable to control whether to allow writing_tidb_rowid#8218 - Add an upper bound to the
Scancommand 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 tablein 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_idcommand to return the next available row ID #8268
tidb-server v2.1.0-rc.4
SQL Optimizer
- Fix the issue that column pruning of
UnionAllis incorrect in some cases #7941 - Fix the issue that the result of the
UnionAlloperator is incorrect in some cases #8007
SQL Execution Engine
- Fix the precision issue of the
AVGfunction #7874 - Support using the
EXPLAIN ANALYZEstatement 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
PointGetoperator 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
Limitsubclause #8002 - Fix the panic issue during the execution process of the
AddDate/SubDatestatement 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 BYis an empty string in theLOAD DATAstatement #8005 - Complete the “coprocessor error” log information #8006
Compatibility
- Set the
Commandfield of theSHOW PROCESSLISTresult toSleepwhen the query is empty #7839
Expressions
- Fix the constant folding issue of the
SYSDATEfunction #7895 - Fix the issue that
SUBSTRING_INDEXpanics in some cases #7897
DDL
tidb-server v2.0.8
Improvements
- Slow down the AUTO_INCREMENT ID increasing speed when the
Updatestatement 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
DateTimetype is calculated #7672 - Fix the issue that
duplicate key updateinserts values incorrectly in some conditions #7685 - Fix the issue that the predicate conditions of
UnionScanare not pushed down #7726 - Fix the issue that the time zone is not correctly handled when you add the
TIMESTAMPindex #7812 - Fix the memory leak issue caused by the statistics module in some conditions #7864
- Fix the issue that the results of
ANALYZEcannot be obtained in some abnormal conditions #7871 - Do not fold the function
SYSDATE, to ensure the returned results are correct #7894 - Fix the
substring_indexpanic issue in some conditions #7896 - Fix the issue that
OUTER JOINis mistakenly converted toINNER JOINin 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
JOINstatement #7645 - Fix the optimization rule of predicate pushdown for the
UnionScanoperator #7695 - Fix the issue that the unique key property of the
Unionoperator 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_prioritysystem variable to set the execution priority for each statement #7694 - Support using the
admin show slowstatement to obtain the slow query log #7785
Compatibility
- Fix the issue that the result of
charset/collationis incorrect ininformation_schema.schemata#7751 - Fix the issue that the value of the
hostnamesystem variable is empty #7750
Expressions
- Support the
init_vecterargument in theAES_ENCRYPT/AES_DECRYPTbuilt-in function #7425 - Fix the issue that the result of
Formatis incorrect in some expressions #7770 - Support the
JSON_LENGTHbuilt-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 UPDATEstatement 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
Rangeto enable it to handle multipleINorEQUALconditions simultaneously #7577 - Fix the issue that the estimation result of
TableScanis incorrect whenRangeis empty #7583 - Support the
PointGetoperator for theUPDATEstatement #7586 - Fix the panic issue during the process of executing the
FirstRowaggregate function in some conditions #7624
SQL Execution Engine
- Fix the potential
DataRaceissue when theHashJoinoperator encounters an error #7554 - Make the
HashJoinoperator 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 JOINis 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
Analyzerequests #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 BUCKETSstatement #7619 - Fix the panic issue when updating an empty histogram #7640
- Update
information_schema.tables.data_lengthusing the statistics information #7657
Server
- Add Trace related dependencies #7532
- Enable the
mutex profilefeature of Golang #7512 - The
Adminstatement requires theSuper_privprivilege #7486 - Forbid users to
Dropcrucial system tables #7471 - Switch from
juju/errorstopkg/errors#7151 - Complete the functional prototype of SQL Tracing #7016
- Remove the goroutine pool #7564
- Support viewing the goroutine information using the
USER1signal #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
Yeartype #7542 - Fix the issue of configuring the result length of the
Yeartype in thePrepare/Executemode #7525 - Fix the issue of inserting zero timestamp in the
Prepare/Executemode #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_tabletable #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_SCALEvalue of the float type is incorrect in theinformation_schema.COLUMNStable #7602 - Fix the issue that Parser reports an error when the single line comment is empty #7612
Expressions
- Check the value of
max_allowed_packetin theinsertfunction #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
DateTimedata #7655
DML
- Set correct
last_insert_idin theInsertOnDuplicateUpdatestatement #7534 - Reduce the cases of updating the
auto_increment_idcounter #7515 - Optimize the error message of
Duplicate Key#7495 - Fix the
insert...select...on duplicate key updateissue #7406 - Support the
LOAD DATA IGNORE LINESstatement #7576
DDL
- Add the DDL job type and the current schema version information in the monitor #7472
- Complete the design of the
Admin Restore Tablefeature #7383 - Fix the issue that the default value of the
Bittype exceeds 128 #7249 - Fix the issue that the default value of the
Bittype cannot beNULL#7604 - Reduce the interval of checking
CREATE TABLE/DATABASEin the DDL queue #7608 - Use the
ddl/owner/resignHTTP interface ro release the DDL owner and start electing a new owner #7649
TiKV Go Client
- Support the issue that the
Seekoperation only obtainsKey#7419
Table Partition (Experimental)
tidb-server v2.0.7
New Feature
- Add the
PROCESSLISTtable ininformation_schema#7286
Improvements
- Collect more details about SQL statement execution and output the information in the
SLOW QUERYlog #7364 - Drop the partition information in
SHOW CREATE TABLE#7388 - Improve the execution efficiency of the
ANALYZEstatement 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 JoinandIndex Joinoutput incorrect results when the inner row isNULL#7301 - Fix the issue that
Joinoutputs 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 tablemistakenly reports an error of a time-type column #7457 - Fix the issue that the data with a default value
current_timestampcannot be queried using the=condition #7467 - Fix the issue that the zero-length parameter inserted by using the
ComStmtSendLongDatacommand is mistakenly parsed to NULL #7508 - Fix the issue that
auto analyzeis repeatedly executed in specific scenarios #7556 - Fix the issue that the parser cannot parse a single line comment ended with a newline character #7635
tidb-server v2.1.0-rc.1
-
SQL Optimizer
- Fix the issue that a wrong result is returned after the correlated subquery is decorrelated in some cases #6972
- Optimize the output result of
Explain#7011#7041 - Optimize the choosing strategy of the outer table for
IndexJoin#7019 - Remove the Plan Cache of the non-
PREPAREstatement #7040 - Fix the issue that the
INSERTstatement is not parsed and executed correctly in some cases #7068 - Fix the issue that the
IndexJoinresult is not correct in some cases #7150 - Fix the issue that the
NULLvalue cannot be found using the unique index in some cases #7163 - Fix the range computing issue of the prefix index in UTF-8 #7194
- Fix the issue that result is not correct caused by eliminating the
Projectoperator in some cases #7257 - Fix the issue that
USE INDEX(PRIMARY)cannot be used when the primary key is an integer #7316 - Fix the issue that the index range cannot be computed using the correlated column in some cases #7357
-
SQL Execution Engine
- Fix the issue that the daylight saving time is not computed correctly in some cases #6823
- Refactor the aggregation function framework to improve the execution efficiency of the
StreamandHashaggregation operators #6852 - Fix the issue that the
Hashaggregation operator cannot exit normally in some cases #6982 - Fix the issue that
BIT_AND/BIT_OR/BIT_XORdoes not handle the non-integer data correctly #6994 - Optimize the execution speed of the
REPLACE INTOstatement and increase the performance nearly 10 times #7027 - Optimize the memory usage of time type data and decrease the memory usage of the time type data by fifty percent #7043
- Fix the issue that the returned result is mixed with signed and unsigned integers in the
UNIONstatement is not compatible with MySQL #7112 - Fix the panic issue caused by the too much memory applied by
LPAD/RPAD/TO_BASE64/FROM_BASE64/REPEAT#7171 #7266 #7409 #7431 - Fix the incorrect result when
MergeJoin/IndexJoinhandles theNULLvalue #7255 - Fix the incorrect result of
Outer Joinin some cases #7288 - Improve the error message of
Data Truncatedto facilitate locating the wrong data and the corresponding field in the table #7401 - Fix the incorrect result for
decimalin some cases #7001 #7113 #7202 #7208 - Optimize the point select performance #6937
- Prohibit the isolation level of
Read Commitedto avoid the underlying problem #7211 - Fix the incorrect result of
LTRIM/RTRIM/TRIMin some cases #7291 - Fix the issue that the
MaxOneRowoperator cannot guarantee that the returned result does not exceed one row #7375 - Divide the Coprocessor requests with too many ranges #7454
-
Statistics
- Optimize the mechanism of statistics dynamic collection #6796
- Fix the issue that
Auto Analyzedoes not work when data is updated frequently #7022 - Decrease the Write conflicts during the statistics dynamic update process #7124
- Optimize the cost estimation when the statistics is incorrect #7175
- Optimize the row count estimation #7233
-
Server
- Fix the bug in loading privilege information #6976
- Fix the issue that the
Killcommand is too strict with privilege check #6954 - Fix the issue of removing some binary numeric types #6922
- Shorten the output log #7029
- Handle the
mismatchClusterIDissue #7053 - Add the
advertise-addressconfiguration item #7078 - Add the
GrpcKeepAliveoption #7100 - Add the connection or
Tokentime monitor #7110 - Optimize the data decoding performance #7149
- Add the
PROCESSLISTtable inINFORMMATION_SCHEMA#7236 - Fix the order issue when multiple rules are hit in verifying the privilege #7211
- Change some default values of encoding related system variables to UTF-8 #7198
- Make the slow query log show more detailed information #7302
- Support registering tidb-serverrelated information in PD and obtaining this information by HTTP API #7082
-
Compatibility
- Support Session variables
warning_countanderror_count#6945 - Add
Scopecheck when reading the system variables #6958 - Support the
MAX_EXECUTION_TIMEsyntax #7012 - Support more statements of the
SETsyntax #7020 - Add validity check when setting system variables #7117
- Add the verification of the number of
PlaceHolders in thePreparestatement #7162 - Support
set character_set_results = null#7353 - Support the
flush statussyntax #7369 - Fix the column size of
SETandENUMtypes ininformation_schema#7347 - Support the
NATIONAL CHARACTERsyntax of statements for creating a table #7378 - Support the
CHARACTER SETsyntax in theLOAD DATAstatement #7391 - Fix the column information of the
SETandENUMtypes #7417 - Support the
IDENTIFIED WITHsyntax in theCREATE USERstatement #7402 - Fix the precision losing issue during
TIMESTAMPcomputing process #7418 - Support the validity verification of more
SYSTEMvariables #7196 - Fix the incorrect result when the
CHAR_LENGTHfunction computes the binary string #7410 - Fix the incorrect
CONCATresult in a statement involvingGROUP BY#7448 - Fix the imprecise type length issue when casting the
DECIMALtype to theSTRINGtype #7451
- Support Session variables
-
DML
-
DDL
- Improve the method of DDL judging whether
Schemais synchronized to avoid misjudgement in some cases #7319 - Fix the
SHOW CREATE TABLEresult in adding index process #6993 - Allow the default value of
text/blob/jsonto be NULL in non-restrictsql-mode#7230 - Fix the
ADD INDEXissue in some cases #7142 - Increase the speed of adding
UNIQUE-KEYindex operation largely #7132 - Fix the truncating issue of the prefix index in UTF-8 character set #7109
- Add the environment variable
tidb_ddl_reorg_priorityto control the priority of theadd-indexoperation #7116 - Fix the display issue of `AUTO-INCREME...
- Improve the method of DDL judging whether
tidb-server v2.0.6
Improvements
- Make “set system variable” log shorter to save disk space #7031
- Record slow operations during the execution of
ADD INDEXin the log, to make troubleshooting easier #7083 - Reduce transaction conflicts when updating statistics #7138
- Improve the accuracy of row count estimation when the values pending to be estimated exceeds the statistics range #7185
- Choose the table with a smaller estimated row count as the outer table for
Index Jointo improve its execution efficiency #7277 - Add the recover mechanism for panics occurred during the execution of
ANALYZE TABLE, to avoid that the tidb-server is unavailable caused by abnormal behavior in the process of collecting statistics #7228 - Return
NULLand the corresponding warning when the results ofRPAD/LPADexceed the value of themax_allowed_packetsystem variable, compatible with MySQL #7244 - Set the upper limit of placeholders count in the
PREPAREstatement to 65535, compatible with MySQL #7250
Bug Fixes
- Fix the issue that the
DROP USERstatement is incompatible with MySQL behavior in some cases #7014 - Fix the issue that statements like
INSERT/LOAD DATAmeet OOM aftering openingtidb_batch_insert#7092 - Fix the issue that the statistics fail to automatically update when the data of a table keeps updating #7093
- Fix the issue that the firewall breaks inactive gPRC connections #7099
- Fix the issue that prefix index returns a wrong result in some scenarios #7126
- Fix the panic issue caused by outdated statistics in some scenarios #7155
- Fix the issue that one piece of index data is missed after the
ADD INDEXoperation in some scenarios #7156 - Fix the wrong result issue when querying
NULLvalues using the unique index in some scenarios #7172 - Fix the messy code issue of the
DECIMALmultiplication result in some scenarios #7212 - Fix the wrong result issue of
DECIMALmodulo operation in some scenarios #7245 - Fix the issue that the
UPDATE/DELETEstatement in a transaction returns a wrong result under some special sequence of statements #7219 - Fix the panic issue of the
UNION ALL/UPDATEstatement during the process of building the execution plan in some scenarios #7225 - Fix the issue that the range of prefix index is calculated incorrectly in some scenarios #7231
- Fix the issue that the
LOAD DATAstatement fails to write the binlog in some scenarios #7242 - Fix the wrong result issue of
SHOW CREATE TABLEduring the execution process ofADD INDEXin some scenarios #7243 - Fix the issue that panic occurs when
Index Joindoes not initialize timestamps in some scenarios #7246 - Fix the false alarm issue when
ADMIN CHECK TABLEmistakenly uses the timezone in the session #7258 - Fix the issue that
ADMIN CLEANUP INDEXdoes not clean up the index in some scenarios #7265 - Disable the Read Committed isolation level #7282
tidb-server v2.0.5
New Features
- Add the
tidb_disable_txn_auto_retrysystem variable which is used to disable the automatic retry of transactions #6877
Improvements
- Optimize the cost calculation of
Selectionto make the result more accurate #6989 - Select the query condition that completely matches the unique index or the primary key as the query path directly #6966
- Execute necessary cleanup when failing to start the service #6964
- Handle
\Nas NULL in theLoad Datastatement #6962 - Optimize the code structure of CBO #6953
- Report the monitoring metrics earlier when starting the service #6931
- Optimize the format of slow queries by removing the line breaks in SQL statements and adding user information #6931
- Support multiple asterisks in comments #6931
Bug Fixes
- Fix the issue that
KILL QUERYalways requires SUPER privilege #6931 - Fix the issue that users might fail to login when the number of users exceeds 1024 #6986
- Fix an issue about inserting unsigned
float/doubledata #6940 - Fix the compatibility of the
COM_FIELD_LISTcommand to resolve the panic issue in some MariaDB clients #6929 - Fix the
CREATE TABLE IF NOT EXISTS LIKEbehavior #6928 - Fix an issue in the process of TopN pushdown #6923
- Fix the ID record issue of the currently processing row when an error occurs in executing
Add Index#6903
tidb-server v2.1.0-beta
- SQL Optimizer
- Optimize the selection range of
Index Jointo improve the execution performance - Optimize correlated subquery, push down
Filter, and extend the index range, to improve the efficiency of some queries by orders of magnitude - Support
Index HintandJoin Hintin theUPDATEandDELETEstatements - Validate Hint
TIDM_SMJwhen no available index exists - Support pushdown of the
ABS,CEIL,FLOOR,IS TRUE, andIS FALSEfunctions - Handle the
IFandIFNULLfunctions especially in the constant folding process
- Optimize the selection range of
- SQL Execution Engine
- Implement parallel
Hash Aggregateoperators and improve the computing performance ofHash Aggregateby 350% in some scenarios - Implement parallel
Projectoperators and improve the performance by 74% in some scenarios - Read the data of the
Innertable andOutertable ofHash Joinconcurrently to improve the execution performance - Fix incorrect results of
INSERT … ON DUPLICATE KEY UPDATE …in some scenarios - Fix incorrect results of the
CONCAT_WS,FLOOR,CEIL, andDIVbuilt-in functions
- Implement parallel
- Server
- Add the HTTP API to scatter the distribution of table Regions in the TiKV cluster
- Add the
auto_analyze_ratiosystem variable to control the threshold value of automaticAnalyze - Add the HTTP API to control whether to open the general log
- Add the HTTP API to modify the log level online
- Add the user information in the general log and the slow query log
- Support the server side cursor
- Compatibility
- Support more MySQL syntax
- Make the
bitaggregate function support theALLparameter - Support the
SHOW PRIVILEGESstatement
- DML
- Decrease the memory usage of the
INSERT INTO SELECTstatement - Fix the performance issue of
PlanCache - Add the
tidb_retry_limitsystem variable to control the automatic retry times of transactions - Add the
tidb_disable_txn_auto_retrysystem variable to control whether the transaction tries automatically - Fix the accuracy issue of the written data of the
timetype - Support the queue of locally conflicted transactions to optimize the conflicted transaction performance
- Fix
Affected Rowsof theUPDATEstatement - Optimize the statement performance of
insert ignore on duplicate key update
- Decrease the memory usage of the
- DDL
- Optimize the execution speed of the
CreateTablestatement - Optimize the execution speed of
ADD INDEXand improve it greatly in some scenarios - Fix the issue that the number of added columns by
Alter table add columnexceeds the limit of the number of table columns - Fix the issue that DDL job retries lead to an increasing pressure on TiKV in abnormal conditions
- Fix the issue that TiDB continuously reloads the schema information in abnormal conditions
- Do not output the
FOREIGN KEYrelated information in the result ofSHOW CREATE TABLE - Support the
select tidb_is_ddl_owner()statement to facilitate judging whether TiDB isDDL Owner - Fix the issue that the index is deleted in the
Yeartype in some scenarios - Fix the renaming table issue in the concurrent execution scenario
- Support the
AlterTableForcesyntax - Support the
AlterTableRenameIndexsyntax withFromKeyandToKey - Add the table name and database name in the output information of
admin show ddl jobs
- Optimize the execution speed of the