package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Packages

# Variables

Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
Error classes.
ErrAddColumnWithSequenceAsDefault is returned when the new added column with sequence's nextval as it's default value.
ErrAlterOperationNotSupported returns when alter operations is not supported.
ErrAlterTiFlashModeForTableWithoutTiFlashReplica returns when set tiflash mode on table whose tiflash_replica is null or tiflash_replica_count = 0.
ErrAutoConvert when auto convert happens.
ErrBadField forbids to refer to unknown column.
ErrBDRRestrictedDDL means the DDL is restricted in BDR mode.
ErrBinlogUnsafeSystemFunction when use a system function that may return a different value on the slave.
ErrBlobCantHaveDefault forbids to give not null default value to TEXT/BLOB/JSON.
ErrBlobKeyWithoutLength is used when BLOB is used as key but without a length.
ErrCancelFinishedDDLJob returns when cancel a finished ddl job.
ErrCancelledDDLJob means the DDL job is cancelled.
ErrCannotCancelDDLJob returns when cancel a almost finished ddl job, because cancel in now may cause data inconsistency.
ErrCannotPauseDDLJob returns when the State is not qualified to be paused.
ErrCannotResumeDDLJob returns when the State is not qualified to be resumed.
ErrCantDecodeRecord means we can't decode the record.
ErrCantDropColWithAutoInc means can't drop column with auto_increment.
ErrCantDropColWithCheckConstraint means can't drop column with check constraint.
ErrCantDropColWithIndex means can't drop the column with index.
ErrCantDropFieldOrKey returns for dropping a non-existent field or key.
ErrCantRemoveAllFields returns for deleting all columns.
ErrCheckConstraintDupName is for duplicate check constraint names.
ErrCheckConstraintFuncIsNotAllowed is returned for not allowed function.
ErrCheckConstraintIsViolated is returned for violating an existent check constraint.
ErrCheckConstraintNamedFuncIsNotAllowed is returned for not allowed function with name.
ErrCheckConstraintRefersAutoIncrementColumn is returned for referring auto-increment columns.
ErrCheckConstraintUsingFKReferActionColumn is returned for referring foreign key columns.
ErrCheckConstraintVariables is returned for referring user or system variables.
ErrCheckNoSuchTable is returned when exchanged normal table is view or sequence.
ErrCoalesceOnlyOnHashPartition returns coalesce partition can only be used on hash/key partitions.
ErrCollationCharsetMismatch returns when collation not match the charset.
ErrColumnBadNull returns for a bad null value.
ErrColumnCheckConstraintReferOther is returned when create column check constraint referring other column.
ErrColumnInChange indicates there is modification on the column in parallel.
ErrColumnTypeUnsupportedNextValue is returned when sequence next value is assigned to unsupported column type.
ErrConflictingDeclarations return conflict declarations.
ErrConstraintNotFound is returned for dropping a non-existent constraint.
ErrDDLJobNotFound indicates the job id was not found.
ErrDDLSetting returns when failing to enable/disable DDL.
ErrDefValGeneratedNamedFunctionIsNotAllowed returns for disallowed function as default value expression of column.
ErrDependentByFunctionalIndex returns when the dropped column depends by expression index.
ErrDependentByGeneratedColumn forbids to delete columns which are dependent by generated columns.
ErrDependentByPartitionFunctional returns when the dropped column depends by expression partition.
ErrDerivedMustHaveAlias returns when a sub select statement does not have a table alias.
ErrDropIndexNeededInForeignKey returns when drop index which is needed in foreign key.
ErrDropLastPartition returns cannot remove all partitions, use drop table instead.
ErrDropPartitionNonExistent returns error in list of partition.
ErrDupKeyName returns for duplicated key name.
ErrErrorOnRename returns error for wrong database name in alter table rename.
ErrExchangePartitionDisabled is returned when exchange partition is disabled.
ErrExpressionIndexCanNotRefer forbids to refer expression index to auto-increment column.
ErrFieldNotFoundPart returns an error when 'partition by columns' are not found in table columns.
ErrFkColumnCannotDrop is used when foreign key column can't be dropped.
ErrFkColumnCannotDropChild is used when foreign key column can't be dropped.
ErrFkDupName returns for duplicated FK name.
ErrFKIncompatibleColumns is used when foreign key column type is incompatible.
ErrForeignKeyCannotDropParent returns when drop table which has foreign key referred.
ErrForeignKeyColumnCannotChange returns when change column which used by foreign key.
ErrForeignKeyColumnCannotChangeChild returns when change child table's column which used by foreign key.
ErrFunctionalIndexFunctionIsNotAllowed returns for unsupported functions for functional index.
ErrFunctionalIndexOnBlob when the expression of expression index returns blob or text.
ErrFunctionalIndexOnField returns 'Functional index on a column is not supported.
ErrFunctionalIndexOnJSONOrGeometryFunction returns when creating expression index and the type of the expression is JSON.
ErrFunctionalIndexPrimaryKey returns 'The primary key cannot be a functional index'.
ErrFunctionalIndexRowValueIsNotAllowed returns for functional index referring to row values.
ErrGeneralUnsupportedDDL as a generic error to customise by argument.
ErrGeneratedColumnFunctionIsNotAllowed returns for unsupported functions for generated columns.
ErrGeneratedColumnNonPrior forbids to refer generated column non prior to it.
ErrGeneratedColumnRefAutoInc forbids to refer generated columns to auto-increment columns .
ErrGeneratedColumnRowValueIsNotAllowed returns for generated columns referring to row values.
ErrGlobalIndexNotExplicitlySet is for Global index when not explicitly said GLOBAL, including UPDATE INDEXES.
ErrIncorrectPrefixKey is used when the prefix length is incorrect for a string key.
ErrIngestCheckEnvFailed returns when the DDL ingest env is failed to init.
ErrIngestFailed returns when the DDL ingest job is failed.
ErrInvalidAttributesSpec is returned when meeting invalid attributes.
ErrInvalidAutoRandom returns when auto_random is used incorrectly.
ErrInvalidDDLJob means the DDL job is invalid.
ErrInvalidDDLJobVersion is used when the DDL job version is invalid.
ErrInvalidDDLState returns for invalid ddl model object state.
ErrInvalidDefaultValue returns for invalid default value for columns.
ErrInvalidGroupFuncUse returns for using invalid group functions.
ErrInvalidOnUpdate returns for invalid ON UPDATE clause.
ErrInvalidPlacementPolicyCheck is returned when txn_scope and commit data changing do not meet the placement policy.
ErrInvalidSplitRegionRanges is used when split region ranges is invalid.
ErrInvalidStoreVer means invalid store version.
ErrInvalidUseOfNull is used when the column is not null.
ErrInvalidWorker means the worker is invalid.
ErrJSONUsedAsKey forbids to use JSON as key or index.
ErrKeyColumnDoesNotExits is used when the key column doesn't exist.
ErrKeyPart0 is used when key parts length is 0.
ErrMaxvalueInValuesIn returns maxvalue cannot be used in values in.
ErrMultipleDefConstInListPart returns multiple definition of same constant in list partitioning.
ErrNonBooleanExprForCheckConstraint is returned for non bool expression.
ErrNoReferencedRow2 returns when there are rows in child table don't have related foreign key value in refer table.
ErrNotAllowedTypeInPartition returns not allowed type error when creating table partition with unsupported expression type.
ErrNotOwner means we are not owner and can't handle DDL jobs.
ErrNotSequence returns when object is not a sequence.
ErrNotSupportedYet returns when tidb does not support this feature.
ErrNullInValuesLessThan returns when a range partition LESS THAN expression includes a NULL.
ErrOnlyOnRangeListPartition is used when the partition type is range list.
ErrOperateSameColumn means we change the same columns multiple times in a DDL.
ErrOperateSameIndex means we change the same indexes multiple times in a DDL.
ErrOptOnCacheTable returns when exec unsupported opt at cache mode.
ErrOptOnTemporaryTable returns when exec unsupported opt at temporary mode.
ErrPartitionConstDomain returns partition constant is out of partition function domain.
ErrPartitionExchangeDifferentOption is returned when attribute does not match between partition table and normal table.
ErrPartitionExchangeForeignKey is returned when exchanged normal table has foreign keys.
ErrPartitionExchangePartTable is returned when exchange table partition with another table is partitioned.
ErrPartitionExchangeTempTable is returned when exchange table partition with a temporary table.
ErrPartitionFuncNotAllowed returns partition function returns the wrong type.
ErrPartitionFunctionIsNotAllowed returns this partition function is not allowed.
ErrPartitionMaxvalue returns maxvalue can only be used in last partition definition.
ErrPartitionMgmtOnNonpartitioned returns it's not a partition table.
ErrPartitionNoTemporary returns when partition at temporary mode.
ErrPausedDDLJob returns when the DDL job cannot be paused.
ErrPKIndexCantBeInvisible return an error when primary key is invisible index.
ErrPlacementPolicyInUse is returned when placement policy is in use in drop/alter.
ErrPlacementPolicyWithDirectOption is returned when create/alter table with both placement policy and placement options existed.
ErrPrimaryCantHaveNull returns All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead.
ErrRangeNotIncreasing returns values less than value must be strictly increasing for each partition.
ErrReorgPanic is used when reorg process is panic.
ErrRepairTableFail is used to repair tableInfo in repair mode.
ErrRowDoesNotMatchPartition is returned when the row record of exchange table does not match the partition rule.
ErrRunMultiSchemaChanges means we run multi schema changes.
ErrSameNamePartition returns duplicate partition name.
ErrSameNamePartitionField returns duplicate partition field.
ErrSequenceAccessFail returns when sequences are not able to access.
ErrSequenceInvalidData returns when sequence values are conflicting.
ErrSequenceRunOut returns when the sequence has been run out.
ErrSequenceUnsupportedTableOption returns when unsupported table option exists in sequence.
ErrSetTTLOptionForNonTTLTable returns when the `TTL_ENABLE` or `TTL_JOB_INTERVAL` option is set on a non-TTL table.
ErrTableCantHandleFt returns FULLTEXT keys are not supported by table type.
ErrTableCheckConstraintReferUnknown is returned when create table check constraint referring non-existing column.
ErrTableMustHaveColumns returns for missing column when creating a table.
ErrTableOptionInsertMethodUnsupported is returned when create/alter table with insert method option.
ErrTableOptionUnionUnsupported is returned when create/alter table with union option.
ErrTablesDifferentMetadata is returned when exchanges tables is not compatible.
ErrTempTableNotAllowedWithTTL returns when setting TTL config for a temp table.
ErrTiFlashBackfillIndex is the error that tiflash backfill the index failed.
ErrTooLongFieldComment means the comment for field/column is too long.
ErrTooLongIdent returns for too long name of database/table/column/index.
ErrTooLongIndexComment means the comment for index is too long.
ErrTooLongKey is used when the column key is too long.
ErrTooLongTableComment means the comment for table is too long.
ErrTooLongTablePartitionComment means the comment for table partition is too long.
ErrTooLongValueForType is returned when the individual enum element length is too long.
ErrTooManyFields is used when too many columns are used in a select statement.
ErrTooManyKeys is used when too many keys used.
ErrTooManyPartitions returns too many partitions were defined.
ErrTruncatedWrongValue is returned when data has been truncated during conversion.
ErrTruncateIllegalForeignKey returns when truncate table which has foreign key referred.
ErrTTLColumnCannotDrop returns when a column is dropped while referenced by TTL config.
ErrUniqueKeyNeedAllFieldsInPf returns must include all columns in the table's partitioning function.
ErrUnknownCharacterSet returns unknown character set.
ErrUnknownCollation returns unknown collation.
ErrUnknownEngine is returned when the table engine is unknown.
ErrUnknownSequence returns when drop / alter unknown sequence.
ErrUnsupportedAddColumn means add columns is unsupported.
ErrUnsupportedAddPartition returns for does not support add partitions.
ErrUnsupportedAddVectorIndex means add vector index is unsupported.
ErrUnsupportedAlterCacheForSysTable means we don't support the alter cache for system table.
ErrUnsupportedAlterTableOption means we don't support the alter table option.
ErrUnsupportedAlterTableSpec means we don't support this alter table specification (i.e.
ErrUnsupportedAlterTableWithoutValidation means we don't support the alter table without validation.
ErrUnsupportedAlterTableWithValidation means we don't support the alter table with validation.
ErrUnsupportedCharset means we don't support the charset.
ErrUnsupportedCheckPartition returns for does not support check partitions.
ErrUnsupportedClusteredSecondaryKey returns when exec unsupported clustered secondary key.
ErrUnsupportedCoalescePartition returns for does not support coalesce partitions.
ErrUnsupportedColumnInTTLConfig returns when a column type is not expected in TTL config.
ErrUnsupportedConstraintCheck returns when use ADD CONSTRAINT CHECK.
ErrUnsupportedCreatePartition returns for does not support create partitions.
ErrUnsupportedDistTask is for `tidb_enable_dist_task enabled` but `tidb_ddl_enable_fast_reorg` disabled.
ErrUnsupportedExpressionIndex is returned when create an expression index without allow-expression-index.
ErrUnsupportedIndexType returns for unsupported index type.
ErrUnsupportedLocalTempTableDDL returns when ddl operation unsupported for local temporary table.
ErrUnsupportedModifyCharset means modify charset is unsupoorted.
ErrUnsupportedModifyCollation means modify collation is unsupoorted.
ErrUnsupportedModifyColumn means modify columns is unsupoorted.
ErrUnsupportedModifyPrimaryKey returns an error when add or drop the primary key.
ErrUnsupportedOnCommitPreserve returns when exec unsupported opt on commit preserve.
ErrUnsupportedOnGeneratedColumn is for unsupported actions on generated columns.
ErrUnsupportedOptimizePartition returns for does not support optimize partitions.
ErrUnsupportedPartitionByRangeColumns returns for does unsupported partition by range columns.
ErrUnsupportedPartitionType is returned when exchange table partition type is not supported.
ErrUnsupportedPKHandle is used to indicate that we can't support this PK handle.
ErrUnsupportedPrimaryKeyTypeWithTTL returns when create or alter a table with TTL options but the primary key is not supported.
ErrUnsupportedRebuildPartition returns for does not support rebuild partitions.
ErrUnsupportedRemovePartition returns for does not support remove partitions.
ErrUnsupportedReorganizePartition returns for does not support reorganize partitions.
ErrUnsupportedRepairPartition returns for does not support repair partitions.
ErrUnsupportedShardRowIDBits means we don't support the shard_row_id_bits.
ErrUnsupportedTiFlashOperationForSysOrMemTable means we don't support the alter tiflash related action(e.g.
ErrUnsupportedTiFlashOperationForUnsupportedCharsetTable is used when alter alter tiflash related action(e.g.
ErrUnsupportedTTLReferencedByFK returns when the TTL config is set for a table referenced by foreign key.
ErrValuesIsNotIntType returns 'VALUES value for partition '%-.64s' must have type INT'.
ErrViewSelectClause returns error for create view with select into clause.
ErrViewSelectVariable returns error for create view with select into clause.
ErrViewWrongList returns create view must include all columns in the select clause.
ErrWaitReorgTimeout means we wait for reorganization timeout.
ErrWarnDataOutOfRange is returned when the value in a numeric column that is outside the permissible range of the column data type.
ErrWarnDataTruncated returns data truncated error.
ErrWarnDeprecatedIntegerDisplayWidth share the same code 1681, and it will be returned when length is specified in integer.
ErrWarnDeprecatedZerofill is for when the deprectated zerofill attribute is used.
ErrWarnGlobalIndexNeedManuallyAnalyze is used for global indexes, which cannot trigger automatic analysis when it contains prefix columns or virtual generated columns.
ErrWindowInvalidWindowFuncUse returns for invalid window function use.
ErrWrongColumnName returns for wrong column name.
ErrWrongDBName returns for wrong database name.
ErrWrongExprInPartitionFunc Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed.
ErrWrongFKOptionForGeneratedColumn is for wrong foreign key reference option on generated columns.
ErrWrongKeyColumn is for table column cannot be indexed.
ErrWrongKeyColumnFunctionalIndex is for expression cannot be indexed.
ErrWrongNameForIndex returns for wrong index name.
ErrWrongObject returns for wrong object.
ErrWrongPartitionName returns for wrong partition name.
ErrWrongStringLength when UserName or HostName is too long.
ErrWrongTableName returns for wrong table name.
ErrWrongTypeColumnValue returns 'Partition column values of incorrect type'.
ErrWrongUsage returns for wrong ddl syntax usage.
ReorgRetryableErrCodes are the error codes that are retryable for reorganization.
ReorgRetryableErrMsgs are the error messages that are retryable for reorganization.

# Structs

ErrClass represents a class of errors.