TiDB 2.1.18 has been released with the following updates:

TiDB

  • The SQL optimizer
    • Fixed bug #12172 with Feedback sharding query scope error
    • Fixed an incorrect permission check issue #12341 in spot lookup
    • Push the Limit operator down toIndexLookUpReaderExecute logic, optimizeselect ... limit ... offset ...Execution performance of# 12380
    • Support inORDER BY,GROUP BY 和 LIMIT OFFSETParameter used in# 12514
    • Fixed IndexJoin error on partition table #12713
    • In the repair TiDBstr_to_dateThe date string and format string do not match# 12757
    • Fixed bug #12791 where outer join was incorrectly converted to inner join when cast was included in query conditions
    • Fixed incorrect expression pass #12800 in join condition of AntiSemiJoin
  • SQL execution engine
    • [fixed] [2019-09-11 11:17:47.999999666] [2019-09-11 11:17:48] #12259
    • repairPREPAREStatement types do not record problems in monitoring# 12329
    • repairFROM_UNIXTIMEPanic error while checking for NULL values# 12572
    • repairYEARWhen type data is inserted into an invalid year, the result isNULLRather than0000Compatibility problems with# 12744
    • MySQL > alter table AutoIncrement alter table AutoIncrement alter table AutoIncrement”Consecutive” lock mode) Consistency: TiDB guarantees the continuity of allocated values for the implicit allocation of multiple AutoIncrement ids in a single Insert statement. This improvement guarantees JDBCgetGeneratedKeys()The method can obtain correct results in any scenario.# 12619
    • Fixed issue #12769 where HashAgg was used as a child of Apply
    • Fixed issue #12813 where logical expressions AND/OR returned incorrect results when involving type conversions
  • Server
    • repairKILL TIDB QUERYGrammar toSLEEP()Invalid statement problem# 12159
    • Fix AUTO INCREMENT MAX INT64 and MAX uint64 Allocation error #12210
    • Fix log level setting toERRORWhen the slow log will not be recorded the problem# 12373
    • Change the number of cached tables related to 100 Schema changes to 1024tidb_max_delta_schema_countSystem variable Modification# 12515
    • Change the start time of SQL statistics from “start execution” to “start compilation” to make SQL performance statistics more accurate #12638
    • Add to TiDB logset session autocommitThe record of# 12568
    • Record the start time of SQL inSessionVarsTo avoid the time being reset during schedule execution# 12676
    • inOrder By/Group By/Limit OffsetSupport in the sentence?A placeholder# 12514
    • Added to slow logsPrev_stmtField for the last statement isCOMMITTo print the previous statement# 12724
    • When an explicitly committed transactionCOMMITWhen an error occurs, record it in the logCOMMITPrevious statement# 12747
    • Optimize the way the previous statement is saved when SQL is executed on TiDB Server to improve performance #12751
    • repairskip-grant-table=trueWhen,FLUSH PRIVILEGESThe statement causes Panic in the system# 12816
    • Increase the minimum request step size of AutoID from 1000 to 30000 to avoid the performance bottleneck #12891 caused by frequent requests for AutoID in a short period of time with a large number of writes
    • Fixed bug #12954 where Prepared statement did not print error SQL in error log when panic occurred in TiDB
    • Fix COM_STMT_FETCH slow log time record and MySQL inconsistent #12953
    • When encountering a write conflict, add an error code to the error message to facilitate diagnosis of the cause of the conflict #12878
  • DDL
    • To avoid misoperations, TiDB no longer allows column deletion by defaultAUTO INCREMENTProperty, change the system variable when it does need to be deletedtidb_allow_remove_auto_inc; Please refer to:Tidb-specific system variables and syntax # 12146
    • Support Create Table statement with multiple Unique #12469
    • repairCreateTableWhen a foreign key constraint is specified in a statement, the foreign key table fails to use the Database of the primary table when no Database is specified, resulting in an error# 12678
    • repairADMIN CANCEL DDL JOBStimesinvalid list indexWrong question# 12681
  • Monitor
    • Backoff monitors add types and replenishes previously uncounted backoffs, such as Backoff #12326 encountered at commit time
    • Add statistics Add Index operation progress monitoring #12389

PD

  • Repair the pd – CTL--helpCommand Output# 1772

Tools

  • TiDB Binlog
    • repairALTER DATABASEThe associated DDL causes a Drainer exit problem# 770
    • Support to query transaction status information against Commit binlog, improve synchronization efficiency #761
    • Fixed Drainer as Drainerstart_tsGreater than the maximum in Pumpcommit_tsMay cause Pump panic problems# 759

TiDB Ansible

  • TiDB Binlog adds queue size and query histogram monitoring item #952
  • Update TiDB alarm expression #961
  • New configuration file check function, will check whether the configuration is reasonable before deployment or update #973
  • New index speed monitoring item #987 in TiDB
  • Update the TiDB Binlog monitoring Dashboard to be compatible with Grafana #993 version 4.6.3

Details:

Github.com/pingcap/tid…

Pingcap.com/docs-cn/sta…