diff --git a/pkg/ddl/column_type_change_test.go b/pkg/ddl/column_type_change_test.go index 908a395f4b42a..a053688b256ff 100644 --- a/pkg/ddl/column_type_change_test.go +++ b/pkg/ddl/column_type_change_test.go @@ -23,6 +23,7 @@ import ( "github.com/pingcap/failpoint" "github.com/pingcap/tidb/pkg/ddl" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/kv" "github.com/pingcap/tidb/pkg/meta/model" "github.com/pingcap/tidb/pkg/parser/mysql" @@ -175,10 +176,10 @@ var mockTerrorMap = make(map[string]*terror.Error) func init() { // Since terror new action will cause data race with other test suite (getTerrorCode) in parallel, we init it all here. - mockTerrorMap[model.StateNone.String()] = dbterror.ClassDDL.NewStdErr(1, mysql.Message("MockRollingBackInCallBack-"+model.StateNone.String(), nil)) - mockTerrorMap[model.StateDeleteOnly.String()] = dbterror.ClassDDL.NewStdErr(1, mysql.Message("MockRollingBackInCallBack-"+model.StateDeleteOnly.String(), nil)) - mockTerrorMap[model.StateWriteOnly.String()] = dbterror.ClassDDL.NewStdErr(1, mysql.Message("MockRollingBackInCallBack-"+model.StateWriteOnly.String(), nil)) - mockTerrorMap[model.StateWriteReorganization.String()] = dbterror.ClassDDL.NewStdErr(1, mysql.Message("MockRollingBackInCallBack-"+model.StateWriteReorganization.String(), nil)) + mockTerrorMap[model.StateNone.String()] = dbterror.ClassDDL.NewStdErr(1, errno.Message("MockRollingBackInCallBack-"+model.StateNone.String(), nil)) + mockTerrorMap[model.StateDeleteOnly.String()] = dbterror.ClassDDL.NewStdErr(1, errno.Message("MockRollingBackInCallBack-"+model.StateDeleteOnly.String(), nil)) + mockTerrorMap[model.StateWriteOnly.String()] = dbterror.ClassDDL.NewStdErr(1, errno.Message("MockRollingBackInCallBack-"+model.StateWriteOnly.String(), nil)) + mockTerrorMap[model.StateWriteReorganization.String()] = dbterror.ClassDDL.NewStdErr(1, errno.Message("MockRollingBackInCallBack-"+model.StateWriteReorganization.String(), nil)) } // Test issue #20529. diff --git a/pkg/domain/domain.go b/pkg/domain/domain.go index cb76a2fe6b586..00412c8d318d4 100644 --- a/pkg/domain/domain.go +++ b/pkg/domain/domain.go @@ -3399,7 +3399,7 @@ var ( ErrInfoSchemaExpired = dbterror.ClassDomain.NewStd(errno.ErrInfoSchemaExpired) // ErrInfoSchemaChanged returns the error that information schema is changed. ErrInfoSchemaChanged = dbterror.ClassDomain.NewStdErr(errno.ErrInfoSchemaChanged, - mysql.Message(errno.MySQLErrName[errno.ErrInfoSchemaChanged].Raw+". "+kv.TxnRetryableMark, nil)) + errno.Message(errno.MySQLErrName[errno.ErrInfoSchemaChanged].Raw+". "+kv.TxnRetryableMark, nil)) ) // SysProcesses holds the sys processes infos diff --git a/pkg/errno/BUILD.bazel b/pkg/errno/BUILD.bazel index 4bbfbb3103035..8749cee658ac8 100644 --- a/pkg/errno/BUILD.bazel +++ b/pkg/errno/BUILD.bazel @@ -9,7 +9,6 @@ go_library( ], importpath = "github.com/pingcap/tidb/pkg/errno", visibility = ["//visibility:public"], - deps = ["//pkg/parser/mysql"], ) go_test( diff --git a/pkg/errno/errname.go b/pkg/errno/errname.go index 8c35058293cc9..d4c57ecf427cf 100644 --- a/pkg/errno/errname.go +++ b/pkg/errno/errname.go @@ -14,1230 +14,1239 @@ package errno -import "github.com/pingcap/tidb/pkg/parser/mysql" +// ErrMessage is a error message with the format specifier. +type ErrMessage struct { + Raw string + RedactArgPos []int +} + +// Message creates a error message with the format specifier. +func Message(message string, redactArgs []int) *ErrMessage { + return &ErrMessage{Raw: message, RedactArgPos: redactArgs} +} // MySQLErrName maps error code to MySQL error messages. // Note: all ErrMessage to be added should be considered about the log redaction -// by setting the suitable configuration in the second argument of mysql.Message. +// by setting the suitable configuration in the second argument of Message. // See https://github.com/pingcap/tidb/blob/master/errno/logredaction.md -var MySQLErrName = map[uint16]*mysql.ErrMessage{ - ErrHashchk: mysql.Message("hashchk", nil), - ErrNisamchk: mysql.Message("isamchk", nil), - ErrNo: mysql.Message("NO", nil), - ErrYes: mysql.Message("YES", nil), - ErrCantCreateFile: mysql.Message("Can't create file '%-.200s' (errno: %d - %s)", nil), - ErrCantCreateTable: mysql.Message("Can't create table '%-.200s' (errno: %d)", nil), - ErrCantCreateDB: mysql.Message("Can't create database '%-.192s' (errno: %d)", nil), - ErrDBCreateExists: mysql.Message("Can't create database '%-.192s'; database exists", nil), - ErrDBDropExists: mysql.Message("Can't drop database '%-.192s'; database doesn't exist", nil), - ErrDBDropDelete: mysql.Message("Error dropping database (can't delete '%-.192s', errno: %d)", nil), - ErrDBDropRmdir: mysql.Message("Error dropping database (can't rmdir '%-.192s', errno: %d)", nil), - ErrCantDeleteFile: mysql.Message("Error on delete of '%-.192s' (errno: %d - %s)", nil), - ErrCantFindSystemRec: mysql.Message("Can't read record in system table", nil), - ErrCantGetStat: mysql.Message("Can't get status of '%-.200s' (errno: %d - %s)", nil), - ErrCantGetWd: mysql.Message("Can't get working directory (errno: %d - %s)", nil), - ErrCantLock: mysql.Message("Can't lock file (errno: %d - %s)", nil), - ErrCantOpenFile: mysql.Message("Can't open file: '%-.200s' (errno: %d - %s)", nil), - ErrFileNotFound: mysql.Message("Can't find file: '%-.200s' (errno: %d - %s)", nil), - ErrCantReadDir: mysql.Message("Can't read dir of '%-.192s' (errno: %d - %s)", nil), - ErrCantSetWd: mysql.Message("Can't change dir to '%-.192s' (errno: %d - %s)", nil), - ErrCheckread: mysql.Message("Record has changed since last read in table '%-.192s'", nil), - ErrDiskFull: mysql.Message("Disk full (%s); waiting for someone to free some space... (errno: %d - %s)", nil), - ErrDupKey: mysql.Message("Can't write; duplicate key in table '%-.192s'", nil), - ErrErrorOnClose: mysql.Message("Error on close of '%-.192s' (errno: %d - %s)", nil), - ErrErrorOnRead: mysql.Message("Error reading file '%-.200s' (errno: %d - %s)", nil), - ErrErrorOnRename: mysql.Message("Error on rename of '%-.210s' to '%-.210s' (errno: %d - %s)", nil), - ErrErrorOnWrite: mysql.Message("Error writing file '%-.200s' (errno: %d - %s)", nil), - ErrFileUsed: mysql.Message("'%-.192s' is locked against change", nil), - ErrFilsortAbort: mysql.Message("Sort aborted", nil), - ErrFormNotFound: mysql.Message("View '%-.192s' doesn't exist for '%-.192s'", nil), - ErrGetErrno: mysql.Message("Got error %d from storage engine", nil), - ErrIllegalHa: mysql.Message("Table storage engine for '%-.192s' doesn't have this option", nil), - ErrKeyNotFound: mysql.Message("Can't find record in '%-.192s'", nil), - ErrNotFormFile: mysql.Message("Incorrect information in file: '%-.200s'", nil), - ErrNotKeyFile: mysql.Message("Incorrect key file for table '%-.200s'; try to repair it", nil), - ErrOldKeyFile: mysql.Message("Old key file for table '%-.192s'; repair it!", nil), - ErrOpenAsReadonly: mysql.Message("Table '%-.192s' is read only", nil), - ErrOutofMemory: mysql.Message("Out of memory; restart server and try again (needed %d bytes)", nil), - ErrOutOfSortMemory: mysql.Message("Out of sort memory, consider increasing server sort buffer size", nil), - ErrUnexpectedEOF: mysql.Message("Unexpected EOF found when reading file '%-.192s' (errno: %d - %s)", nil), - ErrConCount: mysql.Message("Too many connections", nil), - ErrOutOfResources: mysql.Message("Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", nil), - ErrBadHost: mysql.Message("Can't get hostname for your address", nil), - ErrHandshake: mysql.Message("Bad handshake", nil), - ErrDBaccessDenied: mysql.Message("Access denied for user '%-.48s'@'%-.255s' to database '%-.192s'", nil), - ErrAccessDenied: mysql.Message("Access denied for user '%-.48s'@'%-.255s' (using password: %s)", nil), - ErrNoDB: mysql.Message("No database selected", nil), - ErrUnknownCom: mysql.Message("Unknown command", nil), - ErrBadNull: mysql.Message("Column '%-.192s' cannot be null", nil), - ErrBadDB: mysql.Message("Unknown database '%-.192s'", nil), - ErrTableExists: mysql.Message("Table '%-.192s' already exists", nil), - ErrBadTable: mysql.Message("Unknown table '%-.100s'", nil), - ErrNonUniq: mysql.Message("Column '%-.192s' in %-.192s is ambiguous", nil), - ErrServerShutdown: mysql.Message("Server shutdown in progress", nil), - ErrBadField: mysql.Message("Unknown column '%-.192s' in '%-.192s'", nil), - ErrFieldNotInGroupBy: mysql.Message("Expression #%d of %s is not in GROUP BY clause and contains nonaggregated column '%s' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by", nil), - ErrWrongGroupField: mysql.Message("Can't group on '%-.192s'", nil), - ErrWrongSumSelect: mysql.Message("Statement has sum functions and columns in same statement", nil), - ErrWrongValueCount: mysql.Message("Column count doesn't match value count", nil), - ErrTooLongIdent: mysql.Message("Identifier name '%-.100s' is too long", nil), - ErrDupFieldName: mysql.Message("Duplicate column name '%-.192s'", nil), - ErrDupKeyName: mysql.Message("Duplicate key name '%-.192s'", nil), - ErrDupEntry: mysql.Message("Duplicate entry '%-.64s' for key '%-.192s'", []int{0}), - ErrWrongFieldSpec: mysql.Message("Incorrect column specifier for column '%-.192s'", nil), - ErrParse: mysql.Message("%s %s", nil), - ErrEmptyQuery: mysql.Message("Query was empty", nil), - ErrNonuniqTable: mysql.Message("Not unique table/alias: '%-.192s'", nil), - ErrInvalidDefault: mysql.Message("Invalid default value for '%-.192s'", nil), - ErrMultiplePriKey: mysql.Message("Multiple primary key defined", nil), - ErrTooManyKeys: mysql.Message("Too many keys specified; max %d keys allowed", nil), - ErrTooManyKeyParts: mysql.Message("Too many key parts specified; max %d parts allowed", nil), - ErrTooLongKey: mysql.Message("Specified key was too long (%d bytes); max key length is %d bytes", nil), - ErrKeyColumnDoesNotExits: mysql.Message("Key column '%-.192s' doesn't exist in table", nil), - ErrBlobUsedAsKey: mysql.Message("BLOB column '%-.192s' can't be used in key specification with the used table type", nil), - ErrJSONVacuousPath: mysql.Message("The path expression '$' is not allowed in this context.", nil), - ErrJSONBadOneOrAllArg: mysql.Message("The oneOrAll argument to %s may take these values: 'one' or 'all'.", nil), - ErrTooBigFieldlength: mysql.Message("Column length too big for column '%-.192s' (max = %d); use BLOB or TEXT instead", nil), - ErrWrongAutoKey: mysql.Message("Incorrect table definition; there can be only one auto column and it must be defined as a key", nil), - ErrReady: mysql.Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d", nil), - ErrNormalShutdown: mysql.Message("%s: Normal shutdown\n", nil), - ErrGotSignal: mysql.Message("%s: Got signal %d. Aborting!\n", nil), - ErrShutdownComplete: mysql.Message("%s: Shutdown complete\n", nil), - ErrForcingClose: mysql.Message("%s: Forcing close of thread %d user: '%-.48s'\n", nil), - ErrIpsock: mysql.Message("Can't create IP socket", nil), - ErrNoSuchIndex: mysql.Message("Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table", nil), - ErrWrongFieldTerminators: mysql.Message("Field separator argument is not what is expected; check the manual", nil), - ErrBlobsAndNoTerminated: mysql.Message("You can't use fixed rowlength with BLOBs; please use 'fields terminated by'", nil), - ErrTextFileNotReadable: mysql.Message("The file '%-.128s' must be in the database directory or be readable by all", nil), - ErrFileExists: mysql.Message("File '%-.200s' already exists", nil), - ErrLoadInfo: mysql.Message("Records: %d Deleted: %d Skipped: %d Warnings: %d", nil), - ErrAlterInfo: mysql.Message("Records: %d Duplicates: %d", nil), - ErrWrongSubKey: mysql.Message("Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys", nil), - ErrCantRemoveAllFields: mysql.Message("You can't delete all columns with ALTER TABLE; use DROP TABLE instead", nil), - ErrCantDropFieldOrKey: mysql.Message("Can't DROP '%-.192s'; check that column/key exists", nil), - ErrInsertInfo: mysql.Message("Records: %d Duplicates: %d Warnings: %d", nil), - ErrUpdateTableUsed: mysql.Message("You can't specify target table '%-.192s' for update in FROM clause", nil), - ErrNoSuchThread: mysql.Message("Unknown thread id: %d", nil), - ErrKillDenied: mysql.Message("You are not owner of thread %d", nil), - ErrNoTablesUsed: mysql.Message("No tables used", nil), - ErrTooBigSet: mysql.Message("Too many strings for column %-.192s and SET", nil), - ErrNoUniqueLogFile: mysql.Message("Can't generate a unique log-filename %-.200s.(1-999)\n", nil), - ErrTableNotLockedForWrite: mysql.Message("Table '%-.192s' was locked with a READ lock and can't be updated", nil), - ErrTableNotLocked: mysql.Message("Table '%-.192s' was not locked with LOCK TABLES", nil), - ErrBlobCantHaveDefault: mysql.Message("BLOB/TEXT/JSON column '%-.192s' can't have a default value", nil), - ErrWrongDBName: mysql.Message("Incorrect database name '%-.100s'", nil), - ErrWrongTableName: mysql.Message("Incorrect table name '%-.100s'", nil), - ErrTooBigSelect: mysql.Message("The SELECT would examine more than MAXJOINSIZE rows; check your WHERE and use SET SQLBIGSELECTS=1 or SET MAXJOINSIZE=# if the SELECT is okay", nil), - ErrUnknown: mysql.Message("Unknown error", nil), - ErrUnknownProcedure: mysql.Message("Unknown procedure '%-.192s'", nil), - ErrWrongParamcountToProcedure: mysql.Message("Incorrect parameter count to procedure '%-.192s'", nil), - ErrWrongParametersToProcedure: mysql.Message("Incorrect parameters to procedure '%-.192s'", nil), - ErrUnknownTable: mysql.Message("Unknown table '%-.192s' in %-.32s", nil), - ErrFieldSpecifiedTwice: mysql.Message("Column '%-.192s' specified twice", nil), - ErrInvalidGroupFuncUse: mysql.Message("Invalid use of group function", nil), - ErrUnsupportedExtension: mysql.Message("Table '%-.192s' uses an extension that doesn't exist in this MySQL version", nil), - ErrTableMustHaveColumns: mysql.Message("A table must have at least 1 column", nil), - ErrRecordFileFull: mysql.Message("The table '%-.192s' is full", nil), - ErrUnknownCharacterSet: mysql.Message("Unknown character set: '%-.64s'", nil), - ErrTooManyTables: mysql.Message("Too many tables; MySQL can only use %d tables in a join", nil), - ErrTooManyFields: mysql.Message("Too many columns", nil), - ErrTooBigRowsize: mysql.Message("Row size too large. The maximum row size for the used table type, not counting BLOBs, is %d. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs", nil), - ErrStackOverrun: mysql.Message("Thread stack overrun: Used: %d of a %d stack. Use 'mysqld --threadStack=#' to specify a bigger stack if needed", nil), - ErrWrongOuterJoin: mysql.Message("Cross dependency found in OUTER JOIN; examine your ON conditions", nil), - ErrNullColumnInIndex: mysql.Message("Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler", nil), - ErrCantFindUdf: mysql.Message("Can't load function '%-.192s'", nil), - ErrCantInitializeUdf: mysql.Message("Can't initialize function '%-.192s'; %-.80s", nil), - ErrUdfNoPaths: mysql.Message("No paths allowed for shared library", nil), - ErrUdfExists: mysql.Message("Function '%-.192s' already exists", nil), - ErrCantOpenLibrary: mysql.Message("Can't open shared library '%-.192s' (errno: %d %-.128s)", nil), - ErrCantFindDlEntry: mysql.Message("Can't find symbol '%-.128s' in library", nil), - ErrFunctionNotDefined: mysql.Message("Function '%-.192s' is not defined", nil), - ErrHostIsBlocked: mysql.Message("Host '%-.255s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", nil), - ErrHostNotPrivileged: mysql.Message("Host '%-.255s' is not allowed to connect to this MySQL server", nil), - ErrPasswordAnonymousUser: mysql.Message("You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", nil), - ErrPasswordNotAllowed: mysql.Message("You must have privileges to update tables in the mysql database to be able to change passwords for others", nil), - ErrPasswordNoMatch: mysql.Message("Can't find any matching row in the user table", nil), - ErrUpdateInfo: mysql.Message("Rows matched: %d Changed: %d Warnings: %d", nil), - ErrCantCreateThread: mysql.Message("Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", nil), - ErrWrongValueCountOnRow: mysql.Message("Column count doesn't match value count at row %d", nil), - ErrCantReopenTable: mysql.Message("Can't reopen table: '%-.192s'", nil), - ErrInvalidUseOfNull: mysql.Message("Invalid use of NULL value", nil), - ErrRegexp: mysql.Message("Got error '%-.64s' from regexp", nil), - ErrMixOfGroupFuncAndFields: mysql.Message("Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", nil), - ErrNonexistingGrant: mysql.Message("There is no such grant defined for user '%-.48s' on host '%-.255s'", nil), - ErrTableaccessDenied: mysql.Message("%-.128s command denied to user '%-.48s'@'%-.255s' for table '%-.64s'", nil), - ErrColumnaccessDenied: mysql.Message("%-.16s command denied to user '%-.48s'@'%-.255s' for column '%-.192s' in table '%-.192s'", nil), - ErrIllegalGrantForTable: mysql.Message("Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", nil), - ErrGrantWrongHostOrUser: mysql.Message("The host or user argument to GRANT is too long", nil), - ErrNoSuchTable: mysql.Message("Table '%-.192s.%-.192s' doesn't exist", nil), - ErrNonexistingTableGrant: mysql.Message("There is no such grant defined for user '%-.48s' on host '%-.255s' on table '%-.192s'", nil), - ErrNotAllowedCommand: mysql.Message("The used command is not allowed with this MySQL version", nil), - ErrSyntax: mysql.Message("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use", nil), - ErrDelayedCantChangeLock: mysql.Message("Delayed insert thread couldn't get requested lock for table %-.192s", nil), - ErrTooManyDelayedThreads: mysql.Message("Too many delayed threads in use", nil), - ErrAbortingConnection: mysql.Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' (%-.64s)", nil), - ErrNetPacketTooLarge: mysql.Message("Got a packet bigger than 'max_allowed_packet' bytes", nil), - ErrNetReadErrorFromPipe: mysql.Message("Got a read error from the connection pipe", nil), - ErrNetFcntl: mysql.Message("Got an error from fcntl()", nil), - ErrNetPacketsOutOfOrder: mysql.Message("Got packets out of order", nil), - ErrNetUncompress: mysql.Message("Couldn't uncompress communication packet", nil), - ErrNetRead: mysql.Message("Got an error reading communication packets", nil), - ErrNetReadInterrupted: mysql.Message("Got timeout reading communication packets", nil), - ErrNetErrorOnWrite: mysql.Message("Got an error writing communication packets", nil), - ErrNetWriteInterrupted: mysql.Message("Got timeout writing communication packets", nil), - ErrTooLongString: mysql.Message("Result string is longer than 'maxAllowedPacket' bytes", nil), - ErrTableCantHandleBlob: mysql.Message("The used table type doesn't support BLOB/TEXT columns", nil), - ErrTableCantHandleAutoIncrement: mysql.Message("The used table type doesn't support AUTOINCREMENT columns", nil), - ErrDelayedInsertTableLocked: mysql.Message("INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES", nil), - ErrWrongColumnName: mysql.Message("Incorrect column name '%-.100s'", nil), - ErrWrongKeyColumn: mysql.Message("The used storage engine can't index column '%-.192s'", nil), - ErrWrongMrgTable: mysql.Message("Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist", nil), - ErrDupUnique: mysql.Message("Can't write, because of unique constraint, to table '%-.192s'", nil), - ErrBlobKeyWithoutLength: mysql.Message("BLOB/TEXT column '%-.192s' used in key specification without a key length", nil), - ErrPrimaryCantHaveNull: mysql.Message("All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", nil), - ErrTooManyRows: mysql.Message("Result consisted of more than one row", nil), - ErrRequiresPrimaryKey: mysql.Message("This table type requires a primary key", nil), - ErrNoRaidCompiled: mysql.Message("This version of MySQL is not compiled with RAID support", nil), - ErrUpdateWithoutKeyInSafeMode: mysql.Message("You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", nil), - ErrKeyDoesNotExist: mysql.Message("Key '%-.192s' doesn't exist in table '%-.192s'", nil), - ErrCheckNoSuchTable: mysql.Message("Can't open table", nil), - ErrCheckNotImplemented: mysql.Message("The storage engine for the table doesn't support %s", nil), - ErrCantDoThisDuringAnTransaction: mysql.Message("You are not allowed to execute this command in a transaction", nil), - ErrErrorDuringCommit: mysql.Message("Got error %d during COMMIT", nil), - ErrErrorDuringRollback: mysql.Message("Got error %d during ROLLBACK", nil), - ErrErrorDuringFlushLogs: mysql.Message("Got error %d during FLUSHLOGS", nil), - ErrErrorDuringCheckpoint: mysql.Message("Got error %d during CHECKPOINT", nil), - ErrNewAbortingConnection: mysql.Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' host: '%-.255s' (%-.64s)", nil), - ErrDumpNotImplemented: mysql.Message("The storage engine for the table does not support binary table dump", nil), - ErrFlushMasterBinlogClosed: mysql.Message("Binlog closed, cannot RESET MASTER", nil), - ErrIndexRebuild: mysql.Message("Failed rebuilding the index of dumped table '%-.192s'", nil), - ErrMaster: mysql.Message("Error from master: '%-.64s'", nil), - ErrMasterNetRead: mysql.Message("Net error reading from master", nil), - ErrMasterNetWrite: mysql.Message("Net error writing to master", nil), - ErrFtMatchingKeyNotFound: mysql.Message("Can't find FULLTEXT index matching the column list", nil), - ErrLockOrActiveTransaction: mysql.Message("Can't execute the given command because you have active locked tables or an active transaction", nil), - ErrUnknownSystemVariable: mysql.Message("Unknown system variable '%-.64s'", nil), - ErrCrashedOnUsage: mysql.Message("Table '%-.192s' is marked as crashed and should be repaired", nil), - ErrCrashedOnRepair: mysql.Message("Table '%-.192s' is marked as crashed and last (automatic?) repair failed", nil), - ErrWarningNotCompleteRollback: mysql.Message("Some non-transactional changed tables couldn't be rolled back", nil), - ErrTransCacheFull: mysql.Message("Multi-statement transaction required more than 'maxBinlogCacheSize' bytes of storage; increase this mysqld variable and try again", nil), - ErrSlaveMustStop: mysql.Message("This operation cannot be performed with a running slave; run STOP SLAVE first", nil), - ErrSlaveNotRunning: mysql.Message("This operation requires a running slave; configure slave and do START SLAVE", nil), - ErrBadSlave: mysql.Message("The server is not configured as slave; fix in config file or with CHANGE MASTER TO", nil), - ErrMasterInfo: mysql.Message("Could not initialize master info structure; more error messages can be found in the MySQL error log", nil), - ErrSlaveThread: mysql.Message("Could not create slave thread; check system resources", nil), - ErrTooManyUserConnections: mysql.Message("User %-.64s already has more than 'maxUserConnections' active connections", nil), - ErrSetConstantsOnly: mysql.Message("You may only use constant expressions with SET", nil), - ErrLockWaitTimeout: mysql.Message("Lock wait timeout exceeded; try restarting transaction", nil), - ErrLockTableFull: mysql.Message("The total number of locks exceeds the lock table size", nil), - ErrReadOnlyTransaction: mysql.Message("Update locks cannot be acquired during a READ UNCOMMITTED transaction", nil), - ErrDropDBWithReadLock: mysql.Message("DROP DATABASE not allowed while thread is holding global read lock", nil), - ErrCreateDBWithReadLock: mysql.Message("CREATE DATABASE not allowed while thread is holding global read lock", nil), - ErrWrongArguments: mysql.Message("Incorrect arguments to %s", nil), - ErrNoPermissionToCreateUser: mysql.Message("'%-.48s'@'%-.255s' is not allowed to create new users", nil), - ErrUnionTablesInDifferentDir: mysql.Message("Incorrect table definition; all MERGE tables must be in the same database", nil), - ErrLockDeadlock: mysql.Message("Deadlock found when trying to get lock; try restarting transaction", nil), - ErrTableCantHandleFt: mysql.Message("The used table type doesn't support FULLTEXT indexes", nil), - ErrCannotAddForeign: mysql.Message("Cannot add foreign key constraint", nil), - ErrNoReferencedRow: mysql.Message("Cannot add or update a child row: a foreign key constraint fails", nil), - ErrRowIsReferenced: mysql.Message("Cannot delete or update a parent row: a foreign key constraint fails", nil), - ErrConnectToMaster: mysql.Message("Error connecting to master: %-.128s", nil), - ErrQueryOnMaster: mysql.Message("Error running query on master: %-.128s", nil), - ErrErrorWhenExecutingCommand: mysql.Message("Error when executing command %s: %-.128s", nil), - ErrWrongUsage: mysql.Message("Incorrect usage of %s and %s", nil), - ErrWrongNumberOfColumnsInSelect: mysql.Message("The used SELECT statements have a different number of columns", nil), - ErrCantUpdateWithReadlock: mysql.Message("Can't execute the query because you have a conflicting read lock", nil), - ErrMixingNotAllowed: mysql.Message("Mixing of transactional and non-transactional tables is disabled", nil), - ErrDupArgument: mysql.Message("Option '%s' used twice in statement", nil), - ErrUserLimitReached: mysql.Message("User '%-.64s' has exceeded the '%s' resource (current value: %d)", nil), - ErrSpecificAccessDenied: mysql.Message("Access denied; you need (at least one of) the %-.128s privilege(s) for this operation", nil), - ErrLocalVariable: mysql.Message("Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", nil), - ErrGlobalVariable: mysql.Message("Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", nil), - ErrNoDefault: mysql.Message("Variable '%-.64s' doesn't have a default value", nil), - ErrWrongValueForVar: mysql.Message("Variable '%-.64s' can't be set to the value of '%-.200s'", nil), - ErrWrongTypeForVar: mysql.Message("Incorrect argument type to variable '%-.64s'", nil), - ErrVarCantBeRead: mysql.Message("Variable '%-.64s' can only be set, not read", nil), - ErrCantUseOptionHere: mysql.Message("Incorrect usage/placement of '%s'", nil), - ErrNotSupportedYet: mysql.Message("This version of TiDB doesn't yet support '%s'", nil), - ErrMasterFatalErrorReadingBinlog: mysql.Message("Got fatal error %d from master when reading data from binary log: '%-.320s'", nil), - ErrSlaveIgnoredTable: mysql.Message("Slave SQL thread ignored the query because of replicate-*-table rules", nil), - ErrIncorrectGlobalLocalVar: mysql.Message("Variable '%-.192s' is a %s variable", nil), - ErrWrongFkDef: mysql.Message("Incorrect foreign key definition for '%-.192s': %s", nil), - ErrKeyRefDoNotMatchTableRef: mysql.Message("Key reference and table reference don't match", nil), - ErrOperandColumns: mysql.Message("Operand should contain %d column(s)", nil), - ErrSubqueryNo1Row: mysql.Message("Subquery returns more than 1 row", nil), - ErrUnknownStmtHandler: mysql.Message("Unknown prepared statement handler (%.*s) given to %s", nil), - ErrCorruptHelpDB: mysql.Message("Help database is corrupt or does not exist", nil), - ErrCyclicReference: mysql.Message("Cyclic reference on subqueries", nil), - ErrAutoConvert: mysql.Message("Converting column '%s' from %s to %s", nil), - ErrIllegalReference: mysql.Message("Reference '%-.64s' not supported (%s)", nil), - ErrDerivedMustHaveAlias: mysql.Message("Every derived table must have its own alias", nil), - ErrSelectReduced: mysql.Message("Select %d was reduced during optimization", nil), - ErrTablenameNotAllowedHere: mysql.Message("Table '%s' from one of the %ss cannot be used in %s", nil), - ErrNotSupportedAuthMode: mysql.Message("Client does not support authentication protocol requested by server; consider upgrading MySQL client", nil), - ErrSpatialCantHaveNull: mysql.Message("All parts of a SPATIAL index must be NOT NULL", nil), - ErrCollationCharsetMismatch: mysql.Message("COLLATION '%s' is not valid for CHARACTER SET '%s'", nil), - ErrSlaveWasRunning: mysql.Message("Slave is already running", nil), - ErrSlaveWasNotRunning: mysql.Message("Slave already has been stopped", nil), - ErrTooBigForUncompress: mysql.Message("Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", nil), - ErrZlibZMem: mysql.Message("ZLIB: Not enough memory", nil), - ErrZlibZBuf: mysql.Message("ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", nil), - ErrZlibZData: mysql.Message("ZLIB: Input data corrupted", nil), - ErrCutValueGroupConcat: mysql.Message("Some rows were cut by GROUPCONCAT(%s)", []int{0}), - ErrWarnTooFewRecords: mysql.Message("Row %d doesn't contain data for all columns", nil), - ErrWarnTooManyRecords: mysql.Message("Row %d was truncated; it contained more data than there were input columns", nil), - ErrWarnNullToNotnull: mysql.Message("Column set to default value; NULL supplied to NOT NULL column '%s' at row %d", nil), - ErrWarnDataOutOfRange: mysql.Message("Out of range value for column '%s' at row %d", nil), - WarnDataTruncated: mysql.Message("Data truncated for column '%s' at row %d", nil), - ErrWarnUsingOtherHandler: mysql.Message("Using storage engine %s for table '%s'", nil), - ErrCantAggregate2collations: mysql.Message("Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", nil), - ErrDropUser: mysql.Message("Cannot drop one or more of the requested users", nil), - ErrRevokeGrants: mysql.Message("Can't revoke all privileges for one or more of the requested users", nil), - ErrCantAggregate3collations: mysql.Message("Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", nil), - ErrCantAggregateNcollations: mysql.Message("Illegal mix of collations for operation '%s'", nil), - ErrVariableIsNotStruct: mysql.Message("Variable '%-.64s' is not a variable component (can't be used as XXXX.variableName)", nil), - ErrUnknownCollation: mysql.Message("Unknown collation: '%-.64s'", nil), - ErrSlaveIgnoredSslParams: mysql.Message("SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", nil), - ErrServerIsInSecureAuthMode: mysql.Message("Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", nil), - ErrWarnFieldResolved: mysql.Message("Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d", nil), - ErrBadSlaveUntilCond: mysql.Message("Incorrect parameter or combination of parameters for START SLAVE UNTIL", nil), - ErrMissingSkipSlave: mysql.Message("It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart", nil), - ErrUntilCondIgnored: mysql.Message("SQL thread is not to be started so UNTIL options are ignored", nil), - ErrWrongNameForIndex: mysql.Message("Incorrect index name '%-.100s'", nil), - ErrWrongNameForCatalog: mysql.Message("Incorrect catalog name '%-.100s'", nil), - ErrWarnQcResize: mysql.Message("Query cache failed to set size %d; new query cache size is %d", nil), - ErrBadFtColumn: mysql.Message("Column '%-.192s' cannot be part of FULLTEXT index", nil), - ErrUnknownKeyCache: mysql.Message("Unknown key cache '%-.100s'", nil), - ErrWarnHostnameWontWork: mysql.Message("MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work", nil), - ErrUnknownStorageEngine: mysql.Message("Unknown storage engine '%s'", nil), - ErrWarnDeprecatedSyntax: mysql.Message("'%s' is deprecated and will be removed in a future release. Please use %s instead", nil), - ErrNonUpdatableTable: mysql.Message("The target table %-.100s of the %s is not updatable", nil), - ErrFeatureDisabled: mysql.Message("The '%s' feature is disabled; you need MySQL built with '%s' to have it working", nil), - ErrOptionPreventsStatement: mysql.Message("The MySQL server is running with the %s option so it cannot execute this statement", nil), - ErrDuplicatedValueInType: mysql.Message("Column '%-.100s' has duplicated value '%-.64s' in %s", []int{1}), - ErrTruncatedWrongValue: mysql.Message("Truncated incorrect %-.64s value: '%-.128s'", []int{1}), - ErrTooMuchAutoTimestampCols: mysql.Message("Incorrect table definition; there can be only one TIMESTAMP column with CURRENTTIMESTAMP in DEFAULT or ON UPDATE clause", nil), - ErrInvalidOnUpdate: mysql.Message("Invalid ON UPDATE clause for '%-.192s' column", nil), - ErrUnsupportedPs: mysql.Message("This command is not supported in the prepared statement protocol yet", nil), - ErrGetErrmsg: mysql.Message("Got error %d '%-.100s' from %s", nil), - ErrGetTemporaryErrmsg: mysql.Message("Got temporary error %d '%-.100s' from %s", nil), - ErrUnknownTimeZone: mysql.Message("Unknown or incorrect time zone: '%-.64s'", nil), - ErrWarnInvalidTimestamp: mysql.Message("Invalid TIMESTAMP value in column '%s' at row %d", nil), - ErrInvalidCharacterString: mysql.Message("Invalid %s character string: '%.64s'", []int{1}), - ErrWarnAllowedPacketOverflowed: mysql.Message("Result of %s() was larger than max_allowed_packet (%d) - truncated", nil), - ErrConflictingDeclarations: mysql.Message("Conflicting declarations: '%s%s' and '%s%s'", nil), - ErrSpNoRecursiveCreate: mysql.Message("Can't create a %s from within another stored routine", nil), - ErrSpAlreadyExists: mysql.Message("%s %s already exists", nil), - ErrSpDoesNotExist: mysql.Message("%s %s does not exist", nil), - ErrSpDropFailed: mysql.Message("Failed to DROP %s %s", nil), - ErrSpStoreFailed: mysql.Message("Failed to CREATE %s %s", nil), - ErrSpLilabelMismatch: mysql.Message("%s with no matching label: %s", nil), - ErrSpLabelRedefine: mysql.Message("Redefining label %s", nil), - ErrSpLabelMismatch: mysql.Message("End-label %s without match", nil), - ErrSpUninitVar: mysql.Message("Referring to uninitialized variable %s", nil), - ErrSpBadselect: mysql.Message("PROCEDURE %s can't return a result set in the given context", nil), - ErrSpBadreturn: mysql.Message("RETURN is only allowed in a FUNCTION", nil), - ErrSpBadstatement: mysql.Message("%s is not allowed in stored procedures", nil), - ErrUpdateLogDeprecatedIgnored: mysql.Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been ignored.", nil), - ErrUpdateLogDeprecatedTranslated: mysql.Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been translated to SET SQLLOGBIN.", nil), - ErrQueryInterrupted: mysql.Message("Query execution was interrupted", nil), - ErrSpWrongNoOfArgs: mysql.Message("Incorrect number of arguments for %s %s; expected %d, got %d", nil), - ErrSpCondMismatch: mysql.Message("Undefined CONDITION: %s", nil), - ErrSpNoreturn: mysql.Message("No RETURN found in FUNCTION %s", nil), - ErrSpNoreturnend: mysql.Message("FUNCTION %s ended without RETURN", nil), - ErrSpBadCursorQuery: mysql.Message("Cursor statement must be a SELECT", nil), - ErrSpBadCursorSelect: mysql.Message("Cursor SELECT must not have INTO", nil), - ErrSpCursorMismatch: mysql.Message("Undefined CURSOR: %s", nil), - ErrSpCursorAlreadyOpen: mysql.Message("Cursor is already open", nil), - ErrSpCursorNotOpen: mysql.Message("Cursor is not open", nil), - ErrSpUndeclaredVar: mysql.Message("Undeclared variable: %s", nil), - ErrSpWrongNoOfFetchArgs: mysql.Message("Incorrect number of FETCH variables", nil), - ErrSpFetchNoData: mysql.Message("No data - zero rows fetched, selected, or processed", nil), - ErrSpDupParam: mysql.Message("Duplicate parameter: %s", nil), - ErrSpDupVar: mysql.Message("Duplicate variable: %s", nil), - ErrSpDupCond: mysql.Message("Duplicate condition: %s", nil), - ErrSpDupCurs: mysql.Message("Duplicate cursor: %s", nil), - ErrSpCantAlter: mysql.Message("Failed to ALTER %s %s", nil), - ErrSpSubselectNyi: mysql.Message("Subquery value not supported", nil), - ErrStmtNotAllowedInSfOrTrg: mysql.Message("%s is not allowed in stored function or trigger", nil), - ErrSpVarcondAfterCurshndlr: mysql.Message("Variable or condition declaration after cursor or handler declaration", nil), - ErrSpCursorAfterHandler: mysql.Message("Cursor declaration after handler declaration", nil), - ErrSpCaseNotFound: mysql.Message("Case not found for CASE statement", nil), - ErrFparserTooBigFile: mysql.Message("Configuration file '%-.192s' is too big", nil), - ErrFparserBadHeader: mysql.Message("Malformed file type header in file '%-.192s'", nil), - ErrFparserEOFInComment: mysql.Message("Unexpected end of file while parsing comment '%-.200s'", nil), - ErrFparserErrorInParameter: mysql.Message("Error while parsing parameter '%-.192s' (line: '%-.192s')", nil), - ErrFparserEOFInUnknownParameter: mysql.Message("Unexpected end of file while skipping unknown parameter '%-.192s'", nil), - ErrViewNoExplain: mysql.Message("EXPLAIN/SHOW can not be issued; lacking privileges for underlying table", nil), - ErrFrmUnknownType: mysql.Message("File '%-.192s' has unknown type '%-.64s' in its header", nil), - ErrWrongObject: mysql.Message("'%-.192s.%-.192s' is not %s", nil), - ErrNonupdateableColumn: mysql.Message("Column '%-.192s' is not updatable", nil), - ErrViewSelectDerived: mysql.Message("View's SELECT contains a subquery in the FROM clause", nil), - ErrViewSelectClause: mysql.Message("View's SELECT contains a '%s' clause", nil), - ErrViewSelectVariable: mysql.Message("View's SELECT contains a variable or parameter", nil), - ErrViewSelectTmptable: mysql.Message("View's SELECT refers to a temporary table '%-.192s'", nil), - ErrViewWrongList: mysql.Message("In definition of view, derived table or common table expression, SELECT list and column names list have different column counts", nil), - ErrWarnViewMerge: mysql.Message("View merge algorithm can't be used here for now (assumed undefined algorithm)", nil), - ErrWarnViewWithoutKey: mysql.Message("View being updated does not have complete key of underlying table in it", nil), - ErrViewInvalid: mysql.Message("View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them", nil), - ErrSpNoDropSp: mysql.Message("Can't drop or alter a %s from within another stored routine", nil), - ErrSpGotoInHndlr: mysql.Message("GOTO is not allowed in a stored procedure handler", nil), - ErrTrgAlreadyExists: mysql.Message("Trigger already exists", nil), - ErrTrgDoesNotExist: mysql.Message("Trigger does not exist", nil), - ErrTrgOnViewOrTempTable: mysql.Message("Trigger's '%-.192s' is view or temporary table", nil), - ErrTrgCantChangeRow: mysql.Message("Updating of %s row is not allowed in %strigger", nil), - ErrTrgNoSuchRowInTrg: mysql.Message("There is no %s row in %s trigger", nil), - ErrNoDefaultForField: mysql.Message("Field '%-.192s' doesn't have a default value", nil), - ErrDivisionByZero: mysql.Message("Division by 0", nil), - ErrTruncatedWrongValueForField: mysql.Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", []int{0, 1}), - ErrIllegalValueForType: mysql.Message("Illegal %s '%-.192s' value found during parsing", []int{1}), - ErrViewNonupdCheck: mysql.Message("CHECK OPTION on non-updatable view '%-.192s.%-.192s'", nil), - ErrViewCheckFailed: mysql.Message("CHECK OPTION failed '%-.192s.%-.192s'", nil), - ErrProcaccessDenied: mysql.Message("%-.16s command denied to user '%-.48s'@'%-.255s' for routine '%-.192s'", nil), - ErrRelayLogFail: mysql.Message("Failed purging old relay logs: %s", nil), - ErrPasswdLength: mysql.Message("Password hash should be a %d-digit hexadecimal number", nil), - ErrUnknownTargetBinlog: mysql.Message("Target log not found in binlog index", nil), - ErrIoErrLogIndexRead: mysql.Message("I/O error reading log index file", nil), - ErrBinlogPurgeProhibited: mysql.Message("Server configuration does not permit binlog purge", nil), - ErrFseekFail: mysql.Message("Failed on fseek()", nil), - ErrBinlogPurgeFatalErr: mysql.Message("Fatal error during log purge", nil), - ErrLogInUse: mysql.Message("A purgeable log is in use, will not purge", nil), - ErrLogPurgeUnknownErr: mysql.Message("Unknown error during log purge", nil), - ErrRelayLogInit: mysql.Message("Failed initializing relay log position: %s", nil), - ErrNoBinaryLogging: mysql.Message("You are not using binary logging", nil), - ErrReservedSyntax: mysql.Message("The '%-.64s' syntax is reserved for purposes internal to the MySQL server", nil), - ErrWsasFailed: mysql.Message("WSAStartup Failed", nil), - ErrDiffGroupsProc: mysql.Message("Can't handle procedures with different groups yet", nil), - ErrNoGroupForProc: mysql.Message("Select must have a group with this procedure", nil), - ErrOrderWithProc: mysql.Message("Can't use ORDER clause with this procedure", nil), - ErrLoggingProhibitChangingOf: mysql.Message("Binary logging and replication forbid changing the global server %s", nil), - ErrNoFileMapping: mysql.Message("Can't map file: %-.200s, errno: %d", nil), - ErrWrongMagic: mysql.Message("Wrong magic in %-.64s", nil), - ErrPsManyParam: mysql.Message("Prepared statement contains too many placeholders", nil), - ErrKeyPart0: mysql.Message("Key part '%-.192s' length cannot be 0", nil), - ErrViewChecksum: mysql.Message("View text checksum failed", nil), - ErrViewMultiupdate: mysql.Message("Can not modify more than one base table through a join view '%-.192s.%-.192s'", nil), - ErrViewNoInsertFieldList: mysql.Message("Can not insert into join view '%-.192s.%-.192s' without fields list", nil), - ErrViewDeleteMergeView: mysql.Message("Can not delete from join view '%-.192s.%-.192s'", nil), - ErrCannotUser: mysql.Message("Operation %s failed for %.256s", nil), - ErrGrantRole: mysql.Message("Unknown authorization ID %.256s", nil), - ErrXaerNota: mysql.Message("XAERNOTA: Unknown XID", nil), - ErrXaerInval: mysql.Message("XAERINVAL: Invalid arguments (or unsupported command)", nil), - ErrXaerRmfail: mysql.Message("XAERRMFAIL: The command cannot be executed when global transaction is in the %.64s state", nil), - ErrXaerOutside: mysql.Message("XAEROUTSIDE: Some work is done outside global transaction", nil), - ErrXaerRmerr: mysql.Message("XAERRMERR: Fatal error occurred in the transaction branch - check your data for consistency", nil), - ErrXaRbrollback: mysql.Message("XARBROLLBACK: Transaction branch was rolled back", nil), - ErrNonexistingProcGrant: mysql.Message("There is no such grant defined for user '%-.48s' on host '%-.255s' on routine '%-.192s'", nil), - ErrProcAutoGrantFail: mysql.Message("Failed to grant EXECUTE and ALTER ROUTINE privileges", nil), - ErrProcAutoRevokeFail: mysql.Message("Failed to revoke all privileges to dropped routine", nil), - ErrDataTooLong: mysql.Message("Data too long for column '%s' at row %d", nil), - ErrSpBadSQLstate: mysql.Message("Bad SQLSTATE: '%s'", nil), - ErrStartup: mysql.Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s", nil), - ErrLoadFromFixedSizeRowsToVar: mysql.Message("Can't load value from file with fixed size rows to variable", nil), - ErrCantCreateUserWithGrant: mysql.Message("You are not allowed to create a user with GRANT", nil), - ErrWrongValueForType: mysql.Message("Incorrect %-.32s value: '%-.128s' for function %-.32s", nil), - ErrTableDefChanged: mysql.Message("Table definition has changed, please retry transaction", nil), - ErrSpDupHandler: mysql.Message("Duplicate handler declared in the same block", nil), - ErrSpNotVarArg: mysql.Message("OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger", nil), - ErrSpNoRetset: mysql.Message("Not allowed to return a result set from a %s", nil), - ErrCantCreateGeometryObject: mysql.Message("Cannot get geometry object from data you send to the GEOMETRY field", nil), - ErrFailedRoutineBreakBinlog: mysql.Message("A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes", nil), - ErrBinlogUnsafeRoutine: mysql.Message("This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), - ErrBinlogCreateRoutineNeedSuper: mysql.Message("You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), - ErrExecStmtWithOpenCursor: mysql.Message("You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it.", nil), - ErrStmtHasNoOpenCursor: mysql.Message("The statement (%d) has no open cursor.", nil), - ErrCommitNotAllowedInSfOrTrg: mysql.Message("Explicit or implicit commit is not allowed in stored function or trigger.", nil), - ErrNoDefaultForViewField: mysql.Message("Field of view '%-.192s.%-.192s' underlying table doesn't have a default value", nil), - ErrSpNoRecursion: mysql.Message("Recursive stored functions and triggers are not allowed.", nil), - ErrTooBigScale: mysql.Message("Too big scale %d specified for column '%-.192s'. Maximum is %d.", nil), - ErrTooBigPrecision: mysql.Message("Too-big precision %d specified for '%-.192s'. Maximum is %d.", nil), - ErrMBiggerThanD: mysql.Message("For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s').", nil), - ErrWrongLockOfSystemTable: mysql.Message("You can't combine write-locking of system tables with other tables or lock types", nil), - ErrConnectToForeignDataSource: mysql.Message("Unable to connect to foreign data source: %.64s", nil), - ErrQueryOnForeignDataSource: mysql.Message("There was a problem processing the query on the foreign data source. Data source : %-.64s", nil), - ErrForeignDataSourceDoesntExist: mysql.Message("The foreign data source you are trying to reference does not exist. Data source : %-.64s", nil), - ErrForeignDataStringInvalidCantCreate: mysql.Message("Can't create federated table. The data source connection string '%-.64s' is not in the correct format", nil), - ErrForeignDataStringInvalid: mysql.Message("The data source connection string '%-.64s' is not in the correct format", nil), - ErrCantCreateFederatedTable: mysql.Message("Can't create federated table. Foreign data src : %-.64s", nil), - ErrTrgInWrongSchema: mysql.Message("Trigger in wrong schema", nil), - ErrStackOverrunNeedMore: mysql.Message("Thread stack overrun: %d bytes used of a %d byte stack, and %d bytes needed. Use 'mysqld --threadStack=#' to specify a bigger stack.", nil), - ErrTooLongBody: mysql.Message("Routine body for '%-.100s' is too long", nil), - ErrWarnCantDropDefaultKeycache: mysql.Message("Cannot drop default keycache", nil), - ErrTooBigDisplaywidth: mysql.Message("Display width out of range for column '%-.192s' (max = %d)", nil), - ErrXaerDupid: mysql.Message("XAERDUPID: The XID already exists", nil), - ErrDatetimeFunctionOverflow: mysql.Message("Datetime function: %-.32s field overflow", nil), - ErrCantUpdateUsedTableInSfOrTrg: mysql.Message("Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.", nil), - ErrViewPreventUpdate: mysql.Message("The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'.", nil), - ErrPsNoRecursion: mysql.Message("The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner", nil), - ErrSpCantSetAutocommit: mysql.Message("Not allowed to set autocommit from a stored function or trigger", nil), - ErrMalformedDefiner: mysql.Message("Definer is not fully qualified", nil), - ErrViewFrmNoUser: mysql.Message("View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!", nil), - ErrViewOtherUser: mysql.Message("You need the SUPER privilege for creation view with '%-.192s'@'%-.255s' definer", nil), - ErrNoSuchUser: mysql.Message("The user specified as a definer ('%-.64s'@'%-.255s') does not exist", nil), - ErrForbidSchemaChange: mysql.Message("Changing schema from '%-.192s' to '%-.192s' is not allowed.", nil), - ErrRowIsReferenced2: mysql.Message("Cannot delete or update a parent row: a foreign key constraint fails (%.192s)", nil), - ErrNoReferencedRow2: mysql.Message("Cannot add or update a child row: a foreign key constraint fails (%.192s)", nil), - ErrSpBadVarShadow: mysql.Message("Variable '%-.64s' must be quoted with `...`, or renamed", nil), - ErrTrgNoDefiner: mysql.Message("No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.", nil), - ErrOldFileFormat: mysql.Message("'%-.192s' has an old format, you should re-create the '%s' object(s)", nil), - ErrSpRecursionLimit: mysql.Message("Recursive limit %d (as set by the maxSpRecursionDepth variable) was exceeded for routine %.192s", nil), - ErrSpProcTableCorrupt: mysql.Message("Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)", nil), - ErrSpWrongName: mysql.Message("Incorrect routine name '%-.192s'", nil), - ErrTableNeedsUpgrade: mysql.Message("Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\"", nil), - ErrSpNoAggregate: mysql.Message("AGGREGATE is not supported for stored functions", nil), - ErrMaxPreparedStmtCountReached: mysql.Message("Can't create more than maxPreparedStmtCount statements (current value: %d)", nil), - ErrViewRecursive: mysql.Message("`%-.192s`.`%-.192s` contains view recursion", nil), - ErrNonGroupingFieldUsed: mysql.Message("Non-grouping field '%-.192s' is used in %-.64s clause", nil), - ErrTableCantHandleSpkeys: mysql.Message("The used table type doesn't support SPATIAL indexes", nil), - ErrNoTriggersOnSystemSchema: mysql.Message("Triggers can not be created on system tables", nil), - ErrRemovedSpaces: mysql.Message("Leading spaces are removed from name '%s'", nil), - ErrAutoincReadFailed: mysql.Message("Failed to read auto-increment value from storage engine", nil), - ErrUsername: mysql.Message("user name", nil), - ErrHostname: mysql.Message("host name", nil), - ErrWrongStringLength: mysql.Message("String '%-.70s' is too long for %s (should be no longer than %d)", nil), - ErrNonInsertableTable: mysql.Message("The target table %-.100s of the %s is not insertable-into", nil), - ErrAdminWrongMrgTable: mysql.Message("Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist", nil), - ErrTooHighLevelOfNestingForSelect: mysql.Message("Too high level of nesting for select", nil), - ErrNameBecomesEmpty: mysql.Message("Name '%-.64s' has become ''", nil), - ErrAmbiguousFieldTerm: mysql.Message("First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY", nil), - ErrForeignServerExists: mysql.Message("The foreign server, %s, you are trying to create already exists.", nil), - ErrForeignServerDoesntExist: mysql.Message("The foreign server name you are trying to reference does not exist. Data source : %-.64s", nil), - ErrIllegalHaCreateOption: mysql.Message("Table storage engine '%-.64s' does not support the create option '%.64s'", nil), - ErrPartitionRequiresValues: mysql.Message("Syntax : %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition", nil), - ErrPartitionWrongValues: mysql.Message("Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition", []int{1}), - ErrPartitionMaxvalue: mysql.Message("MAXVALUE can only be used in last partition definition", nil), - ErrPartitionSubpartition: mysql.Message("Subpartitions can only be hash partitions and by key", nil), - ErrPartitionSubpartMix: mysql.Message("Must define subpartitions on all partitions if on one partition", nil), - ErrPartitionWrongNoPart: mysql.Message("Wrong number of partitions defined, mismatch with previous setting", nil), - ErrPartitionWrongNoSubpart: mysql.Message("Wrong number of subpartitions defined, mismatch with previous setting", nil), - ErrWrongExprInPartitionFunc: mysql.Message("Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed", nil), - ErrNoConstExprInRangeOrList: mysql.Message("Expression in RANGE/LIST VALUES must be constant", nil), - ErrFieldNotFoundPart: mysql.Message("Field in list of fields for partition function not found in table", nil), - ErrListOfFieldsOnlyInHash: mysql.Message("List of fields is only allowed in KEY partitions", nil), - ErrInconsistentPartitionInfo: mysql.Message("The partition info in the frm file is not consistent with what can be written into the frm file", nil), - ErrPartitionFuncNotAllowed: mysql.Message("The %-.192s function returns the wrong type", nil), - ErrPartitionsMustBeDefined: mysql.Message("For %-.64s partitions each partition must be defined", nil), - ErrRangeNotIncreasing: mysql.Message("VALUES LESS THAN value must be strictly increasing for each partition", nil), - ErrInconsistentTypeOfFunctions: mysql.Message("VALUES value must be of same type as partition function", nil), - ErrMultipleDefConstInListPart: mysql.Message("Multiple definition of same constant in list partitioning", nil), - ErrPartitionEntry: mysql.Message("Partitioning can not be used stand-alone in query", nil), - ErrMixHandler: mysql.Message("The mix of handlers in the partitions is not allowed in this version of MySQL", nil), - ErrPartitionNotDefined: mysql.Message("For the partitioned engine it is necessary to define all %-.64s", nil), - ErrTooManyPartitions: mysql.Message("Too many partitions (including subpartitions) were defined", nil), - ErrSubpartition: mysql.Message("It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning", nil), - ErrCantCreateHandlerFile: mysql.Message("Failed to create specific handler file", nil), - ErrBlobFieldInPartFunc: mysql.Message("A BLOB field is not allowed in partition function", nil), - ErrUniqueKeyNeedAllFieldsInPf: mysql.Message("A %-.192s must include all columns in the table's partitioning function", nil), - ErrNoParts: mysql.Message("Number of %-.64s = 0 is not an allowed value", []int{0}), - ErrPartitionMgmtOnNonpartitioned: mysql.Message("Partition management on a not partitioned table is not possible", nil), - ErrForeignKeyOnPartitioned: mysql.Message("Foreign key clause is not yet supported in conjunction with partitioning", nil), - ErrDropPartitionNonExistent: mysql.Message("Error in list of partitions to %-.64s", nil), - ErrDropLastPartition: mysql.Message("Cannot remove all partitions, use DROP TABLE instead", nil), - ErrCoalesceOnlyOnHashPartition: mysql.Message("COALESCE PARTITION can only be used on HASH/KEY partitions", nil), - ErrReorgHashOnlyOnSameNo: mysql.Message("REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers", nil), - ErrReorgNoParam: mysql.Message("REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs", nil), - ErrOnlyOnRangeListPartition: mysql.Message("%-.64s PARTITION can only be used on RANGE/LIST partitions", nil), - ErrAddPartitionSubpart: mysql.Message("Trying to Add partition(s) with wrong number of subpartitions", nil), - ErrAddPartitionNoNewPartition: mysql.Message("At least one partition must be added", nil), - ErrCoalescePartitionNoPartition: mysql.Message("At least one partition must be coalesced", nil), - ErrReorgPartitionNotExist: mysql.Message("More partitions to reorganize than there are partitions", nil), - ErrSameNamePartition: mysql.Message("Duplicate partition name %-.192s", nil), - ErrNoBinlog: mysql.Message("It is not allowed to shut off binlog on this command", nil), - ErrConsecutiveReorgPartitions: mysql.Message("When reorganizing a set of partitions they must be in consecutive order", nil), - ErrReorgOutsideRange: mysql.Message("Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range", nil), - ErrPartitionFunctionFailure: mysql.Message("Partition function not supported in this version for this handler", nil), - ErrPartState: mysql.Message("Partition state cannot be defined from CREATE/ALTER TABLE", nil), - ErrLimitedPartRange: mysql.Message("The %-.64s handler only supports 32 bit integers in VALUES", nil), - ErrPluginIsNotLoaded: mysql.Message("Plugin '%-.192s' is not loaded", nil), - ErrWrongValue: mysql.Message("Incorrect %-.32s value: '%-.128s'", []int{1}), - ErrNoPartitionForGivenValue: mysql.Message("Table has no partition for value %-.64s", []int{0}), - ErrFilegroupOptionOnlyOnce: mysql.Message("It is not allowed to specify %s more than once", nil), - ErrCreateFilegroupFailed: mysql.Message("Failed to create %s", nil), - ErrDropFilegroupFailed: mysql.Message("Failed to drop %s", nil), - ErrTablespaceAutoExtend: mysql.Message("The handler doesn't support autoextend of tablespaces", nil), - ErrWrongSizeNumber: mysql.Message("A size parameter was incorrectly specified, either number or on the form 10M", nil), - ErrSizeOverflow: mysql.Message("The size number was correct but we don't allow the digit part to be more than 2 billion", nil), - ErrAlterFilegroupFailed: mysql.Message("Failed to alter: %s", nil), - ErrBinlogRowLoggingFailed: mysql.Message("Writing one row to the row-based binary log failed", nil), - ErrBinlogRowWrongTableDef: mysql.Message("Table definition on master and slave does not match: %s", nil), - ErrBinlogRowRbrToSbr: mysql.Message("Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events", nil), - ErrEventAlreadyExists: mysql.Message("Event '%-.192s' already exists", nil), - ErrEventStoreFailed: mysql.Message("Failed to store event %s. Error code %d from storage engine.", nil), - ErrEventDoesNotExist: mysql.Message("Unknown event '%-.192s'", nil), - ErrEventCantAlter: mysql.Message("Failed to alter event '%-.192s'", nil), - ErrEventDropFailed: mysql.Message("Failed to drop %s", nil), - ErrEventIntervalNotPositiveOrTooBig: mysql.Message("INTERVAL is either not positive or too big", nil), - ErrEventEndsBeforeStarts: mysql.Message("ENDS is either invalid or before STARTS", nil), - ErrEventExecTimeInThePast: mysql.Message("Event execution time is in the past. Event has been disabled", nil), - ErrEventOpenTableFailed: mysql.Message("Failed to open mysql.event", nil), - ErrEventNeitherMExprNorMAt: mysql.Message("No datetime expression provided", nil), - ErrObsoleteColCountDoesntMatchCorrupted: mysql.Message("Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), - ErrObsoleteCannotLoadFromTable: mysql.Message("Cannot load from mysql.%s. The table is probably corrupted", nil), - ErrEventCannotDelete: mysql.Message("Failed to delete the event from mysql.event", nil), - ErrEventCompile: mysql.Message("Error during compilation of event's body", nil), - ErrEventSameName: mysql.Message("Same old and new event name", nil), - ErrEventDataTooLong: mysql.Message("Data for column '%s' too long", nil), - ErrDropIndexNeededInForeignKey: mysql.Message("Cannot drop index '%-.192s': needed in a foreign key constraint", nil), - ErrWarnDeprecatedSyntaxWithVer: mysql.Message("The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead", nil), - ErrCantWriteLockLogTable: mysql.Message("You can't write-lock a log table. Only read access is possible", nil), - ErrCantLockLogTable: mysql.Message("You can't use locks with log tables.", nil), - ErrForeignDuplicateKeyOldUnused: mysql.Message("Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry", nil), - ErrColCountDoesntMatchPleaseUpdate: mysql.Message("Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysqlUpgrade to fix this error.", nil), - ErrTempTablePreventsSwitchOutOfRbr: mysql.Message("Cannot switch out of the row-based binary log format when the session has open temporary tables", nil), - ErrStoredFunctionPreventsSwitchBinlogFormat: mysql.Message("Cannot change the binary logging format inside a stored function or trigger", nil), - ErrNdbCantSwitchBinlogFormat: mysql.Message("The NDB cluster engine does not support changing the binlog format on the fly yet", nil), - ErrPartitionNoTemporary: mysql.Message("Cannot create temporary table with partitions", nil), - ErrPartitionConstDomain: mysql.Message("Partition constant is out of partition function domain", nil), - ErrPartitionFunctionIsNotAllowed: mysql.Message("This partition function is not allowed", nil), - ErrDdlLog: mysql.Message("Error in DDL log", nil), - ErrNullInValuesLessThan: mysql.Message("Not allowed to use NULL value in VALUES LESS THAN", nil), - ErrWrongPartitionName: mysql.Message("Incorrect partition name", nil), - ErrCantChangeTxCharacteristics: mysql.Message("Transaction characteristics can't be changed while a transaction is in progress", nil), - ErrDupEntryAutoincrementCase: mysql.Message("ALTER TABLE causes autoIncrement resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'", nil), - ErrEventModifyQueue: mysql.Message("Internal scheduler error %d", nil), - ErrEventSetVar: mysql.Message("Error during starting/stopping of the scheduler. Error code %d", nil), - ErrPartitionMerge: mysql.Message("Engine cannot be used in partitioned tables", nil), - ErrCantActivateLog: mysql.Message("Cannot activate '%-.64s' log", nil), - ErrRbrNotAvailable: mysql.Message("The server was not built with row-based replication", nil), - ErrBase64Decode: mysql.Message("Decoding of base64 string failed", nil), - ErrEventRecursionForbidden: mysql.Message("Recursion of EVENT DDL statements is forbidden when body is present", nil), - ErrEventsDB: mysql.Message("Cannot proceed because system tables used by Event Scheduler were found damaged at server start", nil), - ErrOnlyIntegersAllowed: mysql.Message("Only integers allowed as number here", nil), - ErrUnsuportedLogEngine: mysql.Message("This storage engine cannot be used for log tables\"", nil), - ErrBadLogStatement: mysql.Message("You cannot '%s' a log table if logging is enabled", nil), - ErrCantRenameLogTable: mysql.Message("Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'", nil), - ErrWrongParamcountToNativeFct: mysql.Message("Incorrect parameter count in the call to native function '%-.192s'", nil), - ErrWrongParametersToNativeFct: mysql.Message("Incorrect parameters in the call to native function '%-.192s'", nil), - ErrWrongParametersToStoredFct: mysql.Message("Incorrect parameters in the call to stored function '%-.192s'", nil), - ErrNativeFctNameCollision: mysql.Message("This function '%-.192s' has the same name as a native function", nil), - ErrDupEntryWithKeyName: mysql.Message("Duplicate entry '%-.64s' for key '%-.192s'", nil), - ErrBinlogPurgeEmFile: mysql.Message("Too many files opened, please execute the command again", nil), - ErrEventCannotCreateInThePast: mysql.Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.", nil), - ErrEventCannotAlterInThePast: mysql.Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.", nil), - ErrSlaveIncident: mysql.Message("The incident %s occurred on the master. Message: %-.64s", nil), - ErrNoPartitionForGivenValueSilent: mysql.Message("Table has no partition for some existing values", nil), - ErrBinlogUnsafeStatement: mysql.Message("Unsafe statement written to the binary log using statement format since BINLOGFORMAT = STATEMENT. %s", nil), - ErrSlaveFatal: mysql.Message("Fatal : %s", nil), - ErrSlaveRelayLogReadFailure: mysql.Message("Relay log read failure: %s", nil), - ErrSlaveRelayLogWriteFailure: mysql.Message("Relay log write failure: %s", nil), - ErrSlaveCreateEventFailure: mysql.Message("Failed to create %s", nil), - ErrSlaveMasterComFailure: mysql.Message("Master command %s failed: %s", nil), - ErrBinlogLoggingImpossible: mysql.Message("Binary logging not possible. Message: %s", nil), - ErrViewNoCreationCtx: mysql.Message("View `%-.64s`.`%-.64s` has no creation context", nil), - ErrViewInvalidCreationCtx: mysql.Message("Creation context of view `%-.64s`.`%-.64s' is invalid", nil), - ErrSrInvalidCreationCtx: mysql.Message("Creation context of stored routine `%-.64s`.`%-.64s` is invalid", nil), - ErrTrgCorruptedFile: mysql.Message("Corrupted TRG file for table `%-.64s`.`%-.64s`", nil), - ErrTrgNoCreationCtx: mysql.Message("Triggers for table `%-.64s`.`%-.64s` have no creation context", nil), - ErrTrgInvalidCreationCtx: mysql.Message("Trigger creation context of table `%-.64s`.`%-.64s` is invalid", nil), - ErrEventInvalidCreationCtx: mysql.Message("Creation context of event `%-.64s`.`%-.64s` is invalid", nil), - ErrTrgCantOpenTable: mysql.Message("Cannot open table for trigger `%-.64s`.`%-.64s`", nil), - ErrCantCreateSroutine: mysql.Message("Cannot create stored routine `%-.64s`. Check warnings", nil), - ErrNeverUsed: mysql.Message("Ambiguous slave modes combination. %s", nil), - ErrNoFormatDescriptionEventBeforeBinlogStatement: mysql.Message("The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement.", nil), - ErrSlaveCorruptEvent: mysql.Message("Corrupted replication event was detected", nil), - ErrLoadDataInvalidColumn: mysql.Message("Invalid column reference (%-.64s) in LOAD DATA", nil), - ErrLogPurgeNoFile: mysql.Message("Being purged log %s was not found", nil), - ErrXaRbtimeout: mysql.Message("XARBTIMEOUT: Transaction branch was rolled back: took too long", nil), - ErrXaRbdeadlock: mysql.Message("XARBDEADLOCK: Transaction branch was rolled back: deadlock was detected", nil), - ErrNeedReprepare: mysql.Message("Prepared statement needs to be re-prepared", nil), - ErrDelayedNotSupported: mysql.Message("DELAYED option not supported for table '%-.192s'", nil), - WarnNoMasterInfo: mysql.Message("The master info structure does not exist", nil), - WarnOptionIgnored: mysql.Message("<%-.64s> option ignored", nil), - WarnPluginDeleteBuiltin: mysql.Message("Built-in plugins cannot be deleted", nil), - WarnPluginBusy: mysql.Message("Plugin is busy and will be uninstalled on shutdown", nil), - ErrVariableIsReadonly: mysql.Message("%s variable '%s' is read-only. Use SET %s to assign the value", nil), - ErrWarnEngineTransactionRollback: mysql.Message("Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted", nil), - ErrSlaveHeartbeatFailure: mysql.Message("Unexpected master's heartbeat data: %s", nil), - ErrSlaveHeartbeatValueOutOfRange: mysql.Message("The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds).", nil), - ErrNdbReplicationSchema: mysql.Message("Bad schema for mysql.ndbReplication table. Message: %-.64s", nil), - ErrConflictFnParse: mysql.Message("Error in parsing conflict function. Message: %-.64s", nil), - ErrExceptionsWrite: mysql.Message("Write to exceptions table failed. Message: %-.128s\"", nil), - ErrTooLongTableComment: mysql.Message("Comment for table '%-.64s' is too long (max = %d)", nil), - ErrTooLongFieldComment: mysql.Message("Comment for field '%-.64s' is too long (max = %d)", nil), - ErrFuncInexistentNameCollision: mysql.Message("FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual", nil), - ErrDatabaseName: mysql.Message("Database", nil), - ErrTableName: mysql.Message("Table", nil), - ErrPartitionName: mysql.Message("Partition", nil), - ErrSubpartitionName: mysql.Message("Subpartition", nil), - ErrTemporaryName: mysql.Message("Temporary", nil), - ErrRenamedName: mysql.Message("Renamed", nil), - ErrTooManyConcurrentTrxs: mysql.Message("Too many active concurrent transactions", nil), - WarnNonASCIISeparatorNotImplemented: mysql.Message("Non-ASCII separator arguments are not fully supported", nil), - ErrDebugSyncTimeout: mysql.Message("debug sync point wait timed out", nil), - ErrDebugSyncHitLimit: mysql.Message("debug sync point hit limit reached", nil), - ErrDupSignalSet: mysql.Message("Duplicate condition information item '%s'", nil), - ErrSignalWarn: mysql.Message("Unhandled user-defined warning condition", nil), - ErrSignalNotFound: mysql.Message("Unhandled user-defined not found condition", nil), - ErrSignalException: mysql.Message("Unhandled user-defined exception condition", nil), - ErrResignalWithoutActiveHandler: mysql.Message("RESIGNAL when handler not active", nil), - ErrSignalBadConditionType: mysql.Message("SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE", nil), - WarnCondItemTruncated: mysql.Message("Data truncated for condition item '%s'", nil), - ErrCondItemTooLong: mysql.Message("Data too long for condition item '%s'", nil), - ErrUnknownLocale: mysql.Message("Unknown locale: '%-.64s'", nil), - ErrSlaveIgnoreServerIDs: mysql.Message("The requested server id %d clashes with the slave startup option --replicate-same-server-id", nil), - ErrQueryCacheDisabled: mysql.Message("Query cache is disabled; restart the server with queryCacheType=1 to enable it", nil), - ErrSameNamePartitionField: mysql.Message("Duplicate partition field name '%-.192s'", nil), - ErrPartitionColumnList: mysql.Message("Inconsistency in usage of column lists for partitioning", nil), - ErrWrongTypeColumnValue: mysql.Message("Partition column values of incorrect type", nil), - ErrTooManyPartitionFuncFields: mysql.Message("Too many fields in '%-.192s'", nil), - ErrMaxvalueInValuesIn: mysql.Message("Cannot use MAXVALUE as value in VALUES IN", nil), - ErrTooManyValues: mysql.Message("Cannot have more than one value for this type of %-.64s partitioning", nil), - ErrRowSinglePartitionField: mysql.Message("Row expressions in VALUES IN only allowed for multi-field column partitioning", nil), - ErrFieldTypeNotAllowedAsPartitionField: mysql.Message("Field '%-.192s' is of a not allowed type for this type of partitioning", nil), - ErrPartitionFieldsTooLong: mysql.Message("The total length of the partitioning fields is too large", nil), - ErrBinlogRowEngineAndStmtEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved.", nil), - ErrBinlogRowModeAndStmtEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.", nil), - ErrBinlogUnsafeAndStmtEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOGFORMAT = MIXED. %s", nil), - ErrBinlogRowInjectionAndStmtEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.", nil), - ErrBinlogStmtModeAndRowEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s", nil), - ErrBinlogRowInjectionAndStmtMode: mysql.Message("Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOGFORMAT = STATEMENT.", nil), - ErrBinlogMultipleEnginesAndSelfLoggingEngine: mysql.Message("Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging.", nil), - ErrBinlogUnsafeLimit: mysql.Message("The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.", nil), - ErrBinlogUnsafeInsertDelayed: mysql.Message("The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted.", nil), - ErrBinlogUnsafeSystemTable: mysql.Message("The statement is unsafe because it uses the general log, slow query log, or performanceSchema table(s). This is unsafe because system tables may differ on slaves.", nil), - ErrBinlogUnsafeAutoincColumns: mysql.Message("Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTOINCREMENT column. Inserted values cannot be logged correctly.", nil), - ErrBinlogUnsafeUdf: mysql.Message("Statement is unsafe because it uses a UDF which may not return the same value on the slave.", nil), - ErrBinlogUnsafeSystemVariable: mysql.Message("Statement is unsafe because it uses a system variable that may have a different value on the slave.", nil), - ErrBinlogUnsafeSystemFunction: mysql.Message("Statement is unsafe because it uses a system function that may return a different value on the slave", nil), - ErrBinlogUnsafeNontransAfterTrans: mysql.Message("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.", nil), - ErrMessageAndStatement: mysql.Message("%s Statement: %s", nil), - ErrSlaveConversionFailed: mysql.Message("Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'", nil), - ErrSlaveCantCreateConversion: mysql.Message("Can't create conversion table for table '%-.192s.%-.192s'", nil), - ErrInsideTransactionPreventsSwitchBinlogFormat: mysql.Message("Cannot modify @@session.binlogFormat inside a transaction", nil), - ErrPathLength: mysql.Message("The path specified for %.64s is too long.", nil), - ErrWarnDeprecatedSyntaxNoReplacement: mysql.Message("%s is deprecated and will be removed in a future release.%s", nil), - ErrWrongNativeTableStructure: mysql.Message("Native table '%-.64s'.'%-.64s' has the wrong structure", nil), - ErrWrongPerfSchemaUsage: mysql.Message("Invalid performanceSchema usage.", nil), - ErrWarnISSkippedTable: mysql.Message("Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement", nil), - ErrInsideTransactionPreventsSwitchBinlogDirect: mysql.Message("Cannot modify @@session.binlogDirectNonTransactionalUpdates inside a transaction", nil), - ErrStoredFunctionPreventsSwitchBinlogDirect: mysql.Message("Cannot change the binlog direct flag inside a stored function or trigger", nil), - ErrSpatialMustHaveGeomCol: mysql.Message("A SPATIAL index may only contain a geometrical type column", nil), - ErrTooLongIndexComment: mysql.Message("Comment for index '%-.64s' is too long (max = %d)", nil), - ErrLockAborted: mysql.Message("Wait on a lock was aborted due to a pending exclusive lock", nil), - ErrDataOutOfRange: mysql.Message("%s value is out of range in '%s'", []int{1}), - ErrWrongSpvarTypeInLimit: mysql.Message("A variable of a non-integer based type in LIMIT clause", nil), - ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine: mysql.Message("Mixing self-logging and non-self-logging engines in a statement is unsafe.", nil), - ErrBinlogUnsafeMixedStatement: mysql.Message("Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.", nil), - ErrInsideTransactionPreventsSwitchSQLLogBin: mysql.Message("Cannot modify @@session.sqlLogBin inside a transaction", nil), - ErrStoredFunctionPreventsSwitchSQLLogBin: mysql.Message("Cannot change the sqlLogBin inside a stored function or trigger", nil), - ErrFailedReadFromParFile: mysql.Message("Failed to read from the .par file", nil), - ErrValuesIsNotIntType: mysql.Message("VALUES value for partition '%-.64s' must have type INT", nil), - ErrAccessDeniedNoPassword: mysql.Message("Access denied for user '%-.48s'@'%-.255s'", nil), - ErrSetPasswordAuthPlugin: mysql.Message("SET PASSWORD has no significance for user '%-.48s'@'%-.255s' as authentication plugin does not support it.", nil), - ErrGrantPluginUserExists: mysql.Message("GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists", nil), - ErrTruncateIllegalForeignKey: mysql.Message("Cannot truncate a table referenced in a foreign key constraint (%.192s)", nil), - ErrPluginIsPermanent: mysql.Message("Plugin '%s' is forcePlusPermanent and can not be unloaded", nil), - ErrSlaveHeartbeatValueOutOfRangeMin: mysql.Message("The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.", nil), - ErrSlaveHeartbeatValueOutOfRangeMax: mysql.Message("The requested value for the heartbeat period exceeds the value of `slaveNetTimeout' seconds. A sensible value for the period should be less than the timeout.", nil), - ErrStmtCacheFull: mysql.Message("Multi-row statements required more than 'maxBinlogStmtCacheSize' bytes of storage; increase this mysqld variable and try again", nil), - ErrMultiUpdateKeyConflict: mysql.Message("Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'.", nil), - ErrTableNeedsRebuild: mysql.Message("Table rebuild required. Please do \"ALTER TABLE `%-.32s` FORCE\" or dump/reload to fix it!", nil), - WarnOptionBelowLimit: mysql.Message("The value of '%s' should be no less than the value of '%s'", nil), - ErrIndexColumnTooLong: mysql.Message("Index column size too large. The maximum column size is %d bytes.", nil), - ErrErrorInTriggerBody: mysql.Message("Trigger '%-.64s' has an error in its body: '%-.256s'", nil), - ErrErrorInUnknownTriggerBody: mysql.Message("Unknown trigger has an error in its body: '%-.256s'", nil), - ErrIndexCorrupt: mysql.Message("Index %s is corrupted", nil), - ErrUndoRecordTooBig: mysql.Message("Undo log record is too big.", nil), - ErrBinlogUnsafeInsertIgnoreSelect: mysql.Message("INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeInsertSelectUpdate: mysql.Message("INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeReplaceSelect: mysql.Message("REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateIgnoreSelect: mysql.Message("CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateReplaceSelect: mysql.Message("CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeUpdateIgnore: mysql.Message("UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrPluginNoUninstall: mysql.Message("Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it.", nil), - ErrPluginNoInstall: mysql.Message("Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it.", nil), - ErrBinlogUnsafeWriteAutoincSelect: mysql.Message("Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateSelectAutoinc: mysql.Message("CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeInsertTwoKeys: mysql.Message("INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe", nil), - ErrTableInFkCheck: mysql.Message("Table is being used in foreign key check.", nil), - ErrUnsupportedEngine: mysql.Message("Storage engine '%s' does not support system tables. [%s.%s]", nil), - ErrBinlogUnsafeAutoincNotFirst: mysql.Message("INSERT into autoincrement field which is not the first part in the composed primary key is unsafe.", nil), - ErrCannotLoadFromTableV2: mysql.Message("Cannot load from %s.%s. The table is probably corrupted", nil), - ErrMasterDelayValueOutOfRange: mysql.Message("The requested value %d for the master delay exceeds the maximum %d", nil), - ErrOnlyFdAndRbrEventsAllowedInBinlogStatement: mysql.Message("Only FormatDescriptionLogEvent and row events are allowed in BINLOG statements (but %s was provided)", nil), - ErrPartitionExchangeDifferentOption: mysql.Message("Non matching attribute '%-.64s' between partition and table", nil), - ErrPartitionExchangePartTable: mysql.Message("Table to exchange with partition is partitioned: '%-.64s'", nil), - ErrPartitionExchangeTempTable: mysql.Message("Table to exchange with partition is temporary: '%-.64s'", nil), - ErrPartitionInsteadOfSubpartition: mysql.Message("Subpartitioned table, use subpartition instead of partition", nil), - ErrUnknownPartition: mysql.Message("Unknown partition '%-.64s' in table '%-.64s'", nil), - ErrTablesDifferentMetadata: mysql.Message("Tables have different definitions", nil), - ErrRowDoesNotMatchPartition: mysql.Message("Found a row that does not match the partition", nil), - ErrBinlogCacheSizeGreaterThanMax: mysql.Message("Option binlogCacheSize (%d) is greater than maxBinlogCacheSize (%d); setting binlogCacheSize equal to maxBinlogCacheSize.", nil), - ErrWarnIndexNotApplicable: mysql.Message("Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'", nil), - ErrPartitionExchangeForeignKey: mysql.Message("Table to exchange with partition has foreign key references: '%-.64s'", nil), - ErrNoSuchKeyValue: mysql.Message("Key value '%-.192s' was not found in table '%-.192s.%-.192s'", nil), - ErrRplInfoDataTooLong: mysql.Message("Data for column '%s' too long", nil), - ErrNetworkReadEventChecksumFailure: mysql.Message("Replication event checksum verification failed while reading from network.", nil), - ErrBinlogReadEventChecksumFailure: mysql.Message("Replication event checksum verification failed while reading from a log file.", nil), - ErrBinlogStmtCacheSizeGreaterThanMax: mysql.Message("Option binlogStmtCacheSize (%d) is greater than maxBinlogStmtCacheSize (%d); setting binlogStmtCacheSize equal to maxBinlogStmtCacheSize.", nil), - ErrCantUpdateTableInCreateTableSelect: mysql.Message("Can't update table '%-.192s' while '%-.192s' is being created.", nil), - ErrPartitionClauseOnNonpartitioned: mysql.Message("PARTITION () clause on non partitioned table", nil), - ErrRowDoesNotMatchGivenPartitionSet: mysql.Message("Found a row not matching the given partition set", nil), - ErrNoSuchPartitionunused: mysql.Message("partition '%-.64s' doesn't exist", nil), - ErrChangeRplInfoRepositoryFailure: mysql.Message("Failure while changing the type of replication repository: %s.", nil), - ErrWarningNotCompleteRollbackWithCreatedTempTable: mysql.Message("The creation of some temporary tables could not be rolled back.", nil), - ErrWarningNotCompleteRollbackWithDroppedTempTable: mysql.Message("Some temporary tables were dropped, but these operations could not be rolled back.", nil), - ErrMtsFeatureIsNotSupported: mysql.Message("%s is not supported in multi-threaded slave mode. %s", nil), - ErrMtsUpdatedDBsGreaterMax: mysql.Message("The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata.", nil), - ErrMtsCantParallel: mysql.Message("Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s.", nil), - ErrMtsInconsistentData: mysql.Message("%s", nil), - ErrFulltextNotSupportedWithPartitioning: mysql.Message("FULLTEXT index is not supported for partitioned tables.", nil), - ErrDaInvalidConditionNumber: mysql.Message("Invalid condition number", nil), - ErrInsecurePlainText: mysql.Message("Sending passwords in plain text without SSL/TLS is extremely insecure.", nil), - ErrInsecureChangeMaster: mysql.Message("Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.", nil), - ErrForeignDuplicateKeyWithChildInfo: mysql.Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'", nil), - ErrForeignDuplicateKeyWithoutChildInfo: mysql.Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table", nil), - ErrSQLthreadWithSecureSlave: mysql.Message("Setting authentication options is not possible when only the Slave SQL Thread is being started.", nil), - ErrTableHasNoFt: mysql.Message("The table does not have FULLTEXT index to support this query", nil), - ErrVariableNotSettableInSfOrTrigger: mysql.Message("The system variable %.200s cannot be set in stored functions or triggers.", nil), - ErrVariableNotSettableInTransaction: mysql.Message("The system variable %.200s cannot be set when there is an ongoing transaction.", nil), - ErrGtidNextIsNotInGtidNextList: mysql.Message("The system variable @@SESSION.GTIDNEXT has the value %.200s, which is not listed in @@SESSION.GTIDNEXTLIST.", nil), - ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull: mysql.Message("When @@SESSION.GTIDNEXTLIST == NULL, the system variable @@SESSION.GTIDNEXT cannot change inside a transaction.", nil), - ErrSetStatementCannotInvokeFunction: mysql.Message("The statement 'SET %.200s' cannot invoke a stored function.", nil), - ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull: mysql.Message("The system variable @@SESSION.GTIDNEXT cannot be 'AUTOMATIC' when @@SESSION.GTIDNEXTLIST is non-NULL.", nil), - ErrSkippingLoggedTransaction: mysql.Message("Skipping transaction %.200s because it has already been executed and logged.", nil), - ErrMalformedGtidSetSpecification: mysql.Message("Malformed GTID set specification '%.200s'.", nil), - ErrMalformedGtidSetEncoding: mysql.Message("Malformed GTID set encoding.", nil), - ErrMalformedGtidSpecification: mysql.Message("Malformed GTID specification '%.200s'.", nil), - ErrGnoExhausted: mysql.Message("Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new serverUuid.", nil), - ErrBadSlaveAutoPosition: mysql.Message("Parameters MASTERLOGFILE, MASTERLOGPOS, RELAYLOGFILE and RELAYLOGPOS cannot be set when MASTERAUTOPOSITION is active.", nil), - ErrAutoPositionRequiresGtidModeOn: mysql.Message("CHANGE MASTER TO MASTERAUTOPOSITION = 1 can only be executed when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet: mysql.Message("Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTIDNEXT != AUTOMATIC or @@SESSION.GTIDNEXTLIST != NULL.", nil), - ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn: mysql.Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP2 requires @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), - ErrGtidModeRequiresBinlog: mysql.Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP1 or UPGRADESTEP2 requires --log-bin and --log-slave-updates.", nil), - ErrCantSetGtidNextToGtidWhenGtidModeIsOff: mysql.Message("@@SESSION.GTIDNEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn: mysql.Message("@@SESSION.GTIDNEXT cannot be set to ANONYMOUS when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff: mysql.Message("@@SESSION.GTIDNEXTLIST cannot be set to a non-NULL value when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrFoundGtidEventWhenGtidModeIsOff: mysql.Message("Found a GtidLogEvent or PreviousGtidsLogEvent when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrGtidUnsafeNonTransactionalTable: mysql.Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.", nil), - ErrGtidUnsafeCreateSelect: mysql.Message("CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), - ErrGtidUnsafeCreateDropTemporaryTableInTransaction: mysql.Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.", nil), - ErrGtidModeCanOnlyChangeOneStepAtATime: mysql.Message("The value of @@GLOBAL.GTIDMODE can only change one step at a time: OFF <-> UPGRADESTEP1 <-> UPGRADESTEP2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions.", nil), - ErrMasterHasPurgedRequiredGtids: mysql.Message("The slave is connecting using CHANGE MASTER TO MASTERAUTOPOSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.", nil), - ErrCantSetGtidNextWhenOwningGtid: mysql.Message("@@SESSION.GTIDNEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK.", nil), - ErrUnknownExplainFormat: mysql.Message("Unknown EXPLAIN format name: '%s'", nil), - ErrCantExecuteInReadOnlyTransaction: mysql.Message("Cannot execute statement in a READ ONLY transaction.", nil), - ErrTooLongTablePartitionComment: mysql.Message("Comment for table partition '%-.64s' is too long (max = %d)", nil), - ErrSlaveConfiguration: mysql.Message("Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.", nil), - ErrInnodbFtLimit: mysql.Message("InnoDB presently supports one FULLTEXT index creation at a time", nil), - ErrInnodbNoFtTempTable: mysql.Message("Cannot create FULLTEXT index on temporary InnoDB table", nil), - ErrInnodbFtWrongDocidColumn: mysql.Message("Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), - ErrInnodbFtWrongDocidIndex: mysql.Message("Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), - ErrInnodbOnlineLogTooBig: mysql.Message("Creating index '%-.192s' required more than 'innodbOnlineAlterLogMaxSize' bytes of modification log. Please try again.", nil), - ErrUnknownAlterAlgorithm: mysql.Message("Unknown ALGORITHM '%s'", nil), - ErrUnknownAlterLock: mysql.Message("Unknown LOCK type '%s'", nil), - ErrMtsChangeMasterCantRunWithGaps: mysql.Message("CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL.", nil), - ErrMtsRecoveryFailure: mysql.Message("Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log.", nil), - ErrMtsResetWorkers: mysql.Message("Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log.", nil), - ErrColCountDoesntMatchCorruptedV2: mysql.Message("Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), - ErrSlaveSilentRetryTransaction: mysql.Message("Slave must silently retry current transaction", nil), - ErrDiscardFkChecksRunning: mysql.Message("There is a foreign key check running on table '%-.192s'. Cannot discard the table.", nil), - ErrTableSchemaMismatch: mysql.Message("Schema mismatch (%s)", nil), - ErrTableInSystemTablespace: mysql.Message("Table '%-.192s' in system tablespace", nil), - ErrIoRead: mysql.Message("IO Read : (%d, %s) %s", nil), - ErrIoWrite: mysql.Message("IO Write : (%d, %s) %s", nil), - ErrTablespaceMissing: mysql.Message("Tablespace is missing for table '%-.192s'", nil), - ErrTablespaceExists: mysql.Message("Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT.", nil), - ErrTablespaceDiscarded: mysql.Message("Tablespace has been discarded for table '%-.192s'", nil), - ErrInternal: mysql.Message("Internal : %s", nil), - ErrInnodbImport: mysql.Message("ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %d : '%s'", nil), - ErrInnodbIndexCorrupt: mysql.Message("Index corrupt: %s", nil), - ErrInvalidYearColumnLength: mysql.Message("Supports only YEAR or YEAR(4) column", nil), - ErrNotValidPassword: mysql.Message("Your password does not satisfy the current policy requirements (%s)", nil), - ErrMustChangePassword: mysql.Message("You must reset your password using ALTER USER statement before executing this statement", nil), - ErrFkNoIndexChild: mysql.Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the foreign table '%s'", nil), - ErrForeignKeyNoIndexInParent: mysql.Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the referenced table '%s'", nil), - ErrFkFailAddSystem: mysql.Message("Failed to add the foreign key constraint '%s' to system tables", nil), - ErrForeignKeyCannotOpenParent: mysql.Message("Failed to open the referenced table '%s'", nil), - ErrFkIncorrectOption: mysql.Message("Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'", nil), - ErrFkDupName: mysql.Message("Duplicate foreign key constraint name '%s'", nil), - ErrPasswordFormat: mysql.Message("The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.", nil), - ErrFkColumnCannotDrop: mysql.Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'", nil), - ErrFkColumnCannotDropChild: mysql.Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrForeignKeyColumnNotNull: mysql.Message("Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL", nil), - ErrDupIndex: mysql.Message("Duplicate index '%-.64s' defined on the table '%-.64s.%-.64s'. This is deprecated and will be disallowed in a future release.", nil), - ErrForeignKeyColumnCannotChange: mysql.Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'", nil), - ErrForeignKeyColumnCannotChangeChild: mysql.Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrFkCannotDeleteParent: mysql.Message("Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrMalformedPacket: mysql.Message("Malformed communication packet.", nil), - ErrReadOnlyMode: mysql.Message("Running in read-only mode", nil), - ErrGtidNextTypeUndefinedGroup: mysql.Message("When @@SESSION.GTIDNEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET @@SESSION.GTIDNEXT before a transaction and forgot to set @@SESSION.GTIDNEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current @@SESSION.GTIDNEXT is '%s'.", nil), - ErrVariableNotSettableInSp: mysql.Message("The system variable %.200s cannot be set in stored procedures.", nil), - ErrCantSetGtidPurgedWhenGtidModeIsOff: mysql.Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty: mysql.Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDEXECUTED is empty.", nil), - ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty: mysql.Message("@@GLOBAL.GTIDPURGED can only be set when there are no ongoing transactions (not even in other clients).", nil), - ErrGtidPurgedWasChanged: mysql.Message("@@GLOBAL.GTIDPURGED was changed from '%s' to '%s'.", nil), - ErrGtidExecutedWasChanged: mysql.Message("@@GLOBAL.GTIDEXECUTED was changed from '%s' to '%s'.", nil), - ErrBinlogStmtModeAndNoReplTables: mysql.Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT, and both replicated and non replicated tables are written to.", nil), - ErrAlterOperationNotSupported: mysql.Message("%s is not supported for this operation. Try %s.", nil), - ErrAlterOperationNotSupportedReason: mysql.Message("%s is not supported. Reason: %s. Try %s.", nil), - ErrAlterOperationNotSupportedReasonCopy: mysql.Message("COPY algorithm requires a lock", nil), - ErrAlterOperationNotSupportedReasonPartition: mysql.Message("Partition specific operations do not yet support LOCK/ALGORITHM", nil), - ErrAlterOperationNotSupportedReasonFkRename: mysql.Message("Columns participating in a foreign key are renamed", nil), - ErrAlterOperationNotSupportedReasonColumnType: mysql.Message("Cannot change column type INPLACE", nil), - ErrAlterOperationNotSupportedReasonFkCheck: mysql.Message("Adding foreign keys needs foreignKeyChecks=OFF", nil), - ErrAlterOperationNotSupportedReasonIgnore: mysql.Message("Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows", nil), - ErrAlterOperationNotSupportedReasonNopk: mysql.Message("Dropping a primary key is not allowed without also adding a new primary key", nil), - ErrAlterOperationNotSupportedReasonAutoinc: mysql.Message("Adding an auto-increment column requires a lock", nil), - ErrAlterOperationNotSupportedReasonHiddenFts: mysql.Message("Cannot replace hidden FTSDOCID with a user-visible one", nil), - ErrAlterOperationNotSupportedReasonChangeFts: mysql.Message("Cannot drop or rename FTSDOCID", nil), - ErrAlterOperationNotSupportedReasonFts: mysql.Message("Fulltext index creation requires a lock", nil), - ErrSQLSlaveSkipCounterNotSettableInGtidMode: mysql.Message("sqlSlaveSkipCounter can not be set when the server is running with @@GLOBAL.GTIDMODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction", nil), - ErrDupUnknownInIndex: mysql.Message("Duplicate entry for key '%-.192s'", nil), - ErrIdentCausesTooLongPath: mysql.Message("Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'.", nil), - ErrAlterOperationNotSupportedReasonNotNull: mysql.Message("cannot silently convert NULL values, as required in this SQLMODE", nil), - ErrMustChangePasswordLogin: mysql.Message("Your password has expired. To log in you must change it using a client that supports expired passwords.", nil), - ErrRowInWrongPartition: mysql.Message("Found a row in wrong partition %s", []int{0}), - ErrGeneratedColumnFunctionIsNotAllowed: mysql.Message("Expression of generated column '%s' contains a disallowed function.", nil), - ErrGeneratedColumnRowValueIsNotAllowed: mysql.Message("Expression of generated column '%s' cannot refer to a row value", nil), - ErrDefValGeneratedNamedFunctionIsNotAllowed: mysql.Message("Default value expression of column '%s' contains a disallowed function: `%s`.", nil), - ErrUnsupportedAlterInplaceOnVirtualColumn: mysql.Message("INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions.", nil), - ErrWrongFKOptionForGeneratedColumn: mysql.Message("Cannot define foreign key with %s clause on a generated column.", nil), - ErrBadGeneratedColumn: mysql.Message("The value specified for generated column '%s' in table '%s' is not allowed.", nil), - ErrUnsupportedOnGeneratedColumn: mysql.Message("'%s' is not supported for generated columns.", nil), - ErrGeneratedColumnNonPrior: mysql.Message("Generated column can refer only to generated columns defined prior to it.", nil), - ErrDependentByGeneratedColumn: mysql.Message("Column '%s' has a generated column dependency.", nil), - ErrGeneratedColumnRefAutoInc: mysql.Message("Generated column '%s' cannot refer to auto-increment column.", nil), - ErrAccountHasBeenLocked: mysql.Message("Access denied for user '%s'@'%s'. Account is locked.", nil), - ErUserAccessDeniedForUserAccountBlockedByPasswordLock: mysql.Message("Access denied for user '%s'@'%s'. Account is blocked for %s day(s) (%s day(s) remaining) due to %d consecutive failed logins.", nil), - ErrWarnConflictingHint: mysql.Message("Hint %s is ignored as conflicting/duplicated.", nil), - ErrUnresolvedHintName: mysql.Message("Unresolved name '%s' for %s hint", nil), - ErrForeignKeyCascadeDepthExceeded: mysql.Message("Foreign key cascade delete/update exceeds max depth of %v.", nil), - ErrInvalidFieldSize: mysql.Message("Invalid size for column '%s'.", nil), - ErrPasswordExpireAnonymousUser: mysql.Message("The password for anonymous user cannot be expired.", nil), - ErrInvalidArgumentForLogarithm: mysql.Message("Invalid argument for logarithm", nil), - ErrAggregateOrderNonAggQuery: mysql.Message("Expression #%d of ORDER BY contains aggregate function and applies to the result of a non-aggregated query", nil), - ErrIncorrectType: mysql.Message("Incorrect type for argument %s in function %s.", nil), - ErrFieldInOrderNotSelect: mysql.Message("Expression #%d of ORDER BY clause is not in SELECT list, references column '%s' which is not in SELECT list; this is incompatible with %s", nil), - ErrAggregateInOrderNotSelect: mysql.Message("Expression #%d of ORDER BY clause is not in SELECT list, contains aggregate function; this is incompatible with %s", nil), - ErrInvalidJSONData: mysql.Message("Invalid JSON data provided to function %s: %s", nil), - ErrInvalidJSONText: mysql.Message("Invalid JSON text: %-.192s", []int{0}), - ErrInvalidJSONTextInParam: mysql.Message("Invalid JSON text in argument %d to function %s: \"%s\" at position %d.", nil), - ErrInvalidJSONPath: mysql.Message("Invalid JSON path expression. The error is around character position %d.", []int{0}), - ErrInvalidJSONCharset: mysql.Message("Cannot create a JSON value from a string with CHARACTER SET '%s'.", nil), - ErrInvalidTypeForJSON: mysql.Message("Invalid data type for JSON data in argument %d to function %s; a JSON string or JSON type is required.", nil), - ErrInvalidJSONPathMultipleSelection: mysql.Message("In this situation, path expressions may not contain the * and ** tokens or an array range.", nil), - ErrInvalidJSONContainsPathType: mysql.Message("The second argument can only be either 'one' or 'all'.", nil), - ErrJSONUsedAsKey: mysql.Message("JSON column '%-.192s' cannot be used in key specification.", nil), - ErrJSONDocumentTooDeep: mysql.Message("The JSON document exceeds the maximum depth.", nil), - ErrJSONDocumentNULLKey: mysql.Message("JSON documents may not contain NULL member names.", nil), - ErrSecureTransportRequired: mysql.Message("Connections using insecure transport are prohibited while --require_secure_transport=ON.", nil), - ErrBadUser: mysql.Message("User %s does not exist.", nil), - ErrUserAlreadyExists: mysql.Message("User %s already exists.", nil), - ErrInvalidJSONPathArrayCell: mysql.Message("A path expression is not a path to a cell in an array.", nil), - ErrInvalidEncryptionOption: mysql.Message("Invalid encryption option.", nil), - ErrTooLongValueForType: mysql.Message("Too long enumeration/set value for column %s.", nil), - ErrPKIndexCantBeInvisible: mysql.Message("A primary key index cannot be invisible", nil), - ErrWindowNoSuchWindow: mysql.Message("Window name '%s' is not defined.", nil), - ErrWindowCircularityInWindowGraph: mysql.Message("There is a circularity in the window dependency graph.", nil), - ErrWindowNoChildPartitioning: mysql.Message("A window which depends on another cannot define partitioning.", nil), - ErrWindowNoInherentFrame: mysql.Message("Window '%s' has a frame definition, so cannot be referenced by another window.", nil), - ErrWindowNoRedefineOrderBy: mysql.Message("Window '%s' cannot inherit '%s' since both contain an ORDER BY clause.", nil), - ErrWindowFrameStartIllegal: mysql.Message("Window '%s': frame start cannot be UNBOUNDED FOLLOWING.", nil), - ErrWindowFrameEndIllegal: mysql.Message("Window '%s': frame end cannot be UNBOUNDED PRECEDING.", nil), - ErrWindowFrameIllegal: mysql.Message("Window '%s': frame start or end is negative, NULL or of non-integral type", nil), - ErrWindowRangeFrameOrderType: mysql.Message("Window '%s' with RANGE N PRECEDING/FOLLOWING frame requires exactly one ORDER BY expression, of numeric or temporal type", nil), - ErrWindowRangeFrameTemporalType: mysql.Message("Window '%s' with RANGE frame has ORDER BY expression of datetime type. Only INTERVAL bound value allowed.", nil), - ErrWindowRangeFrameNumericType: mysql.Message("Window '%s' with RANGE frame has ORDER BY expression of numeric type, INTERVAL bound value not allowed.", nil), - ErrWindowRangeBoundNotConstant: mysql.Message("Window '%s' has a non-constant frame bound.", nil), - ErrWindowDuplicateName: mysql.Message("Window '%s' is defined twice.", nil), - ErrWindowIllegalOrderBy: mysql.Message("Window '%s': ORDER BY or PARTITION BY uses legacy position indication which is not supported, use expression.", nil), - ErrWindowInvalidWindowFuncUse: mysql.Message("You cannot use the window function '%s' in this context.'", nil), - ErrWindowInvalidWindowFuncAliasUse: mysql.Message("You cannot use the alias '%s' of an expression containing a window function in this context.'", nil), - ErrWindowNestedWindowFuncUseInWindowSpec: mysql.Message("You cannot nest a window function in the specification of window '%s'.", nil), - ErrWindowRowsIntervalUse: mysql.Message("Window '%s': INTERVAL can only be used with RANGE frames.", nil), - ErrWindowNoGroupOrderUnused: mysql.Message("ASC or DESC with GROUP BY isn't allowed with window functions; put ASC or DESC in ORDER BY", nil), - ErrWindowExplainJSON: mysql.Message("To get information about window functions use EXPLAIN FORMAT=JSON", nil), - ErrWindowFunctionIgnoresFrame: mysql.Message("Window function '%s' ignores the frame clause of window '%s' and aggregates over the whole partition", nil), - ErrInvalidNumberOfArgs: mysql.Message("Too many arguments for function %s; maximum allowed is %d", nil), - ErrFieldInGroupingNotGroupBy: mysql.Message("Argument %s of GROUPING function is not in GROUP BY", nil), - ErrRoleNotGranted: mysql.Message("%s is not granted to %s", nil), - ErrMaxExecTimeExceeded: mysql.Message("Query execution was interrupted, maximum statement execution time exceeded", nil), - ErrLockAcquireFailAndNoWaitSet: mysql.Message("Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set.", nil), - ErrNotHintUpdatable: mysql.Message("Variable '%s' might not be affected by SET_VAR hint.", nil), - ErrExistsInHistoryPassword: mysql.Message("Cannot use these credentials for '%s@%s' because they contradict the password history policy.", nil), - ErrInvalidDefaultUTF8MB4Collation: mysql.Message("Invalid default collation %s: utf8mb4_0900_ai_ci or utf8mb4_general_ci or utf8mb4_bin expected", nil), - ErrForeignKeyCannotDropParent: mysql.Message("Cannot drop table '%s' referenced by a foreign key constraint '%s' on table '%s'.", nil), - ErrForeignKeyCannotUseVirtualColumn: mysql.Message("Foreign key '%s' uses virtual column '%s' which is not supported.", nil), - ErrForeignKeyNoColumnInParent: mysql.Message("Failed to add the foreign key constraint. Missing column '%s' for constraint '%s' in the referenced table '%s'", nil), - ErrDataTruncatedFunctionalIndex: mysql.Message("Data truncated for expression index '%s' at row %d", nil), - ErrDataOutOfRangeFunctionalIndex: mysql.Message("Value is out of range for expression index '%s' at row %d", nil), - ErrFunctionalIndexOnJSONOrGeometryFunction: mysql.Message("Cannot create an expression index on a function that returns a JSON or GEOMETRY value", nil), - ErrFunctionalIndexRefAutoIncrement: mysql.Message("Expression index '%s' cannot refer to an auto-increment column", nil), - ErrCannotDropColumnFunctionalIndex: mysql.Message("Cannot drop column '%s' because it is used by an expression index. In order to drop the column, you must remove the expression index", nil), - ErrFunctionalIndexPrimaryKey: mysql.Message("The primary key cannot be an expression index", nil), - ErrFunctionalIndexOnBlob: mysql.Message("Cannot create an expression index on an expression that returns a BLOB or TEXT. Please consider using CAST", nil), - ErrFunctionalIndexFunctionIsNotAllowed: mysql.Message("Expression of expression index '%s' contains a disallowed function", nil), - ErrFulltextFunctionalIndex: mysql.Message("Fulltext expression index is not supported", nil), - ErrSpatialFunctionalIndex: mysql.Message("Spatial expression index is not supported", nil), - ErrWrongKeyColumnFunctionalIndex: mysql.Message("The used storage engine cannot index the expression '%s'", nil), - ErrFunctionalIndexOnField: mysql.Message("Expression index on a column is not supported. Consider using a regular index instead", nil), - ErrFKIncompatibleColumns: mysql.Message("Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.", nil), - ErrFunctionalIndexRowValueIsNotAllowed: mysql.Message("Expression of expression index '%s' cannot refer to a row value", nil), - ErrNonBooleanExprForCheckConstraint: mysql.Message("An expression of non-boolean type specified to a check constraint '%s'.", nil), - ErrColumnCheckConstraintReferencesOtherColumn: mysql.Message("Column check constraint '%s' references other column.", nil), - ErrCheckConstraintNamedFunctionIsNotAllowed: mysql.Message("An expression of a check constraint '%s' contains disallowed function: %s.", nil), - ErrCheckConstraintFunctionIsNotAllowed: mysql.Message("An expression of a check constraint '%s' contains disallowed function.", nil), - ErrCheckConstraintVariables: mysql.Message("An expression of a check constraint '%s' cannot refer to a user or system variable.", nil), - ErrCheckConstraintRefersAutoIncrementColumn: mysql.Message("Check constraint '%s' cannot refer to an auto-increment column.", nil), - ErrCheckConstraintViolated: mysql.Message("Check constraint '%s' is violated.", nil), - ErrTableCheckConstraintReferUnknown: mysql.Message("Check constraint '%s' refers to non-existing column '%s'.", nil), - ErrCheckConstraintDupName: mysql.Message("Duplicate check constraint name '%s'.", nil), - ErrCheckConstraintClauseUsingFKReferActionColumn: mysql.Message("Column '%s' cannot be used in a check constraint '%s': needed in a foreign key constraint referential action.", nil), - ErrDependentByFunctionalIndex: mysql.Message("Column '%s' has an expression index dependency and cannot be dropped or renamed", nil), - ErrDependentByPartitionFunctional: mysql.Message("Column '%s' has a partitioning function dependency and cannot be dropped or renamed", nil), - ErrCannotConvertString: mysql.Message("Cannot convert string '%.64s' from %s to %s", nil), - ErrInvalidJSONType: mysql.Message("Invalid JSON type in argument %d to function %s; an %s is required.", nil), - ErrInvalidJSONValueForFuncIndex: mysql.Message("Invalid JSON value for CAST for expression index '%s'", nil), - ErrJSONValueOutOfRangeForFuncIndex: mysql.Message("Out of range JSON value for CAST for expression index '%s'", nil), - ErrFunctionalIndexDataIsTooLong: mysql.Message("Data too long for expression index '%s'", nil), - ErrFunctionalIndexNotApplicable: mysql.Message("Cannot use expression index '%s' due to type or collation conversion", nil), - ErrUnsupportedConstraintCheck: mysql.Message("%s is not supported", nil), - ErrDynamicPrivilegeNotRegistered: mysql.Message("Dynamic privilege '%s' is not registered with the server.", nil), - ErrIllegalPrivilegeLevel: mysql.Message("Illegal privilege level specified for %s", nil), - ErrCTERecursiveRequiresUnion: mysql.Message("Recursive Common Table Expression '%s' should contain a UNION", nil), - ErrCTERecursiveRequiresNonRecursiveFirst: mysql.Message("Recursive Common Table Expression '%s' should have one or more non-recursive query blocks followed by one or more recursive ones", nil), - ErrCTERecursiveForbidsAggregation: mysql.Message("Recursive Common Table Expression '%s' can contain neither aggregation nor window functions in recursive query block", nil), - ErrCTERecursiveForbiddenJoinOrder: mysql.Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints", nil), - ErrInvalidRequiresSingleReference: mysql.Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must be referenced only once, and not in any subquery", nil), - ErrCTEMaxRecursionDepth: mysql.Message("Recursive query aborted after %d iterations. Try increasing @@cte_max_recursion_depth to a larger value", nil), - ErrTableWithoutPrimaryKey: mysql.Message("Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.", nil), - ErrConstraintNotFound: mysql.Message("Constraint '%s' does not exist.", nil), - ErrDependentByCheckConstraint: mysql.Message("Check constraint '%s' uses column '%s', hence column cannot be dropped or renamed.", nil), - ErrJSONInBooleanContext: mysql.Message("Evaluating a JSON value in SQL boolean context does an implicit comparison against JSON integer 0; if this is not what you want, consider converting JSON to a SQL numeric type with JSON_VALUE RETURNING", nil), +var MySQLErrName = map[uint16]*ErrMessage{ + ErrHashchk: Message("hashchk", nil), + ErrNisamchk: Message("isamchk", nil), + ErrNo: Message("NO", nil), + ErrYes: Message("YES", nil), + ErrCantCreateFile: Message("Can't create file '%-.200s' (errno: %d - %s)", nil), + ErrCantCreateTable: Message("Can't create table '%-.200s' (errno: %d)", nil), + ErrCantCreateDB: Message("Can't create database '%-.192s' (errno: %d)", nil), + ErrDBCreateExists: Message("Can't create database '%-.192s'; database exists", nil), + ErrDBDropExists: Message("Can't drop database '%-.192s'; database doesn't exist", nil), + ErrDBDropDelete: Message("Error dropping database (can't delete '%-.192s', errno: %d)", nil), + ErrDBDropRmdir: Message("Error dropping database (can't rmdir '%-.192s', errno: %d)", nil), + ErrCantDeleteFile: Message("Error on delete of '%-.192s' (errno: %d - %s)", nil), + ErrCantFindSystemRec: Message("Can't read record in system table", nil), + ErrCantGetStat: Message("Can't get status of '%-.200s' (errno: %d - %s)", nil), + ErrCantGetWd: Message("Can't get working directory (errno: %d - %s)", nil), + ErrCantLock: Message("Can't lock file (errno: %d - %s)", nil), + ErrCantOpenFile: Message("Can't open file: '%-.200s' (errno: %d - %s)", nil), + ErrFileNotFound: Message("Can't find file: '%-.200s' (errno: %d - %s)", nil), + ErrCantReadDir: Message("Can't read dir of '%-.192s' (errno: %d - %s)", nil), + ErrCantSetWd: Message("Can't change dir to '%-.192s' (errno: %d - %s)", nil), + ErrCheckread: Message("Record has changed since last read in table '%-.192s'", nil), + ErrDiskFull: Message("Disk full (%s); waiting for someone to free some space... (errno: %d - %s)", nil), + ErrDupKey: Message("Can't write; duplicate key in table '%-.192s'", nil), + ErrErrorOnClose: Message("Error on close of '%-.192s' (errno: %d - %s)", nil), + ErrErrorOnRead: Message("Error reading file '%-.200s' (errno: %d - %s)", nil), + ErrErrorOnRename: Message("Error on rename of '%-.210s' to '%-.210s' (errno: %d - %s)", nil), + ErrErrorOnWrite: Message("Error writing file '%-.200s' (errno: %d - %s)", nil), + ErrFileUsed: Message("'%-.192s' is locked against change", nil), + ErrFilsortAbort: Message("Sort aborted", nil), + ErrFormNotFound: Message("View '%-.192s' doesn't exist for '%-.192s'", nil), + ErrGetErrno: Message("Got error %d from storage engine", nil), + ErrIllegalHa: Message("Table storage engine for '%-.192s' doesn't have this option", nil), + ErrKeyNotFound: Message("Can't find record in '%-.192s'", nil), + ErrNotFormFile: Message("Incorrect information in file: '%-.200s'", nil), + ErrNotKeyFile: Message("Incorrect key file for table '%-.200s'; try to repair it", nil), + ErrOldKeyFile: Message("Old key file for table '%-.192s'; repair it!", nil), + ErrOpenAsReadonly: Message("Table '%-.192s' is read only", nil), + ErrOutofMemory: Message("Out of memory; restart server and try again (needed %d bytes)", nil), + ErrOutOfSortMemory: Message("Out of sort memory, consider increasing server sort buffer size", nil), + ErrUnexpectedEOF: Message("Unexpected EOF found when reading file '%-.192s' (errno: %d - %s)", nil), + ErrConCount: Message("Too many connections", nil), + ErrOutOfResources: Message("Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", nil), + ErrBadHost: Message("Can't get hostname for your address", nil), + ErrHandshake: Message("Bad handshake", nil), + ErrDBaccessDenied: Message("Access denied for user '%-.48s'@'%-.255s' to database '%-.192s'", nil), + ErrAccessDenied: Message("Access denied for user '%-.48s'@'%-.255s' (using password: %s)", nil), + ErrNoDB: Message("No database selected", nil), + ErrUnknownCom: Message("Unknown command", nil), + ErrBadNull: Message("Column '%-.192s' cannot be null", nil), + ErrBadDB: Message("Unknown database '%-.192s'", nil), + ErrTableExists: Message("Table '%-.192s' already exists", nil), + ErrBadTable: Message("Unknown table '%-.100s'", nil), + ErrNonUniq: Message("Column '%-.192s' in %-.192s is ambiguous", nil), + ErrServerShutdown: Message("Server shutdown in progress", nil), + ErrBadField: Message("Unknown column '%-.192s' in '%-.192s'", nil), + ErrFieldNotInGroupBy: Message("Expression #%d of %s is not in GROUP BY clause and contains nonaggregated column '%s' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by", nil), + ErrWrongGroupField: Message("Can't group on '%-.192s'", nil), + ErrWrongSumSelect: Message("Statement has sum functions and columns in same statement", nil), + ErrWrongValueCount: Message("Column count doesn't match value count", nil), + ErrTooLongIdent: Message("Identifier name '%-.100s' is too long", nil), + ErrDupFieldName: Message("Duplicate column name '%-.192s'", nil), + ErrDupKeyName: Message("Duplicate key name '%-.192s'", nil), + ErrDupEntry: Message("Duplicate entry '%-.64s' for key '%-.192s'", []int{0}), + ErrWrongFieldSpec: Message("Incorrect column specifier for column '%-.192s'", nil), + ErrParse: Message("%s %s", nil), + ErrEmptyQuery: Message("Query was empty", nil), + ErrNonuniqTable: Message("Not unique table/alias: '%-.192s'", nil), + ErrInvalidDefault: Message("Invalid default value for '%-.192s'", nil), + ErrMultiplePriKey: Message("Multiple primary key defined", nil), + ErrTooManyKeys: Message("Too many keys specified; max %d keys allowed", nil), + ErrTooManyKeyParts: Message("Too many key parts specified; max %d parts allowed", nil), + ErrTooLongKey: Message("Specified key was too long (%d bytes); max key length is %d bytes", nil), + ErrKeyColumnDoesNotExits: Message("Key column '%-.192s' doesn't exist in table", nil), + ErrBlobUsedAsKey: Message("BLOB column '%-.192s' can't be used in key specification with the used table type", nil), + ErrJSONVacuousPath: Message("The path expression '$' is not allowed in this context.", nil), + ErrJSONBadOneOrAllArg: Message("The oneOrAll argument to %s may take these values: 'one' or 'all'.", nil), + ErrTooBigFieldlength: Message("Column length too big for column '%-.192s' (max = %d); use BLOB or TEXT instead", nil), + ErrWrongAutoKey: Message("Incorrect table definition; there can be only one auto column and it must be defined as a key", nil), + ErrReady: Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d", nil), + ErrNormalShutdown: Message("%s: Normal shutdown\n", nil), + ErrGotSignal: Message("%s: Got signal %d. Aborting!\n", nil), + ErrShutdownComplete: Message("%s: Shutdown complete\n", nil), + ErrForcingClose: Message("%s: Forcing close of thread %d user: '%-.48s'\n", nil), + ErrIpsock: Message("Can't create IP socket", nil), + ErrNoSuchIndex: Message("Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table", nil), + ErrWrongFieldTerminators: Message("Field separator argument is not what is expected; check the manual", nil), + ErrBlobsAndNoTerminated: Message("You can't use fixed rowlength with BLOBs; please use 'fields terminated by'", nil), + ErrTextFileNotReadable: Message("The file '%-.128s' must be in the database directory or be readable by all", nil), + ErrFileExists: Message("File '%-.200s' already exists", nil), + ErrLoadInfo: Message("Records: %d Deleted: %d Skipped: %d Warnings: %d", nil), + ErrAlterInfo: Message("Records: %d Duplicates: %d", nil), + ErrWrongSubKey: Message("Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys", nil), + ErrCantRemoveAllFields: Message("You can't delete all columns with ALTER TABLE; use DROP TABLE instead", nil), + ErrCantDropFieldOrKey: Message("Can't DROP '%-.192s'; check that column/key exists", nil), + ErrInsertInfo: Message("Records: %d Duplicates: %d Warnings: %d", nil), + ErrUpdateTableUsed: Message("You can't specify target table '%-.192s' for update in FROM clause", nil), + ErrNoSuchThread: Message("Unknown thread id: %d", nil), + ErrKillDenied: Message("You are not owner of thread %d", nil), + ErrNoTablesUsed: Message("No tables used", nil), + ErrTooBigSet: Message("Too many strings for column %-.192s and SET", nil), + ErrNoUniqueLogFile: Message("Can't generate a unique log-filename %-.200s.(1-999)\n", nil), + ErrTableNotLockedForWrite: Message("Table '%-.192s' was locked with a READ lock and can't be updated", nil), + ErrTableNotLocked: Message("Table '%-.192s' was not locked with LOCK TABLES", nil), + ErrBlobCantHaveDefault: Message("BLOB/TEXT/JSON column '%-.192s' can't have a default value", nil), + ErrWrongDBName: Message("Incorrect database name '%-.100s'", nil), + ErrWrongTableName: Message("Incorrect table name '%-.100s'", nil), + ErrTooBigSelect: Message("The SELECT would examine more than MAXJOINSIZE rows; check your WHERE and use SET SQLBIGSELECTS=1 or SET MAXJOINSIZE=# if the SELECT is okay", nil), + ErrUnknown: Message("Unknown error", nil), + ErrUnknownProcedure: Message("Unknown procedure '%-.192s'", nil), + ErrWrongParamcountToProcedure: Message("Incorrect parameter count to procedure '%-.192s'", nil), + ErrWrongParametersToProcedure: Message("Incorrect parameters to procedure '%-.192s'", nil), + ErrUnknownTable: Message("Unknown table '%-.192s' in %-.32s", nil), + ErrFieldSpecifiedTwice: Message("Column '%-.192s' specified twice", nil), + ErrInvalidGroupFuncUse: Message("Invalid use of group function", nil), + ErrUnsupportedExtension: Message("Table '%-.192s' uses an extension that doesn't exist in this MySQL version", nil), + ErrTableMustHaveColumns: Message("A table must have at least 1 column", nil), + ErrRecordFileFull: Message("The table '%-.192s' is full", nil), + ErrUnknownCharacterSet: Message("Unknown character set: '%-.64s'", nil), + ErrTooManyTables: Message("Too many tables; MySQL can only use %d tables in a join", nil), + ErrTooManyFields: Message("Too many columns", nil), + ErrTooBigRowsize: Message("Row size too large. The maximum row size for the used table type, not counting BLOBs, is %d. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs", nil), + ErrStackOverrun: Message("Thread stack overrun: Used: %d of a %d stack. Use 'mysqld --threadStack=#' to specify a bigger stack if needed", nil), + ErrWrongOuterJoin: Message("Cross dependency found in OUTER JOIN; examine your ON conditions", nil), + ErrNullColumnInIndex: Message("Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler", nil), + ErrCantFindUdf: Message("Can't load function '%-.192s'", nil), + ErrCantInitializeUdf: Message("Can't initialize function '%-.192s'; %-.80s", nil), + ErrUdfNoPaths: Message("No paths allowed for shared library", nil), + ErrUdfExists: Message("Function '%-.192s' already exists", nil), + ErrCantOpenLibrary: Message("Can't open shared library '%-.192s' (errno: %d %-.128s)", nil), + ErrCantFindDlEntry: Message("Can't find symbol '%-.128s' in library", nil), + ErrFunctionNotDefined: Message("Function '%-.192s' is not defined", nil), + ErrHostIsBlocked: Message("Host '%-.255s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", nil), + ErrHostNotPrivileged: Message("Host '%-.255s' is not allowed to connect to this MySQL server", nil), + ErrPasswordAnonymousUser: Message("You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", nil), + ErrPasswordNotAllowed: Message("You must have privileges to update tables in the mysql database to be able to change passwords for others", nil), + ErrPasswordNoMatch: Message("Can't find any matching row in the user table", nil), + ErrUpdateInfo: Message("Rows matched: %d Changed: %d Warnings: %d", nil), + ErrCantCreateThread: Message("Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", nil), + ErrWrongValueCountOnRow: Message("Column count doesn't match value count at row %d", nil), + ErrCantReopenTable: Message("Can't reopen table: '%-.192s'", nil), + ErrInvalidUseOfNull: Message("Invalid use of NULL value", nil), + ErrRegexp: Message("Got error '%-.64s' from regexp", nil), + ErrMixOfGroupFuncAndFields: Message("Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", nil), + ErrNonexistingGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.255s'", nil), + ErrTableaccessDenied: Message("%-.128s command denied to user '%-.48s'@'%-.255s' for table '%-.64s'", nil), + ErrColumnaccessDenied: Message("%-.16s command denied to user '%-.48s'@'%-.255s' for column '%-.192s' in table '%-.192s'", nil), + ErrIllegalGrantForTable: Message("Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", nil), + ErrGrantWrongHostOrUser: Message("The host or user argument to GRANT is too long", nil), + ErrNoSuchTable: Message("Table '%-.192s.%-.192s' doesn't exist", nil), + ErrNonexistingTableGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.255s' on table '%-.192s'", nil), + ErrNotAllowedCommand: Message("The used command is not allowed with this MySQL version", nil), + ErrSyntax: Message("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use", nil), + ErrDelayedCantChangeLock: Message("Delayed insert thread couldn't get requested lock for table %-.192s", nil), + ErrTooManyDelayedThreads: Message("Too many delayed threads in use", nil), + ErrAbortingConnection: Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' (%-.64s)", nil), + ErrNetPacketTooLarge: Message("Got a packet bigger than 'max_allowed_packet' bytes", nil), + ErrNetReadErrorFromPipe: Message("Got a read error from the connection pipe", nil), + ErrNetFcntl: Message("Got an error from fcntl()", nil), + ErrNetPacketsOutOfOrder: Message("Got packets out of order", nil), + ErrNetUncompress: Message("Couldn't uncompress communication packet", nil), + ErrNetRead: Message("Got an error reading communication packets", nil), + ErrNetReadInterrupted: Message("Got timeout reading communication packets", nil), + ErrNetErrorOnWrite: Message("Got an error writing communication packets", nil), + ErrNetWriteInterrupted: Message("Got timeout writing communication packets", nil), + ErrTooLongString: Message("Result string is longer than 'maxAllowedPacket' bytes", nil), + ErrTableCantHandleBlob: Message("The used table type doesn't support BLOB/TEXT columns", nil), + ErrTableCantHandleAutoIncrement: Message("The used table type doesn't support AUTOINCREMENT columns", nil), + ErrDelayedInsertTableLocked: Message("INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES", nil), + ErrWrongColumnName: Message("Incorrect column name '%-.100s'", nil), + ErrWrongKeyColumn: Message("The used storage engine can't index column '%-.192s'", nil), + ErrWrongMrgTable: Message("Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist", nil), + ErrDupUnique: Message("Can't write, because of unique constraint, to table '%-.192s'", nil), + ErrBlobKeyWithoutLength: Message("BLOB/TEXT column '%-.192s' used in key specification without a key length", nil), + ErrPrimaryCantHaveNull: Message("All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", nil), + ErrTooManyRows: Message("Result consisted of more than one row", nil), + ErrRequiresPrimaryKey: Message("This table type requires a primary key", nil), + ErrNoRaidCompiled: Message("This version of MySQL is not compiled with RAID support", nil), + ErrUpdateWithoutKeyInSafeMode: Message("You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", nil), + ErrKeyDoesNotExist: Message("Key '%-.192s' doesn't exist in table '%-.192s'", nil), + ErrCheckNoSuchTable: Message("Can't open table", nil), + ErrCheckNotImplemented: Message("The storage engine for the table doesn't support %s", nil), + ErrCantDoThisDuringAnTransaction: Message("You are not allowed to execute this command in a transaction", nil), + ErrErrorDuringCommit: Message("Got error %d during COMMIT", nil), + ErrErrorDuringRollback: Message("Got error %d during ROLLBACK", nil), + ErrErrorDuringFlushLogs: Message("Got error %d during FLUSHLOGS", nil), + ErrErrorDuringCheckpoint: Message("Got error %d during CHECKPOINT", nil), + ErrNewAbortingConnection: Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' host: '%-.255s' (%-.64s)", nil), + ErrDumpNotImplemented: Message("The storage engine for the table does not support binary table dump", nil), + ErrFlushMasterBinlogClosed: Message("Binlog closed, cannot RESET MASTER", nil), + ErrIndexRebuild: Message("Failed rebuilding the index of dumped table '%-.192s'", nil), + ErrMaster: Message("Error from master: '%-.64s'", nil), + ErrMasterNetRead: Message("Net error reading from master", nil), + ErrMasterNetWrite: Message("Net error writing to master", nil), + ErrFtMatchingKeyNotFound: Message("Can't find FULLTEXT index matching the column list", nil), + ErrLockOrActiveTransaction: Message("Can't execute the given command because you have active locked tables or an active transaction", nil), + ErrUnknownSystemVariable: Message("Unknown system variable '%-.64s'", nil), + ErrCrashedOnUsage: Message("Table '%-.192s' is marked as crashed and should be repaired", nil), + ErrCrashedOnRepair: Message("Table '%-.192s' is marked as crashed and last (automatic?) repair failed", nil), + ErrWarningNotCompleteRollback: Message("Some non-transactional changed tables couldn't be rolled back", nil), + ErrTransCacheFull: Message("Multi-statement transaction required more than 'maxBinlogCacheSize' bytes of storage; increase this mysqld variable and try again", nil), + ErrSlaveMustStop: Message("This operation cannot be performed with a running slave; run STOP SLAVE first", nil), + ErrSlaveNotRunning: Message("This operation requires a running slave; configure slave and do START SLAVE", nil), + ErrBadSlave: Message("The server is not configured as slave; fix in config file or with CHANGE MASTER TO", nil), + ErrMasterInfo: Message("Could not initialize master info structure; more error messages can be found in the MySQL error log", nil), + ErrSlaveThread: Message("Could not create slave thread; check system resources", nil), + ErrTooManyUserConnections: Message("User %-.64s already has more than 'maxUserConnections' active connections", nil), + ErrSetConstantsOnly: Message("You may only use constant expressions with SET", nil), + ErrLockWaitTimeout: Message("Lock wait timeout exceeded; try restarting transaction", nil), + ErrLockTableFull: Message("The total number of locks exceeds the lock table size", nil), + ErrReadOnlyTransaction: Message("Update locks cannot be acquired during a READ UNCOMMITTED transaction", nil), + ErrDropDBWithReadLock: Message("DROP DATABASE not allowed while thread is holding global read lock", nil), + ErrCreateDBWithReadLock: Message("CREATE DATABASE not allowed while thread is holding global read lock", nil), + ErrWrongArguments: Message("Incorrect arguments to %s", nil), + ErrNoPermissionToCreateUser: Message("'%-.48s'@'%-.255s' is not allowed to create new users", nil), + ErrUnionTablesInDifferentDir: Message("Incorrect table definition; all MERGE tables must be in the same database", nil), + ErrLockDeadlock: Message("Deadlock found when trying to get lock; try restarting transaction", nil), + ErrTableCantHandleFt: Message("The used table type doesn't support FULLTEXT indexes", nil), + ErrCannotAddForeign: Message("Cannot add foreign key constraint", nil), + ErrNoReferencedRow: Message("Cannot add or update a child row: a foreign key constraint fails", nil), + ErrRowIsReferenced: Message("Cannot delete or update a parent row: a foreign key constraint fails", nil), + ErrConnectToMaster: Message("Error connecting to master: %-.128s", nil), + ErrQueryOnMaster: Message("Error running query on master: %-.128s", nil), + ErrErrorWhenExecutingCommand: Message("Error when executing command %s: %-.128s", nil), + ErrWrongUsage: Message("Incorrect usage of %s and %s", nil), + ErrWrongNumberOfColumnsInSelect: Message("The used SELECT statements have a different number of columns", nil), + ErrCantUpdateWithReadlock: Message("Can't execute the query because you have a conflicting read lock", nil), + ErrMixingNotAllowed: Message("Mixing of transactional and non-transactional tables is disabled", nil), + ErrDupArgument: Message("Option '%s' used twice in statement", nil), + ErrUserLimitReached: Message("User '%-.64s' has exceeded the '%s' resource (current value: %d)", nil), + ErrSpecificAccessDenied: Message("Access denied; you need (at least one of) the %-.128s privilege(s) for this operation", nil), + ErrLocalVariable: Message("Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", nil), + ErrGlobalVariable: Message("Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", nil), + ErrNoDefault: Message("Variable '%-.64s' doesn't have a default value", nil), + ErrWrongValueForVar: Message("Variable '%-.64s' can't be set to the value of '%-.200s'", nil), + ErrWrongTypeForVar: Message("Incorrect argument type to variable '%-.64s'", nil), + ErrVarCantBeRead: Message("Variable '%-.64s' can only be set, not read", nil), + ErrCantUseOptionHere: Message("Incorrect usage/placement of '%s'", nil), + ErrNotSupportedYet: Message("This version of TiDB doesn't yet support '%s'", nil), + ErrMasterFatalErrorReadingBinlog: Message("Got fatal error %d from master when reading data from binary log: '%-.320s'", nil), + ErrSlaveIgnoredTable: Message("Slave SQL thread ignored the query because of replicate-*-table rules", nil), + ErrIncorrectGlobalLocalVar: Message("Variable '%-.192s' is a %s variable", nil), + ErrWrongFkDef: Message("Incorrect foreign key definition for '%-.192s': %s", nil), + ErrKeyRefDoNotMatchTableRef: Message("Key reference and table reference don't match", nil), + ErrOperandColumns: Message("Operand should contain %d column(s)", nil), + ErrSubqueryNo1Row: Message("Subquery returns more than 1 row", nil), + ErrUnknownStmtHandler: Message("Unknown prepared statement handler (%.*s) given to %s", nil), + ErrCorruptHelpDB: Message("Help database is corrupt or does not exist", nil), + ErrCyclicReference: Message("Cyclic reference on subqueries", nil), + ErrAutoConvert: Message("Converting column '%s' from %s to %s", nil), + ErrIllegalReference: Message("Reference '%-.64s' not supported (%s)", nil), + ErrDerivedMustHaveAlias: Message("Every derived table must have its own alias", nil), + ErrSelectReduced: Message("Select %d was reduced during optimization", nil), + ErrTablenameNotAllowedHere: Message("Table '%s' from one of the %ss cannot be used in %s", nil), + ErrNotSupportedAuthMode: Message("Client does not support authentication protocol requested by server; consider upgrading MySQL client", nil), + ErrSpatialCantHaveNull: Message("All parts of a SPATIAL index must be NOT NULL", nil), + ErrCollationCharsetMismatch: Message("COLLATION '%s' is not valid for CHARACTER SET '%s'", nil), + ErrSlaveWasRunning: Message("Slave is already running", nil), + ErrSlaveWasNotRunning: Message("Slave already has been stopped", nil), + ErrTooBigForUncompress: Message("Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", nil), + ErrZlibZMem: Message("ZLIB: Not enough memory", nil), + ErrZlibZBuf: Message("ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", nil), + ErrZlibZData: Message("ZLIB: Input data corrupted", nil), + ErrCutValueGroupConcat: Message("Some rows were cut by GROUPCONCAT(%s)", []int{0}), + ErrWarnTooFewRecords: Message("Row %d doesn't contain data for all columns", nil), + ErrWarnTooManyRecords: Message("Row %d was truncated; it contained more data than there were input columns", nil), + ErrWarnNullToNotnull: Message("Column set to default value; NULL supplied to NOT NULL column '%s' at row %d", nil), + ErrWarnDataOutOfRange: Message("Out of range value for column '%s' at row %d", nil), + WarnDataTruncated: Message("Data truncated for column '%s' at row %d", nil), + ErrWarnUsingOtherHandler: Message("Using storage engine %s for table '%s'", nil), + ErrCantAggregate2collations: Message("Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", nil), + ErrDropUser: Message("Cannot drop one or more of the requested users", nil), + ErrRevokeGrants: Message("Can't revoke all privileges for one or more of the requested users", nil), + ErrCantAggregate3collations: Message("Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", nil), + ErrCantAggregateNcollations: Message("Illegal mix of collations for operation '%s'", nil), + ErrVariableIsNotStruct: Message("Variable '%-.64s' is not a variable component (can't be used as XXXX.variableName)", nil), + ErrUnknownCollation: Message("Unknown collation: '%-.64s'", nil), + ErrSlaveIgnoredSslParams: Message("SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", nil), + ErrServerIsInSecureAuthMode: Message("Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", nil), + ErrWarnFieldResolved: Message("Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d", nil), + ErrBadSlaveUntilCond: Message("Incorrect parameter or combination of parameters for START SLAVE UNTIL", nil), + ErrMissingSkipSlave: Message("It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart", nil), + ErrUntilCondIgnored: Message("SQL thread is not to be started so UNTIL options are ignored", nil), + ErrWrongNameForIndex: Message("Incorrect index name '%-.100s'", nil), + ErrWrongNameForCatalog: Message("Incorrect catalog name '%-.100s'", nil), + ErrWarnQcResize: Message("Query cache failed to set size %d; new query cache size is %d", nil), + ErrBadFtColumn: Message("Column '%-.192s' cannot be part of FULLTEXT index", nil), + ErrUnknownKeyCache: Message("Unknown key cache '%-.100s'", nil), + ErrWarnHostnameWontWork: Message("MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work", nil), + ErrUnknownStorageEngine: Message("Unknown storage engine '%s'", nil), + ErrWarnDeprecatedSyntax: Message("'%s' is deprecated and will be removed in a future release. Please use %s instead", nil), + ErrNonUpdatableTable: Message("The target table %-.100s of the %s is not updatable", nil), + ErrFeatureDisabled: Message("The '%s' feature is disabled; you need MySQL built with '%s' to have it working", nil), + ErrOptionPreventsStatement: Message("The MySQL server is running with the %s option so it cannot execute this statement", nil), + ErrDuplicatedValueInType: Message("Column '%-.100s' has duplicated value '%-.64s' in %s", []int{1}), + ErrTruncatedWrongValue: Message("Truncated incorrect %-.64s value: '%-.128s'", []int{1}), + ErrTooMuchAutoTimestampCols: Message("Incorrect table definition; there can be only one TIMESTAMP column with CURRENTTIMESTAMP in DEFAULT or ON UPDATE clause", nil), + ErrInvalidOnUpdate: Message("Invalid ON UPDATE clause for '%-.192s' column", nil), + ErrUnsupportedPs: Message("This command is not supported in the prepared statement protocol yet", nil), + ErrGetErrmsg: Message("Got error %d '%-.100s' from %s", nil), + ErrGetTemporaryErrmsg: Message("Got temporary error %d '%-.100s' from %s", nil), + ErrUnknownTimeZone: Message("Unknown or incorrect time zone: '%-.64s'", nil), + ErrWarnInvalidTimestamp: Message("Invalid TIMESTAMP value in column '%s' at row %d", nil), + ErrInvalidCharacterString: Message("Invalid %s character string: '%.64s'", []int{1}), + ErrWarnAllowedPacketOverflowed: Message("Result of %s() was larger than max_allowed_packet (%d) - truncated", nil), + ErrConflictingDeclarations: Message("Conflicting declarations: '%s%s' and '%s%s'", nil), + ErrSpNoRecursiveCreate: Message("Can't create a %s from within another stored routine", nil), + ErrSpAlreadyExists: Message("%s %s already exists", nil), + ErrSpDoesNotExist: Message("%s %s does not exist", nil), + ErrSpDropFailed: Message("Failed to DROP %s %s", nil), + ErrSpStoreFailed: Message("Failed to CREATE %s %s", nil), + ErrSpLilabelMismatch: Message("%s with no matching label: %s", nil), + ErrSpLabelRedefine: Message("Redefining label %s", nil), + ErrSpLabelMismatch: Message("End-label %s without match", nil), + ErrSpUninitVar: Message("Referring to uninitialized variable %s", nil), + ErrSpBadselect: Message("PROCEDURE %s can't return a result set in the given context", nil), + ErrSpBadreturn: Message("RETURN is only allowed in a FUNCTION", nil), + ErrSpBadstatement: Message("%s is not allowed in stored procedures", nil), + ErrUpdateLogDeprecatedIgnored: Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been ignored.", nil), + ErrUpdateLogDeprecatedTranslated: Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been translated to SET SQLLOGBIN.", nil), + ErrQueryInterrupted: Message("Query execution was interrupted", nil), + ErrSpWrongNoOfArgs: Message("Incorrect number of arguments for %s %s; expected %d, got %d", nil), + ErrSpCondMismatch: Message("Undefined CONDITION: %s", nil), + ErrSpNoreturn: Message("No RETURN found in FUNCTION %s", nil), + ErrSpNoreturnend: Message("FUNCTION %s ended without RETURN", nil), + ErrSpBadCursorQuery: Message("Cursor statement must be a SELECT", nil), + ErrSpBadCursorSelect: Message("Cursor SELECT must not have INTO", nil), + ErrSpCursorMismatch: Message("Undefined CURSOR: %s", nil), + ErrSpCursorAlreadyOpen: Message("Cursor is already open", nil), + ErrSpCursorNotOpen: Message("Cursor is not open", nil), + ErrSpUndeclaredVar: Message("Undeclared variable: %s", nil), + ErrSpWrongNoOfFetchArgs: Message("Incorrect number of FETCH variables", nil), + ErrSpFetchNoData: Message("No data - zero rows fetched, selected, or processed", nil), + ErrSpDupParam: Message("Duplicate parameter: %s", nil), + ErrSpDupVar: Message("Duplicate variable: %s", nil), + ErrSpDupCond: Message("Duplicate condition: %s", nil), + ErrSpDupCurs: Message("Duplicate cursor: %s", nil), + ErrSpCantAlter: Message("Failed to ALTER %s %s", nil), + ErrSpSubselectNyi: Message("Subquery value not supported", nil), + ErrStmtNotAllowedInSfOrTrg: Message("%s is not allowed in stored function or trigger", nil), + ErrSpVarcondAfterCurshndlr: Message("Variable or condition declaration after cursor or handler declaration", nil), + ErrSpCursorAfterHandler: Message("Cursor declaration after handler declaration", nil), + ErrSpCaseNotFound: Message("Case not found for CASE statement", nil), + ErrFparserTooBigFile: Message("Configuration file '%-.192s' is too big", nil), + ErrFparserBadHeader: Message("Malformed file type header in file '%-.192s'", nil), + ErrFparserEOFInComment: Message("Unexpected end of file while parsing comment '%-.200s'", nil), + ErrFparserErrorInParameter: Message("Error while parsing parameter '%-.192s' (line: '%-.192s')", nil), + ErrFparserEOFInUnknownParameter: Message("Unexpected end of file while skipping unknown parameter '%-.192s'", nil), + ErrViewNoExplain: Message("EXPLAIN/SHOW can not be issued; lacking privileges for underlying table", nil), + ErrFrmUnknownType: Message("File '%-.192s' has unknown type '%-.64s' in its header", nil), + ErrWrongObject: Message("'%-.192s.%-.192s' is not %s", nil), + ErrNonupdateableColumn: Message("Column '%-.192s' is not updatable", nil), + ErrViewSelectDerived: Message("View's SELECT contains a subquery in the FROM clause", nil), + ErrViewSelectClause: Message("View's SELECT contains a '%s' clause", nil), + ErrViewSelectVariable: Message("View's SELECT contains a variable or parameter", nil), + ErrViewSelectTmptable: Message("View's SELECT refers to a temporary table '%-.192s'", nil), + ErrViewWrongList: Message("In definition of view, derived table or common table expression, SELECT list and column names list have different column counts", nil), + ErrWarnViewMerge: Message("View merge algorithm can't be used here for now (assumed undefined algorithm)", nil), + ErrWarnViewWithoutKey: Message("View being updated does not have complete key of underlying table in it", nil), + ErrViewInvalid: Message("View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them", nil), + ErrSpNoDropSp: Message("Can't drop or alter a %s from within another stored routine", nil), + ErrSpGotoInHndlr: Message("GOTO is not allowed in a stored procedure handler", nil), + ErrTrgAlreadyExists: Message("Trigger already exists", nil), + ErrTrgDoesNotExist: Message("Trigger does not exist", nil), + ErrTrgOnViewOrTempTable: Message("Trigger's '%-.192s' is view or temporary table", nil), + ErrTrgCantChangeRow: Message("Updating of %s row is not allowed in %strigger", nil), + ErrTrgNoSuchRowInTrg: Message("There is no %s row in %s trigger", nil), + ErrNoDefaultForField: Message("Field '%-.192s' doesn't have a default value", nil), + ErrDivisionByZero: Message("Division by 0", nil), + ErrTruncatedWrongValueForField: Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", []int{0, 1}), + ErrIllegalValueForType: Message("Illegal %s '%-.192s' value found during parsing", []int{1}), + ErrViewNonupdCheck: Message("CHECK OPTION on non-updatable view '%-.192s.%-.192s'", nil), + ErrViewCheckFailed: Message("CHECK OPTION failed '%-.192s.%-.192s'", nil), + ErrProcaccessDenied: Message("%-.16s command denied to user '%-.48s'@'%-.255s' for routine '%-.192s'", nil), + ErrRelayLogFail: Message("Failed purging old relay logs: %s", nil), + ErrPasswdLength: Message("Password hash should be a %d-digit hexadecimal number", nil), + ErrUnknownTargetBinlog: Message("Target log not found in binlog index", nil), + ErrIoErrLogIndexRead: Message("I/O error reading log index file", nil), + ErrBinlogPurgeProhibited: Message("Server configuration does not permit binlog purge", nil), + ErrFseekFail: Message("Failed on fseek()", nil), + ErrBinlogPurgeFatalErr: Message("Fatal error during log purge", nil), + ErrLogInUse: Message("A purgeable log is in use, will not purge", nil), + ErrLogPurgeUnknownErr: Message("Unknown error during log purge", nil), + ErrRelayLogInit: Message("Failed initializing relay log position: %s", nil), + ErrNoBinaryLogging: Message("You are not using binary logging", nil), + ErrReservedSyntax: Message("The '%-.64s' syntax is reserved for purposes internal to the MySQL server", nil), + ErrWsasFailed: Message("WSAStartup Failed", nil), + ErrDiffGroupsProc: Message("Can't handle procedures with different groups yet", nil), + ErrNoGroupForProc: Message("Select must have a group with this procedure", nil), + ErrOrderWithProc: Message("Can't use ORDER clause with this procedure", nil), + ErrLoggingProhibitChangingOf: Message("Binary logging and replication forbid changing the global server %s", nil), + ErrNoFileMapping: Message("Can't map file: %-.200s, errno: %d", nil), + ErrWrongMagic: Message("Wrong magic in %-.64s", nil), + ErrPsManyParam: Message("Prepared statement contains too many placeholders", nil), + ErrKeyPart0: Message("Key part '%-.192s' length cannot be 0", nil), + ErrViewChecksum: Message("View text checksum failed", nil), + ErrViewMultiupdate: Message("Can not modify more than one base table through a join view '%-.192s.%-.192s'", nil), + ErrViewNoInsertFieldList: Message("Can not insert into join view '%-.192s.%-.192s' without fields list", nil), + ErrViewDeleteMergeView: Message("Can not delete from join view '%-.192s.%-.192s'", nil), + ErrCannotUser: Message("Operation %s failed for %.256s", nil), + ErrGrantRole: Message("Unknown authorization ID %.256s", nil), + ErrXaerNota: Message("XAERNOTA: Unknown XID", nil), + ErrXaerInval: Message("XAERINVAL: Invalid arguments (or unsupported command)", nil), + ErrXaerRmfail: Message("XAERRMFAIL: The command cannot be executed when global transaction is in the %.64s state", nil), + ErrXaerOutside: Message("XAEROUTSIDE: Some work is done outside global transaction", nil), + ErrXaerRmerr: Message("XAERRMERR: Fatal error occurred in the transaction branch - check your data for consistency", nil), + ErrXaRbrollback: Message("XARBROLLBACK: Transaction branch was rolled back", nil), + ErrNonexistingProcGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.255s' on routine '%-.192s'", nil), + ErrProcAutoGrantFail: Message("Failed to grant EXECUTE and ALTER ROUTINE privileges", nil), + ErrProcAutoRevokeFail: Message("Failed to revoke all privileges to dropped routine", nil), + ErrDataTooLong: Message("Data too long for column '%s' at row %d", nil), + ErrSpBadSQLstate: Message("Bad SQLSTATE: '%s'", nil), + ErrStartup: Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s", nil), + ErrLoadFromFixedSizeRowsToVar: Message("Can't load value from file with fixed size rows to variable", nil), + ErrCantCreateUserWithGrant: Message("You are not allowed to create a user with GRANT", nil), + ErrWrongValueForType: Message("Incorrect %-.32s value: '%-.128s' for function %-.32s", nil), + ErrTableDefChanged: Message("Table definition has changed, please retry transaction", nil), + ErrSpDupHandler: Message("Duplicate handler declared in the same block", nil), + ErrSpNotVarArg: Message("OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger", nil), + ErrSpNoRetset: Message("Not allowed to return a result set from a %s", nil), + ErrCantCreateGeometryObject: Message("Cannot get geometry object from data you send to the GEOMETRY field", nil), + ErrFailedRoutineBreakBinlog: Message("A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes", nil), + ErrBinlogUnsafeRoutine: Message("This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), + ErrBinlogCreateRoutineNeedSuper: Message("You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), + ErrExecStmtWithOpenCursor: Message("You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it.", nil), + ErrStmtHasNoOpenCursor: Message("The statement (%d) has no open cursor.", nil), + ErrCommitNotAllowedInSfOrTrg: Message("Explicit or implicit commit is not allowed in stored function or trigger.", nil), + ErrNoDefaultForViewField: Message("Field of view '%-.192s.%-.192s' underlying table doesn't have a default value", nil), + ErrSpNoRecursion: Message("Recursive stored functions and triggers are not allowed.", nil), + ErrTooBigScale: Message("Too big scale %d specified for column '%-.192s'. Maximum is %d.", nil), + ErrTooBigPrecision: Message("Too-big precision %d specified for '%-.192s'. Maximum is %d.", nil), + ErrMBiggerThanD: Message("For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s').", nil), + ErrWrongLockOfSystemTable: Message("You can't combine write-locking of system tables with other tables or lock types", nil), + ErrConnectToForeignDataSource: Message("Unable to connect to foreign data source: %.64s", nil), + ErrQueryOnForeignDataSource: Message("There was a problem processing the query on the foreign data source. Data source : %-.64s", nil), + ErrForeignDataSourceDoesntExist: Message("The foreign data source you are trying to reference does not exist. Data source : %-.64s", nil), + ErrForeignDataStringInvalidCantCreate: Message("Can't create federated table. The data source connection string '%-.64s' is not in the correct format", nil), + ErrForeignDataStringInvalid: Message("The data source connection string '%-.64s' is not in the correct format", nil), + ErrCantCreateFederatedTable: Message("Can't create federated table. Foreign data src : %-.64s", nil), + ErrTrgInWrongSchema: Message("Trigger in wrong schema", nil), + ErrStackOverrunNeedMore: Message("Thread stack overrun: %d bytes used of a %d byte stack, and %d bytes needed. Use 'mysqld --threadStack=#' to specify a bigger stack.", nil), + ErrTooLongBody: Message("Routine body for '%-.100s' is too long", nil), + ErrWarnCantDropDefaultKeycache: Message("Cannot drop default keycache", nil), + ErrTooBigDisplaywidth: Message("Display width out of range for column '%-.192s' (max = %d)", nil), + ErrXaerDupid: Message("XAERDUPID: The XID already exists", nil), + ErrDatetimeFunctionOverflow: Message("Datetime function: %-.32s field overflow", nil), + ErrCantUpdateUsedTableInSfOrTrg: Message("Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.", nil), + ErrViewPreventUpdate: Message("The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'.", nil), + ErrPsNoRecursion: Message("The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner", nil), + ErrSpCantSetAutocommit: Message("Not allowed to set autocommit from a stored function or trigger", nil), + ErrMalformedDefiner: Message("Definer is not fully qualified", nil), + ErrViewFrmNoUser: Message("View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!", nil), + ErrViewOtherUser: Message("You need the SUPER privilege for creation view with '%-.192s'@'%-.255s' definer", nil), + ErrNoSuchUser: Message("The user specified as a definer ('%-.64s'@'%-.255s') does not exist", nil), + ErrForbidSchemaChange: Message("Changing schema from '%-.192s' to '%-.192s' is not allowed.", nil), + ErrRowIsReferenced2: Message("Cannot delete or update a parent row: a foreign key constraint fails (%.192s)", nil), + ErrNoReferencedRow2: Message("Cannot add or update a child row: a foreign key constraint fails (%.192s)", nil), + ErrSpBadVarShadow: Message("Variable '%-.64s' must be quoted with `...`, or renamed", nil), + ErrTrgNoDefiner: Message("No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.", nil), + ErrOldFileFormat: Message("'%-.192s' has an old format, you should re-create the '%s' object(s)", nil), + ErrSpRecursionLimit: Message("Recursive limit %d (as set by the maxSpRecursionDepth variable) was exceeded for routine %.192s", nil), + ErrSpProcTableCorrupt: Message("Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)", nil), + ErrSpWrongName: Message("Incorrect routine name '%-.192s'", nil), + ErrTableNeedsUpgrade: Message("Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\"", nil), + ErrSpNoAggregate: Message("AGGREGATE is not supported for stored functions", nil), + ErrMaxPreparedStmtCountReached: Message("Can't create more than maxPreparedStmtCount statements (current value: %d)", nil), + ErrViewRecursive: Message("`%-.192s`.`%-.192s` contains view recursion", nil), + ErrNonGroupingFieldUsed: Message("Non-grouping field '%-.192s' is used in %-.64s clause", nil), + ErrTableCantHandleSpkeys: Message("The used table type doesn't support SPATIAL indexes", nil), + ErrNoTriggersOnSystemSchema: Message("Triggers can not be created on system tables", nil), + ErrRemovedSpaces: Message("Leading spaces are removed from name '%s'", nil), + ErrAutoincReadFailed: Message("Failed to read auto-increment value from storage engine", nil), + ErrUsername: Message("user name", nil), + ErrHostname: Message("host name", nil), + ErrWrongStringLength: Message("String '%-.70s' is too long for %s (should be no longer than %d)", nil), + ErrNonInsertableTable: Message("The target table %-.100s of the %s is not insertable-into", nil), + ErrAdminWrongMrgTable: Message("Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist", nil), + ErrTooHighLevelOfNestingForSelect: Message("Too high level of nesting for select", nil), + ErrNameBecomesEmpty: Message("Name '%-.64s' has become ''", nil), + ErrAmbiguousFieldTerm: Message("First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY", nil), + ErrForeignServerExists: Message("The foreign server, %s, you are trying to create already exists.", nil), + ErrForeignServerDoesntExist: Message("The foreign server name you are trying to reference does not exist. Data source : %-.64s", nil), + ErrIllegalHaCreateOption: Message("Table storage engine '%-.64s' does not support the create option '%.64s'", nil), + ErrPartitionRequiresValues: Message("Syntax : %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition", nil), + ErrPartitionWrongValues: Message("Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition", []int{1}), + ErrPartitionMaxvalue: Message("MAXVALUE can only be used in last partition definition", nil), + ErrPartitionSubpartition: Message("Subpartitions can only be hash partitions and by key", nil), + ErrPartitionSubpartMix: Message("Must define subpartitions on all partitions if on one partition", nil), + ErrPartitionWrongNoPart: Message("Wrong number of partitions defined, mismatch with previous setting", nil), + ErrPartitionWrongNoSubpart: Message("Wrong number of subpartitions defined, mismatch with previous setting", nil), + ErrWrongExprInPartitionFunc: Message("Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed", nil), + ErrNoConstExprInRangeOrList: Message("Expression in RANGE/LIST VALUES must be constant", nil), + ErrFieldNotFoundPart: Message("Field in list of fields for partition function not found in table", nil), + ErrListOfFieldsOnlyInHash: Message("List of fields is only allowed in KEY partitions", nil), + ErrInconsistentPartitionInfo: Message("The partition info in the frm file is not consistent with what can be written into the frm file", nil), + ErrPartitionFuncNotAllowed: Message("The %-.192s function returns the wrong type", nil), + ErrPartitionsMustBeDefined: Message("For %-.64s partitions each partition must be defined", nil), + ErrRangeNotIncreasing: Message("VALUES LESS THAN value must be strictly increasing for each partition", nil), + ErrInconsistentTypeOfFunctions: Message("VALUES value must be of same type as partition function", nil), + ErrMultipleDefConstInListPart: Message("Multiple definition of same constant in list partitioning", nil), + ErrPartitionEntry: Message("Partitioning can not be used stand-alone in query", nil), + ErrMixHandler: Message("The mix of handlers in the partitions is not allowed in this version of MySQL", nil), + ErrPartitionNotDefined: Message("For the partitioned engine it is necessary to define all %-.64s", nil), + ErrTooManyPartitions: Message("Too many partitions (including subpartitions) were defined", nil), + ErrSubpartition: Message("It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning", nil), + ErrCantCreateHandlerFile: Message("Failed to create specific handler file", nil), + ErrBlobFieldInPartFunc: Message("A BLOB field is not allowed in partition function", nil), + ErrUniqueKeyNeedAllFieldsInPf: Message("A %-.192s must include all columns in the table's partitioning function", nil), + ErrNoParts: Message("Number of %-.64s = 0 is not an allowed value", []int{0}), + ErrPartitionMgmtOnNonpartitioned: Message("Partition management on a not partitioned table is not possible", nil), + ErrForeignKeyOnPartitioned: Message("Foreign key clause is not yet supported in conjunction with partitioning", nil), + ErrDropPartitionNonExistent: Message("Error in list of partitions to %-.64s", nil), + ErrDropLastPartition: Message("Cannot remove all partitions, use DROP TABLE instead", nil), + ErrCoalesceOnlyOnHashPartition: Message("COALESCE PARTITION can only be used on HASH/KEY partitions", nil), + ErrReorgHashOnlyOnSameNo: Message("REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers", nil), + ErrReorgNoParam: Message("REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs", nil), + ErrOnlyOnRangeListPartition: Message("%-.64s PARTITION can only be used on RANGE/LIST partitions", nil), + ErrAddPartitionSubpart: Message("Trying to Add partition(s) with wrong number of subpartitions", nil), + ErrAddPartitionNoNewPartition: Message("At least one partition must be added", nil), + ErrCoalescePartitionNoPartition: Message("At least one partition must be coalesced", nil), + ErrReorgPartitionNotExist: Message("More partitions to reorganize than there are partitions", nil), + ErrSameNamePartition: Message("Duplicate partition name %-.192s", nil), + ErrNoBinlog: Message("It is not allowed to shut off binlog on this command", nil), + ErrConsecutiveReorgPartitions: Message("When reorganizing a set of partitions they must be in consecutive order", nil), + ErrReorgOutsideRange: Message("Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range", nil), + ErrPartitionFunctionFailure: Message("Partition function not supported in this version for this handler", nil), + ErrPartState: Message("Partition state cannot be defined from CREATE/ALTER TABLE", nil), + ErrLimitedPartRange: Message("The %-.64s handler only supports 32 bit integers in VALUES", nil), + ErrPluginIsNotLoaded: Message("Plugin '%-.192s' is not loaded", nil), + ErrWrongValue: Message("Incorrect %-.32s value: '%-.128s'", []int{1}), + ErrNoPartitionForGivenValue: Message("Table has no partition for value %-.64s", []int{0}), + ErrFilegroupOptionOnlyOnce: Message("It is not allowed to specify %s more than once", nil), + ErrCreateFilegroupFailed: Message("Failed to create %s", nil), + ErrDropFilegroupFailed: Message("Failed to drop %s", nil), + ErrTablespaceAutoExtend: Message("The handler doesn't support autoextend of tablespaces", nil), + ErrWrongSizeNumber: Message("A size parameter was incorrectly specified, either number or on the form 10M", nil), + ErrSizeOverflow: Message("The size number was correct but we don't allow the digit part to be more than 2 billion", nil), + ErrAlterFilegroupFailed: Message("Failed to alter: %s", nil), + ErrBinlogRowLoggingFailed: Message("Writing one row to the row-based binary log failed", nil), + ErrBinlogRowWrongTableDef: Message("Table definition on master and slave does not match: %s", nil), + ErrBinlogRowRbrToSbr: Message("Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events", nil), + ErrEventAlreadyExists: Message("Event '%-.192s' already exists", nil), + ErrEventStoreFailed: Message("Failed to store event %s. Error code %d from storage engine.", nil), + ErrEventDoesNotExist: Message("Unknown event '%-.192s'", nil), + ErrEventCantAlter: Message("Failed to alter event '%-.192s'", nil), + ErrEventDropFailed: Message("Failed to drop %s", nil), + ErrEventIntervalNotPositiveOrTooBig: Message("INTERVAL is either not positive or too big", nil), + ErrEventEndsBeforeStarts: Message("ENDS is either invalid or before STARTS", nil), + ErrEventExecTimeInThePast: Message("Event execution time is in the past. Event has been disabled", nil), + ErrEventOpenTableFailed: Message("Failed to open mysql.event", nil), + ErrEventNeitherMExprNorMAt: Message("No datetime expression provided", nil), + ErrObsoleteColCountDoesntMatchCorrupted: Message("Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), + ErrObsoleteCannotLoadFromTable: Message("Cannot load from mysql.%s. The table is probably corrupted", nil), + ErrEventCannotDelete: Message("Failed to delete the event from mysql.event", nil), + ErrEventCompile: Message("Error during compilation of event's body", nil), + ErrEventSameName: Message("Same old and new event name", nil), + ErrEventDataTooLong: Message("Data for column '%s' too long", nil), + ErrDropIndexNeededInForeignKey: Message("Cannot drop index '%-.192s': needed in a foreign key constraint", nil), + ErrWarnDeprecatedSyntaxWithVer: Message("The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead", nil), + ErrCantWriteLockLogTable: Message("You can't write-lock a log table. Only read access is possible", nil), + ErrCantLockLogTable: Message("You can't use locks with log tables.", nil), + ErrForeignDuplicateKeyOldUnused: Message("Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry", nil), + ErrColCountDoesntMatchPleaseUpdate: Message("Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysqlUpgrade to fix this error.", nil), + ErrTempTablePreventsSwitchOutOfRbr: Message("Cannot switch out of the row-based binary log format when the session has open temporary tables", nil), + ErrStoredFunctionPreventsSwitchBinlogFormat: Message("Cannot change the binary logging format inside a stored function or trigger", nil), + ErrNdbCantSwitchBinlogFormat: Message("The NDB cluster engine does not support changing the binlog format on the fly yet", nil), + ErrPartitionNoTemporary: Message("Cannot create temporary table with partitions", nil), + ErrPartitionConstDomain: Message("Partition constant is out of partition function domain", nil), + ErrPartitionFunctionIsNotAllowed: Message("This partition function is not allowed", nil), + ErrDdlLog: Message("Error in DDL log", nil), + ErrNullInValuesLessThan: Message("Not allowed to use NULL value in VALUES LESS THAN", nil), + ErrWrongPartitionName: Message("Incorrect partition name", nil), + ErrCantChangeTxCharacteristics: Message("Transaction characteristics can't be changed while a transaction is in progress", nil), + ErrDupEntryAutoincrementCase: Message("ALTER TABLE causes autoIncrement resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'", nil), + ErrEventModifyQueue: Message("Internal scheduler error %d", nil), + ErrEventSetVar: Message("Error during starting/stopping of the scheduler. Error code %d", nil), + ErrPartitionMerge: Message("Engine cannot be used in partitioned tables", nil), + ErrCantActivateLog: Message("Cannot activate '%-.64s' log", nil), + ErrRbrNotAvailable: Message("The server was not built with row-based replication", nil), + ErrBase64Decode: Message("Decoding of base64 string failed", nil), + ErrEventRecursionForbidden: Message("Recursion of EVENT DDL statements is forbidden when body is present", nil), + ErrEventsDB: Message("Cannot proceed because system tables used by Event Scheduler were found damaged at server start", nil), + ErrOnlyIntegersAllowed: Message("Only integers allowed as number here", nil), + ErrUnsuportedLogEngine: Message("This storage engine cannot be used for log tables\"", nil), + ErrBadLogStatement: Message("You cannot '%s' a log table if logging is enabled", nil), + ErrCantRenameLogTable: Message("Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'", nil), + ErrWrongParamcountToNativeFct: Message("Incorrect parameter count in the call to native function '%-.192s'", nil), + ErrWrongParametersToNativeFct: Message("Incorrect parameters in the call to native function '%-.192s'", nil), + ErrWrongParametersToStoredFct: Message("Incorrect parameters in the call to stored function '%-.192s'", nil), + ErrNativeFctNameCollision: Message("This function '%-.192s' has the same name as a native function", nil), + ErrDupEntryWithKeyName: Message("Duplicate entry '%-.64s' for key '%-.192s'", nil), + ErrBinlogPurgeEmFile: Message("Too many files opened, please execute the command again", nil), + ErrEventCannotCreateInThePast: Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.", nil), + ErrEventCannotAlterInThePast: Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.", nil), + ErrSlaveIncident: Message("The incident %s occurred on the master. Message: %-.64s", nil), + ErrNoPartitionForGivenValueSilent: Message("Table has no partition for some existing values", nil), + ErrBinlogUnsafeStatement: Message("Unsafe statement written to the binary log using statement format since BINLOGFORMAT = STATEMENT. %s", nil), + ErrSlaveFatal: Message("Fatal : %s", nil), + ErrSlaveRelayLogReadFailure: Message("Relay log read failure: %s", nil), + ErrSlaveRelayLogWriteFailure: Message("Relay log write failure: %s", nil), + ErrSlaveCreateEventFailure: Message("Failed to create %s", nil), + ErrSlaveMasterComFailure: Message("Master command %s failed: %s", nil), + ErrBinlogLoggingImpossible: Message("Binary logging not possible. Message: %s", nil), + ErrViewNoCreationCtx: Message("View `%-.64s`.`%-.64s` has no creation context", nil), + ErrViewInvalidCreationCtx: Message("Creation context of view `%-.64s`.`%-.64s' is invalid", nil), + ErrSrInvalidCreationCtx: Message("Creation context of stored routine `%-.64s`.`%-.64s` is invalid", nil), + ErrTrgCorruptedFile: Message("Corrupted TRG file for table `%-.64s`.`%-.64s`", nil), + ErrTrgNoCreationCtx: Message("Triggers for table `%-.64s`.`%-.64s` have no creation context", nil), + ErrTrgInvalidCreationCtx: Message("Trigger creation context of table `%-.64s`.`%-.64s` is invalid", nil), + ErrEventInvalidCreationCtx: Message("Creation context of event `%-.64s`.`%-.64s` is invalid", nil), + ErrTrgCantOpenTable: Message("Cannot open table for trigger `%-.64s`.`%-.64s`", nil), + ErrCantCreateSroutine: Message("Cannot create stored routine `%-.64s`. Check warnings", nil), + ErrNeverUsed: Message("Ambiguous slave modes combination. %s", nil), + ErrNoFormatDescriptionEventBeforeBinlogStatement: Message("The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement.", nil), + ErrSlaveCorruptEvent: Message("Corrupted replication event was detected", nil), + ErrLoadDataInvalidColumn: Message("Invalid column reference (%-.64s) in LOAD DATA", nil), + ErrLogPurgeNoFile: Message("Being purged log %s was not found", nil), + ErrXaRbtimeout: Message("XARBTIMEOUT: Transaction branch was rolled back: took too long", nil), + ErrXaRbdeadlock: Message("XARBDEADLOCK: Transaction branch was rolled back: deadlock was detected", nil), + ErrNeedReprepare: Message("Prepared statement needs to be re-prepared", nil), + ErrDelayedNotSupported: Message("DELAYED option not supported for table '%-.192s'", nil), + WarnNoMasterInfo: Message("The master info structure does not exist", nil), + WarnOptionIgnored: Message("<%-.64s> option ignored", nil), + WarnPluginDeleteBuiltin: Message("Built-in plugins cannot be deleted", nil), + WarnPluginBusy: Message("Plugin is busy and will be uninstalled on shutdown", nil), + ErrVariableIsReadonly: Message("%s variable '%s' is read-only. Use SET %s to assign the value", nil), + ErrWarnEngineTransactionRollback: Message("Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted", nil), + ErrSlaveHeartbeatFailure: Message("Unexpected master's heartbeat data: %s", nil), + ErrSlaveHeartbeatValueOutOfRange: Message("The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds).", nil), + ErrNdbReplicationSchema: Message("Bad schema for mysql.ndbReplication table. Message: %-.64s", nil), + ErrConflictFnParse: Message("Error in parsing conflict function. Message: %-.64s", nil), + ErrExceptionsWrite: Message("Write to exceptions table failed. Message: %-.128s\"", nil), + ErrTooLongTableComment: Message("Comment for table '%-.64s' is too long (max = %d)", nil), + ErrTooLongFieldComment: Message("Comment for field '%-.64s' is too long (max = %d)", nil), + ErrFuncInexistentNameCollision: Message("FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual", nil), + ErrDatabaseName: Message("Database", nil), + ErrTableName: Message("Table", nil), + ErrPartitionName: Message("Partition", nil), + ErrSubpartitionName: Message("Subpartition", nil), + ErrTemporaryName: Message("Temporary", nil), + ErrRenamedName: Message("Renamed", nil), + ErrTooManyConcurrentTrxs: Message("Too many active concurrent transactions", nil), + WarnNonASCIISeparatorNotImplemented: Message("Non-ASCII separator arguments are not fully supported", nil), + ErrDebugSyncTimeout: Message("debug sync point wait timed out", nil), + ErrDebugSyncHitLimit: Message("debug sync point hit limit reached", nil), + ErrDupSignalSet: Message("Duplicate condition information item '%s'", nil), + ErrSignalWarn: Message("Unhandled user-defined warning condition", nil), + ErrSignalNotFound: Message("Unhandled user-defined not found condition", nil), + ErrSignalException: Message("Unhandled user-defined exception condition", nil), + ErrResignalWithoutActiveHandler: Message("RESIGNAL when handler not active", nil), + ErrSignalBadConditionType: Message("SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE", nil), + WarnCondItemTruncated: Message("Data truncated for condition item '%s'", nil), + ErrCondItemTooLong: Message("Data too long for condition item '%s'", nil), + ErrUnknownLocale: Message("Unknown locale: '%-.64s'", nil), + ErrSlaveIgnoreServerIDs: Message("The requested server id %d clashes with the slave startup option --replicate-same-server-id", nil), + ErrQueryCacheDisabled: Message("Query cache is disabled; restart the server with queryCacheType=1 to enable it", nil), + ErrSameNamePartitionField: Message("Duplicate partition field name '%-.192s'", nil), + ErrPartitionColumnList: Message("Inconsistency in usage of column lists for partitioning", nil), + ErrWrongTypeColumnValue: Message("Partition column values of incorrect type", nil), + ErrTooManyPartitionFuncFields: Message("Too many fields in '%-.192s'", nil), + ErrMaxvalueInValuesIn: Message("Cannot use MAXVALUE as value in VALUES IN", nil), + ErrTooManyValues: Message("Cannot have more than one value for this type of %-.64s partitioning", nil), + ErrRowSinglePartitionField: Message("Row expressions in VALUES IN only allowed for multi-field column partitioning", nil), + ErrFieldTypeNotAllowedAsPartitionField: Message("Field '%-.192s' is of a not allowed type for this type of partitioning", nil), + ErrPartitionFieldsTooLong: Message("The total length of the partitioning fields is too large", nil), + ErrBinlogRowEngineAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved.", nil), + ErrBinlogRowModeAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.", nil), + ErrBinlogUnsafeAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOGFORMAT = MIXED. %s", nil), + ErrBinlogRowInjectionAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.", nil), + ErrBinlogStmtModeAndRowEngine: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s", nil), + ErrBinlogRowInjectionAndStmtMode: Message("Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOGFORMAT = STATEMENT.", nil), + ErrBinlogMultipleEnginesAndSelfLoggingEngine: Message("Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging.", nil), + ErrBinlogUnsafeLimit: Message("The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.", nil), + ErrBinlogUnsafeInsertDelayed: Message("The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted.", nil), + ErrBinlogUnsafeSystemTable: Message("The statement is unsafe because it uses the general log, slow query log, or performanceSchema table(s). This is unsafe because system tables may differ on slaves.", nil), + ErrBinlogUnsafeAutoincColumns: Message("Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTOINCREMENT column. Inserted values cannot be logged correctly.", nil), + ErrBinlogUnsafeUdf: Message("Statement is unsafe because it uses a UDF which may not return the same value on the slave.", nil), + ErrBinlogUnsafeSystemVariable: Message("Statement is unsafe because it uses a system variable that may have a different value on the slave.", nil), + ErrBinlogUnsafeSystemFunction: Message("Statement is unsafe because it uses a system function that may return a different value on the slave", nil), + ErrBinlogUnsafeNontransAfterTrans: Message("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.", nil), + ErrMessageAndStatement: Message("%s Statement: %s", nil), + ErrSlaveConversionFailed: Message("Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'", nil), + ErrSlaveCantCreateConversion: Message("Can't create conversion table for table '%-.192s.%-.192s'", nil), + ErrInsideTransactionPreventsSwitchBinlogFormat: Message("Cannot modify @@session.binlogFormat inside a transaction", nil), + ErrPathLength: Message("The path specified for %.64s is too long.", nil), + ErrWarnDeprecatedSyntaxNoReplacement: Message("%s is deprecated and will be removed in a future release.%s", nil), + ErrWrongNativeTableStructure: Message("Native table '%-.64s'.'%-.64s' has the wrong structure", nil), + ErrWrongPerfSchemaUsage: Message("Invalid performanceSchema usage.", nil), + ErrWarnISSkippedTable: Message("Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement", nil), + ErrInsideTransactionPreventsSwitchBinlogDirect: Message("Cannot modify @@session.binlogDirectNonTransactionalUpdates inside a transaction", nil), + ErrStoredFunctionPreventsSwitchBinlogDirect: Message("Cannot change the binlog direct flag inside a stored function or trigger", nil), + ErrSpatialMustHaveGeomCol: Message("A SPATIAL index may only contain a geometrical type column", nil), + ErrTooLongIndexComment: Message("Comment for index '%-.64s' is too long (max = %d)", nil), + ErrLockAborted: Message("Wait on a lock was aborted due to a pending exclusive lock", nil), + ErrDataOutOfRange: Message("%s value is out of range in '%s'", []int{1}), + ErrWrongSpvarTypeInLimit: Message("A variable of a non-integer based type in LIMIT clause", nil), + ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine: Message("Mixing self-logging and non-self-logging engines in a statement is unsafe.", nil), + ErrBinlogUnsafeMixedStatement: Message("Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.", nil), + ErrInsideTransactionPreventsSwitchSQLLogBin: Message("Cannot modify @@session.sqlLogBin inside a transaction", nil), + ErrStoredFunctionPreventsSwitchSQLLogBin: Message("Cannot change the sqlLogBin inside a stored function or trigger", nil), + ErrFailedReadFromParFile: Message("Failed to read from the .par file", nil), + ErrValuesIsNotIntType: Message("VALUES value for partition '%-.64s' must have type INT", nil), + ErrAccessDeniedNoPassword: Message("Access denied for user '%-.48s'@'%-.255s'", nil), + ErrSetPasswordAuthPlugin: Message("SET PASSWORD has no significance for user '%-.48s'@'%-.255s' as authentication plugin does not support it.", nil), + ErrGrantPluginUserExists: Message("GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists", nil), + ErrTruncateIllegalForeignKey: Message("Cannot truncate a table referenced in a foreign key constraint (%.192s)", nil), + ErrPluginIsPermanent: Message("Plugin '%s' is forcePlusPermanent and can not be unloaded", nil), + ErrSlaveHeartbeatValueOutOfRangeMin: Message("The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.", nil), + ErrSlaveHeartbeatValueOutOfRangeMax: Message("The requested value for the heartbeat period exceeds the value of `slaveNetTimeout' seconds. A sensible value for the period should be less than the timeout.", nil), + ErrStmtCacheFull: Message("Multi-row statements required more than 'maxBinlogStmtCacheSize' bytes of storage; increase this mysqld variable and try again", nil), + ErrMultiUpdateKeyConflict: Message("Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'.", nil), + ErrTableNeedsRebuild: Message("Table rebuild required. Please do \"ALTER TABLE `%-.32s` FORCE\" or dump/reload to fix it!", nil), + WarnOptionBelowLimit: Message("The value of '%s' should be no less than the value of '%s'", nil), + ErrIndexColumnTooLong: Message("Index column size too large. The maximum column size is %d bytes.", nil), + ErrErrorInTriggerBody: Message("Trigger '%-.64s' has an error in its body: '%-.256s'", nil), + ErrErrorInUnknownTriggerBody: Message("Unknown trigger has an error in its body: '%-.256s'", nil), + ErrIndexCorrupt: Message("Index %s is corrupted", nil), + ErrUndoRecordTooBig: Message("Undo log record is too big.", nil), + ErrBinlogUnsafeInsertIgnoreSelect: Message("INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeInsertSelectUpdate: Message("INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeReplaceSelect: Message("REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeCreateIgnoreSelect: Message("CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeCreateReplaceSelect: Message("CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeUpdateIgnore: Message("UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), + ErrPluginNoUninstall: Message("Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it.", nil), + ErrPluginNoInstall: Message("Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it.", nil), + ErrBinlogUnsafeWriteAutoincSelect: Message("Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeCreateSelectAutoinc: Message("CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave.", nil), + ErrBinlogUnsafeInsertTwoKeys: Message("INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe", nil), + ErrTableInFkCheck: Message("Table is being used in foreign key check.", nil), + ErrUnsupportedEngine: Message("Storage engine '%s' does not support system tables. [%s.%s]", nil), + ErrBinlogUnsafeAutoincNotFirst: Message("INSERT into autoincrement field which is not the first part in the composed primary key is unsafe.", nil), + ErrCannotLoadFromTableV2: Message("Cannot load from %s.%s. The table is probably corrupted", nil), + ErrMasterDelayValueOutOfRange: Message("The requested value %d for the master delay exceeds the maximum %d", nil), + ErrOnlyFdAndRbrEventsAllowedInBinlogStatement: Message("Only FormatDescriptionLogEvent and row events are allowed in BINLOG statements (but %s was provided)", nil), + ErrPartitionExchangeDifferentOption: Message("Non matching attribute '%-.64s' between partition and table", nil), + ErrPartitionExchangePartTable: Message("Table to exchange with partition is partitioned: '%-.64s'", nil), + ErrPartitionExchangeTempTable: Message("Table to exchange with partition is temporary: '%-.64s'", nil), + ErrPartitionInsteadOfSubpartition: Message("Subpartitioned table, use subpartition instead of partition", nil), + ErrUnknownPartition: Message("Unknown partition '%-.64s' in table '%-.64s'", nil), + ErrTablesDifferentMetadata: Message("Tables have different definitions", nil), + ErrRowDoesNotMatchPartition: Message("Found a row that does not match the partition", nil), + ErrBinlogCacheSizeGreaterThanMax: Message("Option binlogCacheSize (%d) is greater than maxBinlogCacheSize (%d); setting binlogCacheSize equal to maxBinlogCacheSize.", nil), + ErrWarnIndexNotApplicable: Message("Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'", nil), + ErrPartitionExchangeForeignKey: Message("Table to exchange with partition has foreign key references: '%-.64s'", nil), + ErrNoSuchKeyValue: Message("Key value '%-.192s' was not found in table '%-.192s.%-.192s'", nil), + ErrRplInfoDataTooLong: Message("Data for column '%s' too long", nil), + ErrNetworkReadEventChecksumFailure: Message("Replication event checksum verification failed while reading from network.", nil), + ErrBinlogReadEventChecksumFailure: Message("Replication event checksum verification failed while reading from a log file.", nil), + ErrBinlogStmtCacheSizeGreaterThanMax: Message("Option binlogStmtCacheSize (%d) is greater than maxBinlogStmtCacheSize (%d); setting binlogStmtCacheSize equal to maxBinlogStmtCacheSize.", nil), + ErrCantUpdateTableInCreateTableSelect: Message("Can't update table '%-.192s' while '%-.192s' is being created.", nil), + ErrPartitionClauseOnNonpartitioned: Message("PARTITION () clause on non partitioned table", nil), + ErrRowDoesNotMatchGivenPartitionSet: Message("Found a row not matching the given partition set", nil), + ErrNoSuchPartitionunused: Message("partition '%-.64s' doesn't exist", nil), + ErrChangeRplInfoRepositoryFailure: Message("Failure while changing the type of replication repository: %s.", nil), + ErrWarningNotCompleteRollbackWithCreatedTempTable: Message("The creation of some temporary tables could not be rolled back.", nil), + ErrWarningNotCompleteRollbackWithDroppedTempTable: Message("Some temporary tables were dropped, but these operations could not be rolled back.", nil), + ErrMtsFeatureIsNotSupported: Message("%s is not supported in multi-threaded slave mode. %s", nil), + ErrMtsUpdatedDBsGreaterMax: Message("The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata.", nil), + ErrMtsCantParallel: Message("Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s.", nil), + ErrMtsInconsistentData: Message("%s", nil), + ErrFulltextNotSupportedWithPartitioning: Message("FULLTEXT index is not supported for partitioned tables.", nil), + ErrDaInvalidConditionNumber: Message("Invalid condition number", nil), + ErrInsecurePlainText: Message("Sending passwords in plain text without SSL/TLS is extremely insecure.", nil), + ErrInsecureChangeMaster: Message("Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.", nil), + ErrForeignDuplicateKeyWithChildInfo: Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'", nil), + ErrForeignDuplicateKeyWithoutChildInfo: Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table", nil), + ErrSQLthreadWithSecureSlave: Message("Setting authentication options is not possible when only the Slave SQL Thread is being started.", nil), + ErrTableHasNoFt: Message("The table does not have FULLTEXT index to support this query", nil), + ErrVariableNotSettableInSfOrTrigger: Message("The system variable %.200s cannot be set in stored functions or triggers.", nil), + ErrVariableNotSettableInTransaction: Message("The system variable %.200s cannot be set when there is an ongoing transaction.", nil), + ErrGtidNextIsNotInGtidNextList: Message("The system variable @@SESSION.GTIDNEXT has the value %.200s, which is not listed in @@SESSION.GTIDNEXTLIST.", nil), + ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull: Message("When @@SESSION.GTIDNEXTLIST == NULL, the system variable @@SESSION.GTIDNEXT cannot change inside a transaction.", nil), + ErrSetStatementCannotInvokeFunction: Message("The statement 'SET %.200s' cannot invoke a stored function.", nil), + ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull: Message("The system variable @@SESSION.GTIDNEXT cannot be 'AUTOMATIC' when @@SESSION.GTIDNEXTLIST is non-NULL.", nil), + ErrSkippingLoggedTransaction: Message("Skipping transaction %.200s because it has already been executed and logged.", nil), + ErrMalformedGtidSetSpecification: Message("Malformed GTID set specification '%.200s'.", nil), + ErrMalformedGtidSetEncoding: Message("Malformed GTID set encoding.", nil), + ErrMalformedGtidSpecification: Message("Malformed GTID specification '%.200s'.", nil), + ErrGnoExhausted: Message("Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new serverUuid.", nil), + ErrBadSlaveAutoPosition: Message("Parameters MASTERLOGFILE, MASTERLOGPOS, RELAYLOGFILE and RELAYLOGPOS cannot be set when MASTERAUTOPOSITION is active.", nil), + ErrAutoPositionRequiresGtidModeOn: Message("CHANGE MASTER TO MASTERAUTOPOSITION = 1 can only be executed when @@GLOBAL.GTIDMODE = ON.", nil), + ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet: Message("Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTIDNEXT != AUTOMATIC or @@SESSION.GTIDNEXTLIST != NULL.", nil), + ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn: Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP2 requires @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), + ErrGtidModeRequiresBinlog: Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP1 or UPGRADESTEP2 requires --log-bin and --log-slave-updates.", nil), + ErrCantSetGtidNextToGtidWhenGtidModeIsOff: Message("@@SESSION.GTIDNEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTIDMODE = OFF.", nil), + ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn: Message("@@SESSION.GTIDNEXT cannot be set to ANONYMOUS when @@GLOBAL.GTIDMODE = ON.", nil), + ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff: Message("@@SESSION.GTIDNEXTLIST cannot be set to a non-NULL value when @@GLOBAL.GTIDMODE = OFF.", nil), + ErrFoundGtidEventWhenGtidModeIsOff: Message("Found a GtidLogEvent or PreviousGtidsLogEvent when @@GLOBAL.GTIDMODE = OFF.", nil), + ErrGtidUnsafeNonTransactionalTable: Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.", nil), + ErrGtidUnsafeCreateSelect: Message("CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), + ErrGtidUnsafeCreateDropTemporaryTableInTransaction: Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.", nil), + ErrGtidModeCanOnlyChangeOneStepAtATime: Message("The value of @@GLOBAL.GTIDMODE can only change one step at a time: OFF <-> UPGRADESTEP1 <-> UPGRADESTEP2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions.", nil), + ErrMasterHasPurgedRequiredGtids: Message("The slave is connecting using CHANGE MASTER TO MASTERAUTOPOSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.", nil), + ErrCantSetGtidNextWhenOwningGtid: Message("@@SESSION.GTIDNEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK.", nil), + ErrUnknownExplainFormat: Message("Unknown EXPLAIN format name: '%s'", nil), + ErrCantExecuteInReadOnlyTransaction: Message("Cannot execute statement in a READ ONLY transaction.", nil), + ErrTooLongTablePartitionComment: Message("Comment for table partition '%-.64s' is too long (max = %d)", nil), + ErrSlaveConfiguration: Message("Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.", nil), + ErrInnodbFtLimit: Message("InnoDB presently supports one FULLTEXT index creation at a time", nil), + ErrInnodbNoFtTempTable: Message("Cannot create FULLTEXT index on temporary InnoDB table", nil), + ErrInnodbFtWrongDocidColumn: Message("Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), + ErrInnodbFtWrongDocidIndex: Message("Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), + ErrInnodbOnlineLogTooBig: Message("Creating index '%-.192s' required more than 'innodbOnlineAlterLogMaxSize' bytes of modification log. Please try again.", nil), + ErrUnknownAlterAlgorithm: Message("Unknown ALGORITHM '%s'", nil), + ErrUnknownAlterLock: Message("Unknown LOCK type '%s'", nil), + ErrMtsChangeMasterCantRunWithGaps: Message("CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL.", nil), + ErrMtsRecoveryFailure: Message("Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log.", nil), + ErrMtsResetWorkers: Message("Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log.", nil), + ErrColCountDoesntMatchCorruptedV2: Message("Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), + ErrSlaveSilentRetryTransaction: Message("Slave must silently retry current transaction", nil), + ErrDiscardFkChecksRunning: Message("There is a foreign key check running on table '%-.192s'. Cannot discard the table.", nil), + ErrTableSchemaMismatch: Message("Schema mismatch (%s)", nil), + ErrTableInSystemTablespace: Message("Table '%-.192s' in system tablespace", nil), + ErrIoRead: Message("IO Read : (%d, %s) %s", nil), + ErrIoWrite: Message("IO Write : (%d, %s) %s", nil), + ErrTablespaceMissing: Message("Tablespace is missing for table '%-.192s'", nil), + ErrTablespaceExists: Message("Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT.", nil), + ErrTablespaceDiscarded: Message("Tablespace has been discarded for table '%-.192s'", nil), + ErrInternal: Message("Internal : %s", nil), + ErrInnodbImport: Message("ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %d : '%s'", nil), + ErrInnodbIndexCorrupt: Message("Index corrupt: %s", nil), + ErrInvalidYearColumnLength: Message("Supports only YEAR or YEAR(4) column", nil), + ErrNotValidPassword: Message("Your password does not satisfy the current policy requirements (%s)", nil), + ErrMustChangePassword: Message("You must reset your password using ALTER USER statement before executing this statement", nil), + ErrFkNoIndexChild: Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the foreign table '%s'", nil), + ErrForeignKeyNoIndexInParent: Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the referenced table '%s'", nil), + ErrFkFailAddSystem: Message("Failed to add the foreign key constraint '%s' to system tables", nil), + ErrForeignKeyCannotOpenParent: Message("Failed to open the referenced table '%s'", nil), + ErrFkIncorrectOption: Message("Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'", nil), + ErrFkDupName: Message("Duplicate foreign key constraint name '%s'", nil), + ErrPasswordFormat: Message("The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.", nil), + ErrFkColumnCannotDrop: Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'", nil), + ErrFkColumnCannotDropChild: Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table '%-.192s'", nil), + ErrForeignKeyColumnNotNull: Message("Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL", nil), + ErrDupIndex: Message("Duplicate index '%-.64s' defined on the table '%-.64s.%-.64s'. This is deprecated and will be disallowed in a future release.", nil), + ErrForeignKeyColumnCannotChange: Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'", nil), + ErrForeignKeyColumnCannotChangeChild: Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'", nil), + ErrFkCannotDeleteParent: Message("Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'", nil), + ErrMalformedPacket: Message("Malformed communication packet.", nil), + ErrReadOnlyMode: Message("Running in read-only mode", nil), + ErrGtidNextTypeUndefinedGroup: Message("When @@SESSION.GTIDNEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET @@SESSION.GTIDNEXT before a transaction and forgot to set @@SESSION.GTIDNEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current @@SESSION.GTIDNEXT is '%s'.", nil), + ErrVariableNotSettableInSp: Message("The system variable %.200s cannot be set in stored procedures.", nil), + ErrCantSetGtidPurgedWhenGtidModeIsOff: Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDMODE = ON.", nil), + ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty: Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDEXECUTED is empty.", nil), + ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty: Message("@@GLOBAL.GTIDPURGED can only be set when there are no ongoing transactions (not even in other clients).", nil), + ErrGtidPurgedWasChanged: Message("@@GLOBAL.GTIDPURGED was changed from '%s' to '%s'.", nil), + ErrGtidExecutedWasChanged: Message("@@GLOBAL.GTIDEXECUTED was changed from '%s' to '%s'.", nil), + ErrBinlogStmtModeAndNoReplTables: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT, and both replicated and non replicated tables are written to.", nil), + ErrAlterOperationNotSupported: Message("%s is not supported for this operation. Try %s.", nil), + ErrAlterOperationNotSupportedReason: Message("%s is not supported. Reason: %s. Try %s.", nil), + ErrAlterOperationNotSupportedReasonCopy: Message("COPY algorithm requires a lock", nil), + ErrAlterOperationNotSupportedReasonPartition: Message("Partition specific operations do not yet support LOCK/ALGORITHM", nil), + ErrAlterOperationNotSupportedReasonFkRename: Message("Columns participating in a foreign key are renamed", nil), + ErrAlterOperationNotSupportedReasonColumnType: Message("Cannot change column type INPLACE", nil), + ErrAlterOperationNotSupportedReasonFkCheck: Message("Adding foreign keys needs foreignKeyChecks=OFF", nil), + ErrAlterOperationNotSupportedReasonIgnore: Message("Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows", nil), + ErrAlterOperationNotSupportedReasonNopk: Message("Dropping a primary key is not allowed without also adding a new primary key", nil), + ErrAlterOperationNotSupportedReasonAutoinc: Message("Adding an auto-increment column requires a lock", nil), + ErrAlterOperationNotSupportedReasonHiddenFts: Message("Cannot replace hidden FTSDOCID with a user-visible one", nil), + ErrAlterOperationNotSupportedReasonChangeFts: Message("Cannot drop or rename FTSDOCID", nil), + ErrAlterOperationNotSupportedReasonFts: Message("Fulltext index creation requires a lock", nil), + ErrSQLSlaveSkipCounterNotSettableInGtidMode: Message("sqlSlaveSkipCounter can not be set when the server is running with @@GLOBAL.GTIDMODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction", nil), + ErrDupUnknownInIndex: Message("Duplicate entry for key '%-.192s'", nil), + ErrIdentCausesTooLongPath: Message("Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'.", nil), + ErrAlterOperationNotSupportedReasonNotNull: Message("cannot silently convert NULL values, as required in this SQLMODE", nil), + ErrMustChangePasswordLogin: Message("Your password has expired. To log in you must change it using a client that supports expired passwords.", nil), + ErrRowInWrongPartition: Message("Found a row in wrong partition %s", []int{0}), + ErrGeneratedColumnFunctionIsNotAllowed: Message("Expression of generated column '%s' contains a disallowed function.", nil), + ErrGeneratedColumnRowValueIsNotAllowed: Message("Expression of generated column '%s' cannot refer to a row value", nil), + ErrDefValGeneratedNamedFunctionIsNotAllowed: Message("Default value expression of column '%s' contains a disallowed function: `%s`.", nil), + ErrUnsupportedAlterInplaceOnVirtualColumn: Message("INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions.", nil), + ErrWrongFKOptionForGeneratedColumn: Message("Cannot define foreign key with %s clause on a generated column.", nil), + ErrBadGeneratedColumn: Message("The value specified for generated column '%s' in table '%s' is not allowed.", nil), + ErrUnsupportedOnGeneratedColumn: Message("'%s' is not supported for generated columns.", nil), + ErrGeneratedColumnNonPrior: Message("Generated column can refer only to generated columns defined prior to it.", nil), + ErrDependentByGeneratedColumn: Message("Column '%s' has a generated column dependency.", nil), + ErrGeneratedColumnRefAutoInc: Message("Generated column '%s' cannot refer to auto-increment column.", nil), + ErrAccountHasBeenLocked: Message("Access denied for user '%s'@'%s'. Account is locked.", nil), + ErUserAccessDeniedForUserAccountBlockedByPasswordLock: Message("Access denied for user '%s'@'%s'. Account is blocked for %s day(s) (%s day(s) remaining) due to %d consecutive failed logins.", nil), + ErrWarnConflictingHint: Message("Hint %s is ignored as conflicting/duplicated.", nil), + ErrUnresolvedHintName: Message("Unresolved name '%s' for %s hint", nil), + ErrForeignKeyCascadeDepthExceeded: Message("Foreign key cascade delete/update exceeds max depth of %v.", nil), + ErrInvalidFieldSize: Message("Invalid size for column '%s'.", nil), + ErrPasswordExpireAnonymousUser: Message("The password for anonymous user cannot be expired.", nil), + ErrInvalidArgumentForLogarithm: Message("Invalid argument for logarithm", nil), + ErrAggregateOrderNonAggQuery: Message("Expression #%d of ORDER BY contains aggregate function and applies to the result of a non-aggregated query", nil), + ErrIncorrectType: Message("Incorrect type for argument %s in function %s.", nil), + ErrFieldInOrderNotSelect: Message("Expression #%d of ORDER BY clause is not in SELECT list, references column '%s' which is not in SELECT list; this is incompatible with %s", nil), + ErrAggregateInOrderNotSelect: Message("Expression #%d of ORDER BY clause is not in SELECT list, contains aggregate function; this is incompatible with %s", nil), + ErrInvalidJSONData: Message("Invalid JSON data provided to function %s: %s", nil), + ErrInvalidJSONText: Message("Invalid JSON text: %-.192s", []int{0}), + ErrInvalidJSONTextInParam: Message("Invalid JSON text in argument %d to function %s: \"%s\" at position %d.", nil), + ErrInvalidJSONPath: Message("Invalid JSON path expression. The error is around character position %d.", []int{0}), + ErrInvalidJSONCharset: Message("Cannot create a JSON value from a string with CHARACTER SET '%s'.", nil), + ErrInvalidTypeForJSON: Message("Invalid data type for JSON data in argument %d to function %s; a JSON string or JSON type is required.", nil), + ErrInvalidJSONPathMultipleSelection: Message("In this situation, path expressions may not contain the * and ** tokens or an array range.", nil), + ErrInvalidJSONContainsPathType: Message("The second argument can only be either 'one' or 'all'.", nil), + ErrJSONUsedAsKey: Message("JSON column '%-.192s' cannot be used in key specification.", nil), + ErrJSONDocumentTooDeep: Message("The JSON document exceeds the maximum depth.", nil), + ErrJSONDocumentNULLKey: Message("JSON documents may not contain NULL member names.", nil), + ErrSecureTransportRequired: Message("Connections using insecure transport are prohibited while --require_secure_transport=ON.", nil), + ErrBadUser: Message("User %s does not exist.", nil), + ErrUserAlreadyExists: Message("User %s already exists.", nil), + ErrInvalidJSONPathArrayCell: Message("A path expression is not a path to a cell in an array.", nil), + ErrInvalidEncryptionOption: Message("Invalid encryption option.", nil), + ErrTooLongValueForType: Message("Too long enumeration/set value for column %s.", nil), + ErrPKIndexCantBeInvisible: Message("A primary key index cannot be invisible", nil), + ErrWindowNoSuchWindow: Message("Window name '%s' is not defined.", nil), + ErrWindowCircularityInWindowGraph: Message("There is a circularity in the window dependency graph.", nil), + ErrWindowNoChildPartitioning: Message("A window which depends on another cannot define partitioning.", nil), + ErrWindowNoInherentFrame: Message("Window '%s' has a frame definition, so cannot be referenced by another window.", nil), + ErrWindowNoRedefineOrderBy: Message("Window '%s' cannot inherit '%s' since both contain an ORDER BY clause.", nil), + ErrWindowFrameStartIllegal: Message("Window '%s': frame start cannot be UNBOUNDED FOLLOWING.", nil), + ErrWindowFrameEndIllegal: Message("Window '%s': frame end cannot be UNBOUNDED PRECEDING.", nil), + ErrWindowFrameIllegal: Message("Window '%s': frame start or end is negative, NULL or of non-integral type", nil), + ErrWindowRangeFrameOrderType: Message("Window '%s' with RANGE N PRECEDING/FOLLOWING frame requires exactly one ORDER BY expression, of numeric or temporal type", nil), + ErrWindowRangeFrameTemporalType: Message("Window '%s' with RANGE frame has ORDER BY expression of datetime type. Only INTERVAL bound value allowed.", nil), + ErrWindowRangeFrameNumericType: Message("Window '%s' with RANGE frame has ORDER BY expression of numeric type, INTERVAL bound value not allowed.", nil), + ErrWindowRangeBoundNotConstant: Message("Window '%s' has a non-constant frame bound.", nil), + ErrWindowDuplicateName: Message("Window '%s' is defined twice.", nil), + ErrWindowIllegalOrderBy: Message("Window '%s': ORDER BY or PARTITION BY uses legacy position indication which is not supported, use expression.", nil), + ErrWindowInvalidWindowFuncUse: Message("You cannot use the window function '%s' in this context.'", nil), + ErrWindowInvalidWindowFuncAliasUse: Message("You cannot use the alias '%s' of an expression containing a window function in this context.'", nil), + ErrWindowNestedWindowFuncUseInWindowSpec: Message("You cannot nest a window function in the specification of window '%s'.", nil), + ErrWindowRowsIntervalUse: Message("Window '%s': INTERVAL can only be used with RANGE frames.", nil), + ErrWindowNoGroupOrderUnused: Message("ASC or DESC with GROUP BY isn't allowed with window functions; put ASC or DESC in ORDER BY", nil), + ErrWindowExplainJSON: Message("To get information about window functions use EXPLAIN FORMAT=JSON", nil), + ErrWindowFunctionIgnoresFrame: Message("Window function '%s' ignores the frame clause of window '%s' and aggregates over the whole partition", nil), + ErrInvalidNumberOfArgs: Message("Too many arguments for function %s; maximum allowed is %d", nil), + ErrFieldInGroupingNotGroupBy: Message("Argument %s of GROUPING function is not in GROUP BY", nil), + ErrRoleNotGranted: Message("%s is not granted to %s", nil), + ErrMaxExecTimeExceeded: Message("Query execution was interrupted, maximum statement execution time exceeded", nil), + ErrLockAcquireFailAndNoWaitSet: Message("Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set.", nil), + ErrNotHintUpdatable: Message("Variable '%s' might not be affected by SET_VAR hint.", nil), + ErrExistsInHistoryPassword: Message("Cannot use these credentials for '%s@%s' because they contradict the password history policy.", nil), + ErrInvalidDefaultUTF8MB4Collation: Message("Invalid default collation %s: utf8mb4_0900_ai_ci or utf8mb4_general_ci or utf8mb4_bin expected", nil), + ErrForeignKeyCannotDropParent: Message("Cannot drop table '%s' referenced by a foreign key constraint '%s' on table '%s'.", nil), + ErrForeignKeyCannotUseVirtualColumn: Message("Foreign key '%s' uses virtual column '%s' which is not supported.", nil), + ErrForeignKeyNoColumnInParent: Message("Failed to add the foreign key constraint. Missing column '%s' for constraint '%s' in the referenced table '%s'", nil), + ErrDataTruncatedFunctionalIndex: Message("Data truncated for expression index '%s' at row %d", nil), + ErrDataOutOfRangeFunctionalIndex: Message("Value is out of range for expression index '%s' at row %d", nil), + ErrFunctionalIndexOnJSONOrGeometryFunction: Message("Cannot create an expression index on a function that returns a JSON or GEOMETRY value", nil), + ErrFunctionalIndexRefAutoIncrement: Message("Expression index '%s' cannot refer to an auto-increment column", nil), + ErrCannotDropColumnFunctionalIndex: Message("Cannot drop column '%s' because it is used by an expression index. In order to drop the column, you must remove the expression index", nil), + ErrFunctionalIndexPrimaryKey: Message("The primary key cannot be an expression index", nil), + ErrFunctionalIndexOnBlob: Message("Cannot create an expression index on an expression that returns a BLOB or TEXT. Please consider using CAST", nil), + ErrFunctionalIndexFunctionIsNotAllowed: Message("Expression of expression index '%s' contains a disallowed function", nil), + ErrFulltextFunctionalIndex: Message("Fulltext expression index is not supported", nil), + ErrSpatialFunctionalIndex: Message("Spatial expression index is not supported", nil), + ErrWrongKeyColumnFunctionalIndex: Message("The used storage engine cannot index the expression '%s'", nil), + ErrFunctionalIndexOnField: Message("Expression index on a column is not supported. Consider using a regular index instead", nil), + ErrFKIncompatibleColumns: Message("Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.", nil), + ErrFunctionalIndexRowValueIsNotAllowed: Message("Expression of expression index '%s' cannot refer to a row value", nil), + ErrNonBooleanExprForCheckConstraint: Message("An expression of non-boolean type specified to a check constraint '%s'.", nil), + ErrColumnCheckConstraintReferencesOtherColumn: Message("Column check constraint '%s' references other column.", nil), + ErrCheckConstraintNamedFunctionIsNotAllowed: Message("An expression of a check constraint '%s' contains disallowed function: %s.", nil), + ErrCheckConstraintFunctionIsNotAllowed: Message("An expression of a check constraint '%s' contains disallowed function.", nil), + ErrCheckConstraintVariables: Message("An expression of a check constraint '%s' cannot refer to a user or system variable.", nil), + ErrCheckConstraintRefersAutoIncrementColumn: Message("Check constraint '%s' cannot refer to an auto-increment column.", nil), + ErrCheckConstraintViolated: Message("Check constraint '%s' is violated.", nil), + ErrTableCheckConstraintReferUnknown: Message("Check constraint '%s' refers to non-existing column '%s'.", nil), + ErrCheckConstraintDupName: Message("Duplicate check constraint name '%s'.", nil), + ErrCheckConstraintClauseUsingFKReferActionColumn: Message("Column '%s' cannot be used in a check constraint '%s': needed in a foreign key constraint referential action.", nil), + ErrDependentByFunctionalIndex: Message("Column '%s' has an expression index dependency and cannot be dropped or renamed", nil), + ErrDependentByPartitionFunctional: Message("Column '%s' has a partitioning function dependency and cannot be dropped or renamed", nil), + ErrCannotConvertString: Message("Cannot convert string '%.64s' from %s to %s", nil), + ErrInvalidJSONType: Message("Invalid JSON type in argument %d to function %s; an %s is required.", nil), + ErrInvalidJSONValueForFuncIndex: Message("Invalid JSON value for CAST for expression index '%s'", nil), + ErrJSONValueOutOfRangeForFuncIndex: Message("Out of range JSON value for CAST for expression index '%s'", nil), + ErrFunctionalIndexDataIsTooLong: Message("Data too long for expression index '%s'", nil), + ErrFunctionalIndexNotApplicable: Message("Cannot use expression index '%s' due to type or collation conversion", nil), + ErrUnsupportedConstraintCheck: Message("%s is not supported", nil), + ErrDynamicPrivilegeNotRegistered: Message("Dynamic privilege '%s' is not registered with the server.", nil), + ErrIllegalPrivilegeLevel: Message("Illegal privilege level specified for %s", nil), + ErrCTERecursiveRequiresUnion: Message("Recursive Common Table Expression '%s' should contain a UNION", nil), + ErrCTERecursiveRequiresNonRecursiveFirst: Message("Recursive Common Table Expression '%s' should have one or more non-recursive query blocks followed by one or more recursive ones", nil), + ErrCTERecursiveForbidsAggregation: Message("Recursive Common Table Expression '%s' can contain neither aggregation nor window functions in recursive query block", nil), + ErrCTERecursiveForbiddenJoinOrder: Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints", nil), + ErrInvalidRequiresSingleReference: Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must be referenced only once, and not in any subquery", nil), + ErrCTEMaxRecursionDepth: Message("Recursive query aborted after %d iterations. Try increasing @@cte_max_recursion_depth to a larger value", nil), + ErrTableWithoutPrimaryKey: Message("Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.", nil), + ErrConstraintNotFound: Message("Constraint '%s' does not exist.", nil), + ErrDependentByCheckConstraint: Message("Check constraint '%s' uses column '%s', hence column cannot be dropped or renamed.", nil), + ErrJSONInBooleanContext: Message("Evaluating a JSON value in SQL boolean context does an implicit comparison against JSON integer 0; if this is not what you want, consider converting JSON to a SQL numeric type with JSON_VALUE RETURNING", nil), // MariaDB errors. - ErrOnlyOneDefaultPartionAllowed: mysql.Message("Only one DEFAULT partition allowed", nil), - ErrWrongPartitionTypeExpectedSystemTime: mysql.Message("Wrong partitioning type, expected type: `SYSTEM_TIME`", nil), - ErrSystemVersioningWrongPartitions: mysql.Message("Wrong Partitions: must have at least one HISTORY and exactly one last CURRENT", nil), - ErrSequenceRunOut: mysql.Message("Sequence '%-.64s.%-.64s' has run out", nil), - ErrSequenceInvalidData: mysql.Message("Sequence '%-.64s.%-.64s' values are conflicting", nil), - ErrSequenceAccessFail: mysql.Message("Sequence '%-.64s.%-.64s' access error", nil), - ErrNotSequence: mysql.Message("'%-.64s.%-.64s' is not a SEQUENCE", nil), - ErrUnknownSequence: mysql.Message("Unknown SEQUENCE: '%-.300s'", nil), - ErrWrongInsertIntoSequence: mysql.Message("Wrong INSERT into a SEQUENCE. One can only do single table INSERT into a sequence object (like with mysqldump). If you want to change the SEQUENCE, use ALTER SEQUENCE instead.", nil), - ErrSequenceInvalidTableStructure: mysql.Message("Sequence '%-.64s.%-.64s' table structure is invalid (%s)", nil), + ErrOnlyOneDefaultPartionAllowed: Message("Only one DEFAULT partition allowed", nil), + ErrWrongPartitionTypeExpectedSystemTime: Message("Wrong partitioning type, expected type: `SYSTEM_TIME`", nil), + ErrSystemVersioningWrongPartitions: Message("Wrong Partitions: must have at least one HISTORY and exactly one last CURRENT", nil), + ErrSequenceRunOut: Message("Sequence '%-.64s.%-.64s' has run out", nil), + ErrSequenceInvalidData: Message("Sequence '%-.64s.%-.64s' values are conflicting", nil), + ErrSequenceAccessFail: Message("Sequence '%-.64s.%-.64s' access error", nil), + ErrNotSequence: Message("'%-.64s.%-.64s' is not a SEQUENCE", nil), + ErrUnknownSequence: Message("Unknown SEQUENCE: '%-.300s'", nil), + ErrWrongInsertIntoSequence: Message("Wrong INSERT into a SEQUENCE. One can only do single table INSERT into a sequence object (like with mysqldump). If you want to change the SEQUENCE, use ALTER SEQUENCE instead.", nil), + ErrSequenceInvalidTableStructure: Message("Sequence '%-.64s.%-.64s' table structure is invalid (%s)", nil), // TiDB errors. - 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), + ErrMemExceedThreshold: Message("%s holds %dB memory, exceeds threshold %dB.%s", nil), + ErrForUpdateCantRetry: Message("[%d] can not retry select for update statement", nil), + ErrAdminCheckTable: Message("TiDB admin check table failed.", nil), + ErrOptOnTemporaryTable: Message("`%s` is unsupported on temporary tables.", nil), + ErrDropTableOnTemporaryTable: Message("`drop global temporary table` can only drop global temporary table", nil), + ErrTxnTooLarge: Message("Transaction is too large, size: %d", nil), + ErrWriteConflictInTiDB: Message("Write conflict, txnStartTS %d is stale", nil), + ErrInvalidPluginID: Message("Wrong plugin id: %s, valid plugin id is [name]-[version], and version should not contain '-'", nil), + ErrInvalidPluginManifest: Message("Cannot read plugin %s's manifest", nil), + ErrInvalidPluginName: Message("Plugin load with %s but got wrong name %s", nil), + ErrInvalidPluginVersion: Message("Plugin load with %s but got %s", nil), + ErrDuplicatePlugin: Message("Plugin [%s] is redeclared", nil), + ErrInvalidPluginSysVarName: Message("Plugin %s's sysVar %s must start with its plugin name %s", nil), + ErrRequireVersionCheckFail: Message("Plugin %s require %s be %v but got %v", nil), + ErrUnsupportedReloadPlugin: Message("Plugin %s isn't loaded so cannot be reloaded", nil), + ErrUnsupportedReloadPluginVar: Message("Reload plugin with different sysVar is unsupported %v", nil), + ErrTableLocked: Message("Table '%s' was locked in %s by %v", nil), + ErrNotExist: Message("Error: key not exist", nil), + ErrTxnRetryable: Message("Error: KV error safe to retry %s ", []int{0}), + ErrCannotSetNilValue: Message("can not set nil value", nil), + ErrInvalidTxn: Message("invalid transaction", nil), + ErrEntryTooLarge: Message("entry too large, the max entry size is %d, the size of data is %d", nil), + ErrNotImplemented: Message("not implemented", nil), + ErrInfoSchemaExpired: Message("Information schema is out of date: schema failed to update in 1 lease, please make sure TiDB can connect to TiKV", nil), + ErrInfoSchemaChanged: 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: Message("Bad Number", nil), + ErrCastAsSignedOverflow: Message("Cast to signed converted positive out-of-range integer to its negative complement", nil), + ErrCastNegIntAsUnsigned: Message("Cast to unsigned converted negative integer to it's positive complement", nil), + ErrInvalidYearFormat: Message("invalid year format", nil), + ErrInvalidYear: Message("invalid year", nil), + ErrIncorrectDatetimeValue: Message("Incorrect datetime value: '%s'", []int{0}), + ErrInvalidTimeFormat: Message("invalid time format: '%v'", []int{0}), + ErrInvalidWeekModeFormat: Message("invalid week mode format: '%v'", nil), + ErrFieldGetDefaultFailed: Message("Field '%s' get default value fail", nil), + ErrIndexOutBound: Message("Index column %s offset out of bound, offset: %d, row: %v", []int{2}), + ErrUnsupportedOp: Message("operation not supported", nil), + ErrRowNotFound: Message("can not find the row: %s", []int{0}), + ErrTableStateCantNone: Message("table %s can't be in none state", nil), + ErrColumnStateCantNone: Message("column %s can't be in none state", nil), + ErrColumnStateNonPublic: Message("can not use non-public column", nil), + ErrIndexStateCantNone: Message("index %s can't be in none state", nil), + ErrInvalidRecordKey: Message("invalid record key", nil), + ErrUnsupportedValueForVar: Message("variable '%s' does not yet support value: %s", nil), + ErrUnsupportedIsolationLevel: Message("The isolation level '%s' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error", nil), + ErrInvalidDDLWorker: Message("Invalid DDL worker", nil), + ErrUnsupportedDDLOperation: Message("Unsupported %s", nil), + ErrNotOwner: Message("TiDB server is not a DDL owner", nil), + ErrCantDecodeRecord: Message("Cannot decode %s value, because %v", nil), + ErrInvalidDDLJob: Message("Invalid DDL job", nil), + ErrInvalidDDLJobFlag: Message("Invalid DDL job flag", nil), + ErrWaitReorgTimeout: Message("Timeout waiting for data reorganization", nil), + ErrInvalidStoreVersion: Message("Invalid storage current version: %d", nil), + ErrUnknownTypeLength: Message("Unknown length for type %d", nil), + ErrUnknownFractionLength: Message("Unknown length for type %d and fraction %d", nil), + ErrInvalidDDLJobVersion: Message("Version %d of DDL job is greater than current one: %d", nil), + ErrInvalidSplitRegionRanges: Message("Failed to split region ranges: %s", nil), + ErrReorgPanic: Message("Reorg worker panic", nil), + ErrInvalidDDLState: Message("Invalid %s state: %v", nil), + ErrCancelledDDLJob: Message("Cancelled DDL job", nil), + ErrRepairTable: Message("Failed to repair table: %s", nil), + ErrLoadPrivilege: Message("Load privilege table fail: %s", nil), + ErrInvalidPrivilegeType: Message("unknown privilege type %s", nil), + ErrUnknownFieldType: Message("unknown field type", nil), + ErrInvalidSequence: Message("invalid sequence", nil), + ErrInvalidType: Message("invalid type", nil), + ErrCantGetValidID: Message("Cannot get a valid auto-ID when retrying the statement", nil), + ErrCantSetToNull: Message("cannot set variable to null", nil), + ErrSnapshotTooOld: Message("snapshot is older than GC safe point %s", nil), + ErrInvalidTableID: Message("invalid TableID", nil), + ErrInvalidAutoRandom: Message("Invalid auto random: %s", nil), + ErrInvalidHashKeyFlag: Message("invalid encoded hash key flag", nil), + ErrInvalidListIndex: Message("invalid list index", nil), + ErrInvalidListMetaData: Message("invalid list meta data", nil), + ErrWriteOnSnapshot: Message("write on snapshot", nil), + ErrInvalidKey: Message("invalid key", nil), + ErrInvalidIndexKey: Message("invalid index key", nil), + ErrDataInconsistent: Message("data inconsistency in table: %s, index: %s, handle: %s, index-values:%#v != record-values:%#v", []int{2, 3, 4}), + ErrDDLReorgElementNotExist: Message("DDL reorg element does not exist", nil), + ErrDDLJobNotFound: Message("DDL Job:%v not found", nil), + ErrCancelFinishedDDLJob: Message("This job:%v is finished, so can't be cancelled", nil), + ErrCannotCancelDDLJob: Message("This job:%v is almost finished, can't be cancelled now", nil), + ErrUnknownAllocatorType: Message("Invalid allocator type", nil), + ErrAutoRandReadFailed: Message("Failed to read auto-random value from storage engine", nil), + ErrInvalidIncrementAndOffset: Message("Invalid auto_increment settings: auto_increment_increment: %d, auto_increment_offset: %d, both of them must be in range [1..65535]", nil), + ErrDataInconsistentMismatchCount: Message("data inconsistency in table: %s, index: %s, index-count:%d != record-count:%d", nil), + ErrDataInconsistentMismatchIndex: 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: Message("writing inconsistent data in table: %s, expected-values:{%s} != record-values:{%s}", []int{1, 2}), + ErrInconsistentHandle: 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: Message("writing inconsistent data in table: %s, index: %s, col: %s, indexed-value:{%s} != record-value:{%s}", []int{3, 4}), + ErrAssertionFailed: Message("assertion failed: key: %s, assertion: %s, start_ts: %v, existing start ts: %v, existing commit ts: %v", []int{0}), + ErrInstanceScope: Message("modifying %s will require SET GLOBAL in a future version of TiDB", nil), + ErrNonTransactionalJobFailure: 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: Message("setting %s has no effect in TiDB", nil), + ErrGettingNoopVariable: Message("variable %s has no effect in TiDB", nil), + ErrCannotMigrateSession: Message("cannot migrate the current session: %s", nil), + ErrLazyUniquenessCheckFailure: Message("transaction aborted because lazy uniqueness check is enabled and an error occurred: %s", nil), + ErrUnsupportedColumnInTTLConfig: Message("Field '%-.192s' is of a not supported type for TTL config, expect DATETIME, DATE or TIMESTAMP", nil), + ErrTTLColumnCannotDrop: Message("Cannot drop column '%-.192s': needed in TTL config", nil), + ErrSetTTLOptionForNonTTLTable: Message("Cannot set %s on a table without TTL config", nil), + ErrTempTableNotAllowedWithTTL: Message("Set TTL for temporary table is not allowed", nil), + ErrUnsupportedTTLReferencedByFK: Message("Set TTL for a table referenced by foreign key is not allowed", nil), + ErrUnsupportedPrimaryKeyTypeWithTTL: Message("Unsupported clustered primary key type FLOAT/DOUBLE for TTL", nil), + ErrLoadDataFromServerDisk: 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: Message("Do not support loading parquet files from local. Please try to load the parquet files from the cloud storage", nil), + ErrLoadDataEmptyPath: Message("The value of INFILE must not be empty when LOAD DATA from LOCAL", nil), + ErrLoadDataUnsupportedFormat: Message("The FORMAT '%s' is not supported", nil), + ErrLoadDataInvalidURI: 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: Message("Access to the %s has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil), + ErrLoadDataCantRead: Message("Failed to read source files. Reason: %s. %s", nil), + ErrLoadDataWrongFormatConfig: Message("", nil), + ErrUnknownOption: Message("Unknown option %s", nil), + ErrInvalidOptionVal: Message("Invalid option value for %s", nil), + ErrDuplicateOption: Message("Option %s specified more than once", nil), + ErrLoadDataUnsupportedOption: Message("Unsupported option %s for %s", nil), + ErrLoadDataJobNotFound: Message("Job ID %d doesn't exist", nil), + ErrLoadDataInvalidOperation: Message("The current job status cannot perform the operation. %s", nil), + ErrLoadDataLocalUnsupportedOption: Message("Unsupported option for LOAD DATA LOCAL INFILE: %s", nil), + ErrLoadDataPreCheckFailed: Message("PreCheck failed: %s", nil), + ErrMemoryExceedForQuery: 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: 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: Message("Delete can not find column %s for table %s", nil), + ErrKeyTooLarge: Message("key is too large, the size of given key is %d", nil), - ErrHTTPServiceError: mysql.Message("HTTP request failed with status %s", nil), + ErrHTTPServiceError: Message("HTTP request failed with status %s", nil), - 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), - ErrWarnOptimizerHintInvalidToken: mysql.Message("Cannot use %s '%s' (tok = %d) in an optimizer hint", nil), - ErrWarnMemoryQuotaOverflow: mysql.Message("Max value of MEMORY_QUOTA is %d bytes, ignore this invalid limit", nil), - ErrWarnOptimizerHintParseError: mysql.Message("Optimizer hint syntax error at %v", nil), - ErrWarnOptimizerHintWrongPos: mysql.Message("Optimizer hint can only be followed by certain keywords like SELECT, INSERT, etc.", nil), + ErrWarnOptimizerHintInvalidInteger: Message("integer value is out of range in '%s'", nil), + ErrWarnOptimizerHintUnsupportedHint: Message("Optimizer hint %s is not supported by TiDB and is ignored", nil), + ErrWarnOptimizerHintInvalidToken: Message("Cannot use %s '%s' (tok = %d) in an optimizer hint", nil), + ErrWarnMemoryQuotaOverflow: Message("Max value of MEMORY_QUOTA is %d bytes, ignore this invalid limit", nil), + ErrWarnOptimizerHintParseError: Message("Optimizer hint syntax error at %v", nil), + ErrWarnOptimizerHintWrongPos: Message("Optimizer hint can only be followed by certain keywords like SELECT, INSERT, etc.", nil), - ErrSequenceUnsupportedTableOption: mysql.Message("Unsupported sequence table-option %s", nil), - ErrColumnTypeUnsupportedNextValue: mysql.Message("Unsupported sequence default value for column type '%s'", nil), - ErrAddColumnWithSequenceAsDefault: mysql.Message("Unsupported using sequence as default value in add column '%s'", nil), - ErrUnsupportedType: mysql.Message("Unsupported type %T", nil), - ErrAnalyzeMissIndex: mysql.Message("Index '%s' in field list does not exist in table '%s'", nil), - ErrAnalyzeMissColumn: mysql.Message("Column '%s' in ANALYZE column option does not exist in table '%s'", nil), - ErrCartesianProductUnsupported: mysql.Message("Cartesian product is unsupported", nil), - ErrPreparedStmtNotFound: mysql.Message("Prepared statement not found", nil), - ErrWrongParamCount: mysql.Message("Wrong parameter count", nil), - ErrSchemaChanged: mysql.Message("Schema has changed", nil), - ErrUnknownPlan: mysql.Message("Unknown plan", nil), - ErrPrepareMulti: mysql.Message("Can not prepare multiple statements", nil), - ErrPrepareDDL: mysql.Message("Can not prepare DDL statements with parameters", nil), - ErrResultIsEmpty: mysql.Message("Result is empty", nil), - ErrBuildExecutor: mysql.Message("Failed to build executor", nil), - ErrBatchInsertFail: mysql.Message("Batch insert failed, please clean the table and try again.", nil), - ErrGetStartTS: mysql.Message("Can not get start ts", nil), - ErrPrivilegeCheckFail: mysql.Message("privilege check for '%s' fail", nil), // this error message should begin lowercased to be compatible with the test - ErrInvalidWildCard: mysql.Message("Wildcard fields without any table name appears in wrong place", nil), - ErrMixOfGroupFuncAndFieldsIncompatible: mysql.Message("In aggregated query without GROUP BY, expression #%d of SELECT list contains nonaggregated column '%s'; this is incompatible with sql_mode=only_full_group_by", nil), - ErrUnsupportedSecondArgumentType: mysql.Message("JSON_OBJECTAGG: unsupported second argument type %v", nil), - ErrColumnNotMatched: mysql.Message("Load data: unmatched columns", nil), - ErrLockExpire: mysql.Message("TTL manager has timed out, pessimistic locks may expire, please commit or rollback this transaction", nil), - ErrTableOptionUnionUnsupported: mysql.Message("CREATE/ALTER table with union option is not supported", nil), - ErrTableOptionInsertMethodUnsupported: mysql.Message("CREATE/ALTER table with insert method option is not supported", nil), - ErrUserLockDeadlock: mysql.Message("Deadlock found when trying to get user-level lock; try rolling back transaction/releasing locks and restarting lock acquisition.", nil), - ErrUserLockWrongName: mysql.Message("Incorrect user-level lock name '%s'.", nil), + ErrSequenceUnsupportedTableOption: Message("Unsupported sequence table-option %s", nil), + ErrColumnTypeUnsupportedNextValue: Message("Unsupported sequence default value for column type '%s'", nil), + ErrAddColumnWithSequenceAsDefault: Message("Unsupported using sequence as default value in add column '%s'", nil), + ErrUnsupportedType: Message("Unsupported type %T", nil), + ErrAnalyzeMissIndex: Message("Index '%s' in field list does not exist in table '%s'", nil), + ErrAnalyzeMissColumn: Message("Column '%s' in ANALYZE column option does not exist in table '%s'", nil), + ErrCartesianProductUnsupported: Message("Cartesian product is unsupported", nil), + ErrPreparedStmtNotFound: Message("Prepared statement not found", nil), + ErrWrongParamCount: Message("Wrong parameter count", nil), + ErrSchemaChanged: Message("Schema has changed", nil), + ErrUnknownPlan: Message("Unknown plan", nil), + ErrPrepareMulti: Message("Can not prepare multiple statements", nil), + ErrPrepareDDL: Message("Can not prepare DDL statements with parameters", nil), + ErrResultIsEmpty: Message("Result is empty", nil), + ErrBuildExecutor: Message("Failed to build executor", nil), + ErrBatchInsertFail: Message("Batch insert failed, please clean the table and try again.", nil), + ErrGetStartTS: Message("Can not get start ts", nil), + ErrPrivilegeCheckFail: Message("privilege check for '%s' fail", nil), // this error message should begin lowercased to be compatible with the test + ErrInvalidWildCard: Message("Wildcard fields without any table name appears in wrong place", nil), + ErrMixOfGroupFuncAndFieldsIncompatible: Message("In aggregated query without GROUP BY, expression #%d of SELECT list contains nonaggregated column '%s'; this is incompatible with sql_mode=only_full_group_by", nil), + ErrUnsupportedSecondArgumentType: Message("JSON_OBJECTAGG: unsupported second argument type %v", nil), + ErrColumnNotMatched: Message("Load data: unmatched columns", nil), + ErrLockExpire: Message("TTL manager has timed out, pessimistic locks may expire, please commit or rollback this transaction", nil), + ErrTableOptionUnionUnsupported: Message("CREATE/ALTER table with union option is not supported", nil), + ErrTableOptionInsertMethodUnsupported: Message("CREATE/ALTER table with insert method option is not supported", nil), + ErrUserLockDeadlock: Message("Deadlock found when trying to get user-level lock; try rolling back transaction/releasing locks and restarting lock acquisition.", nil), + ErrUserLockWrongName: Message("Incorrect user-level lock name '%s'.", nil), - ErrBRIEBackupFailed: mysql.Message("Backup failed: %s", nil), - ErrBRIERestoreFailed: mysql.Message("Restore failed: %s", nil), - ErrBRIEImportFailed: mysql.Message("Import failed: %s", nil), - ErrBRIEExportFailed: mysql.Message("Export failed: %s", nil), - ErrBRJobNotFound: mysql.Message("BRIE Job %d not found", nil), + ErrBRIEBackupFailed: Message("Backup failed: %s", nil), + ErrBRIERestoreFailed: Message("Restore failed: %s", nil), + ErrBRIEImportFailed: Message("Import failed: %s", nil), + ErrBRIEExportFailed: Message("Export failed: %s", nil), + ErrBRJobNotFound: Message("BRIE Job %d not found", nil), - ErrInvalidTableSample: mysql.Message("Invalid TABLESAMPLE: %s", nil), + ErrInvalidTableSample: Message("Invalid TABLESAMPLE: %s", nil), - ErrJSONObjectKeyTooLong: mysql.Message("TiDB does not yet support JSON objects with the key length >= 65536", nil), - ErrPartitionStatsMissing: mysql.Message("Build global-level stats failed due to missing partition-level stats: %s", nil), - ErrPartitionColumnStatsMissing: mysql.Message("Build global-level stats failed due to missing partition-level column stats: %s, please run analyze table to refresh columns of all partitions", nil), - ErrDDLSetting: mysql.Message("Error happened when %s DDL: %s", nil), - ErrIngestFailed: mysql.Message("Ingest failed: %s", nil), - ErrIngestCheckEnvFailed: mysql.Message("Check ingest environment failed: %s", nil), - ErrNotSupportedWithSem: mysql.Message("Feature '%s' is not supported when security enhanced mode is enabled", nil), + ErrJSONObjectKeyTooLong: Message("TiDB does not yet support JSON objects with the key length >= 65536", nil), + ErrPartitionStatsMissing: Message("Build global-level stats failed due to missing partition-level stats: %s", nil), + ErrPartitionColumnStatsMissing: Message("Build global-level stats failed due to missing partition-level column stats: %s, please run analyze table to refresh columns of all partitions", nil), + ErrDDLSetting: Message("Error happened when %s DDL: %s", nil), + ErrIngestFailed: Message("Ingest failed: %s", nil), + ErrIngestCheckEnvFailed: Message("Check ingest environment failed: %s", nil), + ErrNotSupportedWithSem: Message("Feature '%s' is not supported when security enhanced mode is enabled", nil), - ErrPlacementPolicyCheck: mysql.Message("Placement policy didn't meet the constraint, reason: %s", nil), - ErrMultiStatementDisabled: mysql.Message("client has multi-statement capability disabled. Run SET GLOBAL tidb_multi_statement_mode='ON' after you understand the security risk", nil), - ErrAsOf: mysql.Message("invalid as of timestamp: %s", nil), - ErrVariableNoLongerSupported: mysql.Message("option '%s' is no longer supported. Reason: %s", nil), - ErrInvalidAttributesSpec: mysql.Message("Invalid attributes: %s", nil), - ErrPlacementPolicyExists: mysql.Message("Placement policy '%-.192s' already exists", nil), - ErrPlacementPolicyNotExists: mysql.Message("Unknown placement policy '%-.192s'", nil), - ErrPlacementPolicyWithDirectOption: mysql.Message("Placement policy '%s' can't co-exist with direct placement options", nil), - ErrPlacementPolicyInUse: mysql.Message("Placement policy '%-.192s' is still in use", nil), - ErrOptOnCacheTable: mysql.Message("'%s' is unsupported on cache tables.", nil), - ErrResourceGroupExists: mysql.Message("Resource group '%-.192s' already exists", nil), - ErrResourceGroupNotExists: mysql.Message("Unknown resource group '%-.192s'", nil), - ErrResourceGroupInvalidForRole: mysql.Message("Cannot set resource group for a role", nil), + ErrPlacementPolicyCheck: Message("Placement policy didn't meet the constraint, reason: %s", nil), + ErrMultiStatementDisabled: Message("client has multi-statement capability disabled. Run SET GLOBAL tidb_multi_statement_mode='ON' after you understand the security risk", nil), + ErrAsOf: Message("invalid as of timestamp: %s", nil), + ErrVariableNoLongerSupported: Message("option '%s' is no longer supported. Reason: %s", nil), + ErrInvalidAttributesSpec: Message("Invalid attributes: %s", nil), + ErrPlacementPolicyExists: Message("Placement policy '%-.192s' already exists", nil), + ErrPlacementPolicyNotExists: Message("Unknown placement policy '%-.192s'", nil), + ErrPlacementPolicyWithDirectOption: Message("Placement policy '%s' can't co-exist with direct placement options", nil), + ErrPlacementPolicyInUse: Message("Placement policy '%-.192s' is still in use", nil), + ErrOptOnCacheTable: Message("'%s' is unsupported on cache tables.", nil), + ErrResourceGroupExists: Message("Resource group '%-.192s' already exists", nil), + ErrResourceGroupNotExists: Message("Unknown resource group '%-.192s'", nil), + ErrResourceGroupInvalidForRole: Message("Cannot set resource group for a role", nil), - ErrColumnInChange: mysql.Message("column %s id %d does not exist, this column may have been updated by other DDL ran in parallel", nil), - ErrResourceGroupSupportDisabled: mysql.Message("Resource control feature is disabled. Run `SET GLOBAL tidb_enable_resource_control='on'` to enable the feature", nil), - ErrResourceGroupConfigUnavailable: mysql.Message("Resource group configuration is unavailable", nil), - ErrResourceGroupThrottled: mysql.Message("Exceeded resource group quota limitation", nil), - ErrResourceGroupQueryRunawayInterrupted: mysql.Message("Query execution was interrupted, identified as runaway query [%s]", nil), - ErrResourceGroupQueryRunawayQuarantine: mysql.Message("Quarantined and interrupted because of being in runaway watch list", nil), - ErrResourceGroupInvalidBackgroundTaskName: mysql.Message("Unknown background task name '%-.192s'", nil), + ErrColumnInChange: Message("column %s id %d does not exist, this column may have been updated by other DDL ran in parallel", nil), + ErrResourceGroupSupportDisabled: Message("Resource control feature is disabled. Run `SET GLOBAL tidb_enable_resource_control='on'` to enable the feature", nil), + ErrResourceGroupConfigUnavailable: Message("Resource group configuration is unavailable", nil), + ErrResourceGroupThrottled: Message("Exceeded resource group quota limitation", nil), + ErrResourceGroupQueryRunawayInterrupted: Message("Query execution was interrupted, identified as runaway query [%s]", nil), + ErrResourceGroupQueryRunawayQuarantine: Message("Quarantined and interrupted because of being in runaway watch list", nil), + ErrResourceGroupInvalidBackgroundTaskName: Message("Unknown background task name '%-.192s'", nil), // TiKV/PD errors. - ErrPDServerTimeout: mysql.Message("PD server timeout: %s", nil), - ErrTiKVServerTimeout: mysql.Message("TiKV server timeout", nil), - ErrTiKVServerBusy: mysql.Message("TiKV server is busy", nil), - ErrTiFlashServerTimeout: mysql.Message("TiFlash server timeout", nil), - ErrTiFlashServerBusy: mysql.Message("TiFlash server is busy", nil), - ErrTiFlashBackfillIndex: mysql.Message("TiFlash backfill index failed: %s", nil), - ErrResolveLockTimeout: mysql.Message("Resolve lock timeout", nil), - ErrRegionUnavailable: mysql.Message("Region is unavailable", nil), - ErrGCTooEarly: mysql.Message("GC life time is shorter than transaction duration, transaction starts at %v, GC safe point is %v", nil), - ErrWriteConflict: mysql.Message("Write conflict, txnStartTS=%d, conflictStartTS=%d, conflictCommitTS=%d, key=%s%s%s%s, reason=%s", []int{3, 4, 5, 6}), // the first and third parts of the key are the optional database names and table names - ErrTiKVStoreLimit: mysql.Message("Store token is up to the limit, store id = %d", nil), - ErrPrometheusAddrIsNotSet: mysql.Message("Prometheus address is not set in PD and etcd", nil), - ErrTiKVStaleCommand: mysql.Message("TiKV server reports stale command", nil), - ErrTiKVMaxTimestampNotSynced: mysql.Message("TiKV max timestamp is not synced", nil), + ErrPDServerTimeout: Message("PD server timeout: %s", nil), + ErrTiKVServerTimeout: Message("TiKV server timeout", nil), + ErrTiKVServerBusy: Message("TiKV server is busy", nil), + ErrTiFlashServerTimeout: Message("TiFlash server timeout", nil), + ErrTiFlashServerBusy: Message("TiFlash server is busy", nil), + ErrTiFlashBackfillIndex: Message("TiFlash backfill index failed: %s", nil), + ErrResolveLockTimeout: Message("Resolve lock timeout", nil), + ErrRegionUnavailable: Message("Region is unavailable", nil), + ErrGCTooEarly: Message("GC life time is shorter than transaction duration, transaction starts at %v, GC safe point is %v", nil), + ErrWriteConflict: Message("Write conflict, txnStartTS=%d, conflictStartTS=%d, conflictCommitTS=%d, key=%s%s%s%s, reason=%s", []int{3, 4, 5, 6}), // the first and third parts of the key are the optional database names and table names + ErrTiKVStoreLimit: Message("Store token is up to the limit, store id = %d", nil), + ErrPrometheusAddrIsNotSet: Message("Prometheus address is not set in PD and etcd", nil), + ErrTiKVStaleCommand: Message("TiKV server reports stale command", nil), + ErrTiKVMaxTimestampNotSynced: Message("TiKV max timestamp is not synced", nil), - ErrCannotPauseDDLJob: mysql.Message("Job [%v] can't be paused: %s", nil), - ErrCannotResumeDDLJob: mysql.Message("Job [%v] can't be resumed: %s", nil), - ErrPausedDDLJob: mysql.Message("Job [%v] has already been paused", nil), - ErrBDRRestrictedDDL: mysql.Message("The operation is not allowed while the bdr role of this cluster is set to %s.", nil), + ErrCannotPauseDDLJob: Message("Job [%v] can't be paused: %s", nil), + ErrCannotResumeDDLJob: Message("Job [%v] can't be resumed: %s", nil), + ErrPausedDDLJob: Message("Job [%v] has already been paused", nil), + ErrBDRRestrictedDDL: Message("The operation is not allowed while the bdr role of this cluster is set to %s.", nil), - ErrGlobalIndexNotExplicitlySet: mysql.Message("Global Index is needed for index '%-.192s', since the unique index is not including all partitioning columns, and GLOBAL is not given as IndexOption", nil), + ErrGlobalIndexNotExplicitlySet: Message("Global Index is needed for index '%-.192s', since the unique index is not including all partitioning columns, and GLOBAL is not given as IndexOption", nil), - ErrWarnGlobalIndexNeedManuallyAnalyze: mysql.Message("Auto analyze is not effective for index '%-.192s', need analyze manually", nil), + ErrWarnGlobalIndexNeedManuallyAnalyze: Message("Auto analyze is not effective for index '%-.192s', need analyze manually", nil), } diff --git a/pkg/executor/insert.go b/pkg/executor/insert.go index f6fc14d49c840..7796761483a9b 100644 --- a/pkg/executor/insert.go +++ b/pkg/executor/insert.go @@ -565,7 +565,7 @@ func (e *InsertExec) setMessage() { numDuplicates = stmtCtx.UpdatedRows() } } - msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrInsertInfo].Raw, numRecords, numDuplicates, numWarnings) + msg := fmt.Sprintf(errno.MySQLErrName[errno.ErrInsertInfo].Raw, numRecords, numDuplicates, numWarnings) stmtCtx.SetMessage(msg) } } diff --git a/pkg/executor/load_data.go b/pkg/executor/load_data.go index e034098518532..4c629bbe96d09 100644 --- a/pkg/executor/load_data.go +++ b/pkg/executor/load_data.go @@ -26,6 +26,7 @@ import ( "github.com/pingcap/failpoint" "github.com/pingcap/tidb/br/pkg/storage" "github.com/pingcap/tidb/pkg/errctx" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/executor/importer" "github.com/pingcap/tidb/pkg/executor/internal/exec" "github.com/pingcap/tidb/pkg/expression" @@ -276,7 +277,7 @@ func (e *LoadDataWorker) setResult(colAssignExprWarnings []contextutil.SQLWarn) numWarnings = math.MaxUint16 } - msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrLoadInfo].Raw, numRecords, numDeletes, numSkipped, numWarnings) + msg := fmt.Sprintf(errno.MySQLErrName[errno.ErrLoadInfo].Raw, numRecords, numDeletes, numSkipped, numWarnings) warns := make([]contextutil.SQLWarn, numWarnings) n := copy(warns, stmtCtx.GetWarnings()) for i := 0; i < int(numRecords) && n < len(warns); i++ { diff --git a/pkg/executor/replace.go b/pkg/executor/replace.go index 3b9e9b4101d34..6db5fe01c695e 100644 --- a/pkg/executor/replace.go +++ b/pkg/executor/replace.go @@ -20,10 +20,10 @@ import ( "runtime/trace" "time" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/executor/internal/exec" "github.com/pingcap/tidb/pkg/kv" "github.com/pingcap/tidb/pkg/meta/autoid" - "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/table" "github.com/pingcap/tidb/pkg/table/tables" "github.com/pingcap/tidb/pkg/tablecodec" @@ -213,7 +213,7 @@ func (e *ReplaceExec) setMessage() { if e.SelectExec != nil || numRecords > 1 { numWarnings := stmtCtx.WarningCount() numDuplicates := stmtCtx.AffectedRows() - numRecords - msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrInsertInfo].Raw, numRecords, numDuplicates, numWarnings) + msg := fmt.Sprintf(errno.MySQLErrName[errno.ErrInsertInfo].Raw, numRecords, numDuplicates, numWarnings) stmtCtx.SetMessage(msg) } } diff --git a/pkg/executor/show.go b/pkg/executor/show.go index d2931285aa1a8..6990a58088f95 100644 --- a/pkg/executor/show.go +++ b/pkg/executor/show.go @@ -35,6 +35,7 @@ import ( "github.com/pingcap/tidb/pkg/disttask/importinto" "github.com/pingcap/tidb/pkg/domain" "github.com/pingcap/tidb/pkg/domain/infosync" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/executor/importer" "github.com/pingcap/tidb/pkg/executor/internal/exec" "github.com/pingcap/tidb/pkg/expression" @@ -1986,7 +1987,7 @@ func (e *ShowExec) fetchShowWarnings(errOnly bool) error { if warn != nil { err = warn.Error() } - e.appendRow([]any{w.Level, int64(mysql.ErrUnknown), err}) + e.appendRow([]any{w.Level, int64(errno.ErrUnknown), err}) } } return nil diff --git a/pkg/executor/update.go b/pkg/executor/update.go index 8e237e8a21286..381eb3911461f 100644 --- a/pkg/executor/update.go +++ b/pkg/executor/update.go @@ -21,6 +21,7 @@ import ( "runtime/trace" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/executor/internal/exec" "github.com/pingcap/tidb/pkg/expression" "github.com/pingcap/tidb/pkg/kv" @@ -566,7 +567,7 @@ func (e *UpdateExec) setMessage() { numMatched := e.matched numChanged := stmtCtx.UpdatedRows() numWarnings := stmtCtx.WarningCount() - msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUpdateInfo].Raw, numMatched, numChanged, numWarnings) + msg := fmt.Sprintf(errno.MySQLErrName[errno.ErrUpdateInfo].Raw, numMatched, numChanged, numWarnings) stmtCtx.SetMessage(msg) } diff --git a/pkg/expression/builtin_miscellaneous.go b/pkg/expression/builtin_miscellaneous.go index 5dce7287b7180..cb44a687efad5 100644 --- a/pkg/expression/builtin_miscellaneous.go +++ b/pkg/expression/builtin_miscellaneous.go @@ -27,6 +27,7 @@ import ( "github.com/google/uuid" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/expression/expropt" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" @@ -251,9 +252,9 @@ func (b *builtinLockSig) evalInt(ctx EvalContext, row chunk.Row) (int64, bool, e if err != nil { if terr, ok := errors.Cause(err).(*terror.Error); ok { switch terr.Code() { - case mysql.ErrLockWaitTimeout: + case errno.ErrLockWaitTimeout: return 0, false, nil // Another user has the lock - case mysql.ErrLockDeadlock: + case errno.ErrLockDeadlock: // Currently this code is not reachable because each Advisory Lock // Uses a separate session. Deadlock detection does not work across // independent sessions. diff --git a/pkg/expression/errors.go b/pkg/expression/errors.go index 55e2c6b16fd22..2afa23f08f55b 100644 --- a/pkg/expression/errors.go +++ b/pkg/expression/errors.go @@ -17,7 +17,6 @@ package expression import ( "github.com/pingcap/errors" mysql "github.com/pingcap/tidb/pkg/errno" - pmysql "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/types" "github.com/pingcap/tidb/pkg/util/dbterror" ) @@ -30,7 +29,7 @@ var ( ErrRegexp = dbterror.ClassExpression.NewStd(mysql.ErrRegexp) ErrOperandColumns = dbterror.ClassExpression.NewStd(mysql.ErrOperandColumns) ErrCutValueGroupConcat = dbterror.ClassExpression.NewStd(mysql.ErrCutValueGroupConcat) - ErrFunctionsNoopImpl = dbterror.ClassExpression.NewStdErr(mysql.ErrNotSupportedYet, pmysql.Message("function %s has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions", nil)) + ErrFunctionsNoopImpl = dbterror.ClassExpression.NewStdErr(mysql.ErrNotSupportedYet, mysql.Message("function %s has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions", nil)) ErrInvalidArgumentForLogarithm = dbterror.ClassExpression.NewStd(mysql.ErrInvalidArgumentForLogarithm) ErrIncorrectType = dbterror.ClassExpression.NewStd(mysql.ErrIncorrectType) ErrInvalidTypeForJSON = dbterror.ClassExpression.NewStd(mysql.ErrInvalidTypeForJSON) @@ -46,7 +45,7 @@ var ( errZlibZBuf = dbterror.ClassExpression.NewStd(mysql.ErrZlibZBuf) errIncorrectArgs = dbterror.ClassExpression.NewStd(mysql.ErrWrongArguments) errUnknownCharacterSet = dbterror.ClassExpression.NewStd(mysql.ErrUnknownCharacterSet) - errDefaultValue = dbterror.ClassExpression.NewStdErr(mysql.ErrInvalidDefault, pmysql.Message("invalid default value", nil)) + errDefaultValue = dbterror.ClassExpression.NewStdErr(mysql.ErrInvalidDefault, mysql.Message("invalid default value", nil)) errDeprecatedSyntaxNoReplacement = dbterror.ClassExpression.NewStd(mysql.ErrWarnDeprecatedSyntaxNoReplacement) errWarnAllowedPacketOverflowed = dbterror.ClassExpression.NewStd(mysql.ErrWarnAllowedPacketOverflowed) errWarnOptionIgnored = dbterror.ClassExpression.NewStd(mysql.WarnOptionIgnored) @@ -64,7 +63,7 @@ var ( // Sequence usage privilege check. errSequenceAccessDenied = dbterror.ClassExpression.NewStd(mysql.ErrTableaccessDenied) errUnsupportedJSONComparison = dbterror.ClassExpression.NewStdErr(mysql.ErrNotSupportedYet, - pmysql.Message("comparison of JSON in the LEAST and GREATEST operators", nil)) + mysql.Message("comparison of JSON in the LEAST and GREATEST operators", nil)) ) // handleInvalidTimeError reports error or warning depend on the context. diff --git a/pkg/kv/BUILD.bazel b/pkg/kv/BUILD.bazel index 196b70fc3203b..83ff3817fbb6a 100644 --- a/pkg/kv/BUILD.bazel +++ b/pkg/kv/BUILD.bazel @@ -26,7 +26,6 @@ go_library( "//pkg/errno", "//pkg/meta/model", "//pkg/parser", - "//pkg/parser/mysql", "//pkg/parser/terror", "//pkg/resourcegroup", "//pkg/types", diff --git a/pkg/kv/error.go b/pkg/kv/error.go index b09326477bee3..3cc344b1c28cb 100644 --- a/pkg/kv/error.go +++ b/pkg/kv/error.go @@ -17,8 +17,8 @@ package kv import ( "strings" + "github.com/pingcap/tidb/pkg/errno" mysql "github.com/pingcap/tidb/pkg/errno" - pmysql "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/util/dbterror" ) @@ -34,7 +34,7 @@ var ( // subject to change it in the future. ErrTxnRetryable = dbterror.ClassKV.NewStdErr( mysql.ErrTxnRetryable, - pmysql.Message( + errno.Message( mysql.MySQLErrName[mysql.ErrTxnRetryable].Raw+TxnRetryableMark, mysql.MySQLErrName[mysql.ErrTxnRetryable].RedactArgPos, ), @@ -57,7 +57,7 @@ var ( // ErrWriteConflict is the error when the commit meets an write conflict error. ErrWriteConflict = dbterror.ClassKV.NewStdErr( mysql.ErrWriteConflict, - pmysql.Message( + errno.Message( mysql.MySQLErrName[mysql.ErrWriteConflict].Raw+" "+TxnRetryableMark, mysql.MySQLErrName[mysql.ErrWriteConflict].RedactArgPos, ), @@ -65,7 +65,7 @@ var ( // ErrWriteConflictInTiDB is the error when the commit meets an write conflict error when local latch is enabled. ErrWriteConflictInTiDB = dbterror.ClassKV.NewStdErr( mysql.ErrWriteConflictInTiDB, - pmysql.Message( + errno.Message( mysql.MySQLErrName[mysql.ErrWriteConflictInTiDB].Raw+" "+TxnRetryableMark, mysql.MySQLErrName[mysql.ErrWriteConflictInTiDB].RedactArgPos, ), diff --git a/pkg/lightning/common/util.go b/pkg/lightning/common/util.go index 7017e79a646c2..fe977a05bf111 100644 --- a/pkg/lightning/common/util.go +++ b/pkg/lightning/common/util.go @@ -97,7 +97,7 @@ func tryConnectMySQL(cfg *mysql.Config) (*sql.DB, error) { failpoint.Inject("MustMySQLPassword", func(val failpoint.Value) { pwd := val.(string) if cfg.Passwd != pwd { - failpoint.Return(nil, &mysql.MySQLError{Number: tmysql.ErrAccessDenied, Message: "access denied"}) + failpoint.Return(nil, &mysql.MySQLError{Number: errno.ErrAccessDenied, Message: "access denied"}) } failpoint.Return(nil, nil) }) @@ -122,7 +122,7 @@ func ConnectMySQL(cfg *mysql.Config) (*sql.DB, error) { return db, nil } // If access is denied and password is encoded by base64, try the decoded string as well. - if mysqlErr, ok := errors.Cause(firstErr).(*mysql.MySQLError); ok && mysqlErr.Number == tmysql.ErrAccessDenied { + if mysqlErr, ok := errors.Cause(firstErr).(*mysql.MySQLError); ok && mysqlErr.Number == errno.ErrAccessDenied { // If password is encoded by base64, try the decoded string as well. password, decodeErr := base64.StdEncoding.DecodeString(cfg.Passwd) if decodeErr == nil && string(password) != cfg.Passwd { diff --git a/pkg/meta/meta.go b/pkg/meta/meta.go index d7ea87b7ca817..0d97ebeaa3be4 100644 --- a/pkg/meta/meta.go +++ b/pkg/meta/meta.go @@ -134,9 +134,9 @@ const ( var ( // ErrDBExists is the error for db exists. - ErrDBExists = dbterror.ClassMeta.NewStd(mysql.ErrDBCreateExists) + ErrDBExists = dbterror.ClassMeta.NewStd(errno.ErrDBCreateExists) // ErrDBNotExists is the error for db not exists. - ErrDBNotExists = dbterror.ClassMeta.NewStd(mysql.ErrBadDB) + ErrDBNotExists = dbterror.ClassMeta.NewStd(errno.ErrBadDB) // ErrPolicyExists is the error for policy exists. ErrPolicyExists = dbterror.ClassMeta.NewStd(errno.ErrPlacementPolicyExists) // ErrPolicyNotExists is the error for policy not exists. @@ -146,9 +146,9 @@ var ( // ErrResourceGroupNotExists is the error for resource group not exists. ErrResourceGroupNotExists = dbterror.ClassMeta.NewStd(errno.ErrResourceGroupNotExists) // ErrTableExists is the error for table exists. - ErrTableExists = dbterror.ClassMeta.NewStd(mysql.ErrTableExists) + ErrTableExists = dbterror.ClassMeta.NewStd(errno.ErrTableExists) // ErrTableNotExists is the error for table not exists. - ErrTableNotExists = dbterror.ClassMeta.NewStd(mysql.ErrNoSuchTable) + ErrTableNotExists = dbterror.ClassMeta.NewStd(errno.ErrNoSuchTable) // ErrDDLReorgElementNotExist is the error for reorg element not exists. ErrDDLReorgElementNotExist = dbterror.ClassMeta.NewStd(errno.ErrDDLReorgElementNotExist) // ErrInvalidString is the error for invalid string to parse diff --git a/pkg/parser/BUILD.bazel b/pkg/parser/BUILD.bazel index b81fab9b917c6..990021a5b2013 100644 --- a/pkg/parser/BUILD.bazel +++ b/pkg/parser/BUILD.bazel @@ -21,6 +21,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/ast", "//pkg/parser/auth", "//pkg/parser/charset", diff --git a/pkg/parser/ast/BUILD.bazel b/pkg/parser/ast/BUILD.bazel index e0291f44d6ce7..09e61d9b884e3 100644 --- a/pkg/parser/ast/BUILD.bazel +++ b/pkg/parser/ast/BUILD.bazel @@ -19,6 +19,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser/ast", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/auth", "//pkg/parser/charset", "//pkg/parser/format", diff --git a/pkg/parser/ast/ddl.go b/pkg/parser/ast/ddl.go index 1feaec655bdca..2fd3a00f788d0 100644 --- a/pkg/parser/ast/ddl.go +++ b/pkg/parser/ast/ddl.go @@ -18,9 +18,9 @@ import ( "strings" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/auth" "github.com/pingcap/tidb/pkg/parser/format" - "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" "github.com/pingcap/tidb/pkg/parser/tidb" "github.com/pingcap/tidb/pkg/parser/types" @@ -4004,21 +4004,21 @@ func (n *TruncateTableStmt) Accept(v Visitor) (Node, bool) { } var ( - ErrNoParts = terror.ClassDDL.NewStd(mysql.ErrNoParts) - ErrPartitionColumnList = terror.ClassDDL.NewStd(mysql.ErrPartitionColumnList) - ErrPartitionRequiresValues = terror.ClassDDL.NewStd(mysql.ErrPartitionRequiresValues) - ErrPartitionsMustBeDefined = terror.ClassDDL.NewStd(mysql.ErrPartitionsMustBeDefined) - ErrPartitionWrongNoPart = terror.ClassDDL.NewStd(mysql.ErrPartitionWrongNoPart) - ErrPartitionWrongNoSubpart = terror.ClassDDL.NewStd(mysql.ErrPartitionWrongNoSubpart) - ErrPartitionWrongValues = terror.ClassDDL.NewStd(mysql.ErrPartitionWrongValues) - ErrRowSinglePartitionField = terror.ClassDDL.NewStd(mysql.ErrRowSinglePartitionField) - ErrSubpartition = terror.ClassDDL.NewStd(mysql.ErrSubpartition) - ErrSystemVersioningWrongPartitions = terror.ClassDDL.NewStd(mysql.ErrSystemVersioningWrongPartitions) - ErrTooManyValues = terror.ClassDDL.NewStd(mysql.ErrTooManyValues) - ErrWrongPartitionTypeExpectedSystemTime = terror.ClassDDL.NewStd(mysql.ErrWrongPartitionTypeExpectedSystemTime) - ErrUnknownCharacterSet = terror.ClassDDL.NewStd(mysql.ErrUnknownCharacterSet) - ErrCoalescePartitionNoPartition = terror.ClassDDL.NewStd(mysql.ErrCoalescePartitionNoPartition) - ErrWrongUsage = terror.ClassDDL.NewStd(mysql.ErrWrongUsage) + ErrNoParts = terror.ClassDDL.NewStd(errno.ErrNoParts) + ErrPartitionColumnList = terror.ClassDDL.NewStd(errno.ErrPartitionColumnList) + ErrPartitionRequiresValues = terror.ClassDDL.NewStd(errno.ErrPartitionRequiresValues) + ErrPartitionsMustBeDefined = terror.ClassDDL.NewStd(errno.ErrPartitionsMustBeDefined) + ErrPartitionWrongNoPart = terror.ClassDDL.NewStd(errno.ErrPartitionWrongNoPart) + ErrPartitionWrongNoSubpart = terror.ClassDDL.NewStd(errno.ErrPartitionWrongNoSubpart) + ErrPartitionWrongValues = terror.ClassDDL.NewStd(errno.ErrPartitionWrongValues) + ErrRowSinglePartitionField = terror.ClassDDL.NewStd(errno.ErrRowSinglePartitionField) + ErrSubpartition = terror.ClassDDL.NewStd(errno.ErrSubpartition) + ErrSystemVersioningWrongPartitions = terror.ClassDDL.NewStd(errno.ErrSystemVersioningWrongPartitions) + ErrTooManyValues = terror.ClassDDL.NewStd(errno.ErrTooManyValues) + ErrWrongPartitionTypeExpectedSystemTime = terror.ClassDDL.NewStd(errno.ErrWrongPartitionTypeExpectedSystemTime) + ErrUnknownCharacterSet = terror.ClassDDL.NewStd(errno.ErrUnknownCharacterSet) + ErrCoalescePartitionNoPartition = terror.ClassDDL.NewStd(errno.ErrCoalescePartitionNoPartition) + ErrWrongUsage = terror.ClassDDL.NewStd(errno.ErrWrongUsage) ) type SubPartitionDefinition struct { diff --git a/pkg/parser/charset/BUILD.bazel b/pkg/parser/charset/BUILD.bazel index 56718a7644d60..dcefd750a2e7c 100644 --- a/pkg/parser/charset/BUILD.bazel +++ b/pkg/parser/charset/BUILD.bazel @@ -16,6 +16,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser/charset", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/mysql", "//pkg/parser/terror", "@com_github_pingcap_errors//:errors", diff --git a/pkg/parser/charset/charset.go b/pkg/parser/charset/charset.go index 69adcae00e297..7d6388c3e374f 100644 --- a/pkg/parser/charset/charset.go +++ b/pkg/parser/charset/charset.go @@ -19,6 +19,7 @@ import ( "github.com/pingcap/errors" "github.com/pingcap/log" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" "go.uber.org/zap" @@ -26,9 +27,9 @@ import ( var ( // ErrUnknownCollation is unknown collation. - ErrUnknownCollation = terror.ClassDDL.NewStd(mysql.ErrUnknownCollation) + ErrUnknownCollation = terror.ClassDDL.NewStd(errno.ErrUnknownCollation) // ErrCollationCharsetMismatch is collation charset mismatch. - ErrCollationCharsetMismatch = terror.ClassDDL.NewStd(mysql.ErrCollationCharsetMismatch) + ErrCollationCharsetMismatch = terror.ClassDDL.NewStd(errno.ErrCollationCharsetMismatch) ) var ( diff --git a/pkg/parser/charset/encoding_base.go b/pkg/parser/charset/encoding_base.go index ec4f1b26037cf..38f043e7f3fd5 100644 --- a/pkg/parser/charset/encoding_base.go +++ b/pkg/parser/charset/encoding_base.go @@ -20,14 +20,14 @@ import ( "strings" "unsafe" - "github.com/pingcap/tidb/pkg/parser/mysql" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/terror" "golang.org/x/text/encoding" "golang.org/x/text/transform" ) // ErrInvalidCharacterString returns when the string is invalid in the specific charset. -var ErrInvalidCharacterString = terror.ClassParser.NewStd(mysql.ErrInvalidCharacterString) +var ErrInvalidCharacterString = terror.ClassParser.NewStd(errno.ErrInvalidCharacterString) // encodingBase defines some generic functions. type encodingBase struct { diff --git a/pkg/parser/hintparserimpl.go b/pkg/parser/hintparserimpl.go index a3dcc18deae88..57e4d50d16aed 100644 --- a/pkg/parser/hintparserimpl.go +++ b/pkg/parser/hintparserimpl.go @@ -17,6 +17,7 @@ import ( "strconv" "strings" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/ast" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" @@ -24,12 +25,12 @@ import ( //revive:disable:exported var ( - ErrWarnOptimizerHintUnsupportedHint = terror.ClassParser.NewStd(mysql.ErrWarnOptimizerHintUnsupportedHint) - ErrWarnOptimizerHintInvalidToken = terror.ClassParser.NewStd(mysql.ErrWarnOptimizerHintInvalidToken) - ErrWarnMemoryQuotaOverflow = terror.ClassParser.NewStd(mysql.ErrWarnMemoryQuotaOverflow) - ErrWarnOptimizerHintParseError = terror.ClassParser.NewStd(mysql.ErrWarnOptimizerHintParseError) - ErrWarnOptimizerHintInvalidInteger = terror.ClassParser.NewStd(mysql.ErrWarnOptimizerHintInvalidInteger) - ErrWarnOptimizerHintWrongPos = terror.ClassParser.NewStd(mysql.ErrWarnOptimizerHintWrongPos) + ErrWarnOptimizerHintUnsupportedHint = terror.ClassParser.NewStd(errno.ErrWarnOptimizerHintUnsupportedHint) + ErrWarnOptimizerHintInvalidToken = terror.ClassParser.NewStd(errno.ErrWarnOptimizerHintInvalidToken) + ErrWarnMemoryQuotaOverflow = terror.ClassParser.NewStd(errno.ErrWarnMemoryQuotaOverflow) + ErrWarnOptimizerHintParseError = terror.ClassParser.NewStd(errno.ErrWarnOptimizerHintParseError) + ErrWarnOptimizerHintInvalidInteger = terror.ClassParser.NewStd(errno.ErrWarnOptimizerHintInvalidInteger) + ErrWarnOptimizerHintWrongPos = terror.ClassParser.NewStd(errno.ErrWarnOptimizerHintWrongPos) ) //revive:enable:exported diff --git a/pkg/parser/mysql/BUILD.bazel b/pkg/parser/mysql/BUILD.bazel index 7a1a3b80ce437..5df83846a41c7 100644 --- a/pkg/parser/mysql/BUILD.bazel +++ b/pkg/parser/mysql/BUILD.bazel @@ -5,8 +5,6 @@ go_library( srcs = [ "charset.go", "const.go", - "errcode.go", - "errname.go", "error.go", "locale_format.go", "privs.go", @@ -17,6 +15,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser/mysql", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/format", "@com_github_pingcap_errors//:errors", ], diff --git a/pkg/parser/mysql/const.go b/pkg/parser/mysql/const.go index 591c089069435..4dc77a5976a14 100644 --- a/pkg/parser/mysql/const.go +++ b/pkg/parser/mysql/const.go @@ -18,11 +18,12 @@ import ( "strings" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/format" ) func newInvalidModeErr(s string) error { - return NewErr(ErrWrongValueForVar, "sql_mode", s) + return NewErr(errno.ErrWrongValueForVar, "sql_mode", s) } const ( diff --git a/pkg/parser/mysql/errcode.go b/pkg/parser/mysql/errcode.go deleted file mode 100644 index bfbd196138de9..0000000000000 --- a/pkg/parser/mysql/errcode.go +++ /dev/null @@ -1,980 +0,0 @@ -// Copyright 2015 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package mysql - -// MySQL error code. -// This value is numeric. It is not portable to other database systems. -const ( - ErrErrorFirst = 1000 - ErrHashchk = 1000 - ErrNisamchk = 1001 - ErrNo = 1002 - ErrYes = 1003 - ErrCantCreateFile = 1004 - ErrCantCreateTable = 1005 - ErrCantCreateDB = 1006 - ErrDBCreateExists = 1007 - ErrDBDropExists = 1008 - ErrDBDropDelete = 1009 - ErrDBDropRmdir = 1010 - ErrCantDeleteFile = 1011 - ErrCantFindSystemRec = 1012 - ErrCantGetStat = 1013 - ErrCantGetWd = 1014 - ErrCantLock = 1015 - ErrCantOpenFile = 1016 - ErrFileNotFound = 1017 - ErrCantReadDir = 1018 - ErrCantSetWd = 1019 - ErrCheckread = 1020 - ErrDiskFull = 1021 - ErrDupKey = 1022 - ErrErrorOnClose = 1023 - ErrErrorOnRead = 1024 - ErrErrorOnRename = 1025 - ErrErrorOnWrite = 1026 - ErrFileUsed = 1027 - ErrFilsortAbort = 1028 - ErrFormNotFound = 1029 - ErrGetErrno = 1030 - ErrIllegalHa = 1031 - ErrKeyNotFound = 1032 - ErrNotFormFile = 1033 - ErrNotKeyFile = 1034 - ErrOldKeyFile = 1035 - ErrOpenAsReadonly = 1036 - ErrOutofMemory = 1037 - ErrOutOfSortMemory = 1038 - ErrUnexpectedEOF = 1039 - ErrConCount = 1040 - ErrOutOfResources = 1041 - ErrBadHost = 1042 - ErrHandshake = 1043 - ErrDBaccessDenied = 1044 - ErrAccessDenied = 1045 - ErrNoDB = 1046 - ErrUnknownCom = 1047 - ErrBadNull = 1048 - ErrBadDB = 1049 - ErrTableExists = 1050 - ErrBadTable = 1051 - ErrNonUniq = 1052 - ErrServerShutdown = 1053 - ErrBadField = 1054 - ErrFieldNotInGroupBy = 1055 - ErrWrongGroupField = 1056 - ErrWrongSumSelect = 1057 - ErrWrongValueCount = 1058 - ErrTooLongIdent = 1059 - ErrDupFieldName = 1060 - ErrDupKeyName = 1061 - ErrDupEntry = 1062 - ErrWrongFieldSpec = 1063 - ErrParse = 1064 - ErrEmptyQuery = 1065 - ErrNonuniqTable = 1066 - ErrInvalidDefault = 1067 - ErrMultiplePriKey = 1068 - ErrTooManyKeys = 1069 - ErrTooManyKeyParts = 1070 - ErrTooLongKey = 1071 - ErrKeyColumnDoesNotExits = 1072 - ErrBlobUsedAsKey = 1073 - ErrTooBigFieldlength = 1074 - ErrWrongAutoKey = 1075 - ErrReady = 1076 - ErrNormalShutdown = 1077 - ErrGotSignal = 1078 - ErrShutdownComplete = 1079 - ErrForcingClose = 1080 - ErrIpsock = 1081 - ErrNoSuchIndex = 1082 - ErrWrongFieldTerminators = 1083 - ErrBlobsAndNoTerminated = 1084 - ErrTextFileNotReadable = 1085 - ErrFileExists = 1086 - ErrLoadInfo = 1087 - ErrAlterInfo = 1088 - ErrWrongSubKey = 1089 - ErrCantRemoveAllFields = 1090 - ErrCantDropFieldOrKey = 1091 - ErrInsertInfo = 1092 - ErrUpdateTableUsed = 1093 - ErrNoSuchThread = 1094 - ErrKillDenied = 1095 - ErrNoTablesUsed = 1096 - ErrTooBigSet = 1097 - ErrNoUniqueLogFile = 1098 - ErrTableNotLockedForWrite = 1099 - ErrTableNotLocked = 1100 - ErrBlobCantHaveDefault = 1101 - ErrWrongDBName = 1102 - ErrWrongTableName = 1103 - ErrTooBigSelect = 1104 - ErrUnknown = 1105 - ErrUnknownProcedure = 1106 - ErrWrongParamcountToProcedure = 1107 - ErrWrongParametersToProcedure = 1108 - ErrUnknownTable = 1109 - ErrFieldSpecifiedTwice = 1110 - ErrInvalidGroupFuncUse = 1111 - ErrUnsupportedExtension = 1112 - ErrTableMustHaveColumns = 1113 - ErrRecordFileFull = 1114 - ErrUnknownCharacterSet = 1115 - ErrTooManyTables = 1116 - ErrTooManyFields = 1117 - ErrTooBigRowsize = 1118 - ErrStackOverrun = 1119 - ErrWrongOuterJoin = 1120 - ErrNullColumnInIndex = 1121 - ErrCantFindUdf = 1122 - ErrCantInitializeUdf = 1123 - ErrUdfNoPaths = 1124 - ErrUdfExists = 1125 - ErrCantOpenLibrary = 1126 - ErrCantFindDlEntry = 1127 - ErrFunctionNotDefined = 1128 - ErrHostIsBlocked = 1129 - ErrHostNotPrivileged = 1130 - ErrPasswordAnonymousUser = 1131 - ErrPasswordNotAllowed = 1132 - ErrPasswordNoMatch = 1133 - ErrUpdateInfo = 1134 - ErrCantCreateThread = 1135 - ErrWrongValueCountOnRow = 1136 - ErrCantReopenTable = 1137 - ErrInvalidUseOfNull = 1138 - ErrRegexp = 1139 - ErrMixOfGroupFuncAndFields = 1140 - ErrNonexistingGrant = 1141 - ErrTableaccessDenied = 1142 - ErrColumnaccessDenied = 1143 - ErrIllegalGrantForTable = 1144 - ErrGrantWrongHostOrUser = 1145 - ErrNoSuchTable = 1146 - ErrNonexistingTableGrant = 1147 - ErrNotAllowedCommand = 1148 - ErrSyntax = 1149 - ErrDelayedCantChangeLock = 1150 - ErrTooManyDelayedThreads = 1151 - ErrAbortingConnection = 1152 - ErrNetPacketTooLarge = 1153 - ErrNetReadErrorFromPipe = 1154 - ErrNetFcntl = 1155 - ErrNetPacketsOutOfOrder = 1156 - ErrNetUncompress = 1157 - ErrNetRead = 1158 - ErrNetReadInterrupted = 1159 - ErrNetErrorOnWrite = 1160 - ErrNetWriteInterrupted = 1161 - ErrTooLongString = 1162 - ErrTableCantHandleBlob = 1163 - ErrTableCantHandleAutoIncrement = 1164 - ErrDelayedInsertTableLocked = 1165 - ErrWrongColumnName = 1166 - ErrWrongKeyColumn = 1167 - ErrWrongMrgTable = 1168 - ErrDupUnique = 1169 - ErrBlobKeyWithoutLength = 1170 - ErrPrimaryCantHaveNull = 1171 - ErrTooManyRows = 1172 - ErrRequiresPrimaryKey = 1173 - ErrNoRaidCompiled = 1174 - ErrUpdateWithoutKeyInSafeMode = 1175 - ErrKeyDoesNotExist = 1176 - ErrCheckNoSuchTable = 1177 - ErrCheckNotImplemented = 1178 - ErrCantDoThisDuringAnTransaction = 1179 - ErrErrorDuringCommit = 1180 - ErrErrorDuringRollback = 1181 - ErrErrorDuringFlushLogs = 1182 - ErrErrorDuringCheckpoint = 1183 - ErrNewAbortingConnection = 1184 - ErrDumpNotImplemented = 1185 - ErrFlushMasterBinlogClosed = 1186 - ErrIndexRebuild = 1187 - ErrMaster = 1188 - ErrMasterNetRead = 1189 - ErrMasterNetWrite = 1190 - ErrFtMatchingKeyNotFound = 1191 - ErrLockOrActiveTransaction = 1192 - ErrUnknownSystemVariable = 1193 - ErrCrashedOnUsage = 1194 - ErrCrashedOnRepair = 1195 - ErrWarningNotCompleteRollback = 1196 - ErrTransCacheFull = 1197 - ErrSlaveMustStop = 1198 - ErrSlaveNotRunning = 1199 - ErrBadSlave = 1200 - ErrMasterInfo = 1201 - ErrSlaveThread = 1202 - ErrTooManyUserConnections = 1203 - ErrSetConstantsOnly = 1204 - ErrLockWaitTimeout = 1205 - ErrLockTableFull = 1206 - ErrReadOnlyTransaction = 1207 - ErrDropDBWithReadLock = 1208 - ErrCreateDBWithReadLock = 1209 - ErrWrongArguments = 1210 - ErrNoPermissionToCreateUser = 1211 - ErrUnionTablesInDifferentDir = 1212 - ErrLockDeadlock = 1213 - ErrTableCantHandleFt = 1214 - ErrCannotAddForeign = 1215 - ErrNoReferencedRow = 1216 - ErrRowIsReferenced = 1217 - ErrConnectToMaster = 1218 - ErrQueryOnMaster = 1219 - ErrErrorWhenExecutingCommand = 1220 - ErrWrongUsage = 1221 - ErrWrongNumberOfColumnsInSelect = 1222 - ErrCantUpdateWithReadlock = 1223 - ErrMixingNotAllowed = 1224 - ErrDupArgument = 1225 - ErrUserLimitReached = 1226 - ErrSpecificAccessDenied = 1227 - ErrLocalVariable = 1228 - ErrGlobalVariable = 1229 - ErrNoDefault = 1230 - ErrWrongValueForVar = 1231 - ErrWrongTypeForVar = 1232 - ErrVarCantBeRead = 1233 - ErrCantUseOptionHere = 1234 - ErrNotSupportedYet = 1235 - ErrMasterFatalErrorReadingBinlog = 1236 - ErrSlaveIgnoredTable = 1237 - ErrIncorrectGlobalLocalVar = 1238 - ErrWrongFkDef = 1239 - ErrKeyRefDoNotMatchTableRef = 1240 - ErrOperandColumns = 1241 - ErrSubqueryNo1Row = 1242 - ErrUnknownStmtHandler = 1243 - ErrCorruptHelpDB = 1244 - ErrCyclicReference = 1245 - ErrAutoConvert = 1246 - ErrIllegalReference = 1247 - ErrDerivedMustHaveAlias = 1248 - ErrSelectReduced = 1249 - ErrTablenameNotAllowedHere = 1250 - ErrNotSupportedAuthMode = 1251 - ErrSpatialCantHaveNull = 1252 - ErrCollationCharsetMismatch = 1253 - ErrSlaveWasRunning = 1254 - ErrSlaveWasNotRunning = 1255 - ErrTooBigForUncompress = 1256 - ErrZlibZMem = 1257 - ErrZlibZBuf = 1258 - ErrZlibZData = 1259 - ErrCutValueGroupConcat = 1260 - ErrWarnTooFewRecords = 1261 - ErrWarnTooManyRecords = 1262 - ErrWarnNullToNotnull = 1263 - ErrWarnDataOutOfRange = 1264 - WarnDataTruncated = 1265 - ErrWarnUsingOtherHandler = 1266 - ErrCantAggregate2collations = 1267 - ErrDropUser = 1268 - ErrRevokeGrants = 1269 - ErrCantAggregate3collations = 1270 - ErrCantAggregateNcollations = 1271 - ErrVariableIsNotStruct = 1272 - ErrUnknownCollation = 1273 - ErrSlaveIgnoredSslParams = 1274 - ErrServerIsInSecureAuthMode = 1275 - ErrWarnFieldResolved = 1276 - ErrBadSlaveUntilCond = 1277 - ErrMissingSkipSlave = 1278 - ErrUntilCondIgnored = 1279 - ErrWrongNameForIndex = 1280 - ErrWrongNameForCatalog = 1281 - ErrWarnQcResize = 1282 - ErrBadFtColumn = 1283 - ErrUnknownKeyCache = 1284 - ErrWarnHostnameWontWork = 1285 - ErrUnknownStorageEngine = 1286 - ErrWarnDeprecatedSyntax = 1287 - ErrNonUpdatableTable = 1288 - ErrFeatureDisabled = 1289 - ErrOptionPreventsStatement = 1290 - ErrDuplicatedValueInType = 1291 - ErrTruncatedWrongValue = 1292 - ErrTooMuchAutoTimestampCols = 1293 - ErrInvalidOnUpdate = 1294 - ErrUnsupportedPs = 1295 - ErrGetErrmsg = 1296 - ErrGetTemporaryErrmsg = 1297 - ErrUnknownTimeZone = 1298 - ErrWarnInvalidTimestamp = 1299 - ErrInvalidCharacterString = 1300 - ErrWarnAllowedPacketOverflowed = 1301 - ErrConflictingDeclarations = 1302 - ErrSpNoRecursiveCreate = 1303 - ErrSpAlreadyExists = 1304 - ErrSpDoesNotExist = 1305 - ErrSpDropFailed = 1306 - ErrSpStoreFailed = 1307 - ErrSpLilabelMismatch = 1308 - ErrSpLabelRedefine = 1309 - ErrSpLabelMismatch = 1310 - ErrSpUninitVar = 1311 - ErrSpBadselect = 1312 - ErrSpBadreturn = 1313 - ErrSpBadstatement = 1314 - ErrUpdateLogDeprecatedIgnored = 1315 - ErrUpdateLogDeprecatedTranslated = 1316 - ErrQueryInterrupted = 1317 - ErrSpWrongNoOfArgs = 1318 - ErrSpCondMismatch = 1319 - ErrSpNoreturn = 1320 - ErrSpNoreturnend = 1321 - ErrSpBadCursorQuery = 1322 - ErrSpBadCursorSelect = 1323 - ErrSpCursorMismatch = 1324 - ErrSpCursorAlreadyOpen = 1325 - ErrSpCursorNotOpen = 1326 - ErrSpUndeclaredVar = 1327 - ErrSpWrongNoOfFetchArgs = 1328 - ErrSpFetchNoData = 1329 - ErrSpDupParam = 1330 - ErrSpDupVar = 1331 - ErrSpDupCond = 1332 - ErrSpDupCurs = 1333 - ErrSpCantAlter = 1334 - ErrSpSubselectNyi = 1335 - ErrStmtNotAllowedInSfOrTrg = 1336 - ErrSpVarcondAfterCurshndlr = 1337 - ErrSpCursorAfterHandler = 1338 - ErrSpCaseNotFound = 1339 - ErrFparserTooBigFile = 1340 - ErrFparserBadHeader = 1341 - ErrFparserEOFInComment = 1342 - ErrFparserErrorInParameter = 1343 - ErrFparserEOFInUnknownParameter = 1344 - ErrViewNoExplain = 1345 - ErrFrmUnknownType = 1346 - ErrWrongObject = 1347 - ErrNonupdateableColumn = 1348 - ErrViewSelectDerived = 1349 - ErrViewSelectClause = 1350 - ErrViewSelectVariable = 1351 - ErrViewSelectTmptable = 1352 - ErrViewWrongList = 1353 - ErrWarnViewMerge = 1354 - ErrWarnViewWithoutKey = 1355 - ErrViewInvalid = 1356 - ErrSpNoDropSp = 1357 - ErrSpGotoInHndlr = 1358 - ErrTrgAlreadyExists = 1359 - ErrTrgDoesNotExist = 1360 - ErrTrgOnViewOrTempTable = 1361 - ErrTrgCantChangeRow = 1362 - ErrTrgNoSuchRowInTrg = 1363 - ErrNoDefaultForField = 1364 - ErrDivisionByZero = 1365 - ErrTruncatedWrongValueForField = 1366 - ErrIllegalValueForType = 1367 - ErrViewNonupdCheck = 1368 - ErrViewCheckFailed = 1369 - ErrProcaccessDenied = 1370 - ErrRelayLogFail = 1371 - ErrPasswdLength = 1372 - ErrUnknownTargetBinlog = 1373 - ErrIoErrLogIndexRead = 1374 - ErrBinlogPurgeProhibited = 1375 - ErrFseekFail = 1376 - ErrBinlogPurgeFatalErr = 1377 - ErrLogInUse = 1378 - ErrLogPurgeUnknownErr = 1379 - ErrRelayLogInit = 1380 - ErrNoBinaryLogging = 1381 - ErrReservedSyntax = 1382 - ErrWsasFailed = 1383 - ErrDiffGroupsProc = 1384 - ErrNoGroupForProc = 1385 - ErrOrderWithProc = 1386 - ErrLoggingProhibitChangingOf = 1387 - ErrNoFileMapping = 1388 - ErrWrongMagic = 1389 - ErrPsManyParam = 1390 - ErrKeyPart0 = 1391 - ErrViewChecksum = 1392 - ErrViewMultiupdate = 1393 - ErrViewNoInsertFieldList = 1394 - ErrViewDeleteMergeView = 1395 - ErrCannotUser = 1396 - ErrXaerNota = 1397 - ErrXaerInval = 1398 - ErrXaerRmfail = 1399 - ErrXaerOutside = 1400 - ErrXaerRmerr = 1401 - ErrXaRbrollback = 1402 - ErrNonexistingProcGrant = 1403 - ErrProcAutoGrantFail = 1404 - ErrProcAutoRevokeFail = 1405 - ErrDataTooLong = 1406 - ErrSpBadSQLstate = 1407 - ErrStartup = 1408 - ErrLoadFromFixedSizeRowsToVar = 1409 - ErrCantCreateUserWithGrant = 1410 - ErrWrongValueForType = 1411 - ErrTableDefChanged = 1412 - ErrSpDupHandler = 1413 - ErrSpNotVarArg = 1414 - ErrSpNoRetset = 1415 - ErrCantCreateGeometryObject = 1416 - ErrFailedRoutineBreakBinlog = 1417 - ErrBinlogUnsafeRoutine = 1418 - ErrBinlogCreateRoutineNeedSuper = 1419 - ErrExecStmtWithOpenCursor = 1420 - ErrStmtHasNoOpenCursor = 1421 - ErrCommitNotAllowedInSfOrTrg = 1422 - ErrNoDefaultForViewField = 1423 - ErrSpNoRecursion = 1424 - ErrTooBigScale = 1425 - ErrTooBigPrecision = 1426 - ErrMBiggerThanD = 1427 - ErrWrongLockOfSystemTable = 1428 - ErrConnectToForeignDataSource = 1429 - ErrQueryOnForeignDataSource = 1430 - ErrForeignDataSourceDoesntExist = 1431 - ErrForeignDataStringInvalidCantCreate = 1432 - ErrForeignDataStringInvalid = 1433 - ErrCantCreateFederatedTable = 1434 - ErrTrgInWrongSchema = 1435 - ErrStackOverrunNeedMore = 1436 - ErrTooLongBody = 1437 - ErrWarnCantDropDefaultKeycache = 1438 - ErrTooBigDisplaywidth = 1439 - ErrXaerDupid = 1440 - ErrDatetimeFunctionOverflow = 1441 - ErrCantUpdateUsedTableInSfOrTrg = 1442 - ErrViewPreventUpdate = 1443 - ErrPsNoRecursion = 1444 - ErrSpCantSetAutocommit = 1445 - ErrMalformedDefiner = 1446 - ErrViewFrmNoUser = 1447 - ErrViewOtherUser = 1448 - ErrNoSuchUser = 1449 - ErrForbidSchemaChange = 1450 - ErrRowIsReferenced2 = 1451 - ErrNoReferencedRow2 = 1452 - ErrSpBadVarShadow = 1453 - ErrTrgNoDefiner = 1454 - ErrOldFileFormat = 1455 - ErrSpRecursionLimit = 1456 - ErrSpProcTableCorrupt = 1457 - ErrSpWrongName = 1458 - ErrTableNeedsUpgrade = 1459 - ErrSpNoAggregate = 1460 - ErrMaxPreparedStmtCountReached = 1461 - ErrViewRecursive = 1462 - ErrNonGroupingFieldUsed = 1463 - ErrTableCantHandleSpkeys = 1464 - ErrNoTriggersOnSystemSchema = 1465 - ErrRemovedSpaces = 1466 - ErrAutoincReadFailed = 1467 - ErrUsername = 1468 - ErrHostname = 1469 - ErrWrongStringLength = 1470 - ErrNonInsertableTable = 1471 - ErrAdminWrongMrgTable = 1472 - ErrTooHighLevelOfNestingForSelect = 1473 - ErrNameBecomesEmpty = 1474 - ErrAmbiguousFieldTerm = 1475 - ErrForeignServerExists = 1476 - ErrForeignServerDoesntExist = 1477 - ErrIllegalHaCreateOption = 1478 - ErrPartitionRequiresValues = 1479 - ErrPartitionWrongValues = 1480 - ErrPartitionMaxvalue = 1481 - ErrPartitionSubpartition = 1482 - ErrPartitionSubpartMix = 1483 - ErrPartitionWrongNoPart = 1484 - ErrPartitionWrongNoSubpart = 1485 - ErrWrongExprInPartitionFunc = 1486 - ErrNoConstExprInRangeOrList = 1487 - ErrFieldNotFoundPart = 1488 - ErrListOfFieldsOnlyInHash = 1489 - ErrInconsistentPartitionInfo = 1490 - ErrPartitionFuncNotAllowed = 1491 - ErrPartitionsMustBeDefined = 1492 - ErrRangeNotIncreasing = 1493 - ErrInconsistentTypeOfFunctions = 1494 - ErrMultipleDefConstInListPart = 1495 - ErrPartitionEntry = 1496 - ErrMixHandler = 1497 - ErrPartitionNotDefined = 1498 - ErrTooManyPartitions = 1499 - ErrSubpartition = 1500 - ErrCantCreateHandlerFile = 1501 - ErrBlobFieldInPartFunc = 1502 - ErrUniqueKeyNeedAllFieldsInPf = 1503 - ErrNoParts = 1504 - ErrPartitionMgmtOnNonpartitioned = 1505 - ErrForeignKeyOnPartitioned = 1506 - ErrDropPartitionNonExistent = 1507 - ErrDropLastPartition = 1508 - ErrCoalesceOnlyOnHashPartition = 1509 - ErrReorgHashOnlyOnSameNo = 1510 - ErrReorgNoParam = 1511 - ErrOnlyOnRangeListPartition = 1512 - ErrAddPartitionSubpart = 1513 - ErrAddPartitionNoNewPartition = 1514 - ErrCoalescePartitionNoPartition = 1515 - ErrReorgPartitionNotExist = 1516 - ErrSameNamePartition = 1517 - ErrNoBinlog = 1518 - ErrConsecutiveReorgPartitions = 1519 - ErrReorgOutsideRange = 1520 - ErrPartitionFunctionFailure = 1521 - ErrPartState = 1522 - ErrLimitedPartRange = 1523 - ErrPluginIsNotLoaded = 1524 - ErrWrongValue = 1525 - ErrNoPartitionForGivenValue = 1526 - ErrFilegroupOptionOnlyOnce = 1527 - ErrCreateFilegroupFailed = 1528 - ErrDropFilegroupFailed = 1529 - ErrTablespaceAutoExtend = 1530 - ErrWrongSizeNumber = 1531 - ErrSizeOverflow = 1532 - ErrAlterFilegroupFailed = 1533 - ErrBinlogRowLoggingFailed = 1534 - ErrBinlogRowWrongTableDef = 1535 - ErrBinlogRowRbrToSbr = 1536 - ErrEventAlreadyExists = 1537 - ErrEventStoreFailed = 1538 - ErrEventDoesNotExist = 1539 - ErrEventCantAlter = 1540 - ErrEventDropFailed = 1541 - ErrEventIntervalNotPositiveOrTooBig = 1542 - ErrEventEndsBeforeStarts = 1543 - ErrEventExecTimeInThePast = 1544 - ErrEventOpenTableFailed = 1545 - ErrEventNeitherMExprNorMAt = 1546 - ErrObsoleteColCountDoesntMatchCorrupted = 1547 - ErrObsoleteCannotLoadFromTable = 1548 - ErrEventCannotDelete = 1549 - ErrEventCompile = 1550 - ErrEventSameName = 1551 - ErrEventDataTooLong = 1552 - ErrDropIndexNeededInForeignKey = 1553 - ErrWarnDeprecatedSyntaxWithVer = 1554 - ErrCantWriteLockLogTable = 1555 - ErrCantLockLogTable = 1556 - ErrForeignDuplicateKeyOldUnused = 1557 - ErrColCountDoesntMatchPleaseUpdate = 1558 - ErrTempTablePreventsSwitchOutOfRbr = 1559 - ErrStoredFunctionPreventsSwitchBinlogFormat = 1560 - ErrNdbCantSwitchBinlogFormat = 1561 - ErrPartitionNoTemporary = 1562 - ErrPartitionConstDomain = 1563 - ErrPartitionFunctionIsNotAllowed = 1564 - ErrDdlLog = 1565 - ErrNullInValuesLessThan = 1566 - ErrWrongPartitionName = 1567 - ErrCantChangeTxCharacteristics = 1568 - ErrDupEntryAutoincrementCase = 1569 - ErrEventModifyQueue = 1570 - ErrEventSetVar = 1571 - ErrPartitionMerge = 1572 - ErrCantActivateLog = 1573 - ErrRbrNotAvailable = 1574 - ErrBase64Decode = 1575 - ErrEventRecursionForbidden = 1576 - ErrEventsDB = 1577 - ErrOnlyIntegersAllowed = 1578 - ErrUnsuportedLogEngine = 1579 - ErrBadLogStatement = 1580 - ErrCantRenameLogTable = 1581 - ErrWrongParamcountToNativeFct = 1582 - ErrWrongParametersToNativeFct = 1583 - ErrWrongParametersToStoredFct = 1584 - ErrNativeFctNameCollision = 1585 - ErrDupEntryWithKeyName = 1586 - ErrBinlogPurgeEmFile = 1587 - ErrEventCannotCreateInThePast = 1588 - ErrEventCannotAlterInThePast = 1589 - ErrSlaveIncident = 1590 - ErrNoPartitionForGivenValueSilent = 1591 - ErrBinlogUnsafeStatement = 1592 - ErrSlaveFatal = 1593 - ErrSlaveRelayLogReadFailure = 1594 - ErrSlaveRelayLogWriteFailure = 1595 - ErrSlaveCreateEventFailure = 1596 - ErrSlaveMasterComFailure = 1597 - ErrBinlogLoggingImpossible = 1598 - ErrViewNoCreationCtx = 1599 - ErrViewInvalidCreationCtx = 1600 - ErrSrInvalidCreationCtx = 1601 - ErrTrgCorruptedFile = 1602 - ErrTrgNoCreationCtx = 1603 - ErrTrgInvalidCreationCtx = 1604 - ErrEventInvalidCreationCtx = 1605 - ErrTrgCantOpenTable = 1606 - ErrCantCreateSroutine = 1607 - ErrNeverUsed = 1608 - ErrNoFormatDescriptionEventBeforeBinlogStatement = 1609 - ErrSlaveCorruptEvent = 1610 - ErrLoadDataInvalidColumn = 1611 - ErrLogPurgeNoFile = 1612 - ErrXaRbtimeout = 1613 - ErrXaRbdeadlock = 1614 - ErrNeedReprepare = 1615 - ErrDelayedNotSupported = 1616 - WarnNoMasterInfo = 1617 - WarnOptionIgnored = 1618 - WarnPluginDeleteBuiltin = 1619 - WarnPluginBusy = 1620 - ErrVariableIsReadonly = 1621 - ErrWarnEngineTransactionRollback = 1622 - ErrSlaveHeartbeatFailure = 1623 - ErrSlaveHeartbeatValueOutOfRange = 1624 - ErrNdbReplicationSchema = 1625 - ErrConflictFnParse = 1626 - ErrExceptionsWrite = 1627 - ErrTooLongTableComment = 1628 - ErrTooLongFieldComment = 1629 - ErrFuncInexistentNameCollision = 1630 - ErrDatabaseName = 1631 - ErrTableName = 1632 - ErrPartitionName = 1633 - ErrSubpartitionName = 1634 - ErrTemporaryName = 1635 - ErrRenamedName = 1636 - ErrTooManyConcurrentTrxs = 1637 - WarnNonASCIISeparatorNotImplemented = 1638 - ErrDebugSyncTimeout = 1639 - ErrDebugSyncHitLimit = 1640 - ErrDupSignalSet = 1641 - ErrSignalWarn = 1642 - ErrSignalNotFound = 1643 - ErrSignalException = 1644 - ErrResignalWithoutActiveHandler = 1645 - ErrSignalBadConditionType = 1646 - WarnCondItemTruncated = 1647 - ErrCondItemTooLong = 1648 - ErrUnknownLocale = 1649 - ErrSlaveIgnoreServerIDs = 1650 - ErrQueryCacheDisabled = 1651 - ErrSameNamePartitionField = 1652 - ErrPartitionColumnList = 1653 - ErrWrongTypeColumnValue = 1654 - ErrTooManyPartitionFuncFields = 1655 - ErrMaxvalueInValuesIn = 1656 - ErrTooManyValues = 1657 - ErrRowSinglePartitionField = 1658 - ErrFieldTypeNotAllowedAsPartitionField = 1659 - ErrPartitionFieldsTooLong = 1660 - ErrBinlogRowEngineAndStmtEngine = 1661 - ErrBinlogRowModeAndStmtEngine = 1662 - ErrBinlogUnsafeAndStmtEngine = 1663 - ErrBinlogRowInjectionAndStmtEngine = 1664 - ErrBinlogStmtModeAndRowEngine = 1665 - ErrBinlogRowInjectionAndStmtMode = 1666 - ErrBinlogMultipleEnginesAndSelfLoggingEngine = 1667 - ErrBinlogUnsafeLimit = 1668 - ErrBinlogUnsafeInsertDelayed = 1669 - ErrBinlogUnsafeSystemTable = 1670 - ErrBinlogUnsafeAutoincColumns = 1671 - ErrBinlogUnsafeUdf = 1672 - ErrBinlogUnsafeSystemVariable = 1673 - ErrBinlogUnsafeSystemFunction = 1674 - ErrBinlogUnsafeNontransAfterTrans = 1675 - ErrMessageAndStatement = 1676 - ErrSlaveConversionFailed = 1677 - ErrSlaveCantCreateConversion = 1678 - ErrInsideTransactionPreventsSwitchBinlogFormat = 1679 - ErrPathLength = 1680 - ErrWarnDeprecatedSyntaxNoReplacement = 1681 - ErrWrongNativeTableStructure = 1682 - ErrWrongPerfSchemaUsage = 1683 - ErrWarnISSkippedTable = 1684 - ErrInsideTransactionPreventsSwitchBinlogDirect = 1685 - ErrStoredFunctionPreventsSwitchBinlogDirect = 1686 - ErrSpatialMustHaveGeomCol = 1687 - ErrTooLongIndexComment = 1688 - ErrLockAborted = 1689 - ErrDataOutOfRange = 1690 - ErrWrongSpvarTypeInLimit = 1691 - ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine = 1692 - ErrBinlogUnsafeMixedStatement = 1693 - ErrInsideTransactionPreventsSwitchSQLLogBin = 1694 - ErrStoredFunctionPreventsSwitchSQLLogBin = 1695 - ErrFailedReadFromParFile = 1696 - ErrValuesIsNotIntType = 1697 - ErrAccessDeniedNoPassword = 1698 - ErrSetPasswordAuthPlugin = 1699 - ErrGrantPluginUserExists = 1700 - ErrTruncateIllegalForeignKey = 1701 - ErrPluginIsPermanent = 1702 - ErrSlaveHeartbeatValueOutOfRangeMin = 1703 - ErrSlaveHeartbeatValueOutOfRangeMax = 1704 - ErrStmtCacheFull = 1705 - ErrMultiUpdateKeyConflict = 1706 - ErrTableNeedsRebuild = 1707 - WarnOptionBelowLimit = 1708 - ErrIndexColumnTooLong = 1709 - ErrErrorInTriggerBody = 1710 - ErrErrorInUnknownTriggerBody = 1711 - ErrIndexCorrupt = 1712 - ErrUndoRecordTooBig = 1713 - ErrBinlogUnsafeInsertIgnoreSelect = 1714 - ErrBinlogUnsafeInsertSelectUpdate = 1715 - ErrBinlogUnsafeReplaceSelect = 1716 - ErrBinlogUnsafeCreateIgnoreSelect = 1717 - ErrBinlogUnsafeCreateReplaceSelect = 1718 - ErrBinlogUnsafeUpdateIgnore = 1719 - ErrPluginNoUninstall = 1720 - ErrPluginNoInstall = 1721 - ErrBinlogUnsafeWriteAutoincSelect = 1722 - ErrBinlogUnsafeCreateSelectAutoinc = 1723 - ErrBinlogUnsafeInsertTwoKeys = 1724 - ErrTableInFkCheck = 1725 - ErrUnsupportedEngine = 1726 - ErrBinlogUnsafeAutoincNotFirst = 1727 - ErrCannotLoadFromTableV2 = 1728 - ErrMasterDelayValueOutOfRange = 1729 - ErrOnlyFdAndRbrEventsAllowedInBinlogStatement = 1730 - ErrPartitionExchangeDifferentOption = 1731 - ErrPartitionExchangePartTable = 1732 - ErrPartitionExchangeTempTable = 1733 - ErrPartitionInsteadOfSubpartition = 1734 - ErrUnknownPartition = 1735 - ErrTablesDifferentMetadata = 1736 - ErrRowDoesNotMatchPartition = 1737 - ErrBinlogCacheSizeGreaterThanMax = 1738 - ErrWarnIndexNotApplicable = 1739 - ErrPartitionExchangeForeignKey = 1740 - ErrNoSuchKeyValue = 1741 - ErrRplInfoDataTooLong = 1742 - ErrNetworkReadEventChecksumFailure = 1743 - ErrBinlogReadEventChecksumFailure = 1744 - ErrBinlogStmtCacheSizeGreaterThanMax = 1745 - ErrCantUpdateTableInCreateTableSelect = 1746 - ErrPartitionClauseOnNonpartitioned = 1747 - ErrRowDoesNotMatchGivenPartitionSet = 1748 - ErrNoSuchPartitionunused = 1749 - ErrChangeRplInfoRepositoryFailure = 1750 - ErrWarningNotCompleteRollbackWithCreatedTempTable = 1751 - ErrWarningNotCompleteRollbackWithDroppedTempTable = 1752 - ErrMtsFeatureIsNotSupported = 1753 - ErrMtsUpdatedDBsGreaterMax = 1754 - ErrMtsCantParallel = 1755 - ErrMtsInconsistentData = 1756 - ErrFulltextNotSupportedWithPartitioning = 1757 - ErrDaInvalidConditionNumber = 1758 - ErrInsecurePlainText = 1759 - ErrInsecureChangeMaster = 1760 - ErrForeignDuplicateKeyWithChildInfo = 1761 - ErrForeignDuplicateKeyWithoutChildInfo = 1762 - ErrSQLthreadWithSecureSlave = 1763 - ErrTableHasNoFt = 1764 - ErrVariableNotSettableInSfOrTrigger = 1765 - ErrVariableNotSettableInTransaction = 1766 - ErrGtidNextIsNotInGtidNextList = 1767 - ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull = 1768 - ErrSetStatementCannotInvokeFunction = 1769 - ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull = 1770 - ErrSkippingLoggedTransaction = 1771 - ErrMalformedGtidSetSpecification = 1772 - ErrMalformedGtidSetEncoding = 1773 - ErrMalformedGtidSpecification = 1774 - ErrGnoExhausted = 1775 - ErrBadSlaveAutoPosition = 1776 - ErrAutoPositionRequiresGtidModeOn = 1777 - ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet = 1778 - ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn = 1779 - ErrGtidModeRequiresBinlog = 1780 - ErrCantSetGtidNextToGtidWhenGtidModeIsOff = 1781 - ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn = 1782 - ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff = 1783 - ErrFoundGtidEventWhenGtidModeIsOff = 1784 - ErrGtidUnsafeNonTransactionalTable = 1785 - ErrGtidUnsafeCreateSelect = 1786 - ErrGtidUnsafeCreateDropTemporaryTableInTransaction = 1787 - ErrGtidModeCanOnlyChangeOneStepAtATime = 1788 - ErrMasterHasPurgedRequiredGtids = 1789 - ErrCantSetGtidNextWhenOwningGtid = 1790 - ErrUnknownExplainFormat = 1791 - ErrCantExecuteInReadOnlyTransaction = 1792 - ErrTooLongTablePartitionComment = 1793 - ErrSlaveConfiguration = 1794 - ErrInnodbFtLimit = 1795 - ErrInnodbNoFtTempTable = 1796 - ErrInnodbFtWrongDocidColumn = 1797 - ErrInnodbFtWrongDocidIndex = 1798 - ErrInnodbOnlineLogTooBig = 1799 - ErrUnknownAlterAlgorithm = 1800 - ErrUnknownAlterLock = 1801 - ErrMtsChangeMasterCantRunWithGaps = 1802 - ErrMtsRecoveryFailure = 1803 - ErrMtsResetWorkers = 1804 - ErrColCountDoesntMatchCorruptedV2 = 1805 - ErrSlaveSilentRetryTransaction = 1806 - ErrDiscardFkChecksRunning = 1807 - ErrTableSchemaMismatch = 1808 - ErrTableInSystemTablespace = 1809 - ErrIoRead = 1810 - ErrIoWrite = 1811 - ErrTablespaceMissing = 1812 - ErrTablespaceExists = 1813 - ErrTablespaceDiscarded = 1814 - ErrInternal = 1815 - ErrInnodbImport = 1816 - ErrInnodbIndexCorrupt = 1817 - ErrInvalidYearColumnLength = 1818 - ErrNotValidPassword = 1819 - ErrMustChangePassword = 1820 - ErrFkNoIndexChild = 1821 - ErrForeignKeyNoIndexInParent = 1822 - ErrFkFailAddSystem = 1823 - ErrForeignKeyCannotOpenParent = 1824 - ErrFkIncorrectOption = 1825 - ErrFkDupName = 1826 - ErrPasswordFormat = 1827 - ErrFkColumnCannotDrop = 1828 - ErrFkColumnCannotDropChild = 1829 - ErrForeignKeyColumnNotNull = 1830 - ErrDupIndex = 1831 - ErrForeignKeyColumnCannotChange = 1832 - ErrForeignKeyColumnCannotChangeChild = 1833 - ErrFkCannotDeleteParent = 1834 - ErrMalformedPacket = 1835 - ErrReadOnlyMode = 1836 - ErrGtidNextTypeUndefinedGroup = 1837 - ErrVariableNotSettableInSp = 1838 - ErrCantSetGtidPurgedWhenGtidModeIsOff = 1839 - ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty = 1840 - ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty = 1841 - ErrGtidPurgedWasChanged = 1842 - ErrGtidExecutedWasChanged = 1843 - ErrBinlogStmtModeAndNoReplTables = 1844 - ErrAlterOperationNotSupported = 1845 - ErrAlterOperationNotSupportedReason = 1846 - ErrAlterOperationNotSupportedReasonCopy = 1847 - ErrAlterOperationNotSupportedReasonPartition = 1848 - ErrAlterOperationNotSupportedReasonFkRename = 1849 - ErrAlterOperationNotSupportedReasonColumnType = 1850 - ErrAlterOperationNotSupportedReasonFkCheck = 1851 - ErrAlterOperationNotSupportedReasonIgnore = 1852 - ErrAlterOperationNotSupportedReasonNopk = 1853 - ErrAlterOperationNotSupportedReasonAutoinc = 1854 - ErrAlterOperationNotSupportedReasonHiddenFts = 1855 - ErrAlterOperationNotSupportedReasonChangeFts = 1856 - ErrAlterOperationNotSupportedReasonFts = 1857 - ErrSQLSlaveSkipCounterNotSettableInGtidMode = 1858 - ErrDupUnknownInIndex = 1859 - ErrIdentCausesTooLongPath = 1860 - ErrAlterOperationNotSupportedReasonNotNull = 1861 - ErrMustChangePasswordLogin = 1862 - ErrRowInWrongPartition = 1863 - ErrErrorLast = 1863 - ErrInvalidFieldSize = 3013 - ErrPasswordExpireAnonymousUser = 3016 - ErrMaxExecTimeExceeded = 3024 - ErrIncorrectType = 3064 - ErrInvalidJSONData = 3069 - ErrGeneratedColumnFunctionIsNotAllowed = 3102 - ErrUnsupportedAlterInplaceOnVirtualColumn = 3103 - ErrWrongFKOptionForGeneratedColumn = 3104 - ErrBadGeneratedColumn = 3105 - ErrUnsupportedOnGeneratedColumn = 3106 - ErrGeneratedColumnNonPrior = 3107 - ErrDependentByGeneratedColumn = 3108 - ErrGeneratedColumnRefAutoInc = 3109 - ErrInvalidJSONText = 3140 - ErrInvalidJSONTextInParam = 3141 - ErrInvalidJSONPath = 3143 - ErrInvalidJSONCharset = 3144 - ErrInvalidTypeForJSON = 3146 - ErrInvalidJSONPathWildcard = 3149 - ErrInvalidJSONContainsPathType = 3150 - ErrJSONUsedAsKey = 3152 - ErrJSONVacuousPath = 3153 - ErrJSONBadOneOrAllArg = 3154 - ErrJSONDocumentTooDeep = 3157 - ErrJSONDocumentNULLKey = 3158 - ErrBadUser = 3162 - ErrUserAlreadyExists = 3163 - ErrInvalidJSONPathArrayCell = 3165 - ErrInvalidEncryptionOption = 3184 - ErrRoleNotGranted = 3530 - ErrLockAcquireFailAndNoWaitSet = 3572 - ErrWindowNoSuchWindow = 3579 - ErrWindowCircularityInWindowGraph = 3580 - ErrWindowNoChildPartitioning = 3581 - ErrWindowNoInherentFrame = 3582 - ErrWindowNoRedefineOrderBy = 3583 - ErrWindowFrameStartIllegal = 3584 - ErrWindowFrameEndIllegal = 3585 - ErrWindowFrameIllegal = 3586 - ErrWindowRangeFrameOrderType = 3587 - ErrWindowRangeFrameTemporalType = 3588 - ErrWindowRangeFrameNumericType = 3589 - ErrWindowRangeBoundNotConstant = 3590 - ErrWindowDuplicateName = 3591 - ErrWindowIllegalOrderBy = 3592 - ErrWindowInvalidWindowFuncUse = 3593 - ErrWindowInvalidWindowFuncAliasUse = 3594 - ErrWindowNestedWindowFuncUseInWindowSpec = 3595 - ErrWindowRowsIntervalUse = 3596 - ErrWindowNoGroupOrderUnused = 3597 - ErrWindowExplainJson = 3598 //nolint: revive - ErrWindowFunctionIgnoresFrame = 3599 - ErrDataTruncatedFunctionalIndex = 3751 - ErrDataOutOfRangeFunctionalIndex = 3752 - ErrFunctionalIndexOnJsonOrGeometryFunction = 3753 //nolint: revive - ErrFunctionalIndexRefAutoIncrement = 3754 - ErrCannotDropColumnFunctionalIndex = 3755 - ErrFunctionalIndexPrimaryKey = 3756 - ErrFunctionalIndexOnLob = 3757 - ErrFunctionalIndexFunctionIsNotAllowed = 3758 - ErrFulltextFunctionalIndex = 3759 - ErrSpatialFunctionalIndex = 3760 - ErrWrongKeyColumnFunctionalIndex = 3761 - ErrFunctionalIndexOnField = 3762 - ErrFKIncompatibleColumns = 3780 - ErrFunctionalIndexRowValueIsNotAllowed = 3800 - ErrDependentByFunctionalIndex = 3837 - ErrInvalidJSONType = 3853 - ErrInvalidJsonValueForFuncIndex = 3903 //nolint: revive - ErrJsonValueOutOfRangeForFuncIndex = 3904 //nolint: revive - ErrFunctionalIndexDataIsTooLong = 3907 - ErrFunctionalIndexNotApplicable = 3909 - - // MariaDB errors. - ErrOnlyOneDefaultPartionAllowed = 4030 - ErrWrongPartitionTypeExpectedSystemTime = 4113 - ErrSystemVersioningWrongPartitions = 4128 - ErrSequenceRunOut = 4135 - ErrSequenceInvalidData = 4136 - ErrSequenceAccessFail = 4137 - ErrNotSequence = 4138 - ErrUnknownSequence = 4139 - ErrWrongInsertIntoSequence = 4140 - ErrSequenceInvalidTableStructure = 4141 - - // TiDB self-defined errors. - ErrWarnOptimizerHintUnsupportedHint = 8061 - ErrWarnOptimizerHintInvalidToken = 8062 - ErrWarnMemoryQuotaOverflow = 8063 - ErrWarnOptimizerHintParseError = 8064 - ErrWarnOptimizerHintInvalidInteger = 8065 - ErrWarnOptimizerHintWrongPos = 8066 - - // Stop adding error code here! - // They are moved to github.com/pingcap/tidb/pkg/errno -) diff --git a/pkg/parser/mysql/errname.go b/pkg/parser/mysql/errname.go deleted file mode 100644 index 845c50a21bcec..0000000000000 --- a/pkg/parser/mysql/errname.go +++ /dev/null @@ -1,985 +0,0 @@ -// Copyright 2015 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package mysql - -// ErrMessage is a error message with the format specifier. -type ErrMessage struct { - Raw string - RedactArgPos []int -} - -// Message creates a error message with the format specifier. -func Message(message string, redactArgs []int) *ErrMessage { - return &ErrMessage{Raw: message, RedactArgPos: redactArgs} -} - -// MySQLErrName maps error code to MySQL error messages. -var MySQLErrName = map[uint16]*ErrMessage{ - ErrHashchk: Message("hashchk", nil), - ErrNisamchk: Message("isamchk", nil), - ErrNo: Message("NO", nil), - ErrYes: Message("YES", nil), - ErrCantCreateFile: Message("Can't create file '%-.200s' (errno: %d - %s)", nil), - ErrCantCreateTable: Message("Can't create table '%-.200s' (errno: %d)", nil), - ErrCantCreateDB: Message("Can't create database '%-.192s' (errno: %d)", nil), - ErrDBCreateExists: Message("Can't create database '%-.192s'; database exists", nil), - ErrDBDropExists: Message("Can't drop database '%-.192s'; database doesn't exist", nil), - ErrDBDropDelete: Message("Error dropping database (can't delete '%-.192s', errno: %d)", nil), - ErrDBDropRmdir: Message("Error dropping database (can't rmdir '%-.192s', errno: %d)", nil), - ErrCantDeleteFile: Message("Error on delete of '%-.192s' (errno: %d - %s)", nil), - ErrCantFindSystemRec: Message("Can't read record in system table", nil), - ErrCantGetStat: Message("Can't get status of '%-.200s' (errno: %d - %s)", nil), - ErrCantGetWd: Message("Can't get working directory (errno: %d - %s)", nil), - ErrCantLock: Message("Can't lock file (errno: %d - %s)", nil), - ErrCantOpenFile: Message("Can't open file: '%-.200s' (errno: %d - %s)", nil), - ErrFileNotFound: Message("Can't find file: '%-.200s' (errno: %d - %s)", nil), - ErrCantReadDir: Message("Can't read dir of '%-.192s' (errno: %d - %s)", nil), - ErrCantSetWd: Message("Can't change dir to '%-.192s' (errno: %d - %s)", nil), - ErrCheckread: Message("Record has changed since last read in table '%-.192s'", nil), - ErrDiskFull: Message("Disk full (%s); waiting for someone to free some space... (errno: %d - %s)", nil), - ErrDupKey: Message("Can't write; duplicate key in table '%-.192s'", nil), - ErrErrorOnClose: Message("Error on close of '%-.192s' (errno: %d - %s)", nil), - ErrErrorOnRead: Message("Error reading file '%-.200s' (errno: %d - %s)", nil), - ErrErrorOnRename: Message("Error on rename of '%-.210s' to '%-.210s' (errno: %d - %s)", nil), - ErrErrorOnWrite: Message("Error writing file '%-.200s' (errno: %d - %s)", nil), - ErrFileUsed: Message("'%-.192s' is locked against change", nil), - ErrFilsortAbort: Message("Sort aborted", nil), - ErrFormNotFound: Message("View '%-.192s' doesn't exist for '%-.192s'", nil), - ErrGetErrno: Message("Got error %d from storage engine", nil), - ErrIllegalHa: Message("Table storage engine for '%-.192s' doesn't have this option", nil), - ErrKeyNotFound: Message("Can't find record in '%-.192s'", nil), - ErrNotFormFile: Message("Incorrect information in file: '%-.200s'", nil), - ErrNotKeyFile: Message("Incorrect key file for table '%-.200s'; try to repair it", nil), - ErrOldKeyFile: Message("Old key file for table '%-.192s'; repair it!", nil), - ErrOpenAsReadonly: Message("Table '%-.192s' is read only", nil), - ErrOutofMemory: Message("Out of memory; restart server and try again (needed %d bytes)", nil), - ErrOutOfSortMemory: Message("Out of sort memory, consider increasing server sort buffer size", nil), - ErrUnexpectedEOF: Message("Unexpected EOF found when reading file '%-.192s' (errno: %d - %s)", nil), - ErrConCount: Message("Too many connections", nil), - ErrOutOfResources: Message("Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", nil), - ErrBadHost: Message("Can't get hostname for your address", nil), - ErrHandshake: Message("Bad handshake", nil), - ErrDBaccessDenied: Message("Access denied for user '%-.48s'@'%-.64s' to database '%-.192s'", nil), - ErrAccessDenied: Message("Access denied for user '%-.48s'@'%-.64s' (using password: %s)", nil), - ErrNoDB: Message("No database selected", nil), - ErrUnknownCom: Message("Unknown command", nil), - ErrBadNull: Message("Column '%-.192s' cannot be null", nil), - ErrBadDB: Message("Unknown database '%-.192s'", nil), - ErrTableExists: Message("Table '%-.192s' already exists", nil), - ErrBadTable: Message("Unknown table '%-.100s'", nil), - ErrNonUniq: Message("Column '%-.192s' in %-.192s is ambiguous", nil), - ErrServerShutdown: Message("Server shutdown in progress", nil), - ErrBadField: Message("Unknown column '%-.192s' in '%-.192s'", nil), - ErrFieldNotInGroupBy: Message("Expression #%d of %s is not in GROUP BY clause and contains nonaggregated column '%s' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by", nil), - ErrWrongGroupField: Message("Can't group on '%-.192s'", nil), - ErrWrongSumSelect: Message("Statement has sum functions and columns in same statement", nil), - ErrWrongValueCount: Message("Column count doesn't match value count", nil), - ErrTooLongIdent: Message("Identifier name '%-.100s' is too long", nil), - ErrDupFieldName: Message("Duplicate column name '%-.192s'", nil), - ErrDupKeyName: Message("Duplicate key name '%-.192s'", nil), - ErrDupEntry: Message("Duplicate entry '%-.64s' for key '%-.192s'", nil), - ErrWrongFieldSpec: Message("Incorrect column specifier for column '%-.192s'", nil), - ErrParse: Message("%s %s", nil), - ErrEmptyQuery: Message("Query was empty", nil), - ErrNonuniqTable: Message("Not unique table/alias: '%-.192s'", nil), - ErrInvalidDefault: Message("Invalid default value for '%-.192s'", nil), - ErrMultiplePriKey: Message("Multiple primary key defined", nil), - ErrTooManyKeys: Message("Too many keys specified; max %d keys allowed", nil), - ErrTooManyKeyParts: Message("Too many key parts specified; max %d parts allowed", nil), - ErrTooLongKey: Message("Specified key was too long (%d bytes); max key length is %d bytes", nil), - ErrKeyColumnDoesNotExits: Message("Key column '%-.192s' doesn't exist in table", nil), - ErrBlobUsedAsKey: Message("BLOB column '%-.192s' can't be used in key specification with the used table type", nil), - ErrJSONVacuousPath: Message("The path expression '$' is not allowed in this context.", nil), - ErrJSONBadOneOrAllArg: Message("The oneOrAll argument to %s may take these values: 'one' or 'all'.", nil), - ErrTooBigFieldlength: Message("Column length too big for column '%-.192s' (max = %d); use BLOB or TEXT instead", nil), - ErrWrongAutoKey: Message("Incorrect table definition; there can be only one auto column and it must be defined as a key", nil), - ErrReady: Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d", nil), - ErrNormalShutdown: Message("%s: Normal shutdown\n", nil), - ErrGotSignal: Message("%s: Got signal %d. Aborting!\n", nil), - ErrShutdownComplete: Message("%s: Shutdown complete\n", nil), - ErrForcingClose: Message("%s: Forcing close of thread %d user: '%-.48s'\n", nil), - ErrIpsock: Message("Can't create IP socket", nil), - ErrNoSuchIndex: Message("Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table", nil), - ErrWrongFieldTerminators: Message("Field separator argument is not what is expected; check the manual", nil), - ErrBlobsAndNoTerminated: Message("You can't use fixed rowlength with BLOBs; please use 'fields terminated by'", nil), - ErrTextFileNotReadable: Message("The file '%-.128s' must be in the database directory or be readable by all", nil), - ErrFileExists: Message("File '%-.200s' already exists", nil), - ErrLoadInfo: Message("Records: %d Deleted: %d Skipped: %d Warnings: %d", nil), - ErrAlterInfo: Message("Records: %d Duplicates: %d", nil), - ErrWrongSubKey: Message("Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys", nil), - ErrCantRemoveAllFields: Message("You can't delete all columns with ALTER TABLE; use DROP TABLE instead", nil), - ErrCantDropFieldOrKey: Message("Can't DROP '%-.192s'; check that column/key exists", nil), - ErrInsertInfo: Message("Records: %d Duplicates: %d Warnings: %d", nil), - ErrUpdateTableUsed: Message("You can't specify target table '%-.192s' for update in FROM clause", nil), - ErrNoSuchThread: Message("Unknown thread id: %d", nil), - ErrKillDenied: Message("You are not owner of thread %d", nil), - ErrNoTablesUsed: Message("No tables used", nil), - ErrTooBigSet: Message("Too many strings for column %-.192s and SET", nil), - ErrNoUniqueLogFile: Message("Can't generate a unique log-filename %-.200s.(1-999)\n", nil), - ErrTableNotLockedForWrite: Message("Table '%-.192s' was locked with a READ lock and can't be updated", nil), - ErrTableNotLocked: Message("Table '%-.192s' was not locked with LOCK TABLES", nil), - ErrBlobCantHaveDefault: Message("BLOB/TEXT/JSON column '%-.192s' can't have a default value", nil), - ErrWrongDBName: Message("Incorrect database name '%-.100s'", nil), - ErrWrongTableName: Message("Incorrect table name '%-.100s'", nil), - ErrTooBigSelect: Message("The SELECT would examine more than MAXJOINSIZE rows; check your WHERE and use SET SQLBIGSELECTS=1 or SET MAXJOINSIZE=# if the SELECT is okay", nil), - ErrUnknown: Message("Unknown error", nil), - ErrUnknownProcedure: Message("Unknown procedure '%-.192s'", nil), - ErrWrongParamcountToProcedure: Message("Incorrect parameter count to procedure '%-.192s'", nil), - ErrWrongParametersToProcedure: Message("Incorrect parameters to procedure '%-.192s'", nil), - ErrUnknownTable: Message("Unknown table '%-.192s' in %-.32s", nil), - ErrFieldSpecifiedTwice: Message("Column '%-.192s' specified twice", nil), - ErrInvalidGroupFuncUse: Message("Invalid use of group function", nil), - ErrUnsupportedExtension: Message("Table '%-.192s' uses an extension that doesn't exist in this MySQL version", nil), - ErrTableMustHaveColumns: Message("A table must have at least 1 column", nil), - ErrRecordFileFull: Message("The table '%-.192s' is full", nil), - ErrUnknownCharacterSet: Message("Unknown character set: '%-.64s'", nil), - ErrTooManyTables: Message("Too many tables; MySQL can only use %d tables in a join", nil), - ErrTooManyFields: Message("Too many columns", nil), - ErrTooBigRowsize: Message("Row size too large. The maximum row size for the used table type, not counting BLOBs, is %d. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs", nil), - ErrStackOverrun: Message("Thread stack overrun: Used: %d of a %d stack. Use 'mysqld --threadStack=#' to specify a bigger stack if needed", nil), - ErrWrongOuterJoin: Message("Cross dependency found in OUTER JOIN; examine your ON conditions", nil), - ErrNullColumnInIndex: Message("Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler", nil), - ErrCantFindUdf: Message("Can't load function '%-.192s'", nil), - ErrCantInitializeUdf: Message("Can't initialize function '%-.192s'; %-.80s", nil), - ErrUdfNoPaths: Message("No paths allowed for shared library", nil), - ErrUdfExists: Message("Function '%-.192s' already exists", nil), - ErrCantOpenLibrary: Message("Can't open shared library '%-.192s' (errno: %d %-.128s)", nil), - ErrCantFindDlEntry: Message("Can't find symbol '%-.128s' in library", nil), - ErrFunctionNotDefined: Message("Function '%-.192s' is not defined", nil), - ErrHostIsBlocked: Message("Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", nil), - ErrHostNotPrivileged: Message("Host '%-.64s' is not allowed to connect to this MySQL server", nil), - ErrPasswordAnonymousUser: Message("You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", nil), - ErrPasswordNotAllowed: Message("You must have privileges to update tables in the mysql database to be able to change passwords for others", nil), - ErrPasswordNoMatch: Message("Can't find any matching row in the user table", nil), - ErrUpdateInfo: Message("Rows matched: %d Changed: %d Warnings: %d", nil), - ErrCantCreateThread: Message("Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", nil), - ErrWrongValueCountOnRow: Message("Column count doesn't match value count at row %d", nil), - ErrCantReopenTable: Message("Can't reopen table: '%-.192s'", nil), - ErrInvalidUseOfNull: Message("Invalid use of NULL value", nil), - ErrRegexp: Message("Got error '%-.64s' from regexp", nil), - ErrMixOfGroupFuncAndFields: Message("Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", nil), - ErrNonexistingGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.64s'", nil), - ErrTableaccessDenied: Message("%-.128s command denied to user '%-.48s'@'%-.64s' for table '%-.64s'", nil), - ErrColumnaccessDenied: Message("%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'", nil), - ErrIllegalGrantForTable: Message("Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", nil), - ErrGrantWrongHostOrUser: Message("The host or user argument to GRANT is too long", nil), - ErrNoSuchTable: Message("Table '%-.192s.%-.192s' doesn't exist", nil), - ErrNonexistingTableGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'", nil), - ErrNotAllowedCommand: Message("The used command is not allowed with this MySQL version", nil), - ErrSyntax: Message("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use", nil), - ErrDelayedCantChangeLock: Message("Delayed insert thread couldn't get requested lock for table %-.192s", nil), - ErrTooManyDelayedThreads: Message("Too many delayed threads in use", nil), - ErrAbortingConnection: Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' (%-.64s)", nil), - ErrNetPacketTooLarge: Message("Got a packet bigger than 'max_allowed_packet' bytes", nil), - ErrNetReadErrorFromPipe: Message("Got a read error from the connection pipe", nil), - ErrNetFcntl: Message("Got an error from fcntl()", nil), - ErrNetPacketsOutOfOrder: Message("Got packets out of order", nil), - ErrNetUncompress: Message("Couldn't uncompress communication packet", nil), - ErrNetRead: Message("Got an error reading communication packets", nil), - ErrNetReadInterrupted: Message("Got timeout reading communication packets", nil), - ErrNetErrorOnWrite: Message("Got an error writing communication packets", nil), - ErrNetWriteInterrupted: Message("Got timeout writing communication packets", nil), - ErrTooLongString: Message("Result string is longer than 'maxAllowedPacket' bytes", nil), - ErrTableCantHandleBlob: Message("The used table type doesn't support BLOB/TEXT columns", nil), - ErrTableCantHandleAutoIncrement: Message("The used table type doesn't support AUTOINCREMENT columns", nil), - ErrDelayedInsertTableLocked: Message("INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES", nil), - ErrWrongColumnName: Message("Incorrect column name '%-.100s'", nil), - ErrWrongKeyColumn: Message("The used storage engine can't index column '%-.192s'", nil), - ErrWrongMrgTable: Message("Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist", nil), - ErrDupUnique: Message("Can't write, because of unique constraint, to table '%-.192s'", nil), - ErrBlobKeyWithoutLength: Message("BLOB/TEXT column '%-.192s' used in key specification without a key length", nil), - ErrPrimaryCantHaveNull: Message("All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", nil), - ErrTooManyRows: Message("Result consisted of more than one row", nil), - ErrRequiresPrimaryKey: Message("This table type requires a primary key", nil), - ErrNoRaidCompiled: Message("This version of MySQL is not compiled with RAID support", nil), - ErrUpdateWithoutKeyInSafeMode: Message("You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", nil), - ErrKeyDoesNotExist: Message("Key '%-.192s' doesn't exist in table '%-.192s'", nil), - ErrCheckNoSuchTable: Message("Can't open table", nil), - ErrCheckNotImplemented: Message("The storage engine for the table doesn't support %s", nil), - ErrCantDoThisDuringAnTransaction: Message("You are not allowed to execute this command in a transaction", nil), - ErrErrorDuringCommit: Message("Got error %d during COMMIT", nil), - ErrErrorDuringRollback: Message("Got error %d during ROLLBACK", nil), - ErrErrorDuringFlushLogs: Message("Got error %d during FLUSHLOGS", nil), - ErrErrorDuringCheckpoint: Message("Got error %d during CHECKPOINT", nil), - ErrNewAbortingConnection: Message("Aborted connection %d to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)", nil), - ErrDumpNotImplemented: Message("The storage engine for the table does not support binary table dump", nil), - ErrFlushMasterBinlogClosed: Message("Binlog closed, cannot RESET MASTER", nil), - ErrIndexRebuild: Message("Failed rebuilding the index of dumped table '%-.192s'", nil), - ErrMaster: Message("Error from master: '%-.64s'", nil), - ErrMasterNetRead: Message("Net error reading from master", nil), - ErrMasterNetWrite: Message("Net error writing to master", nil), - ErrFtMatchingKeyNotFound: Message("Can't find FULLTEXT index matching the column list", nil), - ErrLockOrActiveTransaction: Message("Can't execute the given command because you have active locked tables or an active transaction", nil), - ErrUnknownSystemVariable: Message("Unknown system variable '%-.64s'", nil), - ErrCrashedOnUsage: Message("Table '%-.192s' is marked as crashed and should be repaired", nil), - ErrCrashedOnRepair: Message("Table '%-.192s' is marked as crashed and last (automatic?) repair failed", nil), - ErrWarningNotCompleteRollback: Message("Some non-transactional changed tables couldn't be rolled back", nil), - ErrTransCacheFull: Message("Multi-statement transaction required more than 'maxBinlogCacheSize' bytes of storage; increase this mysqld variable and try again", nil), - ErrSlaveMustStop: Message("This operation cannot be performed with a running slave; run STOP SLAVE first", nil), - ErrSlaveNotRunning: Message("This operation requires a running slave; configure slave and do START SLAVE", nil), - ErrBadSlave: Message("The server is not configured as slave; fix in config file or with CHANGE MASTER TO", nil), - ErrMasterInfo: Message("Could not initialize master info structure; more error messages can be found in the MySQL error log", nil), - ErrSlaveThread: Message("Could not create slave thread; check system resources", nil), - ErrTooManyUserConnections: Message("User %-.64s already has more than 'maxUserConnections' active connections", nil), - ErrSetConstantsOnly: Message("You may only use constant expressions with SET", nil), - ErrLockWaitTimeout: Message("Lock wait timeout exceeded; try restarting transaction", nil), - ErrLockTableFull: Message("The total number of locks exceeds the lock table size", nil), - ErrReadOnlyTransaction: Message("Update locks cannot be acquired during a READ UNCOMMITTED transaction", nil), - ErrDropDBWithReadLock: Message("DROP DATABASE not allowed while thread is holding global read lock", nil), - ErrCreateDBWithReadLock: Message("CREATE DATABASE not allowed while thread is holding global read lock", nil), - ErrWrongArguments: Message("Incorrect arguments to %s", nil), - ErrNoPermissionToCreateUser: Message("'%-.48s'@'%-.64s' is not allowed to create new users", nil), - ErrUnionTablesInDifferentDir: Message("Incorrect table definition; all MERGE tables must be in the same database", nil), - ErrLockDeadlock: Message("Deadlock found when trying to get lock; try restarting transaction", nil), - ErrTableCantHandleFt: Message("The used table type doesn't support FULLTEXT indexes", nil), - ErrCannotAddForeign: Message("Cannot add foreign key constraint", nil), - ErrNoReferencedRow: Message("Cannot add or update a child row: a foreign key constraint fails", nil), - ErrRowIsReferenced: Message("Cannot delete or update a parent row: a foreign key constraint fails", nil), - ErrConnectToMaster: Message("Error connecting to master: %-.128s", nil), - ErrQueryOnMaster: Message("Error running query on master: %-.128s", nil), - ErrErrorWhenExecutingCommand: Message("Error when executing command %s: %-.128s", nil), - ErrWrongUsage: Message("Incorrect usage of %s and %s", nil), - ErrWrongNumberOfColumnsInSelect: Message("The used SELECT statements have a different number of columns", nil), - ErrCantUpdateWithReadlock: Message("Can't execute the query because you have a conflicting read lock", nil), - ErrMixingNotAllowed: Message("Mixing of transactional and non-transactional tables is disabled", nil), - ErrDupArgument: Message("Option '%s' used twice in statement", nil), - ErrUserLimitReached: Message("User '%-.64s' has exceeded the '%s' resource (current value: %d)", nil), - ErrSpecificAccessDenied: Message("Access denied; you need (at least one of) the %-.128s privilege(s) for this operation", nil), - ErrLocalVariable: Message("Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", nil), - ErrGlobalVariable: Message("Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", nil), - ErrNoDefault: Message("Variable '%-.64s' doesn't have a default value", nil), - ErrWrongValueForVar: Message("Variable '%-.64s' can't be set to the value of '%-.200s'", nil), - ErrWrongTypeForVar: Message("Incorrect argument type to variable '%-.64s'", nil), - ErrVarCantBeRead: Message("Variable '%-.64s' can only be set, not read", nil), - ErrCantUseOptionHere: Message("Incorrect usage/placement of '%s'", nil), - ErrNotSupportedYet: Message("This version of TiDB doesn't yet support '%s'", nil), - ErrMasterFatalErrorReadingBinlog: Message("Got fatal error %d from master when reading data from binary log: '%-.320s'", nil), - ErrSlaveIgnoredTable: Message("Slave SQL thread ignored the query because of replicate-*-table rules", nil), - ErrIncorrectGlobalLocalVar: Message("Variable '%-.192s' is a %s variable", nil), - ErrWrongFkDef: Message("Incorrect foreign key definition for '%-.192s': %s", nil), - ErrKeyRefDoNotMatchTableRef: Message("Key reference and table reference don't match", nil), - ErrOperandColumns: Message("Operand should contain %d column(s)", nil), - ErrSubqueryNo1Row: Message("Subquery returns more than 1 row", nil), - ErrUnknownStmtHandler: Message("Unknown prepared statement handler %s given to %s", nil), - ErrCorruptHelpDB: Message("Help database is corrupt or does not exist", nil), - ErrCyclicReference: Message("Cyclic reference on subqueries", nil), - ErrAutoConvert: Message("Converting column '%s' from %s to %s", nil), - ErrIllegalReference: Message("Reference '%-.64s' not supported (%s)", nil), - ErrDerivedMustHaveAlias: Message("Every derived table must have its own alias", nil), - ErrSelectReduced: Message("Select %d was reduced during optimization", nil), - ErrTablenameNotAllowedHere: Message("Table '%s' from one of the %ss cannot be used in %s", nil), - ErrNotSupportedAuthMode: Message("Client does not support authentication protocol requested by server; consider upgrading MySQL client", nil), - ErrSpatialCantHaveNull: Message("All parts of a SPATIAL index must be NOT NULL", nil), - ErrCollationCharsetMismatch: Message("COLLATION '%s' is not valid for CHARACTER SET '%s'", nil), - ErrSlaveWasRunning: Message("Slave is already running", nil), - ErrSlaveWasNotRunning: Message("Slave already has been stopped", nil), - ErrTooBigForUncompress: Message("Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", nil), - ErrZlibZMem: Message("ZLIB: Not enough memory", nil), - ErrZlibZBuf: Message("ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", nil), - ErrZlibZData: Message("ZLIB: Input data corrupted", nil), - ErrCutValueGroupConcat: Message("Some rows were cut by GROUPCONCAT(%s)", nil), - ErrWarnTooFewRecords: Message("Row %d doesn't contain data for all columns", nil), - ErrWarnTooManyRecords: Message("Row %d was truncated; it contained more data than there were input columns", nil), - ErrWarnNullToNotnull: Message("Column set to default value; NULL supplied to NOT NULL column '%s' at row %d", nil), - ErrWarnDataOutOfRange: Message("Out of range value for column '%s' at row %d", nil), - WarnDataTruncated: Message("Data truncated for column '%s' at row %d", nil), - ErrWarnUsingOtherHandler: Message("Using storage engine %s for table '%s'", nil), - ErrCantAggregate2collations: Message("Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", nil), - ErrDropUser: Message("Cannot drop one or more of the requested users", nil), - ErrRevokeGrants: Message("Can't revoke all privileges for one or more of the requested users", nil), - ErrCantAggregate3collations: Message("Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", nil), - ErrCantAggregateNcollations: Message("Illegal mix of collations for operation '%s'", nil), - ErrVariableIsNotStruct: Message("Variable '%-.64s' is not a variable component (can't be used as XXXX.variableName)", nil), - ErrUnknownCollation: Message("Unknown collation: '%-.64s'", nil), - ErrSlaveIgnoredSslParams: Message("SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", nil), - ErrServerIsInSecureAuthMode: Message("Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", nil), - ErrWarnFieldResolved: Message("Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d", nil), - ErrBadSlaveUntilCond: Message("Incorrect parameter or combination of parameters for START SLAVE UNTIL", nil), - ErrMissingSkipSlave: Message("It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart", nil), - ErrUntilCondIgnored: Message("SQL thread is not to be started so UNTIL options are ignored", nil), - ErrWrongNameForIndex: Message("Incorrect index name '%-.100s'", nil), - ErrWrongNameForCatalog: Message("Incorrect catalog name '%-.100s'", nil), - ErrWarnQcResize: Message("Query cache failed to set size %d; new query cache size is %d", nil), - ErrBadFtColumn: Message("Column '%-.192s' cannot be part of FULLTEXT index", nil), - ErrUnknownKeyCache: Message("Unknown key cache '%-.100s'", nil), - ErrWarnHostnameWontWork: Message("MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work", nil), - ErrUnknownStorageEngine: Message("Unknown storage engine '%s'", nil), - ErrWarnDeprecatedSyntax: Message("'%s' is deprecated and will be removed in a future release. Please use %s instead", nil), - ErrNonUpdatableTable: Message("The target table %-.100s of the %s is not updatable", nil), - ErrFeatureDisabled: Message("The '%s' feature is disabled; you need MySQL built with '%s' to have it working", nil), - ErrOptionPreventsStatement: Message("The MySQL server is running with the %s option so it cannot execute this statement", nil), - ErrDuplicatedValueInType: Message("Column '%-.100s' has duplicated value '%-.64s' in %s", nil), - ErrTruncatedWrongValue: Message("Truncated incorrect %-.64s value: '%-.128s'", nil), - ErrTooMuchAutoTimestampCols: Message("Incorrect table definition; there can be only one TIMESTAMP column with CURRENTTIMESTAMP in DEFAULT or ON UPDATE clause", nil), - ErrInvalidOnUpdate: Message("Invalid ON UPDATE clause for '%-.192s' column", nil), - ErrUnsupportedPs: Message("This command is not supported in the prepared statement protocol yet", nil), - ErrGetErrmsg: Message("Got error %d '%-.100s' from %s", nil), - ErrGetTemporaryErrmsg: Message("Got temporary error %d '%-.100s' from %s", nil), - ErrUnknownTimeZone: Message("Unknown or incorrect time zone: '%-.64s'", nil), - ErrWarnInvalidTimestamp: Message("Invalid TIMESTAMP value in column '%s' at row %d", nil), - ErrInvalidCharacterString: Message("Invalid %s character string: '%.64s'", nil), - ErrWarnAllowedPacketOverflowed: Message("Result of %s() was larger than max_allowed_packet (%d) - truncated", nil), - ErrConflictingDeclarations: Message("Conflicting declarations: '%s%s' and '%s%s'", nil), - ErrSpNoRecursiveCreate: Message("Can't create a %s from within another stored routine", nil), - ErrSpAlreadyExists: Message("%s %s already exists", nil), - ErrSpDoesNotExist: Message("%s %s does not exist", nil), - ErrSpDropFailed: Message("Failed to DROP %s %s", nil), - ErrSpStoreFailed: Message("Failed to CREATE %s %s", nil), - ErrSpLilabelMismatch: Message("%s with no matching label: %s", nil), - ErrSpLabelRedefine: Message("Redefining label %s", nil), - ErrSpLabelMismatch: Message("End-label %s without match", nil), - ErrSpUninitVar: Message("Referring to uninitialized variable %s", nil), - ErrSpBadselect: Message("PROCEDURE %s can't return a result set in the given context", nil), - ErrSpBadreturn: Message("RETURN is only allowed in a FUNCTION", nil), - ErrSpBadstatement: Message("%s is not allowed in stored procedures", nil), - ErrUpdateLogDeprecatedIgnored: Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been ignored.", nil), - ErrUpdateLogDeprecatedTranslated: Message("The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been translated to SET SQLLOGBIN.", nil), - ErrQueryInterrupted: Message("Query execution was interrupted", nil), - ErrSpWrongNoOfArgs: Message("Incorrect number of arguments for %s %s; expected %d, got %d", nil), - ErrSpCondMismatch: Message("Undefined CONDITION: %s", nil), - ErrSpNoreturn: Message("No RETURN found in FUNCTION %s", nil), - ErrSpNoreturnend: Message("FUNCTION %s ended without RETURN", nil), - ErrSpBadCursorQuery: Message("Cursor statement must be a SELECT", nil), - ErrSpBadCursorSelect: Message("Cursor SELECT must not have INTO", nil), - ErrSpCursorMismatch: Message("Undefined CURSOR: %s", nil), - ErrSpCursorAlreadyOpen: Message("Cursor is already open", nil), - ErrSpCursorNotOpen: Message("Cursor is not open", nil), - ErrSpUndeclaredVar: Message("Undeclared variable: %s", nil), - ErrSpWrongNoOfFetchArgs: Message("Incorrect number of FETCH variables", nil), - ErrSpFetchNoData: Message("No data - zero rows fetched, selected, or processed", nil), - ErrSpDupParam: Message("Duplicate parameter: %s", nil), - ErrSpDupVar: Message("Duplicate variable: %s", nil), - ErrSpDupCond: Message("Duplicate condition: %s", nil), - ErrSpDupCurs: Message("Duplicate cursor: %s", nil), - ErrSpCantAlter: Message("Failed to ALTER %s %s", nil), - ErrSpSubselectNyi: Message("Subquery value not supported", nil), - ErrStmtNotAllowedInSfOrTrg: Message("%s is not allowed in stored function or trigger", nil), - ErrSpVarcondAfterCurshndlr: Message("Variable or condition declaration after cursor or handler declaration", nil), - ErrSpCursorAfterHandler: Message("Cursor declaration after handler declaration", nil), - ErrSpCaseNotFound: Message("Case not found for CASE statement", nil), - ErrFparserTooBigFile: Message("Configuration file '%-.192s' is too big", nil), - ErrFparserBadHeader: Message("Malformed file type header in file '%-.192s'", nil), - ErrFparserEOFInComment: Message("Unexpected end of file while parsing comment '%-.200s'", nil), - ErrFparserErrorInParameter: Message("Error while parsing parameter '%-.192s' (line: '%-.192s')", nil), - ErrFparserEOFInUnknownParameter: Message("Unexpected end of file while skipping unknown parameter '%-.192s'", nil), - ErrViewNoExplain: Message("EXPLAIN/SHOW can not be issued; lacking privileges for underlying table", nil), - ErrFrmUnknownType: Message("File '%-.192s' has unknown type '%-.64s' in its header", nil), - ErrWrongObject: Message("'%-.192s.%-.192s' is not %s", nil), - ErrNonupdateableColumn: Message("Column '%-.192s' is not updatable", nil), - ErrViewSelectDerived: Message("View's SELECT contains a subquery in the FROM clause", nil), - ErrViewSelectClause: Message("View's SELECT contains a '%s' clause", nil), - ErrViewSelectVariable: Message("View's SELECT contains a variable or parameter", nil), - ErrViewSelectTmptable: Message("View's SELECT refers to a temporary table '%-.192s'", nil), - ErrViewWrongList: Message("View's SELECT and view's field list have different column counts", nil), - ErrWarnViewMerge: Message("View merge algorithm can't be used here for now (assumed undefined algorithm)", nil), - ErrWarnViewWithoutKey: Message("View being updated does not have complete key of underlying table in it", nil), - ErrViewInvalid: Message("View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them", nil), - ErrSpNoDropSp: Message("Can't drop or alter a %s from within another stored routine", nil), - ErrSpGotoInHndlr: Message("GOTO is not allowed in a stored procedure handler", nil), - ErrTrgAlreadyExists: Message("Trigger already exists", nil), - ErrTrgDoesNotExist: Message("Trigger does not exist", nil), - ErrTrgOnViewOrTempTable: Message("Trigger's '%-.192s' is view or temporary table", nil), - ErrTrgCantChangeRow: Message("Updating of %s row is not allowed in %strigger", nil), - ErrTrgNoSuchRowInTrg: Message("There is no %s row in %s trigger", nil), - ErrNoDefaultForField: Message("Field '%-.192s' doesn't have a default value", nil), - ErrDivisionByZero: Message("Division by 0", nil), - ErrTruncatedWrongValueForField: Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", nil), - ErrIllegalValueForType: Message("Illegal %s '%-.192s' value found during parsing", nil), - ErrViewNonupdCheck: Message("CHECK OPTION on non-updatable view '%-.192s.%-.192s'", nil), - ErrViewCheckFailed: Message("CHECK OPTION failed '%-.192s.%-.192s'", nil), - ErrProcaccessDenied: Message("%-.16s command denied to user '%-.48s'@'%-.64s' for routine '%-.192s'", nil), - ErrRelayLogFail: Message("Failed purging old relay logs: %s", nil), - ErrPasswdLength: Message("Password hash should be a %d-digit hexadecimal number", nil), - ErrUnknownTargetBinlog: Message("Target log not found in binlog index", nil), - ErrIoErrLogIndexRead: Message("I/O error reading log index file", nil), - ErrBinlogPurgeProhibited: Message("Server configuration does not permit binlog purge", nil), - ErrFseekFail: Message("Failed on fseek()", nil), - ErrBinlogPurgeFatalErr: Message("Fatal error during log purge", nil), - ErrLogInUse: Message("A purgeable log is in use, will not purge", nil), - ErrLogPurgeUnknownErr: Message("Unknown error during log purge", nil), - ErrRelayLogInit: Message("Failed initializing relay log position: %s", nil), - ErrNoBinaryLogging: Message("You are not using binary logging", nil), - ErrReservedSyntax: Message("The '%-.64s' syntax is reserved for purposes internal to the MySQL server", nil), - ErrWsasFailed: Message("WSAStartup Failed", nil), - ErrDiffGroupsProc: Message("Can't handle procedures with different groups yet", nil), - ErrNoGroupForProc: Message("Select must have a group with this procedure", nil), - ErrOrderWithProc: Message("Can't use ORDER clause with this procedure", nil), - ErrLoggingProhibitChangingOf: Message("Binary logging and replication forbid changing the global server %s", nil), - ErrNoFileMapping: Message("Can't map file: %-.200s, errno: %d", nil), - ErrWrongMagic: Message("Wrong magic in %-.64s", nil), - ErrPsManyParam: Message("Prepared statement contains too many placeholders", nil), - ErrKeyPart0: Message("Key part '%-.192s' length cannot be 0", nil), - ErrViewChecksum: Message("View text checksum failed", nil), - ErrViewMultiupdate: Message("Can not modify more than one base table through a join view '%-.192s.%-.192s'", nil), - ErrViewNoInsertFieldList: Message("Can not insert into join view '%-.192s.%-.192s' without fields list", nil), - ErrViewDeleteMergeView: Message("Can not delete from join view '%-.192s.%-.192s'", nil), - ErrCannotUser: Message("Operation %s failed for %.256s", nil), - ErrXaerNota: Message("XAERNOTA: Unknown XID", nil), - ErrXaerInval: Message("XAERINVAL: Invalid arguments (or unsupported command)", nil), - ErrXaerRmfail: Message("XAERRMFAIL: The command cannot be executed when global transaction is in the %.64s state", nil), - ErrXaerOutside: Message("XAEROUTSIDE: Some work is done outside global transaction", nil), - ErrXaerRmerr: Message("XAERRMERR: Fatal error occurred in the transaction branch - check your data for consistency", nil), - ErrXaRbrollback: Message("XARBROLLBACK: Transaction branch was rolled back", nil), - ErrNonexistingProcGrant: Message("There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'", nil), - ErrProcAutoGrantFail: Message("Failed to grant EXECUTE and ALTER ROUTINE privileges", nil), - ErrProcAutoRevokeFail: Message("Failed to revoke all privileges to dropped routine", nil), - ErrDataTooLong: Message("Data too long for column '%s' at row %d", nil), - ErrSpBadSQLstate: Message("Bad SQLSTATE: '%s'", nil), - ErrStartup: Message("%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s", nil), - ErrLoadFromFixedSizeRowsToVar: Message("Can't load value from file with fixed size rows to variable", nil), - ErrCantCreateUserWithGrant: Message("You are not allowed to create a user with GRANT", nil), - ErrWrongValueForType: Message("Incorrect %-.32s value: '%-.128s' for function %-.32s", nil), - ErrTableDefChanged: Message("Table definition has changed, please retry transaction", nil), - ErrSpDupHandler: Message("Duplicate handler declared in the same block", nil), - ErrSpNotVarArg: Message("OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger", nil), - ErrSpNoRetset: Message("Not allowed to return a result set from a %s", nil), - ErrCantCreateGeometryObject: Message("Cannot get geometry object from data you send to the GEOMETRY field", nil), - ErrFailedRoutineBreakBinlog: Message("A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes", nil), - ErrBinlogUnsafeRoutine: Message("This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), - ErrBinlogCreateRoutineNeedSuper: Message("You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", nil), - ErrExecStmtWithOpenCursor: Message("You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it.", nil), - ErrStmtHasNoOpenCursor: Message("The statement (%d) has no open cursor.", nil), - ErrCommitNotAllowedInSfOrTrg: Message("Explicit or implicit commit is not allowed in stored function or trigger.", nil), - ErrNoDefaultForViewField: Message("Field of view '%-.192s.%-.192s' underlying table doesn't have a default value", nil), - ErrSpNoRecursion: Message("Recursive stored functions and triggers are not allowed.", nil), - ErrTooBigScale: Message("Too big scale %d specified for column '%-.192s'. Maximum is %d.", nil), - ErrTooBigPrecision: Message("Too-big precision %d specified for '%-.192s'. Maximum is %d.", nil), - ErrMBiggerThanD: Message("For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s').", nil), - ErrWrongLockOfSystemTable: Message("You can't combine write-locking of system tables with other tables or lock types", nil), - ErrConnectToForeignDataSource: Message("Unable to connect to foreign data source: %.64s", nil), - ErrQueryOnForeignDataSource: Message("There was a problem processing the query on the foreign data source. Data source : %-.64s", nil), - ErrForeignDataSourceDoesntExist: Message("The foreign data source you are trying to reference does not exist. Data source : %-.64s", nil), - ErrForeignDataStringInvalidCantCreate: Message("Can't create federated table. The data source connection string '%-.64s' is not in the correct format", nil), - ErrForeignDataStringInvalid: Message("The data source connection string '%-.64s' is not in the correct format", nil), - ErrCantCreateFederatedTable: Message("Can't create federated table. Foreign data src : %-.64s", nil), - ErrTrgInWrongSchema: Message("Trigger in wrong schema", nil), - ErrStackOverrunNeedMore: Message("Thread stack overrun: %d bytes used of a %d byte stack, and %d bytes needed. Use 'mysqld --threadStack=#' to specify a bigger stack.", nil), - ErrTooLongBody: Message("Routine body for '%-.100s' is too long", nil), - ErrWarnCantDropDefaultKeycache: Message("Cannot drop default keycache", nil), - ErrTooBigDisplaywidth: Message("Display width out of range for column '%-.192s' (max = %d)", nil), - ErrXaerDupid: Message("XAERDUPID: The XID already exists", nil), - ErrDatetimeFunctionOverflow: Message("Datetime function: %-.32s field overflow", nil), - ErrCantUpdateUsedTableInSfOrTrg: Message("Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.", nil), - ErrViewPreventUpdate: Message("The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'.", nil), - ErrPsNoRecursion: Message("The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner", nil), - ErrSpCantSetAutocommit: Message("Not allowed to set autocommit from a stored function or trigger", nil), - ErrMalformedDefiner: Message("Definer is not fully qualified", nil), - ErrViewFrmNoUser: Message("View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!", nil), - ErrViewOtherUser: Message("You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer", nil), - ErrNoSuchUser: Message("The user specified as a definer ('%-.64s'@'%-.64s') does not exist", nil), - ErrForbidSchemaChange: Message("Changing schema from '%-.192s' to '%-.192s' is not allowed.", nil), - ErrRowIsReferenced2: Message("Cannot delete or update a parent row: a foreign key constraint fails (%.192s)", nil), - ErrNoReferencedRow2: Message("Cannot add or update a child row: a foreign key constraint fails (%.192s)", nil), - ErrSpBadVarShadow: Message("Variable '%-.64s' must be quoted with `...`, or renamed", nil), - ErrTrgNoDefiner: Message("No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.", nil), - ErrOldFileFormat: Message("'%-.192s' has an old format, you should re-create the '%s' object(s)", nil), - ErrSpRecursionLimit: Message("Recursive limit %d (as set by the maxSpRecursionDepth variable) was exceeded for routine %.192s", nil), - ErrSpProcTableCorrupt: Message("Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)", nil), - ErrSpWrongName: Message("Incorrect routine name '%-.192s'", nil), - ErrTableNeedsUpgrade: Message("Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\"", nil), - ErrSpNoAggregate: Message("AGGREGATE is not supported for stored functions", nil), - ErrMaxPreparedStmtCountReached: Message("Can't create more than maxPreparedStmtCount statements (current value: %d)", nil), - ErrViewRecursive: Message("`%-.192s`.`%-.192s` contains view recursion", nil), - ErrNonGroupingFieldUsed: Message("Non-grouping field '%-.192s' is used in %-.64s clause", nil), - ErrTableCantHandleSpkeys: Message("The used table type doesn't support SPATIAL indexes", nil), - ErrNoTriggersOnSystemSchema: Message("Triggers can not be created on system tables", nil), - ErrRemovedSpaces: Message("Leading spaces are removed from name '%s'", nil), - ErrAutoincReadFailed: Message("Failed to read auto-increment value from storage engine", nil), - ErrUsername: Message("user name", nil), - ErrHostname: Message("host name", nil), - ErrWrongStringLength: Message("String '%-.70s' is too long for %s (should be no longer than %d)", nil), - ErrNonInsertableTable: Message("The target table %-.100s of the %s is not insertable-into", nil), - ErrAdminWrongMrgTable: Message("Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist", nil), - ErrTooHighLevelOfNestingForSelect: Message("Too high level of nesting for select", nil), - ErrNameBecomesEmpty: Message("Name '%-.64s' has become ''", nil), - ErrAmbiguousFieldTerm: Message("First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY", nil), - ErrForeignServerExists: Message("The foreign server, %s, you are trying to create already exists.", nil), - ErrForeignServerDoesntExist: Message("The foreign server name you are trying to reference does not exist. Data source : %-.64s", nil), - ErrIllegalHaCreateOption: Message("Table storage engine '%-.64s' does not support the create option '%.64s'", nil), - ErrPartitionRequiresValues: Message("Syntax : %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition", nil), - ErrPartitionWrongValues: Message("Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition", nil), - ErrPartitionMaxvalue: Message("MAXVALUE can only be used in last partition definition", nil), - ErrPartitionSubpartition: Message("Subpartitions can only be hash partitions and by key", nil), - ErrPartitionSubpartMix: Message("Must define subpartitions on all partitions if on one partition", nil), - ErrPartitionWrongNoPart: Message("Wrong number of partitions defined, mismatch with previous setting", nil), - ErrPartitionWrongNoSubpart: Message("Wrong number of subpartitions defined, mismatch with previous setting", nil), - ErrWrongExprInPartitionFunc: Message("Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed", nil), - ErrNoConstExprInRangeOrList: Message("Expression in RANGE/LIST VALUES must be constant", nil), - ErrFieldNotFoundPart: Message("Field in list of fields for partition function not found in table", nil), - ErrListOfFieldsOnlyInHash: Message("List of fields is only allowed in KEY partitions", nil), - ErrInconsistentPartitionInfo: Message("The partition info in the frm file is not consistent with what can be written into the frm file", nil), - ErrPartitionFuncNotAllowed: Message("The %-.192s function returns the wrong type", nil), - ErrPartitionsMustBeDefined: Message("For %-.64s partitions each partition must be defined", nil), - ErrRangeNotIncreasing: Message("VALUES LESS THAN value must be strictly increasing for each partition", nil), - ErrInconsistentTypeOfFunctions: Message("VALUES value must be of same type as partition function", nil), - ErrMultipleDefConstInListPart: Message("Multiple definition of same constant in list partitioning", nil), - ErrPartitionEntry: Message("Partitioning can not be used stand-alone in query", nil), - ErrMixHandler: Message("The mix of handlers in the partitions is not allowed in this version of MySQL", nil), - ErrPartitionNotDefined: Message("For the partitioned engine it is necessary to define all %-.64s", nil), - ErrTooManyPartitions: Message("Too many partitions (including subpartitions) were defined", nil), - ErrSubpartition: Message("It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning", nil), - ErrCantCreateHandlerFile: Message("Failed to create specific handler file", nil), - ErrBlobFieldInPartFunc: Message("A BLOB field is not allowed in partition function", nil), - ErrUniqueKeyNeedAllFieldsInPf: Message("A %-.192s must include all columns in the table's partitioning function", nil), - ErrNoParts: Message("Number of %-.64s = 0 is not an allowed value", nil), - ErrPartitionMgmtOnNonpartitioned: Message("Partition management on a not partitioned table is not possible", nil), - ErrForeignKeyOnPartitioned: Message("Foreign key clause is not yet supported in conjunction with partitioning", nil), - ErrDropPartitionNonExistent: Message("Error in list of partitions to %-.64s", nil), - ErrDropLastPartition: Message("Cannot remove all partitions, use DROP TABLE instead", nil), - ErrCoalesceOnlyOnHashPartition: Message("COALESCE PARTITION can only be used on HASH/KEY partitions", nil), - ErrReorgHashOnlyOnSameNo: Message("REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers", nil), - ErrReorgNoParam: Message("REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs", nil), - ErrOnlyOnRangeListPartition: Message("%-.64s PARTITION can only be used on RANGE/LIST partitions", nil), - ErrAddPartitionSubpart: Message("Trying to Add partition(s) with wrong number of subpartitions", nil), - ErrAddPartitionNoNewPartition: Message("At least one partition must be added", nil), - ErrCoalescePartitionNoPartition: Message("At least one partition must be coalesced", nil), - ErrReorgPartitionNotExist: Message("More partitions to reorganize than there are partitions", nil), - ErrSameNamePartition: Message("Duplicate partition name %-.192s", nil), - ErrNoBinlog: Message("It is not allowed to shut off binlog on this command", nil), - ErrConsecutiveReorgPartitions: Message("When reorganizing a set of partitions they must be in consecutive order", nil), - ErrReorgOutsideRange: Message("Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range", nil), - ErrPartitionFunctionFailure: Message("Partition function not supported in this version for this handler", nil), - ErrPartState: Message("Partition state cannot be defined from CREATE/ALTER TABLE", nil), - ErrLimitedPartRange: Message("The %-.64s handler only supports 32 bit integers in VALUES", nil), - ErrPluginIsNotLoaded: Message("Plugin '%-.192s' is not loaded", nil), - ErrWrongValue: Message("Incorrect %-.32s value: '%-.128s'", nil), - ErrNoPartitionForGivenValue: Message("Table has no partition for value %-.64s", nil), - ErrFilegroupOptionOnlyOnce: Message("It is not allowed to specify %s more than once", nil), - ErrCreateFilegroupFailed: Message("Failed to create %s", nil), - ErrDropFilegroupFailed: Message("Failed to drop %s", nil), - ErrTablespaceAutoExtend: Message("The handler doesn't support autoextend of tablespaces", nil), - ErrWrongSizeNumber: Message("A size parameter was incorrectly specified, either number or on the form 10M", nil), - ErrSizeOverflow: Message("The size number was correct but we don't allow the digit part to be more than 2 billion", nil), - ErrAlterFilegroupFailed: Message("Failed to alter: %s", nil), - ErrBinlogRowLoggingFailed: Message("Writing one row to the row-based binary log failed", nil), - ErrBinlogRowWrongTableDef: Message("Table definition on master and slave does not match: %s", nil), - ErrBinlogRowRbrToSbr: Message("Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events", nil), - ErrEventAlreadyExists: Message("Event '%-.192s' already exists", nil), - ErrEventStoreFailed: Message("Failed to store event %s. Error code %d from storage engine.", nil), - ErrEventDoesNotExist: Message("Unknown event '%-.192s'", nil), - ErrEventCantAlter: Message("Failed to alter event '%-.192s'", nil), - ErrEventDropFailed: Message("Failed to drop %s", nil), - ErrEventIntervalNotPositiveOrTooBig: Message("INTERVAL is either not positive or too big", nil), - ErrEventEndsBeforeStarts: Message("ENDS is either invalid or before STARTS", nil), - ErrEventExecTimeInThePast: Message("Event execution time is in the past. Event has been disabled", nil), - ErrEventOpenTableFailed: Message("Failed to open mysql.event", nil), - ErrEventNeitherMExprNorMAt: Message("No datetime expression provided", nil), - ErrObsoleteColCountDoesntMatchCorrupted: Message("Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), - ErrObsoleteCannotLoadFromTable: Message("Cannot load from mysql.%s. The table is probably corrupted", nil), - ErrEventCannotDelete: Message("Failed to delete the event from mysql.event", nil), - ErrEventCompile: Message("Error during compilation of event's body", nil), - ErrEventSameName: Message("Same old and new event name", nil), - ErrEventDataTooLong: Message("Data for column '%s' too long", nil), - ErrDropIndexNeededInForeignKey: Message("Cannot drop index '%-.192s': needed in a foreign key constraint", nil), - ErrWarnDeprecatedSyntaxWithVer: Message("The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead", nil), - ErrCantWriteLockLogTable: Message("You can't write-lock a log table. Only read access is possible", nil), - ErrCantLockLogTable: Message("You can't use locks with log tables.", nil), - ErrForeignDuplicateKeyOldUnused: Message("Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry", nil), - ErrColCountDoesntMatchPleaseUpdate: Message("Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysqlUpgrade to fix this error.", nil), - ErrTempTablePreventsSwitchOutOfRbr: Message("Cannot switch out of the row-based binary log format when the session has open temporary tables", nil), - ErrStoredFunctionPreventsSwitchBinlogFormat: Message("Cannot change the binary logging format inside a stored function or trigger", nil), - ErrNdbCantSwitchBinlogFormat: Message("The NDB cluster engine does not support changing the binlog format on the fly yet", nil), - ErrPartitionNoTemporary: Message("Cannot create temporary table with partitions", nil), - ErrPartitionConstDomain: Message("Partition constant is out of partition function domain", nil), - ErrPartitionFunctionIsNotAllowed: Message("This partition function is not allowed", nil), - ErrDdlLog: Message("Error in DDL log", nil), - ErrNullInValuesLessThan: Message("Not allowed to use NULL value in VALUES LESS THAN", nil), - ErrWrongPartitionName: Message("Incorrect partition name", nil), - ErrCantChangeTxCharacteristics: Message("Transaction characteristics can't be changed while a transaction is in progress", nil), - ErrDupEntryAutoincrementCase: Message("ALTER TABLE causes autoIncrement resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'", nil), - ErrEventModifyQueue: Message("Internal scheduler error %d", nil), - ErrEventSetVar: Message("Error during starting/stopping of the scheduler. Error code %d", nil), - ErrPartitionMerge: Message("Engine cannot be used in partitioned tables", nil), - ErrCantActivateLog: Message("Cannot activate '%-.64s' log", nil), - ErrRbrNotAvailable: Message("The server was not built with row-based replication", nil), - ErrBase64Decode: Message("Decoding of base64 string failed", nil), - ErrEventRecursionForbidden: Message("Recursion of EVENT DDL statements is forbidden when body is present", nil), - ErrEventsDB: Message("Cannot proceed because system tables used by Event Scheduler were found damaged at server start", nil), - ErrOnlyIntegersAllowed: Message("Only integers allowed as number here", nil), - ErrUnsuportedLogEngine: Message("This storage engine cannot be used for log tables\"", nil), - ErrBadLogStatement: Message("You cannot '%s' a log table if logging is enabled", nil), - ErrCantRenameLogTable: Message("Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'", nil), - ErrWrongParamcountToNativeFct: Message("Incorrect parameter count in the call to native function '%-.192s'", nil), - ErrWrongParametersToNativeFct: Message("Incorrect parameters in the call to native function '%-.192s'", nil), - ErrWrongParametersToStoredFct: Message("Incorrect parameters in the call to stored function '%-.192s'", nil), - ErrNativeFctNameCollision: Message("This function '%-.192s' has the same name as a native function", nil), - ErrDupEntryWithKeyName: Message("Duplicate entry '%-.64s' for key '%-.192s'", nil), - ErrBinlogPurgeEmFile: Message("Too many files opened, please execute the command again", nil), - ErrEventCannotCreateInThePast: Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.", nil), - ErrEventCannotAlterInThePast: Message("Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.", nil), - ErrSlaveIncident: Message("The incident %s occurred on the master. Message: %-.64s", nil), - ErrNoPartitionForGivenValueSilent: Message("Table has no partition for some existing values", nil), - ErrBinlogUnsafeStatement: Message("Unsafe statement written to the binary log using statement format since BINLOGFORMAT = STATEMENT. %s", nil), - ErrSlaveFatal: Message("Fatal : %s", nil), - ErrSlaveRelayLogReadFailure: Message("Relay log read failure: %s", nil), - ErrSlaveRelayLogWriteFailure: Message("Relay log write failure: %s", nil), - ErrSlaveCreateEventFailure: Message("Failed to create %s", nil), - ErrSlaveMasterComFailure: Message("Master command %s failed: %s", nil), - ErrBinlogLoggingImpossible: Message("Binary logging not possible. Message: %s", nil), - ErrViewNoCreationCtx: Message("View `%-.64s`.`%-.64s` has no creation context", nil), - ErrViewInvalidCreationCtx: Message("Creation context of view `%-.64s`.`%-.64s' is invalid", nil), - ErrSrInvalidCreationCtx: Message("Creation context of stored routine `%-.64s`.`%-.64s` is invalid", nil), - ErrTrgCorruptedFile: Message("Corrupted TRG file for table `%-.64s`.`%-.64s`", nil), - ErrTrgNoCreationCtx: Message("Triggers for table `%-.64s`.`%-.64s` have no creation context", nil), - ErrTrgInvalidCreationCtx: Message("Trigger creation context of table `%-.64s`.`%-.64s` is invalid", nil), - ErrEventInvalidCreationCtx: Message("Creation context of event `%-.64s`.`%-.64s` is invalid", nil), - ErrTrgCantOpenTable: Message("Cannot open table for trigger `%-.64s`.`%-.64s`", nil), - ErrCantCreateSroutine: Message("Cannot create stored routine `%-.64s`. Check warnings", nil), - ErrNeverUsed: Message("Ambiguous slave modes combination. %s", nil), - ErrNoFormatDescriptionEventBeforeBinlogStatement: Message("The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement.", nil), - ErrSlaveCorruptEvent: Message("Corrupted replication event was detected", nil), - ErrLoadDataInvalidColumn: Message("Invalid column reference (%-.64s) in LOAD DATA", nil), - ErrLogPurgeNoFile: Message("Being purged log %s was not found", nil), - ErrXaRbtimeout: Message("XARBTIMEOUT: Transaction branch was rolled back: took too long", nil), - ErrXaRbdeadlock: Message("XARBDEADLOCK: Transaction branch was rolled back: deadlock was detected", nil), - ErrNeedReprepare: Message("Prepared statement needs to be re-prepared", nil), - ErrDelayedNotSupported: Message("DELAYED option not supported for table '%-.192s'", nil), - WarnNoMasterInfo: Message("The master info structure does not exist", nil), - WarnOptionIgnored: Message("<%-.64s> option ignored", nil), - WarnPluginDeleteBuiltin: Message("Built-in plugins cannot be deleted", nil), - WarnPluginBusy: Message("Plugin is busy and will be uninstalled on shutdown", nil), - ErrVariableIsReadonly: Message("%s variable '%s' is read-only. Use SET %s to assign the value", nil), - ErrWarnEngineTransactionRollback: Message("Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted", nil), - ErrSlaveHeartbeatFailure: Message("Unexpected master's heartbeat data: %s", nil), - ErrSlaveHeartbeatValueOutOfRange: Message("The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds).", nil), - ErrNdbReplicationSchema: Message("Bad schema for mysql.ndbReplication table. Message: %-.64s", nil), - ErrConflictFnParse: Message("Error in parsing conflict function. Message: %-.64s", nil), - ErrExceptionsWrite: Message("Write to exceptions table failed. Message: %-.128s\"", nil), - ErrTooLongTableComment: Message("Comment for table '%-.64s' is too long (max = %d)", nil), - ErrTooLongFieldComment: Message("Comment for field '%-.64s' is too long (max = %d)", nil), - ErrFuncInexistentNameCollision: Message("FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual", nil), - ErrDatabaseName: Message("Database", nil), - ErrTableName: Message("Table", nil), - ErrPartitionName: Message("Partition", nil), - ErrSubpartitionName: Message("Subpartition", nil), - ErrTemporaryName: Message("Temporary", nil), - ErrRenamedName: Message("Renamed", nil), - ErrTooManyConcurrentTrxs: Message("Too many active concurrent transactions", nil), - WarnNonASCIISeparatorNotImplemented: Message("Non-ASCII separator arguments are not fully supported", nil), - ErrDebugSyncTimeout: Message("debug sync point wait timed out", nil), - ErrDebugSyncHitLimit: Message("debug sync point hit limit reached", nil), - ErrDupSignalSet: Message("Duplicate condition information item '%s'", nil), - ErrSignalWarn: Message("Unhandled user-defined warning condition", nil), - ErrSignalNotFound: Message("Unhandled user-defined not found condition", nil), - ErrSignalException: Message("Unhandled user-defined exception condition", nil), - ErrResignalWithoutActiveHandler: Message("RESIGNAL when handler not active", nil), - ErrSignalBadConditionType: Message("SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE", nil), - WarnCondItemTruncated: Message("Data truncated for condition item '%s'", nil), - ErrCondItemTooLong: Message("Data too long for condition item '%s'", nil), - ErrUnknownLocale: Message("Unknown locale: '%-.64s'", nil), - ErrSlaveIgnoreServerIDs: Message("The requested server id %d clashes with the slave startup option --replicate-same-server-id", nil), - ErrQueryCacheDisabled: Message("Query cache is disabled; restart the server with queryCacheType=1 to enable it", nil), - ErrSameNamePartitionField: Message("Duplicate partition field name '%-.192s'", nil), - ErrPartitionColumnList: Message("Inconsistency in usage of column lists for partitioning", nil), - ErrWrongTypeColumnValue: Message("Partition column values of incorrect type", nil), - ErrTooManyPartitionFuncFields: Message("Too many fields in '%-.192s'", nil), - ErrMaxvalueInValuesIn: Message("Cannot use MAXVALUE as value in VALUES IN", nil), - ErrTooManyValues: Message("Cannot have more than one value for this type of %-.64s partitioning", nil), - ErrRowSinglePartitionField: Message("Row expressions in VALUES IN only allowed for multi-field column partitioning", nil), - ErrFieldTypeNotAllowedAsPartitionField: Message("Field '%-.192s' is of a not allowed type for this type of partitioning", nil), - ErrPartitionFieldsTooLong: Message("The total length of the partitioning fields is too large", nil), - ErrBinlogRowEngineAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved.", nil), - ErrBinlogRowModeAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.", nil), - ErrBinlogUnsafeAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOGFORMAT = MIXED. %s", nil), - ErrBinlogRowInjectionAndStmtEngine: Message("Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.", nil), - ErrBinlogStmtModeAndRowEngine: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s", nil), - ErrBinlogRowInjectionAndStmtMode: Message("Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOGFORMAT = STATEMENT.", nil), - ErrBinlogMultipleEnginesAndSelfLoggingEngine: Message("Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging.", nil), - ErrBinlogUnsafeLimit: Message("The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.", nil), - ErrBinlogUnsafeInsertDelayed: Message("The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted.", nil), - ErrBinlogUnsafeSystemTable: Message("The statement is unsafe because it uses the general log, slow query log, or performanceSchema table(s). This is unsafe because system tables may differ on slaves.", nil), - ErrBinlogUnsafeAutoincColumns: Message("Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTOINCREMENT column. Inserted values cannot be logged correctly.", nil), - ErrBinlogUnsafeUdf: Message("Statement is unsafe because it uses a UDF which may not return the same value on the slave.", nil), - ErrBinlogUnsafeSystemVariable: Message("Statement is unsafe because it uses a system variable that may have a different value on the slave.", nil), - ErrBinlogUnsafeSystemFunction: Message("Statement is unsafe because it uses a system function that may return a different value on the slave.", nil), - ErrBinlogUnsafeNontransAfterTrans: Message("Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.", nil), - ErrMessageAndStatement: Message("%s Statement: %s", nil), - ErrSlaveConversionFailed: Message("Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'", nil), - ErrSlaveCantCreateConversion: Message("Can't create conversion table for table '%-.192s.%-.192s'", nil), - ErrInsideTransactionPreventsSwitchBinlogFormat: Message("Cannot modify @@session.binlogFormat inside a transaction", nil), - ErrPathLength: Message("The path specified for %.64s is too long.", nil), - ErrWarnDeprecatedSyntaxNoReplacement: Message("%s is deprecated and will be removed in a future release.%s", nil), - ErrWrongNativeTableStructure: Message("Native table '%-.64s'.'%-.64s' has the wrong structure", nil), - ErrWrongPerfSchemaUsage: Message("Invalid performanceSchema usage.", nil), - ErrWarnISSkippedTable: Message("Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement", nil), - ErrInsideTransactionPreventsSwitchBinlogDirect: Message("Cannot modify @@session.binlogDirectNonTransactionalUpdates inside a transaction", nil), - ErrStoredFunctionPreventsSwitchBinlogDirect: Message("Cannot change the binlog direct flag inside a stored function or trigger", nil), - ErrSpatialMustHaveGeomCol: Message("A SPATIAL index may only contain a geometrical type column", nil), - ErrTooLongIndexComment: Message("Comment for index '%-.64s' is too long (max = %d)", nil), - ErrLockAborted: Message("Wait on a lock was aborted due to a pending exclusive lock", nil), - ErrDataOutOfRange: Message("%s value is out of range in '%s'", nil), - ErrWrongSpvarTypeInLimit: Message("A variable of a non-integer based type in LIMIT clause", nil), - ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine: Message("Mixing self-logging and non-self-logging engines in a statement is unsafe.", nil), - ErrBinlogUnsafeMixedStatement: Message("Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.", nil), - ErrInsideTransactionPreventsSwitchSQLLogBin: Message("Cannot modify @@session.sqlLogBin inside a transaction", nil), - ErrStoredFunctionPreventsSwitchSQLLogBin: Message("Cannot change the sqlLogBin inside a stored function or trigger", nil), - ErrFailedReadFromParFile: Message("Failed to read from the .par file", nil), - ErrValuesIsNotIntType: Message("VALUES value for partition '%-.64s' must have type INT", nil), - ErrAccessDeniedNoPassword: Message("Access denied for user '%-.48s'@'%-.64s'", nil), - ErrSetPasswordAuthPlugin: Message("SET PASSWORD has no significance for user '%-.48s'@'%-.255s' as authentication plugin does not support it.", nil), - ErrGrantPluginUserExists: Message("GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists", nil), - ErrTruncateIllegalForeignKey: Message("Cannot truncate a table referenced in a foreign key constraint (%.192s)", nil), - ErrPluginIsPermanent: Message("Plugin '%s' is forcePlusPermanent and can not be unloaded", nil), - ErrSlaveHeartbeatValueOutOfRangeMin: Message("The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.", nil), - ErrSlaveHeartbeatValueOutOfRangeMax: Message("The requested value for the heartbeat period exceeds the value of `slaveNetTimeout' seconds. A sensible value for the period should be less than the timeout.", nil), - ErrStmtCacheFull: Message("Multi-row statements required more than 'maxBinlogStmtCacheSize' bytes of storage; increase this mysqld variable and try again", nil), - ErrMultiUpdateKeyConflict: Message("Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'.", nil), - ErrTableNeedsRebuild: Message("Table rebuild required. Please do \"ALTER TABLE `%-.32s` FORCE\" or dump/reload to fix it!", nil), - WarnOptionBelowLimit: Message("The value of '%s' should be no less than the value of '%s'", nil), - ErrIndexColumnTooLong: Message("Index column size too large. The maximum column size is %d bytes.", nil), - ErrErrorInTriggerBody: Message("Trigger '%-.64s' has an error in its body: '%-.256s'", nil), - ErrErrorInUnknownTriggerBody: Message("Unknown trigger has an error in its body: '%-.256s'", nil), - ErrIndexCorrupt: Message("Index %s is corrupted", nil), - ErrUndoRecordTooBig: Message("Undo log record is too big.", nil), - ErrBinlogUnsafeInsertIgnoreSelect: Message("INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeInsertSelectUpdate: Message("INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeReplaceSelect: Message("REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateIgnoreSelect: Message("CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateReplaceSelect: Message("CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeUpdateIgnore: Message("UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", nil), - ErrPluginNoUninstall: Message("Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it.", nil), - ErrPluginNoInstall: Message("Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it.", nil), - ErrBinlogUnsafeWriteAutoincSelect: Message("Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeCreateSelectAutoinc: Message("CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave.", nil), - ErrBinlogUnsafeInsertTwoKeys: Message("INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe", nil), - ErrTableInFkCheck: Message("Table is being used in foreign key check.", nil), - ErrUnsupportedEngine: Message("Storage engine '%s' does not support system tables. [%s.%s]", nil), - ErrBinlogUnsafeAutoincNotFirst: Message("INSERT into autoincrement field which is not the first part in the composed primary key is unsafe.", nil), - ErrCannotLoadFromTableV2: Message("Cannot load from %s.%s. The table is probably corrupted", nil), - ErrMasterDelayValueOutOfRange: Message("The requested value %d for the master delay exceeds the maximum %d", nil), - ErrOnlyFdAndRbrEventsAllowedInBinlogStatement: Message("Only FormatDescriptionLogEvent and row events are allowed in BINLOG statements (but %s was provided)", nil), - ErrPartitionExchangeDifferentOption: Message("Non matching attribute '%-.64s' between partition and table", nil), - ErrPartitionExchangePartTable: Message("Table to exchange with partition is partitioned: '%-.64s'", nil), - ErrPartitionExchangeTempTable: Message("Table to exchange with partition is temporary: '%-.64s'", nil), - ErrPartitionInsteadOfSubpartition: Message("Subpartitioned table, use subpartition instead of partition", nil), - ErrUnknownPartition: Message("Unknown partition '%-.64s' in table '%-.64s'", nil), - ErrTablesDifferentMetadata: Message("Tables have different definitions", nil), - ErrRowDoesNotMatchPartition: Message("Found a row that does not match the partition", nil), - ErrBinlogCacheSizeGreaterThanMax: Message("Option binlogCacheSize (%d) is greater than maxBinlogCacheSize (%d); setting binlogCacheSize equal to maxBinlogCacheSize.", nil), - ErrWarnIndexNotApplicable: Message("Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'", nil), - ErrPartitionExchangeForeignKey: Message("Table to exchange with partition has foreign key references: '%-.64s'", nil), - ErrNoSuchKeyValue: Message("Key value '%-.192s' was not found in table '%-.192s.%-.192s'", nil), - ErrRplInfoDataTooLong: Message("Data for column '%s' too long", nil), - ErrNetworkReadEventChecksumFailure: Message("Replication event checksum verification failed while reading from network.", nil), - ErrBinlogReadEventChecksumFailure: Message("Replication event checksum verification failed while reading from a log file.", nil), - ErrBinlogStmtCacheSizeGreaterThanMax: Message("Option binlogStmtCacheSize (%d) is greater than maxBinlogStmtCacheSize (%d); setting binlogStmtCacheSize equal to maxBinlogStmtCacheSize.", nil), - ErrCantUpdateTableInCreateTableSelect: Message("Can't update table '%-.192s' while '%-.192s' is being created.", nil), - ErrPartitionClauseOnNonpartitioned: Message("PARTITION () clause on non partitioned table", nil), - ErrRowDoesNotMatchGivenPartitionSet: Message("Found a row not matching the given partition set", nil), - ErrNoSuchPartitionunused: Message("partition '%-.64s' doesn't exist", nil), - ErrChangeRplInfoRepositoryFailure: Message("Failure while changing the type of replication repository: %s.", nil), - ErrWarningNotCompleteRollbackWithCreatedTempTable: Message("The creation of some temporary tables could not be rolled back.", nil), - ErrWarningNotCompleteRollbackWithDroppedTempTable: Message("Some temporary tables were dropped, but these operations could not be rolled back.", nil), - ErrMtsFeatureIsNotSupported: Message("%s is not supported in multi-threaded slave mode. %s", nil), - ErrMtsUpdatedDBsGreaterMax: Message("The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata.", nil), - ErrMtsCantParallel: Message("Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s.", nil), - ErrMtsInconsistentData: Message("%s", nil), - ErrFulltextNotSupportedWithPartitioning: Message("FULLTEXT index is not supported for partitioned tables.", nil), - ErrDaInvalidConditionNumber: Message("Invalid condition number", nil), - ErrInsecurePlainText: Message("Sending passwords in plain text without SSL/TLS is extremely insecure.", nil), - ErrInsecureChangeMaster: Message("Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.", nil), - ErrForeignDuplicateKeyWithChildInfo: Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'", nil), - ErrForeignDuplicateKeyWithoutChildInfo: Message("Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table", nil), - ErrSQLthreadWithSecureSlave: Message("Setting authentication options is not possible when only the Slave SQL Thread is being started.", nil), - ErrTableHasNoFt: Message("The table does not have FULLTEXT index to support this query", nil), - ErrVariableNotSettableInSfOrTrigger: Message("The system variable %.200s cannot be set in stored functions or triggers.", nil), - ErrVariableNotSettableInTransaction: Message("The system variable %.200s cannot be set when there is an ongoing transaction.", nil), - ErrGtidNextIsNotInGtidNextList: Message("The system variable @@SESSION.GTIDNEXT has the value %.200s, which is not listed in @@SESSION.GTIDNEXTLIST.", nil), - ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull: Message("When @@SESSION.GTIDNEXTLIST == NULL, the system variable @@SESSION.GTIDNEXT cannot change inside a transaction.", nil), - ErrSetStatementCannotInvokeFunction: Message("The statement 'SET %.200s' cannot invoke a stored function.", nil), - ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull: Message("The system variable @@SESSION.GTIDNEXT cannot be 'AUTOMATIC' when @@SESSION.GTIDNEXTLIST is non-NULL.", nil), - ErrSkippingLoggedTransaction: Message("Skipping transaction %.200s because it has already been executed and logged.", nil), - ErrMalformedGtidSetSpecification: Message("Malformed GTID set specification '%.200s'.", nil), - ErrMalformedGtidSetEncoding: Message("Malformed GTID set encoding.", nil), - ErrMalformedGtidSpecification: Message("Malformed GTID specification '%.200s'.", nil), - ErrGnoExhausted: Message("Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new serverUuid.", nil), - ErrBadSlaveAutoPosition: Message("Parameters MASTERLOGFILE, MASTERLOGPOS, RELAYLOGFILE and RELAYLOGPOS cannot be set when MASTERAUTOPOSITION is active.", nil), - ErrAutoPositionRequiresGtidModeOn: Message("CHANGE MASTER TO MASTERAUTOPOSITION = 1 can only be executed when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet: Message("Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTIDNEXT != AUTOMATIC or @@SESSION.GTIDNEXTLIST != NULL.", nil), - ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn: Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP2 requires @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), - ErrGtidModeRequiresBinlog: Message("@@GLOBAL.GTIDMODE = ON or UPGRADESTEP1 or UPGRADESTEP2 requires --log-bin and --log-slave-updates.", nil), - ErrCantSetGtidNextToGtidWhenGtidModeIsOff: Message("@@SESSION.GTIDNEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn: Message("@@SESSION.GTIDNEXT cannot be set to ANONYMOUS when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff: Message("@@SESSION.GTIDNEXTLIST cannot be set to a non-NULL value when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrFoundGtidEventWhenGtidModeIsOff: Message("Found a GtidLogEvent or PreviousGtidsLogEvent when @@GLOBAL.GTIDMODE = OFF.", nil), - ErrGtidUnsafeNonTransactionalTable: Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.", nil), - ErrGtidUnsafeCreateSelect: Message("CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", nil), - ErrGtidUnsafeCreateDropTemporaryTableInTransaction: Message("When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.", nil), - ErrGtidModeCanOnlyChangeOneStepAtATime: Message("The value of @@GLOBAL.GTIDMODE can only change one step at a time: OFF <-> UPGRADESTEP1 <-> UPGRADESTEP2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions.", nil), - ErrMasterHasPurgedRequiredGtids: Message("The slave is connecting using CHANGE MASTER TO MASTERAUTOPOSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.", nil), - ErrCantSetGtidNextWhenOwningGtid: Message("@@SESSION.GTIDNEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK.", nil), - ErrUnknownExplainFormat: Message("Unknown EXPLAIN format name: '%s'", nil), - ErrCantExecuteInReadOnlyTransaction: Message("Cannot execute statement in a READ ONLY transaction.", nil), - ErrTooLongTablePartitionComment: Message("Comment for table partition '%-.64s' is too long (max = %d)", nil), - ErrSlaveConfiguration: Message("Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.", nil), - ErrInnodbFtLimit: Message("InnoDB presently supports one FULLTEXT index creation at a time", nil), - ErrInnodbNoFtTempTable: Message("Cannot create FULLTEXT index on temporary InnoDB table", nil), - ErrInnodbFtWrongDocidColumn: Message("Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), - ErrInnodbFtWrongDocidIndex: Message("Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index", nil), - ErrInnodbOnlineLogTooBig: Message("Creating index '%-.192s' required more than 'innodbOnlineAlterLogMaxSize' bytes of modification log. Please try again.", nil), - ErrUnknownAlterAlgorithm: Message("Unknown ALGORITHM '%s'", nil), - ErrUnknownAlterLock: Message("Unknown LOCK type '%s'", nil), - ErrMtsChangeMasterCantRunWithGaps: Message("CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL.", nil), - ErrMtsRecoveryFailure: Message("Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log.", nil), - ErrMtsResetWorkers: Message("Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log.", nil), - ErrColCountDoesntMatchCorruptedV2: Message("Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted", nil), - ErrSlaveSilentRetryTransaction: Message("Slave must silently retry current transaction", nil), - ErrDiscardFkChecksRunning: Message("There is a foreign key check running on table '%-.192s'. Cannot discard the table.", nil), - ErrTableSchemaMismatch: Message("Schema mismatch (%s)", nil), - ErrTableInSystemTablespace: Message("Table '%-.192s' in system tablespace", nil), - ErrIoRead: Message("IO Read : (%d, %s) %s", nil), - ErrIoWrite: Message("IO Write : (%d, %s) %s", nil), - ErrTablespaceMissing: Message("Tablespace is missing for table '%-.192s'", nil), - ErrTablespaceExists: Message("Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT.", nil), - ErrTablespaceDiscarded: Message("Tablespace has been discarded for table '%-.192s'", nil), - ErrInternal: Message("Internal : %s", nil), - ErrInnodbImport: Message("ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %d : '%s'", nil), - ErrInnodbIndexCorrupt: Message("Index corrupt: %s", nil), - ErrInvalidYearColumnLength: Message("Supports only YEAR or YEAR(4) column", nil), - ErrNotValidPassword: Message("Your password does not satisfy the current policy requirements (%s)", nil), - ErrMustChangePassword: Message("You must SET PASSWORD before executing this statement", nil), - ErrFkNoIndexChild: Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the foreign table '%s'", nil), - ErrForeignKeyNoIndexInParent: Message("Failed to add the foreign key constraint. Missing index for constraint '%s' in the referenced table '%s'", nil), - ErrFkFailAddSystem: Message("Failed to add the foreign key constraint '%s' to system tables", nil), - ErrForeignKeyCannotOpenParent: Message("Failed to open the referenced table '%s'", nil), - ErrFkIncorrectOption: Message("Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'", nil), - ErrFkDupName: Message("Duplicate foreign key constraint name '%s'", nil), - ErrPasswordFormat: Message("The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.", nil), - ErrFkColumnCannotDrop: Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'", nil), - ErrFkColumnCannotDropChild: Message("Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrForeignKeyColumnNotNull: Message("Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL", nil), - ErrDupIndex: Message("Duplicate index '%-.64s' defined on the table '%-.64s.%-.64s'. This is deprecated and will be disallowed in a future release.", nil), - ErrForeignKeyColumnCannotChange: Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'", nil), - ErrForeignKeyColumnCannotChangeChild: Message("Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrFkCannotDeleteParent: Message("Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'", nil), - ErrMalformedPacket: Message("Malformed communication packet.", nil), - ErrReadOnlyMode: Message("Running in read-only mode", nil), - ErrGtidNextTypeUndefinedGroup: Message("When @@SESSION.GTIDNEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET @@SESSION.GTIDNEXT before a transaction and forgot to set @@SESSION.GTIDNEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current @@SESSION.GTIDNEXT is '%s'.", nil), - ErrVariableNotSettableInSp: Message("The system variable %.200s cannot be set in stored procedures.", nil), - ErrCantSetGtidPurgedWhenGtidModeIsOff: Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDMODE = ON.", nil), - ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty: Message("@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDEXECUTED is empty.", nil), - ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty: Message("@@GLOBAL.GTIDPURGED can only be set when there are no ongoing transactions (not even in other clients).", nil), - ErrGtidPurgedWasChanged: Message("@@GLOBAL.GTIDPURGED was changed from '%s' to '%s'.", nil), - ErrGtidExecutedWasChanged: Message("@@GLOBAL.GTIDEXECUTED was changed from '%s' to '%s'.", nil), - ErrBinlogStmtModeAndNoReplTables: Message("Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT, and both replicated and non replicated tables are written to.", nil), - ErrAlterOperationNotSupported: Message("%s is not supported for this operation. Try %s.", nil), - ErrAlterOperationNotSupportedReason: Message("%s is not supported. Reason: %s. Try %s.", nil), - ErrAlterOperationNotSupportedReasonCopy: Message("COPY algorithm requires a lock", nil), - ErrAlterOperationNotSupportedReasonPartition: Message("Partition specific operations do not yet support LOCK/ALGORITHM", nil), - ErrAlterOperationNotSupportedReasonFkRename: Message("Columns participating in a foreign key are renamed", nil), - ErrAlterOperationNotSupportedReasonColumnType: Message("Cannot change column type INPLACE", nil), - ErrAlterOperationNotSupportedReasonFkCheck: Message("Adding foreign keys needs foreignKeyChecks=OFF", nil), - ErrAlterOperationNotSupportedReasonIgnore: Message("Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows", nil), - ErrAlterOperationNotSupportedReasonNopk: Message("Dropping a primary key is not allowed without also adding a new primary key", nil), - ErrAlterOperationNotSupportedReasonAutoinc: Message("Adding an auto-increment column requires a lock", nil), - ErrAlterOperationNotSupportedReasonHiddenFts: Message("Cannot replace hidden FTSDOCID with a user-visible one", nil), - ErrAlterOperationNotSupportedReasonChangeFts: Message("Cannot drop or rename FTSDOCID", nil), - ErrAlterOperationNotSupportedReasonFts: Message("Fulltext index creation requires a lock", nil), - ErrSQLSlaveSkipCounterNotSettableInGtidMode: Message("sqlSlaveSkipCounter can not be set when the server is running with @@GLOBAL.GTIDMODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction", nil), - ErrDupUnknownInIndex: Message("Duplicate entry for key '%-.192s'", nil), - ErrIdentCausesTooLongPath: Message("Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'.", nil), - ErrAlterOperationNotSupportedReasonNotNull: Message("cannot silently convert NULL values, as required in this SQLMODE", nil), - ErrMustChangePasswordLogin: Message("Your password has expired. To log in you must change it using a client that supports expired passwords.", nil), - ErrRowInWrongPartition: Message("Found a row in wrong partition %s", nil), - ErrGeneratedColumnFunctionIsNotAllowed: Message("Expression of generated column '%s' contains a disallowed function.", nil), - ErrUnsupportedAlterInplaceOnVirtualColumn: Message("INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions.", nil), - ErrWrongFKOptionForGeneratedColumn: Message("Cannot define foreign key with %s clause on a generated column.", nil), - ErrBadGeneratedColumn: Message("The value specified for generated column '%s' in table '%s' is not allowed.", nil), - ErrUnsupportedOnGeneratedColumn: Message("'%s' is not supported for generated columns.", nil), - ErrGeneratedColumnNonPrior: Message("Generated column can refer only to generated columns defined prior to it.", nil), - ErrDependentByGeneratedColumn: Message("Column '%s' has a generated column dependency.", nil), - ErrGeneratedColumnRefAutoInc: Message("Generated column '%s' cannot refer to auto-increment column.", nil), - ErrInvalidFieldSize: Message("Invalid size for column '%s'.", nil), - ErrPasswordExpireAnonymousUser: Message("The password for anonymous user cannot be expired.", nil), - ErrIncorrectType: Message("Incorrect type for argument %s in function %s.", nil), - ErrInvalidJSONData: Message("Invalid JSON data provided to function %s: %s", nil), - ErrInvalidJSONText: Message("Invalid JSON text: %-.192s", nil), - ErrInvalidJSONTextInParam: Message("Invalid JSON text in argument %d to function %s: \"%s\" at position %d.", nil), - ErrInvalidJSONPath: Message("Invalid JSON path expression %s.", nil), - ErrInvalidJSONCharset: Message("Cannot create a JSON value from a string with CHARACTER SET '%s'.", nil), - ErrInvalidTypeForJSON: Message("Invalid data type for JSON data in argument %d to function %s; a JSON string or JSON type is required.", nil), - ErrInvalidJSONPathWildcard: Message("In this situation, path expressions may not contain the * and ** tokens or an array range.", nil), - ErrInvalidJSONContainsPathType: Message("The second argument can only be either 'one' or 'all'.", nil), - ErrJSONUsedAsKey: Message("JSON column '%-.192s' cannot be used in key specification.", nil), - ErrJSONDocumentTooDeep: Message("The JSON document exceeds the maximum depth.", nil), - ErrJSONDocumentNULLKey: Message("JSON documents may not contain NULL member names.", nil), - ErrBadUser: Message("User %s does not exist.", nil), - ErrUserAlreadyExists: Message("User %s already exists.", nil), - ErrInvalidJSONPathArrayCell: Message("A path expression is not a path to a cell in an array.", nil), - ErrInvalidEncryptionOption: Message("Invalid encryption option.", nil), - ErrWindowNoSuchWindow: Message("Window name '%s' is not defined.", nil), - ErrWindowCircularityInWindowGraph: Message("There is a circularity in the window dependency graph.", nil), - ErrWindowNoChildPartitioning: Message("A window which depends on another cannot define partitioning.", nil), - ErrWindowNoInherentFrame: Message("Window '%s' has a frame definition, so cannot be referenced by another window.", nil), - ErrWindowNoRedefineOrderBy: Message("Window '%s' cannot inherit '%s' since both contain an ORDER BY clause.", nil), - ErrWindowFrameStartIllegal: Message("Window '%s': frame start cannot be UNBOUNDED FOLLOWING.", nil), - ErrWindowFrameEndIllegal: Message("Window '%s': frame end cannot be UNBOUNDED PRECEDING.", nil), - ErrWindowFrameIllegal: Message("Window '%s': frame start or end is negative, NULL or of non-integral type", nil), - ErrWindowRangeFrameOrderType: Message("Window '%s' with RANGE N PRECEDING/FOLLOWING frame requires exactly one ORDER BY expression, of numeric or temporal type", nil), - ErrWindowRangeFrameTemporalType: Message("Window '%s' with RANGE frame has ORDER BY expression of datetime type. Only INTERVAL bound value allowed.", nil), - ErrWindowRangeFrameNumericType: Message("Window '%s' with RANGE frame has ORDER BY expression of numeric type, INTERVAL bound value not allowed.", nil), - ErrWindowRangeBoundNotConstant: Message("Window '%s' has a non-constant frame bound.", nil), - ErrWindowDuplicateName: Message("Window '%s' is defined twice.", nil), - ErrWindowIllegalOrderBy: Message("Window '%s': ORDER BY or PARTITION BY uses legacy position indication which is not supported, use expression.", nil), - ErrWindowInvalidWindowFuncUse: Message("You cannot use the window function '%s' in this context.'", nil), - ErrWindowInvalidWindowFuncAliasUse: Message("You cannot use the alias '%s' of an expression containing a window function in this context.'", nil), - ErrWindowNestedWindowFuncUseInWindowSpec: Message("You cannot nest a window function in the specification of window '%s'.", nil), - ErrWindowRowsIntervalUse: Message("Window '%s': INTERVAL can only be used with RANGE frames.", nil), - ErrWindowNoGroupOrderUnused: Message("ASC or DESC with GROUP BY isn't allowed with window functions; put ASC or DESC in ORDER BY", nil), - ErrWindowExplainJson: Message("To get information about window functions use EXPLAIN FORMAT=JSON", nil), - ErrWindowFunctionIgnoresFrame: Message("Window function '%s' ignores the frame clause of window '%s' and aggregates over the whole partition", nil), - ErrRoleNotGranted: Message("%s is not granted to %s", nil), - ErrMaxExecTimeExceeded: Message("Query execution was interrupted, maximum statement execution time exceeded", nil), - ErrLockAcquireFailAndNoWaitSet: Message("Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set.", nil), - ErrDataTruncatedFunctionalIndex: Message("Data truncated for functional index '%s' at row %d", nil), - ErrDataOutOfRangeFunctionalIndex: Message("Value is out of range for functional index '%s' at row %d", nil), - ErrFunctionalIndexOnJsonOrGeometryFunction: Message("Cannot create a functional index on a function that returns a JSON or GEOMETRY value", nil), - ErrFunctionalIndexRefAutoIncrement: Message("Functional index '%s' cannot refer to an auto-increment column", nil), - ErrCannotDropColumnFunctionalIndex: Message("Cannot drop column '%s' because it is used by a functional index. In order to drop the column, you must remove the functional index", nil), - ErrFunctionalIndexPrimaryKey: Message("The primary key cannot be a functional index", nil), - ErrFunctionalIndexOnLob: Message("Cannot create a functional index on an expression that returns a BLOB or TEXT. Please consider using CAST", nil), - ErrFunctionalIndexFunctionIsNotAllowed: Message("Expression of functional index '%s' contains a disallowed function", nil), - ErrFulltextFunctionalIndex: Message("Fulltext functional index is not supported", nil), - ErrSpatialFunctionalIndex: Message("Spatial functional index is not supported", nil), - ErrWrongKeyColumnFunctionalIndex: Message("The used storage engine cannot index the expression '%s'", nil), - ErrFunctionalIndexOnField: Message("Functional index on a column is not supported. Consider using a regular index instead", nil), - ErrFKIncompatibleColumns: Message("Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.", nil), - ErrFunctionalIndexRowValueIsNotAllowed: Message("Expression of functional index '%s' cannot refer to a row value", nil), - ErrDependentByFunctionalIndex: Message("Column '%s' has a functional index dependency and cannot be dropped or renamed", nil), - ErrInvalidJSONType: Message("Invalid JSON type in argument %d to function %s; an %s is required.", nil), - ErrInvalidJsonValueForFuncIndex: Message("Invalid JSON value for CAST for functional index '%s'", nil), - ErrJsonValueOutOfRangeForFuncIndex: Message("Out of range JSON value for CAST for functional index '%s'", nil), - ErrFunctionalIndexDataIsTooLong: Message("Data too long for functional index '%s'", nil), - ErrFunctionalIndexNotApplicable: Message("Cannot use functional index '%s' due to type or collation conversion", nil), - - // MariaDB errors. - ErrOnlyOneDefaultPartionAllowed: Message("Only one DEFAULT partition allowed", nil), - ErrWrongPartitionTypeExpectedSystemTime: Message("Wrong partitioning type, expected type: `SYSTEM_TIME`", nil), - ErrSystemVersioningWrongPartitions: Message("Wrong Partitions: must have at least one HISTORY and exactly one last CURRENT", nil), - ErrSequenceRunOut: Message("Sequence '%-.64s.%-.64s' has run out", nil), - ErrSequenceInvalidData: Message("Sequence '%-.64s.%-.64s' values are conflicting", nil), - ErrSequenceAccessFail: Message("Sequence '%-.64s.%-.64s' access error", nil), - ErrNotSequence: Message("'%-.64s.%-.64s' is not a SEQUENCE", nil), - ErrUnknownSequence: Message("Unknown SEQUENCE: '%-.300s'", nil), - ErrWrongInsertIntoSequence: Message("Wrong INSERT into a SEQUENCE. One can only do single table INSERT into a sequence object (like with mysqldump). If you want to change the SEQUENCE, use ALTER SEQUENCE instead.", nil), - ErrSequenceInvalidTableStructure: Message("Sequence '%-.64s.%-.64s' table structure is invalid (%s)", nil), - - // TiDB errors. - ErrWarnOptimizerHintInvalidInteger: Message("integer value is out of range in '%s'", nil), - ErrWarnOptimizerHintUnsupportedHint: Message("Optimizer hint %s is not supported by TiDB and is ignored", nil), - ErrWarnOptimizerHintInvalidToken: Message("Cannot use %s '%s' (tok = %d) in an optimizer hint", nil), - ErrWarnMemoryQuotaOverflow: Message("Max value of MEMORY_QUOTA is %d bytes, ignore this invalid limit", nil), - ErrWarnOptimizerHintParseError: Message("Optimizer hint syntax error at %v", nil), - ErrWarnOptimizerHintWrongPos: Message("Optimizer hint can only be followed by certain keywords like SELECT, INSERT, etc.", nil), -} diff --git a/pkg/parser/mysql/error.go b/pkg/parser/mysql/error.go index 4d58d9fe23573..c854f8b913ae2 100644 --- a/pkg/parser/mysql/error.go +++ b/pkg/parser/mysql/error.go @@ -17,6 +17,7 @@ import ( "fmt" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" ) // Portable analogs of some common call errors. @@ -47,7 +48,7 @@ func NewErr(errCode uint16, args ...interface{}) *SQLError { e.State = DefaultMySQLState } - if sqlErr, ok := MySQLErrName[errCode]; ok { + if sqlErr, ok := errno.MySQLErrName[errCode]; ok { errors.RedactErrorArg(args, sqlErr.RedactArgPos) e.Message = fmt.Sprintf(sqlErr.Raw, args...) } else { diff --git a/pkg/parser/mysql/state.go b/pkg/parser/mysql/state.go index 307965d08838a..10a7b0b705447 100644 --- a/pkg/parser/mysql/state.go +++ b/pkg/parser/mysql/state.go @@ -13,6 +13,10 @@ package mysql +import ( + "github.com/pingcap/tidb/pkg/errno" +) + const ( // DefaultMySQLState is default state of the mySQL DefaultMySQLState = "HY000" @@ -21,248 +25,248 @@ const ( // MySQLState maps error code to MySQL SQLSTATE value. // The values are taken from ANSI SQL and ODBC and are more standardized. var MySQLState = map[uint16]string{ - ErrDupKey: "23000", - ErrOutofMemory: "HY001", - ErrOutOfSortMemory: "HY001", - ErrConCount: "08004", - ErrBadHost: "08S01", - ErrHandshake: "08S01", - ErrDBaccessDenied: "42000", - ErrAccessDenied: "28000", - ErrNoDB: "3D000", - ErrUnknownCom: "08S01", - ErrBadNull: "23000", - ErrBadDB: "42000", - ErrTableExists: "42S01", - ErrBadTable: "42S02", - ErrNonUniq: "23000", - ErrServerShutdown: "08S01", - ErrBadField: "42S22", - ErrFieldNotInGroupBy: "42000", - ErrWrongSumSelect: "42000", - ErrWrongGroupField: "42000", - ErrWrongValueCount: "21S01", - ErrTooLongIdent: "42000", - ErrDupFieldName: "42S21", - ErrDupKeyName: "42000", - ErrDupEntry: "23000", - ErrWrongFieldSpec: "42000", - ErrParse: "42000", - ErrEmptyQuery: "42000", - ErrNonuniqTable: "42000", - ErrInvalidDefault: "42000", - ErrMultiplePriKey: "42000", - ErrTooManyKeys: "42000", - ErrTooManyKeyParts: "42000", - ErrTooLongKey: "42000", - ErrKeyColumnDoesNotExits: "42000", - ErrBlobUsedAsKey: "42000", - ErrJSONDocumentTooDeep: "22032", - ErrTooBigFieldlength: "42000", - ErrWrongAutoKey: "42000", - ErrForcingClose: "08S01", - ErrIpsock: "08S01", - ErrNoSuchIndex: "42S12", - ErrWrongFieldTerminators: "42000", - ErrBlobsAndNoTerminated: "42000", - ErrCantRemoveAllFields: "42000", - ErrCantDropFieldOrKey: "42000", - ErrBlobCantHaveDefault: "42000", - ErrWrongDBName: "42000", - ErrWrongTableName: "42000", - ErrTooBigSelect: "42000", - ErrUnknownProcedure: "42000", - ErrWrongParamcountToProcedure: "42000", - ErrUnknownTable: "42S02", - ErrFieldSpecifiedTwice: "42000", - ErrUnsupportedExtension: "42000", - ErrTableMustHaveColumns: "42000", - ErrUnknownCharacterSet: "42000", - ErrTooBigRowsize: "42000", - ErrWrongOuterJoin: "42000", - ErrNullColumnInIndex: "42000", - ErrPasswordAnonymousUser: "42000", - ErrPasswordNotAllowed: "42000", - ErrPasswordNoMatch: "42000", - ErrWrongValueCountOnRow: "21S01", - ErrInvalidUseOfNull: "22004", - ErrRegexp: "42000", - ErrMixOfGroupFuncAndFields: "42000", - ErrNonexistingGrant: "42000", - ErrTableaccessDenied: "42000", - ErrColumnaccessDenied: "42000", - ErrIllegalGrantForTable: "42000", - ErrGrantWrongHostOrUser: "42000", - ErrNoSuchTable: "42S02", - ErrNonexistingTableGrant: "42000", - ErrNotAllowedCommand: "42000", - ErrSyntax: "42000", - ErrAbortingConnection: "08S01", - ErrNetPacketTooLarge: "08S01", - ErrNetReadErrorFromPipe: "08S01", - ErrNetFcntl: "08S01", - ErrNetPacketsOutOfOrder: "08S01", - ErrNetUncompress: "08S01", - ErrNetRead: "08S01", - ErrNetReadInterrupted: "08S01", - ErrNetErrorOnWrite: "08S01", - ErrNetWriteInterrupted: "08S01", - ErrTooLongString: "42000", - ErrTableCantHandleBlob: "42000", - ErrTableCantHandleAutoIncrement: "42000", - ErrWrongColumnName: "42000", - ErrWrongKeyColumn: "42000", - ErrDupUnique: "23000", - ErrBlobKeyWithoutLength: "42000", - ErrPrimaryCantHaveNull: "42000", - ErrTooManyRows: "42000", - ErrRequiresPrimaryKey: "42000", - ErrKeyDoesNotExist: "42000", - ErrCheckNoSuchTable: "42000", - ErrCheckNotImplemented: "42000", - ErrCantDoThisDuringAnTransaction: "25000", - ErrNewAbortingConnection: "08S01", - ErrMasterNetRead: "08S01", - ErrMasterNetWrite: "08S01", - ErrTooManyUserConnections: "42000", - ErrReadOnlyTransaction: "25000", - ErrNoPermissionToCreateUser: "42000", - ErrLockDeadlock: "40001", - ErrNoReferencedRow: "23000", - ErrRowIsReferenced: "23000", - ErrConnectToMaster: "08S01", - ErrWrongNumberOfColumnsInSelect: "21000", - ErrUserLimitReached: "42000", - ErrSpecificAccessDenied: "42000", - ErrNoDefault: "42000", - ErrWrongValueForVar: "42000", - ErrWrongTypeForVar: "42000", - ErrCantUseOptionHere: "42000", - ErrNotSupportedYet: "42000", - ErrWrongFkDef: "42000", - ErrOperandColumns: "21000", - ErrSubqueryNo1Row: "21000", - ErrIllegalReference: "42S22", - ErrDerivedMustHaveAlias: "42000", - ErrSelectReduced: "01000", - ErrTablenameNotAllowedHere: "42000", - ErrNotSupportedAuthMode: "08004", - ErrSpatialCantHaveNull: "42000", - ErrCollationCharsetMismatch: "42000", - ErrWarnTooFewRecords: "01000", - ErrWarnTooManyRecords: "01000", - ErrWarnNullToNotnull: "22004", - ErrWarnDataOutOfRange: "22003", - WarnDataTruncated: "01000", - ErrWrongNameForIndex: "42000", - ErrWrongNameForCatalog: "42000", - ErrUnknownStorageEngine: "42000", - ErrTruncatedWrongValue: "22007", - ErrSpNoRecursiveCreate: "2F003", - ErrSpAlreadyExists: "42000", - ErrSpDoesNotExist: "42000", - ErrSpLilabelMismatch: "42000", - ErrSpLabelRedefine: "42000", - ErrSpLabelMismatch: "42000", - ErrSpUninitVar: "01000", - ErrSpBadselect: "0A000", - ErrSpBadreturn: "42000", - ErrSpBadstatement: "0A000", - ErrUpdateLogDeprecatedIgnored: "42000", - ErrUpdateLogDeprecatedTranslated: "42000", - ErrQueryInterrupted: "70100", - ErrSpWrongNoOfArgs: "42000", - ErrSpCondMismatch: "42000", - ErrSpNoreturn: "42000", - ErrSpNoreturnend: "2F005", - ErrSpBadCursorQuery: "42000", - ErrSpBadCursorSelect: "42000", - ErrSpCursorMismatch: "42000", - ErrSpCursorAlreadyOpen: "24000", - ErrSpCursorNotOpen: "24000", - ErrSpUndeclaredVar: "42000", - ErrSpFetchNoData: "02000", - ErrSpDupParam: "42000", - ErrSpDupVar: "42000", - ErrSpDupCond: "42000", - ErrSpDupCurs: "42000", - ErrSpSubselectNyi: "0A000", - ErrStmtNotAllowedInSfOrTrg: "0A000", - ErrSpVarcondAfterCurshndlr: "42000", - ErrSpCursorAfterHandler: "42000", - ErrSpCaseNotFound: "20000", - ErrDivisionByZero: "22012", - ErrIllegalValueForType: "22007", - ErrProcaccessDenied: "42000", - ErrXaerNota: "XAE04", - ErrXaerInval: "XAE05", - ErrXaerRmfail: "XAE07", - ErrXaerOutside: "XAE09", - ErrXaerRmerr: "XAE03", - ErrXaRbrollback: "XA100", - ErrNonexistingProcGrant: "42000", - ErrDataTooLong: "22001", - ErrSpBadSQLstate: "42000", - ErrCantCreateUserWithGrant: "42000", - ErrSpDupHandler: "42000", - ErrSpNotVarArg: "42000", - ErrSpNoRetset: "0A000", - ErrCantCreateGeometryObject: "22003", - ErrTooBigScale: "42000", - ErrTooBigPrecision: "42000", - ErrMBiggerThanD: "42000", - ErrTooLongBody: "42000", - ErrTooBigDisplaywidth: "42000", - ErrXaerDupid: "XAE08", - ErrDatetimeFunctionOverflow: "22008", - ErrRowIsReferenced2: "23000", - ErrNoReferencedRow2: "23000", - ErrSpBadVarShadow: "42000", - ErrSpWrongName: "42000", - ErrSpNoAggregate: "42000", - ErrMaxPreparedStmtCountReached: "42000", - ErrNonGroupingFieldUsed: "42000", - ErrForeignDuplicateKeyOldUnused: "23000", - ErrCantChangeTxCharacteristics: "25001", - ErrWrongParamcountToNativeFct: "42000", - ErrWrongParametersToNativeFct: "42000", - ErrWrongParametersToStoredFct: "42000", - ErrDupEntryWithKeyName: "23000", - ErrXaRbtimeout: "XA106", - ErrXaRbdeadlock: "XA102", - ErrFuncInexistentNameCollision: "42000", - ErrDupSignalSet: "42000", - ErrSignalWarn: "01000", - ErrSignalNotFound: "02000", - ErrSignalException: "HY000", - ErrResignalWithoutActiveHandler: "0K000", - ErrSpatialMustHaveGeomCol: "42000", - ErrDataOutOfRange: "22003", - ErrAccessDeniedNoPassword: "28000", - ErrTruncateIllegalForeignKey: "42000", - ErrDaInvalidConditionNumber: "35000", - ErrForeignDuplicateKeyWithChildInfo: "23000", - ErrForeignDuplicateKeyWithoutChildInfo: "23000", - ErrCantExecuteInReadOnlyTransaction: "25006", - ErrAlterOperationNotSupported: "0A000", - ErrAlterOperationNotSupportedReason: "0A000", - ErrDupUnknownInIndex: "23000", - ErrBadGeneratedColumn: "HY000", - ErrUnsupportedOnGeneratedColumn: "HY000", - ErrGeneratedColumnNonPrior: "HY000", - ErrDependentByGeneratedColumn: "HY000", - ErrInvalidJSONText: "22032", - ErrInvalidJSONTextInParam: "22032", - ErrInvalidJSONPath: "42000", - ErrInvalidJSONCharset: "22032", - ErrInvalidJSONData: "22032", - ErrInvalidJSONPathWildcard: "42000", - ErrJSONUsedAsKey: "42000", - ErrJSONVacuousPath: "42000", - ErrJSONBadOneOrAllArg: "42000", - ErrJSONDocumentNULLKey: "22032", - ErrInvalidJSONPathArrayCell: "42000", - ErrInvalidTypeForJSON: "22032", - ErrInvalidJsonValueForFuncIndex: "22018", - ErrInvalidJSONType: "22032", + errno.ErrDupKey: "23000", + errno.ErrOutofMemory: "HY001", + errno.ErrOutOfSortMemory: "HY001", + errno.ErrConCount: "08004", + errno.ErrBadHost: "08S01", + errno.ErrHandshake: "08S01", + errno.ErrDBaccessDenied: "42000", + errno.ErrAccessDenied: "28000", + errno.ErrNoDB: "3D000", + errno.ErrUnknownCom: "08S01", + errno.ErrBadNull: "23000", + errno.ErrBadDB: "42000", + errno.ErrTableExists: "42S01", + errno.ErrBadTable: "42S02", + errno.ErrNonUniq: "23000", + errno.ErrServerShutdown: "08S01", + errno.ErrBadField: "42S22", + errno.ErrFieldNotInGroupBy: "42000", + errno.ErrWrongSumSelect: "42000", + errno.ErrWrongGroupField: "42000", + errno.ErrWrongValueCount: "21S01", + errno.ErrTooLongIdent: "42000", + errno.ErrDupFieldName: "42S21", + errno.ErrDupKeyName: "42000", + errno.ErrDupEntry: "23000", + errno.ErrWrongFieldSpec: "42000", + errno.ErrParse: "42000", + errno.ErrEmptyQuery: "42000", + errno.ErrNonuniqTable: "42000", + errno.ErrInvalidDefault: "42000", + errno.ErrMultiplePriKey: "42000", + errno.ErrTooManyKeys: "42000", + errno.ErrTooManyKeyParts: "42000", + errno.ErrTooLongKey: "42000", + errno.ErrKeyColumnDoesNotExits: "42000", + errno.ErrBlobUsedAsKey: "42000", + errno.ErrJSONDocumentTooDeep: "22032", + errno.ErrTooBigFieldlength: "42000", + errno.ErrWrongAutoKey: "42000", + errno.ErrForcingClose: "08S01", + errno.ErrIpsock: "08S01", + errno.ErrNoSuchIndex: "42S12", + errno.ErrWrongFieldTerminators: "42000", + errno.ErrBlobsAndNoTerminated: "42000", + errno.ErrCantRemoveAllFields: "42000", + errno.ErrCantDropFieldOrKey: "42000", + errno.ErrBlobCantHaveDefault: "42000", + errno.ErrWrongDBName: "42000", + errno.ErrWrongTableName: "42000", + errno.ErrTooBigSelect: "42000", + errno.ErrUnknownProcedure: "42000", + errno.ErrWrongParamcountToProcedure: "42000", + errno.ErrUnknownTable: "42S02", + errno.ErrFieldSpecifiedTwice: "42000", + errno.ErrUnsupportedExtension: "42000", + errno.ErrTableMustHaveColumns: "42000", + errno.ErrUnknownCharacterSet: "42000", + errno.ErrTooBigRowsize: "42000", + errno.ErrWrongOuterJoin: "42000", + errno.ErrNullColumnInIndex: "42000", + errno.ErrPasswordAnonymousUser: "42000", + errno.ErrPasswordNotAllowed: "42000", + errno.ErrPasswordNoMatch: "42000", + errno.ErrWrongValueCountOnRow: "21S01", + errno.ErrInvalidUseOfNull: "22004", + errno.ErrRegexp: "42000", + errno.ErrMixOfGroupFuncAndFields: "42000", + errno.ErrNonexistingGrant: "42000", + errno.ErrTableaccessDenied: "42000", + errno.ErrColumnaccessDenied: "42000", + errno.ErrIllegalGrantForTable: "42000", + errno.ErrGrantWrongHostOrUser: "42000", + errno.ErrNoSuchTable: "42S02", + errno.ErrNonexistingTableGrant: "42000", + errno.ErrNotAllowedCommand: "42000", + errno.ErrSyntax: "42000", + errno.ErrAbortingConnection: "08S01", + errno.ErrNetPacketTooLarge: "08S01", + errno.ErrNetReadErrorFromPipe: "08S01", + errno.ErrNetFcntl: "08S01", + errno.ErrNetPacketsOutOfOrder: "08S01", + errno.ErrNetUncompress: "08S01", + errno.ErrNetRead: "08S01", + errno.ErrNetReadInterrupted: "08S01", + errno.ErrNetErrorOnWrite: "08S01", + errno.ErrNetWriteInterrupted: "08S01", + errno.ErrTooLongString: "42000", + errno.ErrTableCantHandleBlob: "42000", + errno.ErrTableCantHandleAutoIncrement: "42000", + errno.ErrWrongColumnName: "42000", + errno.ErrWrongKeyColumn: "42000", + errno.ErrDupUnique: "23000", + errno.ErrBlobKeyWithoutLength: "42000", + errno.ErrPrimaryCantHaveNull: "42000", + errno.ErrTooManyRows: "42000", + errno.ErrRequiresPrimaryKey: "42000", + errno.ErrKeyDoesNotExist: "42000", + errno.ErrCheckNoSuchTable: "42000", + errno.ErrCheckNotImplemented: "42000", + errno.ErrCantDoThisDuringAnTransaction: "25000", + errno.ErrNewAbortingConnection: "08S01", + errno.ErrMasterNetRead: "08S01", + errno.ErrMasterNetWrite: "08S01", + errno.ErrTooManyUserConnections: "42000", + errno.ErrReadOnlyTransaction: "25000", + errno.ErrNoPermissionToCreateUser: "42000", + errno.ErrLockDeadlock: "40001", + errno.ErrNoReferencedRow: "23000", + errno.ErrRowIsReferenced: "23000", + errno.ErrConnectToMaster: "08S01", + errno.ErrWrongNumberOfColumnsInSelect: "21000", + errno.ErrUserLimitReached: "42000", + errno.ErrSpecificAccessDenied: "42000", + errno.ErrNoDefault: "42000", + errno.ErrWrongValueForVar: "42000", + errno.ErrWrongTypeForVar: "42000", + errno.ErrCantUseOptionHere: "42000", + errno.ErrNotSupportedYet: "42000", + errno.ErrWrongFkDef: "42000", + errno.ErrOperandColumns: "21000", + errno.ErrSubqueryNo1Row: "21000", + errno.ErrIllegalReference: "42S22", + errno.ErrDerivedMustHaveAlias: "42000", + errno.ErrSelectReduced: "01000", + errno.ErrTablenameNotAllowedHere: "42000", + errno.ErrNotSupportedAuthMode: "08004", + errno.ErrSpatialCantHaveNull: "42000", + errno.ErrCollationCharsetMismatch: "42000", + errno.ErrWarnTooFewRecords: "01000", + errno.ErrWarnTooManyRecords: "01000", + errno.ErrWarnNullToNotnull: "22004", + errno.ErrWarnDataOutOfRange: "22003", + errno.WarnDataTruncated: "01000", + errno.ErrWrongNameForIndex: "42000", + errno.ErrWrongNameForCatalog: "42000", + errno.ErrUnknownStorageEngine: "42000", + errno.ErrTruncatedWrongValue: "22007", + errno.ErrSpNoRecursiveCreate: "2F003", + errno.ErrSpAlreadyExists: "42000", + errno.ErrSpDoesNotExist: "42000", + errno.ErrSpLilabelMismatch: "42000", + errno.ErrSpLabelRedefine: "42000", + errno.ErrSpLabelMismatch: "42000", + errno.ErrSpUninitVar: "01000", + errno.ErrSpBadselect: "0A000", + errno.ErrSpBadreturn: "42000", + errno.ErrSpBadstatement: "0A000", + errno.ErrUpdateLogDeprecatedIgnored: "42000", + errno.ErrUpdateLogDeprecatedTranslated: "42000", + errno.ErrQueryInterrupted: "70100", + errno.ErrSpWrongNoOfArgs: "42000", + errno.ErrSpCondMismatch: "42000", + errno.ErrSpNoreturn: "42000", + errno.ErrSpNoreturnend: "2F005", + errno.ErrSpBadCursorQuery: "42000", + errno.ErrSpBadCursorSelect: "42000", + errno.ErrSpCursorMismatch: "42000", + errno.ErrSpCursorAlreadyOpen: "24000", + errno.ErrSpCursorNotOpen: "24000", + errno.ErrSpUndeclaredVar: "42000", + errno.ErrSpFetchNoData: "02000", + errno.ErrSpDupParam: "42000", + errno.ErrSpDupVar: "42000", + errno.ErrSpDupCond: "42000", + errno.ErrSpDupCurs: "42000", + errno.ErrSpSubselectNyi: "0A000", + errno.ErrStmtNotAllowedInSfOrTrg: "0A000", + errno.ErrSpVarcondAfterCurshndlr: "42000", + errno.ErrSpCursorAfterHandler: "42000", + errno.ErrSpCaseNotFound: "20000", + errno.ErrDivisionByZero: "22012", + errno.ErrIllegalValueForType: "22007", + errno.ErrProcaccessDenied: "42000", + errno.ErrXaerNota: "XAE04", + errno.ErrXaerInval: "XAE05", + errno.ErrXaerRmfail: "XAE07", + errno.ErrXaerOutside: "XAE09", + errno.ErrXaerRmerr: "XAE03", + errno.ErrXaRbrollback: "XA100", + errno.ErrNonexistingProcGrant: "42000", + errno.ErrDataTooLong: "22001", + errno.ErrSpBadSQLstate: "42000", + errno.ErrCantCreateUserWithGrant: "42000", + errno.ErrSpDupHandler: "42000", + errno.ErrSpNotVarArg: "42000", + errno.ErrSpNoRetset: "0A000", + errno.ErrCantCreateGeometryObject: "22003", + errno.ErrTooBigScale: "42000", + errno.ErrTooBigPrecision: "42000", + errno.ErrMBiggerThanD: "42000", + errno.ErrTooLongBody: "42000", + errno.ErrTooBigDisplaywidth: "42000", + errno.ErrXaerDupid: "XAE08", + errno.ErrDatetimeFunctionOverflow: "22008", + errno.ErrRowIsReferenced2: "23000", + errno.ErrNoReferencedRow2: "23000", + errno.ErrSpBadVarShadow: "42000", + errno.ErrSpWrongName: "42000", + errno.ErrSpNoAggregate: "42000", + errno.ErrMaxPreparedStmtCountReached: "42000", + errno.ErrNonGroupingFieldUsed: "42000", + errno.ErrForeignDuplicateKeyOldUnused: "23000", + errno.ErrCantChangeTxCharacteristics: "25001", + errno.ErrWrongParamcountToNativeFct: "42000", + errno.ErrWrongParametersToNativeFct: "42000", + errno.ErrWrongParametersToStoredFct: "42000", + errno.ErrDupEntryWithKeyName: "23000", + errno.ErrXaRbtimeout: "XA106", + errno.ErrXaRbdeadlock: "XA102", + errno.ErrFuncInexistentNameCollision: "42000", + errno.ErrDupSignalSet: "42000", + errno.ErrSignalWarn: "01000", + errno.ErrSignalNotFound: "02000", + errno.ErrSignalException: "HY000", + errno.ErrResignalWithoutActiveHandler: "0K000", + errno.ErrSpatialMustHaveGeomCol: "42000", + errno.ErrDataOutOfRange: "22003", + errno.ErrAccessDeniedNoPassword: "28000", + errno.ErrTruncateIllegalForeignKey: "42000", + errno.ErrDaInvalidConditionNumber: "35000", + errno.ErrForeignDuplicateKeyWithChildInfo: "23000", + errno.ErrForeignDuplicateKeyWithoutChildInfo: "23000", + errno.ErrCantExecuteInReadOnlyTransaction: "25006", + errno.ErrAlterOperationNotSupported: "0A000", + errno.ErrAlterOperationNotSupportedReason: "0A000", + errno.ErrDupUnknownInIndex: "23000", + errno.ErrBadGeneratedColumn: "HY000", + errno.ErrUnsupportedOnGeneratedColumn: "HY000", + errno.ErrGeneratedColumnNonPrior: "HY000", + errno.ErrDependentByGeneratedColumn: "HY000", + errno.ErrInvalidJSONText: "22032", + errno.ErrInvalidJSONTextInParam: "22032", + errno.ErrInvalidJSONPath: "42000", + errno.ErrInvalidJSONCharset: "22032", + errno.ErrInvalidJSONData: "22032", + errno.ErrInvalidJSONPathMultipleSelection: "42000", + errno.ErrJSONUsedAsKey: "42000", + errno.ErrJSONVacuousPath: "42000", + errno.ErrJSONBadOneOrAllArg: "42000", + errno.ErrJSONDocumentNULLKey: "22032", + errno.ErrInvalidJSONPathArrayCell: "42000", + errno.ErrInvalidTypeForJSON: "22032", + errno.ErrInvalidJSONValueForFuncIndex: "22018", + errno.ErrInvalidJSONType: "22032", } diff --git a/pkg/parser/terror/BUILD.bazel b/pkg/parser/terror/BUILD.bazel index c51ac9bc2b5d9..a55152ad09e4f 100644 --- a/pkg/parser/terror/BUILD.bazel +++ b/pkg/parser/terror/BUILD.bazel @@ -6,6 +6,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser/terror", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/mysql", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_log//:log", diff --git a/pkg/parser/terror/terror.go b/pkg/parser/terror/terror.go index 58be892236bab..8d8f4c856a5ee 100644 --- a/pkg/parser/terror/terror.go +++ b/pkg/parser/terror/terror.go @@ -23,6 +23,7 @@ import ( "github.com/pingcap/errors" "github.com/pingcap/log" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/mysql" "go.uber.org/zap" ) @@ -197,7 +198,7 @@ func (ec ErrClass) New(code ErrCode, message string) *Error { // NewStdErr defines an *Error with an error code, an error // message and workaround to create standard error. -func (ec ErrClass) NewStdErr(code ErrCode, message *mysql.ErrMessage) *Error { +func (ec ErrClass) NewStdErr(code ErrCode, message *errno.ErrMessage) *Error { rfcCode := ec.initError(code) err := errors.Normalize( message.Raw, errors.RedactArgs(message.RedactArgPos), @@ -211,7 +212,7 @@ func (ec ErrClass) NewStdErr(code ErrCode, message *mysql.ErrMessage) *Error { // this method is not goroutine-safe and // usually be used in global variable initializer func (ec ErrClass) NewStd(code ErrCode) *Error { - return ec.NewStdErr(code, mysql.MySQLErrName[uint16(code)]) + return ec.NewStdErr(code, errno.MySQLErrName[uint16(code)]) } // Synthesize synthesizes an *Error in the air @@ -261,16 +262,16 @@ var ( // ErrClassToMySQLCodes is the map of ErrClass to code-set. ErrClassToMySQLCodes = make(map[ErrClass]map[ErrCode]struct{}) // ErrCritical is the critical error class. - ErrCritical = ClassGlobal.NewStdErr(CodeExecResultIsEmpty, mysql.Message("critical error %v", nil)) + ErrCritical = ClassGlobal.NewStdErr(CodeExecResultIsEmpty, errno.Message("critical error %v", nil)) // ErrResultUndetermined is the error when execution result is unknown. ErrResultUndetermined = ClassGlobal.NewStdErr( CodeResultUndetermined, - mysql.Message("execution result undetermined", nil), + errno.Message("execution result undetermined", nil), ) ) func init() { - defaultMySQLErrorCode = mysql.ErrUnknown + defaultMySQLErrorCode = errno.ErrUnknown } // ErrorEqual returns a boolean indicating whether err1 is equal to err2. diff --git a/pkg/parser/types/BUILD.bazel b/pkg/parser/types/BUILD.bazel index c9af955d45def..94133280ea583 100644 --- a/pkg/parser/types/BUILD.bazel +++ b/pkg/parser/types/BUILD.bazel @@ -10,6 +10,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/parser/types", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/charset", "//pkg/parser/format", "//pkg/parser/mysql", diff --git a/pkg/parser/types/etc.go b/pkg/parser/types/etc.go index 74c89ac0d1185..396120220f1c3 100644 --- a/pkg/parser/types/etc.go +++ b/pkg/parser/types/etc.go @@ -20,6 +20,7 @@ package types import ( "strings" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" ) @@ -160,12 +161,12 @@ const ( var ( // ErrInvalidDefault is returned when meet a invalid default value. - ErrInvalidDefault = terror.ClassTypes.NewStd(mysql.ErrInvalidDefault) + ErrInvalidDefault = terror.ClassTypes.NewStd(errno.ErrInvalidDefault) // ErrDataOutOfRange is returned when meet a value out of range. - ErrDataOutOfRange = terror.ClassTypes.NewStd(mysql.ErrDataOutOfRange) + ErrDataOutOfRange = terror.ClassTypes.NewStd(errno.ErrDataOutOfRange) // ErrTruncatedWrongValue is returned when meet a value bigger than // 99999999999999999999999999999999999999999999999999999999999999999 during parsing. - ErrTruncatedWrongValue = terror.ClassTypes.NewStd(mysql.ErrTruncatedWrongValue) + ErrTruncatedWrongValue = terror.ClassTypes.NewStd(errno.ErrTruncatedWrongValue) // ErrIllegalValueForType is returned when strconv.ParseFloat meet strconv.ErrRange during parsing. - ErrIllegalValueForType = terror.ClassTypes.NewStd(mysql.ErrIllegalValueForType) + ErrIllegalValueForType = terror.ClassTypes.NewStd(errno.ErrIllegalValueForType) ) diff --git a/pkg/parser/yy_parser.go b/pkg/parser/yy_parser.go index db2f96bd1a174..3c567616702d0 100644 --- a/pkg/parser/yy_parser.go +++ b/pkg/parser/yy_parser.go @@ -21,6 +21,7 @@ import ( "unicode" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/ast" "github.com/pingcap/tidb/pkg/parser/auth" "github.com/pingcap/tidb/pkg/parser/charset" @@ -31,35 +32,35 @@ import ( var ( // ErrSyntax returns for sql syntax error. - ErrSyntax = terror.ClassParser.NewStd(mysql.ErrSyntax) + ErrSyntax = terror.ClassParser.NewStd(errno.ErrSyntax) // ErrParse returns for sql parse error. - ErrParse = terror.ClassParser.NewStd(mysql.ErrParse) + ErrParse = terror.ClassParser.NewStd(errno.ErrParse) // ErrUnknownCharacterSet returns for no character set found error. - ErrUnknownCharacterSet = terror.ClassParser.NewStd(mysql.ErrUnknownCharacterSet) + ErrUnknownCharacterSet = terror.ClassParser.NewStd(errno.ErrUnknownCharacterSet) // ErrInvalidYearColumnLength returns for illegal column length for year type. - ErrInvalidYearColumnLength = terror.ClassParser.NewStd(mysql.ErrInvalidYearColumnLength) + ErrInvalidYearColumnLength = terror.ClassParser.NewStd(errno.ErrInvalidYearColumnLength) // ErrWrongArguments returns for illegal argument. - ErrWrongArguments = terror.ClassParser.NewStd(mysql.ErrWrongArguments) + ErrWrongArguments = terror.ClassParser.NewStd(errno.ErrWrongArguments) // ErrWrongFieldTerminators returns for illegal field terminators. - ErrWrongFieldTerminators = terror.ClassParser.NewStd(mysql.ErrWrongFieldTerminators) + ErrWrongFieldTerminators = terror.ClassParser.NewStd(errno.ErrWrongFieldTerminators) // ErrTooBigDisplayWidth returns for data display width exceed limit . - ErrTooBigDisplayWidth = terror.ClassParser.NewStd(mysql.ErrTooBigDisplaywidth) + ErrTooBigDisplayWidth = terror.ClassParser.NewStd(errno.ErrTooBigDisplaywidth) // ErrTooBigPrecision returns for data precision exceed limit. - ErrTooBigPrecision = terror.ClassParser.NewStd(mysql.ErrTooBigPrecision) + ErrTooBigPrecision = terror.ClassParser.NewStd(errno.ErrTooBigPrecision) // ErrUnknownAlterLock returns for no alter lock type found error. - ErrUnknownAlterLock = terror.ClassParser.NewStd(mysql.ErrUnknownAlterLock) + ErrUnknownAlterLock = terror.ClassParser.NewStd(errno.ErrUnknownAlterLock) // ErrUnknownAlterAlgorithm returns for no alter algorithm found error. - ErrUnknownAlterAlgorithm = terror.ClassParser.NewStd(mysql.ErrUnknownAlterAlgorithm) + ErrUnknownAlterAlgorithm = terror.ClassParser.NewStd(errno.ErrUnknownAlterAlgorithm) // ErrWrongValue returns for wrong value - ErrWrongValue = terror.ClassParser.NewStd(mysql.ErrWrongValue) + ErrWrongValue = terror.ClassParser.NewStd(errno.ErrWrongValue) // ErrWarnDeprecatedSyntax return when the syntax was deprecated - ErrWarnDeprecatedSyntax = terror.ClassParser.NewStd(mysql.ErrWarnDeprecatedSyntax) + ErrWarnDeprecatedSyntax = terror.ClassParser.NewStd(errno.ErrWarnDeprecatedSyntax) // ErrWarnDeprecatedSyntaxNoReplacement return when the syntax was deprecated and there is no replacement. - ErrWarnDeprecatedSyntaxNoReplacement = terror.ClassParser.NewStd(mysql.ErrWarnDeprecatedSyntaxNoReplacement) + ErrWarnDeprecatedSyntaxNoReplacement = terror.ClassParser.NewStd(errno.ErrWarnDeprecatedSyntaxNoReplacement) // ErrWrongUsage returns for incorrect usages. - ErrWrongUsage = terror.ClassParser.NewStd(mysql.ErrWrongUsage) + ErrWrongUsage = terror.ClassParser.NewStd(errno.ErrWrongUsage) // ErrWrongDBName returns for incorrect DB name. - ErrWrongDBName = terror.ClassParser.NewStd(mysql.ErrWrongDBName) + ErrWrongDBName = terror.ClassParser.NewStd(errno.ErrWrongDBName) // SpecFieldPattern special result field pattern SpecFieldPattern = regexp.MustCompile(`(\/\*!(M?[0-9]{5,6})?|\*\/)`) specCodeStart = regexp.MustCompile(`^\/\*!(M?[0-9]{5,6})?[ \t]*`) diff --git a/pkg/privilege/privileges/cache.go b/pkg/privilege/privileges/cache.go index 30db8dff136d3..b5ba60d048c2a 100644 --- a/pkg/privilege/privileges/cache.go +++ b/pkg/privilege/privileges/cache.go @@ -28,6 +28,7 @@ import ( "time" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/kv" "github.com/pingcap/tidb/pkg/parser/auth" "github.com/pingcap/tidb/pkg/parser/mysql" @@ -583,7 +584,7 @@ func (p *MySQLPrivilege) merge(diff *immutable, userList []string) *MySQLPrivile func noSuchTable(err error) bool { e1 := errors.Cause(err) if e2, ok := e1.(*terror.Error); ok { - if terror.ErrCode(e2.Code()) == terror.ErrCode(mysql.ErrNoSuchTable) { + if terror.ErrCode(e2.Code()) == terror.ErrCode(errno.ErrNoSuchTable) { return true } } diff --git a/pkg/server/conn.go b/pkg/server/conn.go index f7a45129d4cce..cf2feedaec66d 100644 --- a/pkg/server/conn.go +++ b/pkg/server/conn.go @@ -1419,7 +1419,7 @@ func (cc *clientConn) dispatch(ctx context.Context, data []byte) error { return cc.handleResetConnection(ctx) // ComEnd default: - return mysql.NewErrf(mysql.ErrUnknown, "command %d not supported now", nil, cmd) + return mysql.NewErrf(errno.ErrUnknown, "command %d not supported now", nil, cmd) } } @@ -1550,7 +1550,7 @@ func (cc *clientConn) writeError(ctx context.Context, e error) error { case *terror.Error: m = terror.ToSQLError(y) default: - m = mysql.NewErrf(mysql.ErrUnknown, "%s", nil, e.Error()) + m = mysql.NewErrf(errno.ErrUnknown, "%s", nil, e.Error()) } } diff --git a/pkg/server/conn_stmt.go b/pkg/server/conn_stmt.go index 19ac430500944..782fdb2b77f3c 100644 --- a/pkg/server/conn_stmt.go +++ b/pkg/server/conn_stmt.go @@ -44,6 +44,7 @@ import ( "github.com/pingcap/errors" "github.com/pingcap/failpoint" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/kv" "github.com/pingcap/tidb/pkg/param" "github.com/pingcap/tidb/pkg/parser" @@ -143,7 +144,7 @@ func (cc *clientConn) handleStmtExecute(ctx context.Context, data []byte) (err e stmt := cc.ctx.GetStatement(int(stmtID)) if stmt == nil { - return mysql.NewErr(mysql.ErrUnknownStmtHandler, + return mysql.NewErr(errno.ErrUnknownStmtHandler, strconv.FormatUint(uint64(stmtID), 10), "stmt_execute") } @@ -157,10 +158,10 @@ func (cc *clientConn) handleStmtExecute(ctx context.Context, data []byte) (err e useCursor = true } if flag&mysql.CursorTypeForUpdate > 0 { - return mysql.NewErrf(mysql.ErrUnknown, "unsupported flag: CursorTypeForUpdate", nil) + return mysql.NewErrf(errno.ErrUnknown, "unsupported flag: CursorTypeForUpdate", nil) } if flag&mysql.CursorTypeScrollable > 0 { - return mysql.NewErrf(mysql.ErrUnknown, "unsupported flag: CursorTypeScrollable", nil) + return mysql.NewErrf(errno.ErrUnknown, "unsupported flag: CursorTypeScrollable", nil) } if useCursor { @@ -494,11 +495,11 @@ func (cc *clientConn) handleStmtFetch(ctx context.Context, data []byte) (err err stmt := cc.ctx.GetStatement(int(stmtID)) if stmt == nil { - return errors.Annotate(mysql.NewErr(mysql.ErrUnknownStmtHandler, + return errors.Annotate(mysql.NewErr(errno.ErrUnknownStmtHandler, strconv.FormatUint(uint64(stmtID), 10), "stmt_fetch"), cc.preparedStmt2String(stmtID)) } if !stmt.GetCursorActive() { - return errors.Annotate(mysql.NewErr(mysql.ErrSpCursorNotOpen), cc.preparedStmt2String(stmtID)) + return errors.Annotate(mysql.NewErr(errno.ErrSpCursorNotOpen), cc.preparedStmt2String(stmtID)) } // from now on, we have made sure: the statement has an active cursor // then if facing any error, this cursor should be reset @@ -567,7 +568,7 @@ func (cc *clientConn) handleStmtSendLongData(data []byte) (err error) { stmt := cc.ctx.GetStatement(stmtID) if stmt == nil { - return mysql.NewErr(mysql.ErrUnknownStmtHandler, + return mysql.NewErr(errno.ErrUnknownStmtHandler, strconv.Itoa(stmtID), "stmt_send_longdata") } @@ -587,7 +588,7 @@ func (cc *clientConn) handleStmtReset(ctx context.Context, data []byte) (err err stmtID := int(binary.LittleEndian.Uint32(data[0:4])) stmt := cc.ctx.GetStatement(stmtID) if stmt == nil { - return mysql.NewErr(mysql.ErrUnknownStmtHandler, + return mysql.NewErr(errno.ErrUnknownStmtHandler, strconv.Itoa(stmtID), "stmt_reset") } err = stmt.Reset() diff --git a/pkg/server/driver_tidb.go b/pkg/server/driver_tidb.go index 2369342728861..ed3366ccb5e54 100644 --- a/pkg/server/driver_tidb.go +++ b/pkg/server/driver_tidb.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/expression" "github.com/pingcap/tidb/pkg/extension" "github.com/pingcap/tidb/pkg/kv" @@ -100,7 +101,7 @@ func (ts *TiDBStatement) Execute(ctx context.Context, args []expression.Expressi // AppendParam implements PreparedStatement AppendParam method. func (ts *TiDBStatement) AppendParam(paramID int, data []byte) error { if paramID >= len(ts.boundParams) { - return mysql.NewErr(mysql.ErrWrongArguments, "stmt_send_longdata") + return mysql.NewErr(errno.ErrWrongArguments, "stmt_send_longdata") } // If len(data) is 0, append an empty byte slice to the end to distinguish no data and no parameter. if len(data) == 0 { diff --git a/pkg/sessionctx/variable/error.go b/pkg/sessionctx/variable/error.go index 399b619aa157f..1bec090c04b5e 100644 --- a/pkg/sessionctx/variable/error.go +++ b/pkg/sessionctx/variable/error.go @@ -16,7 +16,6 @@ package variable import ( mysql "github.com/pingcap/tidb/pkg/errno" - pmysql "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/util/dbterror" ) @@ -37,14 +36,14 @@ var ( errUnknownSystemVariable = dbterror.ClassVariable.NewStd(mysql.ErrUnknownSystemVariable) errGlobalVariable = dbterror.ClassVariable.NewStd(mysql.ErrGlobalVariable) errLocalVariable = dbterror.ClassVariable.NewStd(mysql.ErrLocalVariable) - errValueNotSupportedWhen = dbterror.ClassVariable.NewStdErr(mysql.ErrNotSupportedYet, pmysql.Message("%s = OFF is not supported when %s = ON", nil)) + errValueNotSupportedWhen = dbterror.ClassVariable.NewStdErr(mysql.ErrNotSupportedYet, mysql.Message("%s = OFF is not supported when %s = ON", nil)) ErrNotValidPassword = dbterror.ClassExecutor.NewStd(mysql.ErrNotValidPassword) // ErrFunctionsNoopImpl is an error to say the behavior is protected by the tidb_enable_noop_functions sysvar. // This is copied from expression.ErrFunctionsNoopImpl to prevent circular dependencies. // It needs to be public for tests. - ErrFunctionsNoopImpl = dbterror.ClassVariable.NewStdErr(mysql.ErrNotSupportedYet, pmysql.Message("function %s has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions", nil)) + ErrFunctionsNoopImpl = dbterror.ClassVariable.NewStdErr(mysql.ErrNotSupportedYet, mysql.Message("function %s has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions", nil)) ErrVariableNoLongerSupported = dbterror.ClassVariable.NewStd(mysql.ErrVariableNoLongerSupported) ErrInvalidDefaultUTF8MB4Collation = dbterror.ClassVariable.NewStd(mysql.ErrInvalidDefaultUTF8MB4Collation) - ErrWarnDeprecatedSyntaxNoReplacement = dbterror.ClassVariable.NewStdErr(mysql.ErrWarnDeprecatedSyntaxNoReplacement, pmysql.Message("Updating '%s' is deprecated. It will be made read-only in a future release.", nil)) - ErrWarnDeprecatedSyntaxSimpleMsg = dbterror.ClassVariable.NewStdErr(mysql.ErrWarnDeprecatedSyntaxNoReplacement, pmysql.Message("%s is deprecated and will be removed in a future release.", nil)) + ErrWarnDeprecatedSyntaxNoReplacement = dbterror.ClassVariable.NewStdErr(mysql.ErrWarnDeprecatedSyntaxNoReplacement, mysql.Message("Updating '%s' is deprecated. It will be made read-only in a future release.", nil)) + ErrWarnDeprecatedSyntaxSimpleMsg = dbterror.ClassVariable.NewStdErr(mysql.ErrWarnDeprecatedSyntaxNoReplacement, mysql.Message("%s is deprecated and will be removed in a future release.", nil)) ) diff --git a/pkg/statistics/BUILD.bazel b/pkg/statistics/BUILD.bazel index 5b388ddc2cc5f..3c6d8e26fee96 100644 --- a/pkg/statistics/BUILD.bazel +++ b/pkg/statistics/BUILD.bazel @@ -23,6 +23,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/statistics", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/expression", "//pkg/kv", "//pkg/meta/model", diff --git a/pkg/statistics/cmsketch.go b/pkg/statistics/cmsketch.go index f0c1ee11ceceb..365fe456cd781 100644 --- a/pkg/statistics/cmsketch.go +++ b/pkg/statistics/cmsketch.go @@ -27,7 +27,7 @@ import ( "github.com/pingcap/errors" "github.com/pingcap/failpoint" - "github.com/pingcap/tidb/pkg/parser/mysql" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/planner/planctx" "github.com/pingcap/tidb/pkg/planner/util/debugtrace" "github.com/pingcap/tidb/pkg/sessionctx" @@ -46,7 +46,7 @@ const topNThreshold = uint64(10) var ( // ErrQueryInterrupted indicates interrupted - ErrQueryInterrupted = dbterror.ClassExecutor.NewStd(mysql.ErrQueryInterrupted) + ErrQueryInterrupted = dbterror.ClassExecutor.NewStd(errno.ErrQueryInterrupted) ) // CMSketch is used to estimate point queries. diff --git a/pkg/util/collate/BUILD.bazel b/pkg/util/collate/BUILD.bazel index 567ddd458cdbf..749010d7d943e 100644 --- a/pkg/util/collate/BUILD.bazel +++ b/pkg/util/collate/BUILD.bazel @@ -19,6 +19,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/util/collate", visibility = ["//visibility:public"], deps = [ + "//pkg/errno", "//pkg/parser/charset", "//pkg/parser/mysql", "//pkg/parser/terror", diff --git a/pkg/util/collate/collate.go b/pkg/util/collate/collate.go index fa80f0591cddc..6a2f50c13e3dd 100644 --- a/pkg/util/collate/collate.go +++ b/pkg/util/collate/collate.go @@ -21,6 +21,7 @@ import ( "sync/atomic" "github.com/pingcap/errors" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/parser/charset" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" @@ -39,13 +40,13 @@ var ( binCollatorInstanceSliceWithLen1 = []Collator{binCollatorInstance} // ErrUnsupportedCollation is returned when an unsupported collation is specified. - ErrUnsupportedCollation = dbterror.ClassDDL.NewStdErr(mysql.ErrUnknownCollation, mysql.Message("Unsupported collation when new collation is enabled: '%-.64s'", nil)) + ErrUnsupportedCollation = dbterror.ClassDDL.NewStdErr(errno.ErrUnknownCollation, errno.Message("Unsupported collation when new collation is enabled: '%-.64s'", nil)) // ErrIllegalMixCollation is returned when illegal mix of collations. - ErrIllegalMixCollation = dbterror.ClassExpression.NewStd(mysql.ErrCantAggregateNcollations) + ErrIllegalMixCollation = dbterror.ClassExpression.NewStd(errno.ErrCantAggregateNcollations) // ErrIllegalMix2Collation is returned when illegal mix of 2 collations. - ErrIllegalMix2Collation = dbterror.ClassExpression.NewStd(mysql.ErrCantAggregate2collations) + ErrIllegalMix2Collation = dbterror.ClassExpression.NewStd(errno.ErrCantAggregate2collations) // ErrIllegalMix3Collation is returned when illegal mix of 3 collations. - ErrIllegalMix3Collation = dbterror.ClassExpression.NewStd(mysql.ErrCantAggregate3collations) + ErrIllegalMix3Collation = dbterror.ClassExpression.NewStd(errno.ErrCantAggregate3collations) ) const ( diff --git a/pkg/util/dbterror/BUILD.bazel b/pkg/util/dbterror/BUILD.bazel index 188fe9af542e3..4b2634e686bb6 100644 --- a/pkg/util/dbterror/BUILD.bazel +++ b/pkg/util/dbterror/BUILD.bazel @@ -10,7 +10,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/errno", - "//pkg/parser/mysql", "//pkg/parser/terror", ], ) diff --git a/pkg/util/dbterror/ddl_terror.go b/pkg/util/dbterror/ddl_terror.go index 62cac767d37c8..d7b3c48bee651 100644 --- a/pkg/util/dbterror/ddl_terror.go +++ b/pkg/util/dbterror/ddl_terror.go @@ -18,7 +18,6 @@ import ( "fmt" mysql "github.com/pingcap/tidb/pkg/errno" - parser_mysql "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/terror" ) @@ -38,11 +37,11 @@ var ( // ErrBDRRestrictedDDL means the DDL is restricted in BDR mode. ErrBDRRestrictedDDL = ClassDDL.NewStd(mysql.ErrBDRRestrictedDDL) // ErrRunMultiSchemaChanges means we run multi schema changes. - ErrRunMultiSchemaChanges = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "multi schema change for %s"), nil)) + ErrRunMultiSchemaChanges = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "multi schema change for %s"), nil)) // ErrOperateSameColumn means we change the same columns multiple times in a DDL. - ErrOperateSameColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "operate same column '%s'"), nil)) + ErrOperateSameColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "operate same column '%s'"), nil)) // ErrOperateSameIndex means we change the same indexes multiple times in a DDL. - ErrOperateSameIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "operate same index '%s'"), nil)) + ErrOperateSameIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "operate same index '%s'"), nil)) // ErrWaitReorgTimeout means we wait for reorganization timeout. ErrWaitReorgTimeout = ClassDDL.NewStdErr(mysql.ErrLockWaitTimeout, mysql.MySQLErrName[mysql.ErrWaitReorgTimeout]) // ErrInvalidStoreVer means invalid store version. @@ -51,35 +50,35 @@ var ( ErrRepairTableFail = ClassDDL.NewStd(mysql.ErrRepairTable) // ErrUnsupportedAddVectorIndex means add vector index is unsupported - ErrUnsupportedAddVectorIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add vector index: %s"), nil)) + ErrUnsupportedAddVectorIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add vector index: %s"), nil)) // ErrCantDropColWithIndex means can't drop the column with index. We don't support dropping column with index covered now. - ErrCantDropColWithIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "drop column with index"), nil)) + ErrCantDropColWithIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "drop column with index"), nil)) // ErrCantDropColWithAutoInc means can't drop column with auto_increment - ErrCantDropColWithAutoInc = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "can't remove column with auto_increment when @@tidb_allow_remove_auto_inc disabled"), nil)) + ErrCantDropColWithAutoInc = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "can't remove column with auto_increment when @@tidb_allow_remove_auto_inc disabled"), nil)) // ErrCantDropColWithCheckConstraint means can't drop column with check constraint ErrCantDropColWithCheckConstraint = ClassDDL.NewStd(mysql.ErrDependentByCheckConstraint) // ErrUnsupportedAddColumn means add columns is unsupported - ErrUnsupportedAddColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add column"), nil)) + ErrUnsupportedAddColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add column"), nil)) // ErrUnsupportedModifyColumn means modify columns is unsupoorted - ErrUnsupportedModifyColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modify column: %s"), nil)) + ErrUnsupportedModifyColumn = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modify column: %s"), nil)) // ErrUnsupportedModifyCharset means modify charset is unsupoorted - ErrUnsupportedModifyCharset = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modify %s"), nil)) + ErrUnsupportedModifyCharset = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modify %s"), nil)) // ErrUnsupportedModifyCollation means modify collation is unsupoorted - ErrUnsupportedModifyCollation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modifying collation from %s to %s"), nil)) + ErrUnsupportedModifyCollation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "modifying collation from %s to %s"), nil)) // ErrUnsupportedPKHandle is used to indicate that we can't support this PK handle. - ErrUnsupportedPKHandle = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "drop integer primary key"), nil)) + ErrUnsupportedPKHandle = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "drop integer primary key"), nil)) // ErrUnsupportedCharset means we don't support the charset. - ErrUnsupportedCharset = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "charset %s and collate %s"), nil)) + ErrUnsupportedCharset = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "charset %s and collate %s"), nil)) // ErrUnsupportedShardRowIDBits means we don't support the shard_row_id_bits. - ErrUnsupportedShardRowIDBits = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "shard_row_id_bits for table with primary key as row id"), nil)) + ErrUnsupportedShardRowIDBits = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "shard_row_id_bits for table with primary key as row id"), nil)) // ErrUnsupportedAlterTableWithValidation means we don't support the alter table with validation. - ErrUnsupportedAlterTableWithValidation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("ALTER TABLE WITH VALIDATION is currently unsupported", nil)) + ErrUnsupportedAlterTableWithValidation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("ALTER TABLE WITH VALIDATION is currently unsupported", nil)) // ErrUnsupportedAlterTableWithoutValidation means we don't support the alter table without validation. - ErrUnsupportedAlterTableWithoutValidation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("ALTER TABLE WITHOUT VALIDATION is currently unsupported", nil)) + ErrUnsupportedAlterTableWithoutValidation = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("ALTER TABLE WITHOUT VALIDATION is currently unsupported", nil)) // ErrUnsupportedAlterTableOption means we don't support the alter table option. - ErrUnsupportedAlterTableOption = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("This type of ALTER TABLE is currently unsupported", nil)) + ErrUnsupportedAlterTableOption = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("This type of ALTER TABLE is currently unsupported", nil)) // ErrUnsupportedAlterCacheForSysTable means we don't support the alter cache for system table. - ErrUnsupportedAlterCacheForSysTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("ALTER table cache for tables in system database is currently unsupported", nil)) + ErrUnsupportedAlterCacheForSysTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("ALTER table cache for tables in system database is currently unsupported", nil)) // ErrBlobKeyWithoutLength is used when BLOB is used as key but without a length. ErrBlobKeyWithoutLength = ClassDDL.NewStd(mysql.ErrBlobKeyWithoutLength) // ErrKeyPart0 is used when key parts length is 0. @@ -143,35 +142,35 @@ var ( // ErrExpressionIndexCanNotRefer forbids to refer expression index to auto-increment column. ErrExpressionIndexCanNotRefer = ClassDDL.NewStd(mysql.ErrFunctionalIndexRefAutoIncrement) // ErrUnsupportedAddPartition returns for does not support add partitions. - ErrUnsupportedAddPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add partitions"), nil)) + ErrUnsupportedAddPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "add partitions"), nil)) // ErrUnsupportedCoalescePartition returns for does not support coalesce partitions. - ErrUnsupportedCoalescePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "coalesce partitions"), nil)) + ErrUnsupportedCoalescePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "coalesce partitions"), nil)) // ErrUnsupportedReorganizePartition returns for does not support reorganize partitions. - ErrUnsupportedReorganizePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "reorganize partition"), nil)) + ErrUnsupportedReorganizePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "reorganize partition"), nil)) // ErrUnsupportedCheckPartition returns for does not support check partitions. - ErrUnsupportedCheckPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "check partition"), nil)) + ErrUnsupportedCheckPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "check partition"), nil)) // ErrUnsupportedOptimizePartition returns for does not support optimize partitions. - ErrUnsupportedOptimizePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "optimize partition"), nil)) + ErrUnsupportedOptimizePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "optimize partition"), nil)) // ErrUnsupportedRebuildPartition returns for does not support rebuild partitions. - ErrUnsupportedRebuildPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "rebuild partition"), nil)) + ErrUnsupportedRebuildPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "rebuild partition"), nil)) // ErrUnsupportedRemovePartition returns for does not support remove partitions. - ErrUnsupportedRemovePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "remove partitioning"), nil)) + ErrUnsupportedRemovePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "remove partitioning"), nil)) // ErrUnsupportedRepairPartition returns for does not support repair partitions. - ErrUnsupportedRepairPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "repair partition"), nil)) + ErrUnsupportedRepairPartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "repair partition"), nil)) // ErrGeneratedColumnFunctionIsNotAllowed returns for unsupported functions for generated columns. ErrGeneratedColumnFunctionIsNotAllowed = ClassDDL.NewStd(mysql.ErrGeneratedColumnFunctionIsNotAllowed) // ErrGeneratedColumnRowValueIsNotAllowed returns for generated columns referring to row values. ErrGeneratedColumnRowValueIsNotAllowed = ClassDDL.NewStd(mysql.ErrGeneratedColumnRowValueIsNotAllowed) // ErrUnsupportedPartitionByRangeColumns returns for does unsupported partition by range columns. - ErrUnsupportedPartitionByRangeColumns = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition by range columns"), nil)) + ErrUnsupportedPartitionByRangeColumns = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition by range columns"), nil)) // ErrFunctionalIndexFunctionIsNotAllowed returns for unsupported functions for functional index. ErrFunctionalIndexFunctionIsNotAllowed = ClassDDL.NewStd(mysql.ErrFunctionalIndexFunctionIsNotAllowed) // ErrFunctionalIndexRowValueIsNotAllowed returns for functional index referring to row values. ErrFunctionalIndexRowValueIsNotAllowed = ClassDDL.NewStd(mysql.ErrFunctionalIndexRowValueIsNotAllowed) // ErrUnsupportedCreatePartition returns for does not support create partitions. - ErrUnsupportedCreatePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition type, treat as normal table"), nil)) + ErrUnsupportedCreatePartition = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition type, treat as normal table"), nil)) // ErrUnsupportedIndexType returns for unsupported index type. - ErrUnsupportedIndexType = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "index type"), nil)) + ErrUnsupportedIndexType = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "index type"), nil)) // ErrWindowInvalidWindowFuncUse returns for invalid window function use. ErrWindowInvalidWindowFuncUse = ClassDDL.NewStd(mysql.ErrWindowInvalidWindowFuncUse) @@ -180,10 +179,10 @@ var ( // ErrFkDupName returns for duplicated FK name. ErrFkDupName = ClassDDL.NewStd(mysql.ErrFkDupName) // ErrInvalidDDLState returns for invalid ddl model object state. - ErrInvalidDDLState = ClassDDL.NewStdErr(mysql.ErrInvalidDDLState, parser_mysql.Message(mysql.MySQLErrName[mysql.ErrInvalidDDLState].Raw, nil)) + ErrInvalidDDLState = ClassDDL.NewStdErr(mysql.ErrInvalidDDLState, mysql.Message(mysql.MySQLErrName[mysql.ErrInvalidDDLState].Raw, nil)) // ErrUnsupportedModifyPrimaryKey returns an error when add or drop the primary key. // It's exported for testing. - ErrUnsupportedModifyPrimaryKey = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "%s primary key"), nil)) + ErrUnsupportedModifyPrimaryKey = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "%s primary key"), nil)) // ErrPKIndexCantBeInvisible return an error when primary key is invisible index ErrPKIndexCantBeInvisible = ClassDDL.NewStd(mysql.ErrPKIndexCantBeInvisible) @@ -222,7 +221,7 @@ var ( // ErrCollationCharsetMismatch returns when collation not match the charset. ErrCollationCharsetMismatch = ClassDDL.NewStd(mysql.ErrCollationCharsetMismatch) // ErrConflictingDeclarations return conflict declarations. - ErrConflictingDeclarations = ClassDDL.NewStdErr(mysql.ErrConflictingDeclarations, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrConflictingDeclarations].Raw, "CHARACTER SET ", "%s", "CHARACTER SET ", "%s"), nil)) + ErrConflictingDeclarations = ClassDDL.NewStdErr(mysql.ErrConflictingDeclarations, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrConflictingDeclarations].Raw, "CHARACTER SET ", "%s", "CHARACTER SET ", "%s"), nil)) // ErrPrimaryCantHaveNull returns All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead ErrPrimaryCantHaveNull = ClassDDL.NewStd(mysql.ErrPrimaryCantHaveNull) // ErrErrorOnRename returns error for wrong database name in alter table rename @@ -310,7 +309,7 @@ var ( // ErrAddColumnWithSequenceAsDefault is returned when the new added column with sequence's nextval as it's default value. ErrAddColumnWithSequenceAsDefault = ClassDDL.NewStd(mysql.ErrAddColumnWithSequenceAsDefault) // ErrUnsupportedExpressionIndex is returned when create an expression index without allow-expression-index. - ErrUnsupportedExpressionIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "creating expression index containing unsafe functions without allow-expression-index in config"), nil)) + ErrUnsupportedExpressionIndex = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "creating expression index containing unsafe functions without allow-expression-index in config"), nil)) // ErrPartitionExchangePartTable is returned when exchange table partition with another table is partitioned. ErrPartitionExchangePartTable = ClassDDL.NewStd(mysql.ErrPartitionExchangePartTable) // ErrPartitionExchangeTempTable is returned when exchange table partition with a temporary table @@ -324,7 +323,7 @@ var ( // ErrCheckNoSuchTable is returned when exchanged normal table is view or sequence. ErrCheckNoSuchTable = ClassDDL.NewStd(mysql.ErrCheckNoSuchTable) // ErrUnsupportedPartitionType is returned when exchange table partition type is not supported. - ErrUnsupportedPartitionType = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition type of table %s when exchanging partition"), nil)) + ErrUnsupportedPartitionType = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "partition type of table %s when exchanging partition"), nil)) // ErrPartitionExchangeDifferentOption is returned when attribute does not match between partition table and normal table. ErrPartitionExchangeDifferentOption = ClassDDL.NewStd(mysql.ErrPartitionExchangeDifferentOption) // ErrTableOptionUnionUnsupported is returned when create/alter table with union option. @@ -358,7 +357,7 @@ var ( ErrUnknownEngine = ClassDDL.NewStd(mysql.ErrUnknownStorageEngine) // ErrExchangePartitionDisabled is returned when exchange partition is disabled. - ErrExchangePartitionDisabled = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("Exchange Partition is disabled, please set 'tidb_enable_exchange_partition' if you need to need to enable it", nil)) + ErrExchangePartitionDisabled = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("Exchange Partition is disabled, please set 'tidb_enable_exchange_partition' if you need to need to enable it", nil)) // ErrPartitionNoTemporary returns when partition at temporary mode ErrPartitionNoTemporary = ClassDDL.NewStd(mysql.ErrPartitionNoTemporary) @@ -368,12 +367,12 @@ var ( // ErrOptOnCacheTable returns when exec unsupported opt at cache mode ErrOptOnCacheTable = ClassDDL.NewStd(mysql.ErrOptOnCacheTable) // ErrUnsupportedOnCommitPreserve returns when exec unsupported opt on commit preserve - ErrUnsupportedOnCommitPreserve = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("TiDB doesn't support ON COMMIT PRESERVE ROWS for now", nil)) + ErrUnsupportedOnCommitPreserve = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("TiDB doesn't support ON COMMIT PRESERVE ROWS for now", nil)) // ErrUnsupportedClusteredSecondaryKey returns when exec unsupported clustered secondary key - ErrUnsupportedClusteredSecondaryKey = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("CLUSTERED/NONCLUSTERED keyword is only supported for primary key", nil)) + ErrUnsupportedClusteredSecondaryKey = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("CLUSTERED/NONCLUSTERED keyword is only supported for primary key", nil)) // ErrUnsupportedLocalTempTableDDL returns when ddl operation unsupported for local temporary table - ErrUnsupportedLocalTempTableDDL = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("TiDB doesn't support %s for local temporary table", nil)) + ErrUnsupportedLocalTempTableDDL = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("TiDB doesn't support %s for local temporary table", nil)) // ErrInvalidAttributesSpec is returned when meeting invalid attributes. ErrInvalidAttributesSpec = ClassDDL.NewStd(mysql.ErrInvalidAttributesSpec) // ErrFunctionalIndexOnJSONOrGeometryFunction returns when creating expression index and the type of the expression is JSON. @@ -386,9 +385,9 @@ var ( ErrDependentByPartitionFunctional = ClassDDL.NewStd(mysql.ErrDependentByPartitionFunctional) // ErrUnsupportedAlterTableSpec means we don't support this alter table specification (i.e. unknown) - ErrUnsupportedAlterTableSpec = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "Unsupported/unknown ALTER TABLE specification"), nil)) + ErrUnsupportedAlterTableSpec = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "Unsupported/unknown ALTER TABLE specification"), nil)) // ErrGeneralUnsupportedDDL as a generic error to customise by argument - ErrGeneralUnsupportedDDL = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "%s"), nil)) + ErrGeneralUnsupportedDDL = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "%s"), nil)) // ErrAutoConvert when auto convert happens ErrAutoConvert = ClassDDL.NewStd(mysql.ErrAutoConvert) @@ -419,14 +418,14 @@ var ( ErrColumnInChange = ClassDDL.NewStd(mysql.ErrColumnInChange) // ErrAlterTiFlashModeForTableWithoutTiFlashReplica returns when set tiflash mode on table whose tiflash_replica is null or tiflash_replica_count = 0 - ErrAlterTiFlashModeForTableWithoutTiFlashReplica = ClassDDL.NewStdErr(0, parser_mysql.Message("TiFlash mode will take effect after at least one TiFlash replica is set for the table", nil)) + ErrAlterTiFlashModeForTableWithoutTiFlashReplica = ClassDDL.NewStdErr(0, mysql.Message("TiFlash mode will take effect after at least one TiFlash replica is set for the table", nil)) // ErrUnsupportedTiFlashOperationForSysOrMemTable means we don't support the alter tiflash related action(e.g. set tiflash mode, set tiflash replica) for system table. - ErrUnsupportedTiFlashOperationForSysOrMemTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "`set TiFlash replica` settings for system table and memory table"), nil)) + ErrUnsupportedTiFlashOperationForSysOrMemTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "`set TiFlash replica` settings for system table and memory table"), nil)) // ErrUnsupportedTiFlashOperationForUnsupportedCharsetTable is used when alter alter tiflash related action(e.g. set tiflash mode, set tiflash replica) with unsupported charset. - ErrUnsupportedTiFlashOperationForUnsupportedCharsetTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "`set TiFlash replica` settings for table contains %s charset"), nil)) + ErrUnsupportedTiFlashOperationForUnsupportedCharsetTable = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "`set TiFlash replica` settings for table contains %s charset"), nil)) // ErrTiFlashBackfillIndex is the error that tiflash backfill the index failed. ErrTiFlashBackfillIndex = ClassDDL.NewStdErr(mysql.ErrTiFlashBackfillIndex, - parser_mysql.Message(mysql.MySQLErrName[mysql.ErrTiFlashBackfillIndex].Raw, nil)) + mysql.Message(mysql.MySQLErrName[mysql.ErrTiFlashBackfillIndex].Raw, nil)) // ErrDropIndexNeededInForeignKey returns when drop index which is needed in foreign key. ErrDropIndexNeededInForeignKey = ClassDDL.NewStd(mysql.ErrDropIndexNeededInForeignKey) @@ -480,14 +479,14 @@ var ( // ErrWarnDeprecatedIntegerDisplayWidth share the same code 1681, and it will be returned when length is specified in integer. ErrWarnDeprecatedIntegerDisplayWidth = ClassDDL.NewStdErr( mysql.ErrWarnDeprecatedSyntaxNoReplacement, - parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrWarnDeprecatedSyntaxNoReplacement].Raw, + mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrWarnDeprecatedSyntaxNoReplacement].Raw, "Integer display width", "", ), nil), ) // ErrWarnDeprecatedZerofill is for when the deprectated zerofill attribute is used ErrWarnDeprecatedZerofill = ClassDDL.NewStdErr( mysql.ErrWarnDeprecatedSyntaxNoReplacement, - parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrWarnDeprecatedSyntaxNoReplacement].Raw, + mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrWarnDeprecatedSyntaxNoReplacement].Raw, "The ZEROFILL attribute", " Use the LPAD function to zero-pad numbers, or store the formatted numbers in a CHAR column.", ), nil), @@ -496,7 +495,7 @@ var ( ErrCheckConstraintDupName = ClassDDL.NewStd(mysql.ErrCheckConstraintDupName) // ErrUnsupportedDistTask is for `tidb_enable_dist_task enabled` but `tidb_ddl_enable_fast_reorg` disabled. ErrUnsupportedDistTask = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, - parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, + mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "tidb_enable_dist_task setting. To utilize distributed task execution, please enable tidb_ddl_enable_fast_reorg first."), nil)) // ErrGlobalIndexNotExplicitlySet is for Global index when not explicitly said GLOBAL, including UPDATE INDEXES ErrGlobalIndexNotExplicitlySet = ClassDDL.NewStd(mysql.ErrGlobalIndexNotExplicitlySet) diff --git a/pkg/util/dbterror/exeerrors/BUILD.bazel b/pkg/util/dbterror/exeerrors/BUILD.bazel index cd9bd87a6d1dd..70755e44c128d 100644 --- a/pkg/util/dbterror/exeerrors/BUILD.bazel +++ b/pkg/util/dbterror/exeerrors/BUILD.bazel @@ -7,7 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/errno", - "//pkg/parser/mysql", "//pkg/util/dbterror", ], ) diff --git a/pkg/util/dbterror/exeerrors/errors.go b/pkg/util/dbterror/exeerrors/errors.go index 86bfe0a8ef83e..70be0a80cf813 100644 --- a/pkg/util/dbterror/exeerrors/errors.go +++ b/pkg/util/dbterror/exeerrors/errors.go @@ -16,7 +16,6 @@ package exeerrors import ( mysql "github.com/pingcap/tidb/pkg/errno" - parser_mysql "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/util/dbterror" ) @@ -72,15 +71,15 @@ var ( ErrCTEMaxRecursionDepth = dbterror.ClassExecutor.NewStd(mysql.ErrCTEMaxRecursionDepth) ErrPluginIsNotLoaded = dbterror.ClassExecutor.NewStd(mysql.ErrPluginIsNotLoaded) ErrSetPasswordAuthPlugin = dbterror.ClassExecutor.NewStd(mysql.ErrSetPasswordAuthPlugin) - ErrFuncNotEnabled = dbterror.ClassExecutor.NewStdErr(mysql.ErrNotSupportedYet, parser_mysql.Message("%-.32s is not supported. To enable this experimental feature, set '%-.32s' in the configuration file.", nil)) + ErrFuncNotEnabled = dbterror.ClassExecutor.NewStdErr(mysql.ErrNotSupportedYet, mysql.Message("%-.32s is not supported. To enable this experimental feature, set '%-.32s' in the configuration file.", nil)) ErrSavepointNotExists = dbterror.ClassExecutor.NewStd(mysql.ErrSpDoesNotExist) ErrForeignKeyCascadeDepthExceeded = dbterror.ClassExecutor.NewStd(mysql.ErrForeignKeyCascadeDepthExceeded) ErrPasswordExpireAnonymousUser = dbterror.ClassExecutor.NewStd(mysql.ErrPasswordExpireAnonymousUser) ErrMustChangePassword = dbterror.ClassExecutor.NewStd(mysql.ErrMustChangePassword) ErrWrongStringLength = dbterror.ClassDDL.NewStd(mysql.ErrWrongStringLength) - ErrUnsupportedFlashbackTmpTable = dbterror.ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("Recover/flashback table is not supported on temporary tables", nil)) - ErrTruncateWrongInsertValue = dbterror.ClassTable.NewStdErr(mysql.ErrTruncatedWrongValue, parser_mysql.Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", nil)) + ErrUnsupportedFlashbackTmpTable = dbterror.ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, mysql.Message("Recover/flashback table is not supported on temporary tables", nil)) + ErrTruncateWrongInsertValue = dbterror.ClassTable.NewStdErr(mysql.ErrTruncatedWrongValue, mysql.Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", nil)) ErrExistsInHistoryPassword = dbterror.ClassExecutor.NewStd(mysql.ErrExistsInHistoryPassword) ErrWarnTooFewRecords = dbterror.ClassExecutor.NewStd(mysql.ErrWarnTooFewRecords) diff --git a/pkg/util/timeutil/BUILD.bazel b/pkg/util/timeutil/BUILD.bazel index a0f51bea94e03..1d7bb149677f8 100644 --- a/pkg/util/timeutil/BUILD.bazel +++ b/pkg/util/timeutil/BUILD.bazel @@ -10,7 +10,7 @@ go_library( importpath = "github.com/pingcap/tidb/pkg/util/timeutil", visibility = ["//visibility:public"], deps = [ - "//pkg/parser/mysql", + "//pkg/errno", "//pkg/types", "//pkg/util/dbterror", "//pkg/util/logutil", diff --git a/pkg/util/timeutil/errors.go b/pkg/util/timeutil/errors.go index 7d3f2a86f8a95..06234358cf523 100644 --- a/pkg/util/timeutil/errors.go +++ b/pkg/util/timeutil/errors.go @@ -15,9 +15,9 @@ package timeutil import ( - "github.com/pingcap/tidb/pkg/parser/mysql" + "github.com/pingcap/tidb/pkg/errno" "github.com/pingcap/tidb/pkg/util/dbterror" ) // ErrUnknownTimeZone indicates timezone is unknown. -var ErrUnknownTimeZone = dbterror.ClassVariable.NewStd(mysql.ErrUnknownTimeZone) +var ErrUnknownTimeZone = dbterror.ClassVariable.NewStd(errno.ErrUnknownTimeZone)