pingcap/tidb

Standardize error codes and messages for error class `ClassExpression`

Open

#18.481 geöffnet am 10. Juli 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (1 zugewiesene Person)Go (6.186 Forks)batch import
good first issuehelp wantedtype/enhancement

Repository-Metriken

Stars
 (40.090 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 14T 4h) (346 gemergte PRs in 30 T)

Beschreibung

Development Task

Add workaround for errors which belong to ClassExpression

This task need to add description and workaround for these errors:

position: expression/errors.go

  • ErrIncorrectParameterCount
  • ErrDivisionByZero
  • ErrRegexp
  • ErrOperandColumns
  • ErrCutValueGroupConcat
  • ErrFunctionsNoopImpl
  • ErrIncorrectType
  • errFunctionNotExists
  • errZlibZData
  • errZlibZBuf
  • errIncorrectArgs
  • errUnknownCharacterSet
  • errDefaultValue
  • errDeprecatedSyntaxNoReplacement
  • errBadField(expression/errors.go#42)
  • errWarnAllowedPacketOverflowed
  • errWarnOptionIgnored
  • errTruncatedWrongValue
  • errUnknownLocale
  • errNonUniq
  • errSequenceAccessDenied
  • errTooBigPrecision(planner/core/errors/go#71)
  • ErrIllegalMixCollation(util/collate.go#39)

Here is a example:

[error.9005]
error = '''Region is unavailable'''
description = '''
A certain Raft Group is not available, such as the number of replicas is not enough.
This error usually occurs when the TiKV server is busy or the TiKV node is down.
'''
workaround = '''Check the status, monitoring data and log of the TiKV server.'''

Error code and error message has been saved when the error registered. So just need a description to describe what happen when this error occur and a workaround to let user know how to deal with it.

Contributor Guide