Query Serving

Errors a users might encounter while querying Vitess

These error messages are internal to Vitess. If you are getting other errors from MySQL you can check them on this MySQL error page.

New Errors #

IDDescriptionErrorMySQL Error CodeSQL State
VT03001This aggregation function only takes a single argument.aggregate functions take a single argument '%s'114942000
VT03002This schema change is not allowed. You cannot change the keyspace of a table.changing schema from '%s' to '%s' is not allowed1450HY000
VT03003The specified table in this DELETE statement is unknown.unknown table '%s' in MULTI DELETE110942S02
VT03004You cannot delete something that is not a real MySQL table.the target table %s of the DELETE is not updatable1288HY000
VT03005The planner does not allow grouping on certain field. For instance, aggregation function.cannot group on '%s'105642000
VT03006The number of columns you want to insert do not match the number of columns of your SELECT query.column count does not match value count at row 1113621S01
VT03007You need to add a keyspace qualifier.keyspace not specified0
VT03008The given token is not usable in this situation. Please refer to the MySQL documentation to learn more about your token's syntax.incorrect usage/placement of '%s'123442000
VT03009You cannot assign this type to the given variable.unexpected value type for '%s': %v123142000
VT03010You cannot set the given variable as it is a read-only variable.variable '%s' is a read only variable1238HY000
VT03011The given value type is not accepted.invalid value type: %v0
VT03012The syntax is invalid. Please refer to the MySQL documentation for the proper syntax.invalid syntax: %s0
VT03013This table or alias name is already use. Please use another one that is unique.not unique table/alias: '%s'106642000
VT03014The given column is unknown.unknown column '%d' in '%s'105442S22
VT03015Cannot assign multiple values to a column in an update statement.column has duplicate set values: '%v'0
VT03016The given column is unknown in the vindex table.unknown vindex column: '%s'0
VT03017This vstream where clause can only be a greater than filter.where clause can only be of the type 'pos > '114942000
VT03018You cannot use the NEXT syntax on a table that is not a sequence table.NEXT used on a non-sequence table0
VT03019The given column was not found or is not available.column %s not found0
VT03020The given column was not found in the subquery.column %s not found in subquery0
VT03021The given column is ambiguous. You can use a table qualifier to make it unambiguous.ambiguous column reference: %v0
VT03022The given column cannot be found.column %v not found in %v0
VT03023When targeting a range of shards, Vitess does not know which shard to send the INSERT to.INSERT not supported when targeting a key range: %s0
VT03024The query cannot be prepared using the user defined variable as it does not exists for this session.'%s' user defined variable does not exists0
VT03025The execute statement have wrong number of argumentsIncorrect arguments to %s1210HY000
VT03024The query cannot be executed as missing the bind variable.'%s' bind variable does not exists0
VT05001The given database does not exist; Vitess cannot drop it.cannot drop database '%s'; database does not exists1008HY000
VT05002The given database does not exist; Vitess cannot alter it.cannot alter database '%s'; unknown database104942000
VT05003The given database does not exist in the VSchema.unknown database '%s' in vschema104942000
VT05004The given table is unknown.table '%s' does not exist110942S02
VT05005The given table does not exist in this keyspace.table '%s' does not exist in keyspace '%s'114642S02
VT05006The given system variable is unknown.unknown system variable '%s'1193HY000
VT05007Table information is not available.no table info0
VT06001The given database name already exists.cannot create database '%s'; database exists1007HY000
VT07001Kill statement is not allowed. More in docs about how to enable it and its limitations.%s1095HY000
VT09001the table does not have a primary vindex, the operation is impossible.table '%s' does not have a primary vindex117342000
VT09002This type of DML statement is not allowed on a replica target.%s statement with a replica target1874HY000
VT09003A vindex column is mandatory for the insert, please provide one.INSERT query does not have primary vindex column '%v' in the column list0
VT09004You need to provide the list of columns you want to insert, or provide a VSchema with authoritative columns. If schema tracking is disabled you can enable it to automatically have authoritative columns.INSERT should contain column list or the table should have authoritative columns in vschema0
VT09005A database must be selected.no database selected: use keyspace<:shard><@type> or keyspace<[range]><@type> (<> are optional)10463D000
VT09006VITESS_MIGRATION commands work only on primary tablets, you must send such commands to a primary tablet.%s VITESS_MIGRATION works only on primary tablet0
VT09007VITESS_THROTTLED_APPS commands work only on primary tablet, you must send such commands to a primary tablet.%s VITESS_THROTTLED_APPS works only on primary tablet0
VT09008vexplain queries/all will actually run queries. /*vt+ EXECUTE_DML_QUERIES */ must be set to run DML queries in vtexplain. Example: vexplain /*vt+ EXECUTE_DML_QUERIES */ queries delete from t1vexplain queries/all will actually run queries0
VT09009Stream is only supported for primary tablets, please use a stream on those tablets.stream is supported only for primary tablet type, current type: %v0
VT09010SHOW VITESS_THROTTLER STATUS works only on primary tablet.SHOW VITESS_THROTTLER STATUS works only on primary tablet0
VT09011The prepared statement is not availableUnknown prepared statement handler (%s) given to %s1243HY000
VT09012This type of statement is not allowed on the given tablet.%s statement with %s tablet not allowed0
VT09013Durability policy wants Vitess to use semi-sync, but the MySQL instances don't have the semi-sync plugin loaded.semi-sync plugins are not loaded0
VT09014The vindex cannot be used as table in DML statementvindex cannot be modified0
VT09015This query cannot be planned without more information on the SQL schema. Please turn on schema tracking or add authoritative columns information to your VSchema.schema tracking required0
VT09016SET DEFAULT is not supported by InnoDBCannot delete or update a parent row: a foreign key constraint fails145123000
VT10001Foreign key constraints are not allowed, see https://vitess.io/blog/2021-06-15-online-ddl-why-no-fk/.foreign key constraints are not allowed0
VT12001This statement is unsupported by Vitess. Please rewrite your query to use supported syntax.unsupported: %s0
VT12002Vitess does not support cross shard foreign keys.unsupported: cross-shard foreign keys0
VT13001This error should not happen and is a bug. Please file an issue on GitHub: https://github.com/vitessio/vitess/issues/new/choose.[BUG] %s0
VT13002This error should not happen and is a bug. Please file an issue on GitHub: https://github.com/vitessio/vitess/issues/new/choose.unexpected AST struct for query: %s0
VT14001The connection failed.connection error0
VT14002No available connection.no available connection0
VT14003No connection for the given tablet.no connection for tablet %v0
VT14004The specified keyspace could not be found.cannot find keyspace for: %s0
VT14005Failed to read sidecar database identifier.cannot lookup sidecar database for keyspace: %s0

Old Errors #

Error NumberError StateMessageMeaning
1192HY000Can't execute the given command because you have an active transactionThe provided statement cannot be executed inside a transaction.
123142000invalid transaction_mode: %sValid transaction_mode values are 'SINGLE', 'MULTI' or 'TWOPC'.
123142000invalid workload: %sValid workload values are 'OLTP', 'OLAP' or 'DBA'.
123142000invalid DDL strategy: %sValid DDL strategies are vitess, gh-ost, pt-osc, mysql, direct.
169022003%s value is out of range in %v [+,-,*,/] %vArithmetic operation lead to out of range value for the type.
104742000connection ID and transaction ID do not existThe session is pointing to a transaction and/or reserved connection that is not valid.
1105HY000%d is not a booleanTried setting a system variable to a value that could not be converted a boolean value.
1105HY000%s is not a sequenceThe given table is not a sequence table.
1105HY000%v cannot be converted to a go typeThis type can't be represented as a golang value.
1105HY0002pc is not enabledThis functionality requires 2PC. Read more about 'transaction_mode' to learn how to enable it.
1105HY000GTIDSet Mismatch: requested source position:%v, current target vrep position: %vThe requested GTIDSet does not exist in the vrep stream.
1105HY000No targetTODO https://github.com/vitessio/vitess/blob/9542883311c0849c645cfb1b5c77ac761990b31b/go/vt/vttablet/tabletserver/state_manager.go#L376
1105HY000Unexpected error, DestinationKeyspaceID mapping to multiple shardsThis is an internal error. If you see this error, please report it as a bug.
1105HY000auto sequence generation can happen through single shard only, it is getting routed to %d shardsA sequence query has to be routed to a single shard, but this query was not.
1105HY000could not parse value: '%s'Tried parsing a value as a number but failed.
1105HY000disallowed due to rule: %sThe query was not permitted to execute because the session was lacking permissions to do so.
1105HY000invalid increment for sequence %s: %dThe given sequence increment is incorrect it should be equal or greater than zero.
1105HY000invalid keyspace %v does not match expected %vThe given keyspace target does not match this tablet's keyspace name.
1105HY000invalid shard %v does not match expected %vThe given shard target does not match this tablet's shard.
1105HY000invalid table name: %sThe table name contains invalid characters.
1105HY000[%d,'%s'] is not a booleanThis error will be returned if you try to set a variable to a value that can't be converted to a boolean value.
1105HY000negative number cannot be converted to unsigned: %dThe column or variable is expecting an unsigned int, and negative numbers invalid here.
1105HY000query arguments missing for %sArgument expected but was missing.
1105HY000require autocommit to be 1: got %sConnection needs autocommit to be enabled, but it was not.
1105HY000require sql_auto_is_null to be 0: got %sVitess requires the connection not use the auto_col functionality.
1105HY000require sql_mode to be STRICT_TRANS_TABLES or STRICT_ALL_TABLES: got '%s'Vitess requires the connection to be in STRICT mode; either or both of these settings need to be enabled.
1105HY000unexpected rows from reading sequence %s (possible mis-route): %dThe sequence table used returned invalid results.
1105HY000unsigned number overflows int64 value: %dTried to convert an unsigned integer into a signed integer, and the value overflows.