package
2.1.1+incompatible
Repository: https://github.com/planetscale/vitess.git
Documentation: pkg.go.dev

# Packages

Package fakesqldb provides a MySQL server for tests.
No description provided by the author
Package replication contains data structure definitions for MySQL replication related features.

# Functions

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.
Connect creates a connection to a server.
DescribeTableRow returns a row for a 'describe table' command.
GetAuthServer returns an AuthServer by name, or log.Fatalf.
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.
NewAuthServerStatic returns a new empty AuthServerStatic.
NewListener creates a new Listener.
NewSalt returns a 20 character salt.
RegisterAuthServerImpl registers an implementations of AuthServer.
RegisterAuthServerStaticFromParams creates and registers a new AuthServerStatic, loaded for a JSON file or string.
ShowIndexFromTableRow returns the fields from a 'show index from table' command.

# Constants

AuthSwitchRequestPacket is used to switch auth method.
BaseShowTables is the base query used in further methods.
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.
CapabilityClientLongFlag is CLIENT_LONG_FLAG.
CapabilityClientLongPassword is CLIENT_LONG_PASSWORD.
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.
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.
ERAccessDeniedError is ER_ACCESS_DENIED_ERROR.
ERBadNullError is ER_BAD_NULL_ERROR.
ERCantDoThisDuringAnTransaction is ER_CANT_DO_THIS_DURING_AN_TRANSACTION.
ERDataOutOfRange is ER_DATA_OUT_OF_RANGE.
ERDataTooLong is ER_DATA_TOO_LONG.
ERDupEntry is ER_DUP_ENTRY.
ERLockDeadlock is ER_LOCK_DEADLOCK.
ERLockWaitTimeout is ER_LOCK_WAIT_TIMEOUT.
EROptionPreventsStatement is ER_OPTION_PREVENTS_STATEMENT.
ErrPacket is the header of the error packet.
ERServerShutdown is ER_SERVER_SHUTDOWN.
ERUnknownComError is ER_UNKNOWN_COM_ERROR.
ERUnknownError is ER_UNKNOWN_ERROR.
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.
ServerStatusAutocommit is SERVER_STATUS_AUTOCOMMIT.
SSAccessDeniedError is ER_ACCESS_DENIED_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.
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.

# 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.
ShowIndexFromTableFields contains the fields returned by a 'show index from <table>' command.

# Structs

AuthServerNone takes all comers.
AuthServerStatic implements AuthServer using a static configuration.
AuthServerStaticEntry stores the values for a given user.
Conn is a connection between a client and a server, using the MySQL binary protocol.
Listener is the MySQL server protocol listener.
NoneGetter holds the empty string.
StaticUserData holds the username.

# Interfaces

AuthServer is the interface that servers must implement to validate users and passwords.
A Getter has a Get().
A Handler is an interface used by Listener to send queries.