package
3.0.0-rc.3+incompatible
Repository: https://github.com/vitessio/vitess.git
Documentation: pkg.go.dev

# Packages

Package endtoend is a test-only package.
Package fakesqldb provides a MySQL server for tests.

# Functions

AppendGTID returns a new Position that represents the position after the given GTID is replicated.
AuthServerNegotiateClearOrDialog will finish a negotiation based on the method type for the connection.
AuthServerReadPacketString is a helper method to read a packet as a null terminated string.
BaseShowTablesForTable specializes BaseShowTables for a single table.
BaseShowTablesRow returns the fields from a BaseShowTables or BaseShowTablesForTable command.
CellValue returns the data for a cell as a sqltypes.Value, and how many bytes it takes.
Connect creates a connection to a server.
DecodeGTID converts a string in the format returned by EncodeGTID back into a GTID interface value with the correct underlying flavor.
DecodePosition converts a string in the format returned by EncodePosition back into a Position value with the correct underlying flavor.
DescribeTableRow returns a row for a 'describe table' command.
EncodeGTID returns a string that contains both the flavor and value of the GTID, so that the correct parser can be selected when that string is passed to DecodeGTID.
EncodePosition returns a string that contains both the flavor and value of the Position, so that the correct parser can be selected when that string is passed to DecodePosition.
ExecuteFetchMap returns a map from column names to cell data for a query that should return exactly 1 row.
GetAuthServer returns an AuthServer by name, or log.Exitf.
GetCharset returns the current numerical values of the per-session character set variables.
InitAuthServerStatic Handles initializing the AuthServerStatic if necessary.
IsConnErr returns true if the error is a connection error.
IsNum returns true if a MySQL type is a numeric value.
MustDecodeGTID calls DecodeGTID and panics on error.
MustParseGTID calls ParseGTID and panics on error.
MustParsePosition calls ParsePosition and panics on error.
NewAuthServerStatic returns a new empty AuthServerStatic.
NewDeleteRowsEvent returns an DeleteRows event.
NewFakeBinlogStream returns a simple FakeBinlogStream.
NewFormatDescriptionEvent creates a new FormatDescriptionEvent based on the provided BinlogFormat.
NewFromListener creares a new mysql listener from an existing net.Listener.
NewIntVarEvent returns an IntVar event.
NewInvalidEvent returns an invalid event (its size is <19).
NewInvalidFormatDescriptionEvent returns an invalid FormatDescriptionEvent.
NewInvalidQueryEvent returns an invalid QueryEvent.
NewListener creates a new Listener.
NewListenerWithConfig creates new listener using provided config.
NewMariadbBinlogEvent creates a BinlogEvent instance from given byte array.
NewMariaDBBinlogFormat returns a typical BinlogFormat for MariaDB 10.0.
NewMariaDBGTIDEvent returns a MariaDB specific GTID event.
NewMysql56BinlogEvent creates a BinlogEvent from given byte array.
NewMySQL56BinlogFormat returns a typical BinlogFormat for MySQL 5.6.
NewMysql56GTIDSetFromSIDBlock builds a Mysql56GTIDSet from parsing a SID Block.
NewQueryEvent makes up a QueryEvent based on the Query structure.
NewRotateEvent returns a RotateEvent.
NewSalt returns a 20 character salt.
NewServerBitmap returns a bitmap that can hold 'count' bits.
NewSQLError creates a new SQLError.
NewSQLErrorFromError returns a *SQLError from the provided error.
NewTableMapEvent returns a TableMap event.
NewUpdateRowsEvent returns an UpdateRows event.
NewWriteRowsEvent returns a WriteRows event.
NewXIDEvent returns a XID event.
ParseErrorPacket parses the error packet and returns a SQLError.
ParseGTID calls the GTID parser for the specified flavor.
ParsePosition calls the parser for the specified flavor.
ParseSID parses an SID in the form used by MySQL 5.6.
ProtoToSlaveStatus translates a proto Status, or panics.
RegisterAuthServerImpl registers an implementations of AuthServer.
RegisterAuthServerStaticFromParams creates and registers a new AuthServerStatic, loaded for a JSON file or string.
ScramblePassword computes the hash of the password using 4.1+ method.
SetCharset changes the per-session character set variables.
ShowIndexFromTableRow returns the fields from a 'show index from table' command.
SlaveStatusToProto translates a Status to proto3.

# Constants

AuthSwitchRequestPacket is used to switch auth method.
BaseShowTables is the base query used in further methods.
BinlogChecksumAlgCRC32 indicates that CRC32 checksums are used.
BinlogChecksumAlgOff indicates that checksums are supported but off.
BinlogChecksumAlgUndef indicates that checksums are not supported.
CapabilityClientConnAttr is CLIENT_CONNECT_ATTRS Permits connection attributes in Protocol::HandshakeResponse41.
CapabilityClientConnectWithDB is CLIENT_CONNECT_WITH_DB.
CapabilityClientDeprecateEOF is CLIENT_DEPRECATE_EOF Expects an OK (instead of EOF) after the resultset rows of a Text Resultset.
CapabilityClientFoundRows is CLIENT_FOUND_ROWS.
CapabilityClientLongFlag is CLIENT_LONG_FLAG.
CapabilityClientLongPassword is CLIENT_LONG_PASSWORD.
CapabilityClientMultiResults is CLIENT_MULTI_RESULTS Can send multiple resultsets for COM_QUERY.
CapabilityClientMultiStatements is CLIENT_MULTI_STATEMENTS Can handle multiple statements per COM_QUERY and COM_STMT_PREPARE.
CapabilityClientPluginAuth is CLIENT_PLUGIN_AUTH.
CapabilityClientPluginAuthLenencClientData is CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA.
CapabilityClientProtocol41 is CLIENT_PROTOCOL_41.
CapabilityClientSecureConnection is CLIENT_SECURE_CONNECTION.
CapabilityClientSSL is CLIENT_SSL.
CapabilityClientTransactions is CLIENT_TRANSACTIONS.
CharacterSetBinary is for binary.
CharacterSetUtf8 is for UTF8.
ComBinlogDump is COM_BINLOG_DUMP.
ComBinlogDumpGTID is COM_BINLOG_DUMP_GTID.
ComInitDB is COM_INIT_DB.
ComPing is COM_PING.
ComQuery is COM_QUERY.
ComQuit is COM_QUIT.
ComSetOption is COM_SET_OPTION.
CRCantReadCharset is CR_CANT_READ_CHARSET.
CRCommandsOutOfSync is CR_COMMANDS_OUT_OF_SYNC Sent when the streaming calls are not done in the right order.
CRConnectionError is CR_CONNECTION_ERROR This is returned if a connection via a Unix socket fails.
CRConnHostError is CR_CONN_HOST_ERROR This is returned if a connection via a TCP socket fails.
CRMalformedPacket is CR_MALFORMED_PACKET.
CRNamedPipeStateError is CR_NAMEDPIPESETSTATE_ERROR.
CRServerGone is CR_SERVER_GONE_ERROR.
CRServerHandshakeErr is CR_SERVER_HANDSHAKE_ERR.
CRServerLost is CR_SERVER_LOST.
CRSSLConnectionError is CR_SSL_CONNECTION_ERROR.
CRUnknownError is CR_UNKNOWN_ERROR.
CRVersionError is CR_VERSION_ERROR This is returned if the server versions don't match what we support.
DefaultServerVersion is the default server version we're sending to the client.
EOFPacket is the header of the EOF packet.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
permissions.
Error codes for server-side errors.
Error codes for server-side errors.
resource exhausted.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
not found.
Error codes for server-side errors.
Error codes for server-side errors.
aborted.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
deadline exceeded.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
failed precondition.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
unimplemented.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
ErrPacket is the header of the error packet.
unavailable.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
already exists.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
invalid arg.
unknown.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
ERVitessMaxRowsExceeded is when a user tries to select more rows than the max rows as enforced by vitess.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
Error codes for server-side errors.
IntVarInsertID is INSERT_ID_EVENT.
IntVarInvalidInt is INVALID_INT_EVENT.
IntVarLastInsertID is LAST_INSERT_ID_EVENT.
MaximumPositionSize is the maximum size of a replication position.
MaxPacketSize is the maximum payload length of a packet the server supports.
MysqlClearPassword transmits the password in the clear.
MysqlDialog uses the dialog plugin on the client side.
MysqlNativePassword uses a salt and transmits a hash on the wire.
NullValue is the encoded value of NULL.
OKPacket is the header of the OK packet.
QAutoIncrement is Q_AUTO_INCREMENT.
QCatalog is Q_CATALOG.
QCatalogNZCode is Q_CATALOG_NZ_CODE.
QCharsetCode is Q_CHARSET_CODE.
QFlags2Code is Q_FLAGS2_CODE.
QSQLModeCode is Q_SQL_MODE_CODE.
QTimeZoneCode is Q_TIME_ZONE_CODE.
ServerMoreResultsExists is SERVER_MORE_RESULTS_EXISTS.
ServerStatusAutocommit is SERVER_STATUS_AUTOCOMMIT.
SSAccessDeniedError is ER_ACCESS_DENIED_ERROR.
SSBadFieldError is ER_BAD_FIELD_ERROR.
SSBadNullError is ER_BAD_NULL_ERROR.
SSCantDoThisDuringAnTransaction is ER_CANT_DO_THIS_DURING_AN_TRANSACTION.
SSDataOutOfRange is ER_DATA_OUT_OF_RANGE.
SSDataTooLong is ER_DATA_TOO_LONG.
SSDupKey is ER_DUP_KEY.
SSHandshakeError is ER_HANDSHAKE_ERROR.
SSLockDeadlock is ER_LOCK_DEADLOCK.
SSServerShutdown is ER_SERVER_SHUTDOWN.
SSUnknownComError is ER_UNKNOWN_COM_ERROR.
SSUnknownSqlstate is ER_SIGNAL_EXCEPTION in include/mysql/sql_state.h, but: const char *unknown_sqlstate= "HY000" in client.c.
TypeBit is MYSQL_TYPE_BIT.
TypeBlob is MYSQL_TYPE_BLOB.
TypeDate is MYSQL_TYPE_DATE.
TypeDateTime is MYSQL_TYPE_DATETIME.
TypeDateTime2 is MYSQL_TYPE_DATETIME2.
TypeDecimal is MYSQL_TYPE_DECIMAL.
TypeDouble is MYSQL_TYPE_DOUBLE.
TypeEnum is MYSQL_TYPE_ENUM.
TypeFloat is MYSQL_TYPE_FLOAT.
TypeGeometry is MYSQL_TYPE_GEOMETRY.
TypeInt24 is MYSQL_TYPE_INT24.
TypeJSON is MYSQL_TYPE_JSON.
TypeLong is MYSQL_TYPE_LONG.
TypeLongBlob is MYSQL_TYPE_LONG_BLOB.
TypeLongLong is MYSQL_TYPE_LONGLONG.
TypeMediumBlob is MYSQL_TYPE_MEDIUM_BLOB.
TypeNewDate is MYSQL_TYPE_NEWDATE.
TypeNewDecimal is MYSQL_TYPE_NEWDECIMAL.
TypeNull is MYSQL_TYPE_NULL.
TypeSet is MYSQL_TYPE_SET.
TypeShort is MYSQL_TYPE_SHORT.
TypeString is MYSQL_TYPE_STRING.
TypeTime is MYSQL_TYPE_TIME.
TypeTime2 is MYSQL_TYPE_TIME2.
TypeTimestamp is MYSQL_TYPE_TIMESTAMP.
TypeTimestamp2 is MYSQL_TYPE_TIMESTAMP2.
TypeTiny is MYSQL_TYPE_TINY.
TypeTinyBlob is MYSQL_TYPE_TINY_BLOB.
TypeVarchar is MYSQL_TYPE_VARCHAR.
TypeVarString is MYSQL_TYPE_VAR_STRING.
TypeYear is MYSQL_TYPE_YEAR.

# Variables

BaseShowTablesFields contains the fields returned by a BaseShowTables or a BaseShowTablesForTable command.
CharacterSetMap maps the charset name (used in ConnParams) to the integer value.
DescribeTableFields contains the fields returned by a 'describe <table>' command.
ErrNotSlave means there is no slave status.
IntVarNames maps a InVar type to the variable name it represents.
ShowIndexFromTableFields contains the fields returned by a 'show index from <table>' command.
ZeroTimestamp is the special value 0 for a timestamp.

# Structs

AuthServerNone takes all comers.
AuthServerStatic implements AuthServer using a static configuration.
AuthServerStaticEntry stores the values for a given user.
BinlogFormat contains relevant data from the FORMAT_DESCRIPTION_EVENT.
Bitmap is used by the previous structures.
Conn is a connection between a client and a server, using the MySQL binary protocol.
ConnParams contains all the parameters to use to connect to mysql.
FakeBinlogStream is used to generate consistent BinlogEvent packets for a stream.
Listener is the MySQL server protocol listener.
ListenerConfig should be used with NewListenerWithConfig to specify listener parameters.
MariadbGTID implements GTID.
Mysql56GTID implements GTID.
NoneGetter holds the empty string.
Position represents the information necessary to describe which transactions a server has seen, so that it can request a replication stream from a new master that picks up where it left off.
Query contains data from a QUERY_EVENT.
Row contains data for a single Row in a Rows event.
Rows contains data from a {WRITE,UPDATE,DELETE}_ROWS_EVENT.
SlaveStatus holds replication information from SHOW SLAVE STATUS.
SQLError is the error structure returned from calling a db library function.
StaticUserData holds the username.
TableMap contains data from a TABLE_MAP_EVENT.

# Interfaces

AuthServer is the interface that servers must implement to validate users and passwords.
BinlogEvent represents a single event from a raw MySQL binlog dump stream.
A Getter has a Get().
GTID represents a Global Transaction ID, also known as Transaction Group ID.
GTIDSet represents the set of transactions received or applied by a server.
A Handler is an interface used by Listener to send queries.

# Type aliases

MariadbGTIDSet implements GTIDSet.
Mysql56GTIDSet implements GTIDSet for MySQL 5.6.
SID is the 16-byte unique ID of a MySQL 5.6 server.