Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#57282
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
you06 authored and ti-chi-bot committed Nov 27, 2024
1 parent 5f4110d commit 6c843ea
Show file tree
Hide file tree
Showing 22 changed files with 4,220 additions and 4 deletions.
22 changes: 22 additions & 0 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2973,8 +2973,19 @@ def go_deps():
name = "com_github_pingcap_kvproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/kvproto",
<<<<<<< HEAD
sum = "h1:ZWFeZNN+6poqqEQ3XU6M/Gw6oiNexbDD3yqIZ05GxlM=",
version = "v0.0.0-20240112060601-a0e3fbb1eeee",
=======
sha256 = "d470ef683433f2c5bc7a1e610da44d516908d326a0341c07208af76a30f0d8a6",
strip_prefix = "github.com/pingcap/[email protected]",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20241113043844-e1fa7ea8c302.zip",
"http://ats.apps.svc/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20241113043844-e1fa7ea8c302.zip",
"https://cache.hawkingrei.com/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20241113043844-e1fa7ea8c302.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/pingcap/kvproto/com_github_pingcap_kvproto-v0.0.0-20241113043844-e1fa7ea8c302.zip",
],
>>>>>>> e234164d7cd (*: bump client-go with some regression tests (#57282))
)
go_repository(
name = "com_github_pingcap_log",
Expand Down Expand Up @@ -3603,8 +3614,19 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
<<<<<<< HEAD
sum = "h1:lKLA4jW6wj/A15+sb901WXvGd4xvdGuGDOndtyVTV/8=",
version = "v2.0.4-0.20240910032334-87841020c53e",
=======
sha256 = "4bc779621156c4ee6f46b57235da9c34c8ec0ee6d3be5f52e33da4c47098eeed",
strip_prefix = "github.com/tikv/client-go/[email protected]",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/client-go/v2/com_github_tikv_client_go_v2-v2.0.8-0.20241120024459-05d115b3e88b.zip",
"http://ats.apps.svc/gomod/github.com/tikv/client-go/v2/com_github_tikv_client_go_v2-v2.0.8-0.20241120024459-05d115b3e88b.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/client-go/v2/com_github_tikv_client_go_v2-v2.0.8-0.20241120024459-05d115b3e88b.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/client-go/v2/com_github_tikv_client_go_v2-v2.0.8-0.20241120024459-05d115b3e88b.zip",
],
>>>>>>> e234164d7cd (*: bump client-go with some regression tests (#57282))
)
go_repository(
name = "com_github_tikv_pd_client",
Expand Down
25 changes: 25 additions & 0 deletions errno/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,31 @@ const (
ErrSetTTLEnableForNonTTLTable = 8150
ErrTempTableNotAllowedWithTTL = 8151
ErrUnsupportedTTLReferencedByFK = 8152
<<<<<<< HEAD:errno/errcode.go
=======
ErrUnsupportedPrimaryKeyTypeWithTTL = 8153
ErrLoadDataFromServerDisk = 8154
ErrLoadParquetFromLocal = 8155
ErrLoadDataEmptyPath = 8156
ErrLoadDataUnsupportedFormat = 8157
ErrLoadDataInvalidURI = 8158
ErrLoadDataCantAccess = 8159
ErrLoadDataCantRead = 8160
ErrLoadDataWrongFormatConfig = 8162
ErrUnknownOption = 8163
ErrInvalidOptionVal = 8164
ErrDuplicateOption = 8165
ErrLoadDataUnsupportedOption = 8166
ErrLoadDataJobNotFound = 8170
ErrLoadDataInvalidOperation = 8171
ErrLoadDataLocalUnsupportedOption = 8172
ErrLoadDataPreCheckFailed = 8173
ErrBRJobNotFound = 8174
ErrMemoryExceedForQuery = 8175
ErrMemoryExceedForInstance = 8176
ErrDeleteNotFoundColumn = 8177
ErrKeyTooLarge = 8178
>>>>>>> e234164d7cd (*: bump client-go with some regression tests (#57282)):pkg/errno/errcode.go

// Error codes used by TiDB ddl package
ErrUnsupportedDDLOperation = 8200
Expand Down
127 changes: 127 additions & 0 deletions errno/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrSequenceInvalidTableStructure: mysql.Message("Sequence '%-.64s.%-.64s' table structure is invalid (%s)", nil),

// TiDB errors.
<<<<<<< HEAD:errno/errname.go
ErrMemExceedThreshold: mysql.Message("%s holds %dB memory, exceeds threshold %dB.%s", nil),
ErrForUpdateCantRetry: mysql.Message("[%d] can not retry select for update statement", nil),
ErrAdminCheckTable: mysql.Message("TiDB admin check table failed.", nil),
Expand Down Expand Up @@ -1037,6 +1038,132 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrSetTTLEnableForNonTTLTable: mysql.Message("Cannot set TTL_ENABLE on a table without TTL config", nil),
ErrTempTableNotAllowedWithTTL: mysql.Message("Set TTL for temporary table is not allowed", nil),
ErrUnsupportedTTLReferencedByFK: mysql.Message("Set TTL for a table referenced by foreign key is not allowed", nil),
=======
ErrMemExceedThreshold: mysql.Message("%s holds %dB memory, exceeds threshold %dB.%s", nil),
ErrForUpdateCantRetry: mysql.Message("[%d] can not retry select for update statement", nil),
ErrAdminCheckTable: mysql.Message("TiDB admin check table failed.", nil),
ErrOptOnTemporaryTable: mysql.Message("`%s` is unsupported on temporary tables.", nil),
ErrDropTableOnTemporaryTable: mysql.Message("`drop global temporary table` can only drop global temporary table", nil),
ErrTxnTooLarge: mysql.Message("Transaction is too large, size: %d", nil),
ErrWriteConflictInTiDB: mysql.Message("Write conflict, txnStartTS %d is stale", nil),
ErrInvalidPluginID: mysql.Message("Wrong plugin id: %s, valid plugin id is [name]-[version], and version should not contain '-'", nil),
ErrInvalidPluginManifest: mysql.Message("Cannot read plugin %s's manifest", nil),
ErrInvalidPluginName: mysql.Message("Plugin load with %s but got wrong name %s", nil),
ErrInvalidPluginVersion: mysql.Message("Plugin load with %s but got %s", nil),
ErrDuplicatePlugin: mysql.Message("Plugin [%s] is redeclared", nil),
ErrInvalidPluginSysVarName: mysql.Message("Plugin %s's sysVar %s must start with its plugin name %s", nil),
ErrRequireVersionCheckFail: mysql.Message("Plugin %s require %s be %v but got %v", nil),
ErrUnsupportedReloadPlugin: mysql.Message("Plugin %s isn't loaded so cannot be reloaded", nil),
ErrUnsupportedReloadPluginVar: mysql.Message("Reload plugin with different sysVar is unsupported %v", nil),
ErrTableLocked: mysql.Message("Table '%s' was locked in %s by %v", nil),
ErrNotExist: mysql.Message("Error: key not exist", nil),
ErrTxnRetryable: mysql.Message("Error: KV error safe to retry %s ", []int{0}),
ErrCannotSetNilValue: mysql.Message("can not set nil value", nil),
ErrInvalidTxn: mysql.Message("invalid transaction", nil),
ErrEntryTooLarge: mysql.Message("entry too large, the max entry size is %d, the size of data is %d", nil),
ErrNotImplemented: mysql.Message("not implemented", nil),
ErrInfoSchemaExpired: mysql.Message("Information schema is out of date: schema failed to update in 1 lease, please make sure TiDB can connect to TiKV", nil),
ErrInfoSchemaChanged: mysql.Message("Information schema is changed during the execution of the statement(for example, table definition may be updated by other DDL ran in parallel). If you see this error often, try increasing `tidb_max_delta_schema_count`", nil),
ErrBadNumber: mysql.Message("Bad Number", nil),
ErrCastAsSignedOverflow: mysql.Message("Cast to signed converted positive out-of-range integer to its negative complement", nil),
ErrCastNegIntAsUnsigned: mysql.Message("Cast to unsigned converted negative integer to it's positive complement", nil),
ErrInvalidYearFormat: mysql.Message("invalid year format", nil),
ErrInvalidYear: mysql.Message("invalid year", nil),
ErrIncorrectDatetimeValue: mysql.Message("Incorrect datetime value: '%s'", []int{0}),
ErrInvalidTimeFormat: mysql.Message("invalid time format: '%v'", []int{0}),
ErrInvalidWeekModeFormat: mysql.Message("invalid week mode format: '%v'", nil),
ErrFieldGetDefaultFailed: mysql.Message("Field '%s' get default value fail", nil),
ErrIndexOutBound: mysql.Message("Index column %s offset out of bound, offset: %d, row: %v", []int{2}),
ErrUnsupportedOp: mysql.Message("operation not supported", nil),
ErrRowNotFound: mysql.Message("can not find the row: %s", []int{0}),
ErrTableStateCantNone: mysql.Message("table %s can't be in none state", nil),
ErrColumnStateCantNone: mysql.Message("column %s can't be in none state", nil),
ErrColumnStateNonPublic: mysql.Message("can not use non-public column", nil),
ErrIndexStateCantNone: mysql.Message("index %s can't be in none state", nil),
ErrInvalidRecordKey: mysql.Message("invalid record key", nil),
ErrUnsupportedValueForVar: mysql.Message("variable '%s' does not yet support value: %s", nil),
ErrUnsupportedIsolationLevel: mysql.Message("The isolation level '%s' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error", nil),
ErrInvalidDDLWorker: mysql.Message("Invalid DDL worker", nil),
ErrUnsupportedDDLOperation: mysql.Message("Unsupported %s", nil),
ErrNotOwner: mysql.Message("TiDB server is not a DDL owner", nil),
ErrCantDecodeRecord: mysql.Message("Cannot decode %s value, because %v", nil),
ErrInvalidDDLJob: mysql.Message("Invalid DDL job", nil),
ErrInvalidDDLJobFlag: mysql.Message("Invalid DDL job flag", nil),
ErrWaitReorgTimeout: mysql.Message("Timeout waiting for data reorganization", nil),
ErrInvalidStoreVersion: mysql.Message("Invalid storage current version: %d", nil),
ErrUnknownTypeLength: mysql.Message("Unknown length for type %d", nil),
ErrUnknownFractionLength: mysql.Message("Unknown length for type %d and fraction %d", nil),
ErrInvalidDDLJobVersion: mysql.Message("Version %d of DDL job is greater than current one: %d", nil),
ErrInvalidSplitRegionRanges: mysql.Message("Failed to split region ranges: %s", nil),
ErrReorgPanic: mysql.Message("Reorg worker panic", nil),
ErrInvalidDDLState: mysql.Message("Invalid %s state: %v", nil),
ErrCancelledDDLJob: mysql.Message("Cancelled DDL job", nil),
ErrRepairTable: mysql.Message("Failed to repair table: %s", nil),
ErrLoadPrivilege: mysql.Message("Load privilege table fail: %s", nil),
ErrInvalidPrivilegeType: mysql.Message("unknown privilege type %s", nil),
ErrUnknownFieldType: mysql.Message("unknown field type", nil),
ErrInvalidSequence: mysql.Message("invalid sequence", nil),
ErrInvalidType: mysql.Message("invalid type", nil),
ErrCantGetValidID: mysql.Message("Cannot get a valid auto-ID when retrying the statement", nil),
ErrCantSetToNull: mysql.Message("cannot set variable to null", nil),
ErrSnapshotTooOld: mysql.Message("snapshot is older than GC safe point %s", nil),
ErrInvalidTableID: mysql.Message("invalid TableID", nil),
ErrInvalidAutoRandom: mysql.Message("Invalid auto random: %s", nil),
ErrInvalidHashKeyFlag: mysql.Message("invalid encoded hash key flag", nil),
ErrInvalidListIndex: mysql.Message("invalid list index", nil),
ErrInvalidListMetaData: mysql.Message("invalid list meta data", nil),
ErrWriteOnSnapshot: mysql.Message("write on snapshot", nil),
ErrInvalidKey: mysql.Message("invalid key", nil),
ErrInvalidIndexKey: mysql.Message("invalid index key", nil),
ErrDataInconsistent: mysql.Message("data inconsistency in table: %s, index: %s, handle: %s, index-values:%#v != record-values:%#v", []int{2, 3, 4}),
ErrDDLReorgElementNotExist: mysql.Message("DDL reorg element does not exist", nil),
ErrDDLJobNotFound: mysql.Message("DDL Job:%v not found", nil),
ErrCancelFinishedDDLJob: mysql.Message("This job:%v is finished, so can't be cancelled", nil),
ErrCannotCancelDDLJob: mysql.Message("This job:%v is almost finished, can't be cancelled now", nil),
ErrUnknownAllocatorType: mysql.Message("Invalid allocator type", nil),
ErrAutoRandReadFailed: mysql.Message("Failed to read auto-random value from storage engine", nil),
ErrInvalidIncrementAndOffset: mysql.Message("Invalid auto_increment settings: auto_increment_increment: %d, auto_increment_offset: %d, both of them must be in range [1..65535]", nil),
ErrDataInconsistentMismatchCount: mysql.Message("data inconsistency in table: %s, index: %s, index-count:%d != record-count:%d", nil),
ErrDataInconsistentMismatchIndex: mysql.Message("data inconsistency in table: %s, index: %s, col: %s, handle: %#v, index-values:%#v != record-values:%#v, compare err:%#v", []int{3, 4, 5, 6}),
ErrInconsistentRowValue: mysql.Message("writing inconsistent data in table: %s, expected-values:{%s} != record-values:{%s}", []int{1, 2}),
ErrInconsistentHandle: mysql.Message("writing inconsistent data in table: %s, index: %s, index-handle:%#v != record-handle:%#v, index: %#v, record: %#v", []int{2, 3, 4, 5}),
ErrInconsistentIndexedValue: mysql.Message("writing inconsistent data in table: %s, index: %s, col: %s, indexed-value:{%s} != record-value:{%s}", []int{3, 4}),
ErrAssertionFailed: mysql.Message("assertion failed: key: %s, assertion: %s, start_ts: %v, existing start ts: %v, existing commit ts: %v", []int{0}),
ErrInstanceScope: mysql.Message("modifying %s will require SET GLOBAL in a future version of TiDB", nil),
ErrNonTransactionalJobFailure: mysql.Message("non-transactional job failed, job id: %d, total jobs: %d. job range: [%s, %s], job sql: %s, err: %v", []int{2, 3, 4}),
ErrSettingNoopVariable: mysql.Message("setting %s has no effect in TiDB", nil),
ErrGettingNoopVariable: mysql.Message("variable %s has no effect in TiDB", nil),
ErrCannotMigrateSession: mysql.Message("cannot migrate the current session: %s", nil),
ErrLazyUniquenessCheckFailure: mysql.Message("transaction aborted because lazy uniqueness check is enabled and an error occurred: %s", nil),
ErrUnsupportedColumnInTTLConfig: mysql.Message("Field '%-.192s' is of a not supported type for TTL config, expect DATETIME, DATE or TIMESTAMP", nil),
ErrTTLColumnCannotDrop: mysql.Message("Cannot drop column '%-.192s': needed in TTL config", nil),
ErrSetTTLOptionForNonTTLTable: mysql.Message("Cannot set %s on a table without TTL config", nil),
ErrTempTableNotAllowedWithTTL: mysql.Message("Set TTL for temporary table is not allowed", nil),
ErrUnsupportedTTLReferencedByFK: mysql.Message("Set TTL for a table referenced by foreign key is not allowed", nil),
ErrUnsupportedPrimaryKeyTypeWithTTL: mysql.Message("Unsupported clustered primary key type FLOAT/DOUBLE for TTL", nil),
ErrLoadDataFromServerDisk: mysql.Message("Don't support load data from tidb-server's disk. Or if you want to load local data via client, the path of INFILE '%s' needs to specify the clause of LOCAL first", nil),
ErrLoadParquetFromLocal: mysql.Message("Do not support loading parquet files from local. Please try to load the parquet files from the cloud storage", nil),
ErrLoadDataEmptyPath: mysql.Message("The value of INFILE must not be empty when LOAD DATA from LOCAL", nil),
ErrLoadDataUnsupportedFormat: mysql.Message("The FORMAT '%s' is not supported", nil),
ErrLoadDataInvalidURI: mysql.Message("The URI of %s is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}'", nil),
ErrLoadDataCantAccess: mysql.Message("Access to the %s has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil),
ErrLoadDataCantRead: mysql.Message("Failed to read source files. Reason: %s. %s", nil),
ErrLoadDataWrongFormatConfig: mysql.Message("", nil),
ErrUnknownOption: mysql.Message("Unknown option %s", nil),
ErrInvalidOptionVal: mysql.Message("Invalid option value for %s", nil),
ErrDuplicateOption: mysql.Message("Option %s specified more than once", nil),
ErrLoadDataUnsupportedOption: mysql.Message("Unsupported option %s for %s", nil),
ErrLoadDataJobNotFound: mysql.Message("Job ID %d doesn't exist", nil),
ErrLoadDataInvalidOperation: mysql.Message("The current job status cannot perform the operation. %s", nil),
ErrLoadDataLocalUnsupportedOption: mysql.Message("Unsupported option for LOAD DATA LOCAL INFILE: %s", nil),
ErrLoadDataPreCheckFailed: mysql.Message("PreCheck failed: %s", nil),
ErrMemoryExceedForQuery: mysql.Message("Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=%d]", nil),
ErrMemoryExceedForInstance: mysql.Message("Your query has been cancelled due to exceeding the allowed memory limit for the tidb-server instance and this query is currently using the most memory. Please try narrowing your query scope or increase the tidb_server_memory_limit and try again.[conn=%d]", nil),
ErrDeleteNotFoundColumn: mysql.Message("Delete can not find column %s for table %s", nil),
ErrKeyTooLarge: mysql.Message("key is too large, the size of given key is %d", nil),

ErrHTTPServiceError: mysql.Message("HTTP request failed with status %s", nil),
>>>>>>> e234164d7cd (*: bump client-go with some regression tests (#57282)):pkg/errno/errname.go

ErrWarnOptimizerHintInvalidInteger: mysql.Message("integer value is out of range in '%s'", nil),
ErrWarnOptimizerHintUnsupportedHint: mysql.Message("Optimizer hint %s is not supported by TiDB and is ignored", nil),
Expand Down
5 changes: 5 additions & 0 deletions errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,11 @@ error = '''
not implemented
'''

["kv:8178"]
error = '''
key is too large, the size of given key is %d
'''

["kv:9007"]
error = '''
Write conflict, txnStartTS=%d, conflictStartTS=%d, conflictCommitTS=%d, key=%s%s%s%s, reason=%s [try again later]
Expand Down
2 changes: 1 addition & 1 deletion executor/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ func (a *ExecStmt) handleStmtForeignKeyTrigger(ctx context.Context, e Executor)
if stmtCtx.ForeignKeyTriggerCtx.HasFKCascades {
// If the ExecStmt has foreign key cascade to be executed, we need call `StmtCommit` to commit the ExecStmt itself
// change first.
// Since `UnionScanExec` use `SnapshotIter` and `SnapshotGetter` to read txn mem-buffer, if we don't do `StmtCommit`,
// Since `UnionScanExec` use `SnapshotIter` and `SnapshotGetter` to read txn mem-buffer, if we don't do `StmtCommit`,
// then the fk cascade executor can't read the mem-buffer changed by the ExecStmt.
a.Ctx.StmtCommit()
}
Expand Down
Loading

0 comments on commit 6c843ea

Please sign in to comment.