package
0.15.7
Repository: https://github.com/mdibaiee/vitess.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package endtoend is a test-only package.
Package fakesqldb provides a MySQL server for tests.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

BaseShowTablesRow returns the fields from a BaseShowTables or BaseShowTablesForTable command.
No description provided by the author
Connect creates a connection to a server.
DecodeMysqlNativePasswordHex decodes the standard format used by MySQL for 4.1 style password hashes.
EncryptPasswordWithPublicKey obfuscates the password and encrypts it with server's public key as required by caching_sha2_password plugin for "full" authentication.
ExecuteFetchMap returns a map from column names to cell data for a query that should return exactly 1 row.
No description provided by the author
GetAuthServer returns an AuthServer by name, or log.Exitf.
GetCharset returns the current numerical values of the per-session character set variables.
GetFlavor fills in c.Flavor.
GetTestConn returns a conn for testing purpose only.
GetTestServerConn is only meant to be used for testing.
InitAuthServerClientCert is public so it can be called from plugin_auth_clientcert.go (go/cmd/vtgate).
InitAuthServerStatic Handles initializing the AuthServerStatic if necessary.
IsNum returns true if a MySQL type is a numeric value.
MatchSourceHost validates host entry in auth configuration.
NewAuthServerNone returns an empty auth server.
NewAuthServerStatic returns a new empty AuthServerStatic.
NewAuthServerStaticWithAuthMethodDescription returns a new empty AuthServerStatic but with support for a different auth method.
NewDeleteRowsEvent returns an DeleteRows event.
NewFakeBinlogStream returns a simple FakeBinlogStream.
No description provided by the author
NewFormatDescriptionEvent creates a new FormatDescriptionEvent based on the provided BinlogFormat.
NewFromListener creates a new mysql listener from an existing net.Listener.
NewHeartbeatEvent returns a HeartbeatEvent.
NewHeartbeatEvent returns a HeartbeatEvent.
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.
NewMariadbBinlogEventWithSemiSyncInfo 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.
NewMysql56BinlogEventWithSemiSyncInfo creates a BinlogEvent from given byte array.
NewMySQL56BinlogFormat returns a typical BinlogFormat for MySQL 5.6.
NewMysqlClearAuthMethod will create a new AuthMethod that implements the `mysql_clear_password` handshake.
NewMysqlDialogAuthMethod will create a new AuthMethod that implements the `dialog` handshake.
NewMysqlNativeAuthMethod will create a new AuthMethod that implements the `mysql_native_password` handshake.
NewQueryEvent makes up a QueryEvent based on the Query structure.
NewRotateEvent returns a RotateEvent.
NewServerBitmap returns a bitmap that can hold 'count' bits.
NewSha2CachingAuthMethod will create a new AuthMethod that implements the `caching_sha2_password` handshake.
NewTableMapEvent returns a TableMap event.
NewUpdateRowsEvent returns an UpdateRows event.
NewWriteRowsEvent returns a WriteRows event.
NewXIDEvent returns a XID event.
ParseConfig takes a JSON MySQL static config and converts to a validated map.
ParseErrorPacket parses the error packet and returns a SQLError.
RegisterAuthServer registers an implementations of AuthServer.
RegisterAuthServerStaticFromParams creates and registers a new AuthServerStatic, loaded for a JSON file or string.
ScrambleCachingSha2Password computes the hash of the password using SHA256 as required by caching_sha2_password plugin for "fast" authentication.
ScrambleMysqlNativePassword computes the hash of the password using 4.1+ method.
ServerVersionCapableOf is a convenience function that returns a CapableOf function given a server version.
SetCharset changes the per-session character set variables.
ShowPrimaryRow returns a row for a primary key column.
VerifyHashedCachingSha2Password verifies a client reply against a stored hash.
VerifyHashedMysqlNativePassword verifies a client reply against a stored hash.

# Constants

AuthAccepted is used when the cache knows the request can be accepted.
AuthMoreDataPacket is sent when server requires more data to authenticate.
AuthNeedMoreData is used when the cache doesn't know the answer and more data is needed.
AuthRejected is used when the cache knows the request can be rejected.
AuthSwitchRequestPacket is used to switch auth method.
BaseShowPrimary is the base query for fetching primary key info.
No description provided by the author
BinlogChecksumAlgCRC32 indicates that CRC32 checksums are used.
BinlogChecksumAlgOff indicates that checksums are supported but off.
BinlogChecksumAlgUndef indicates that checksums are not supported.
Byte length of the checksum suffix when the CRC32 algorithm is used.
No description provided by the author
Offset from 0 where the 4 byte length is stored.
The offset from 0 where the type is stored as 1 byte.
Default length of the fixed header for v4 events.
No description provided by the author
No description provided by the author
CachingSha2FastAuth is sent before OKPacket when server authenticates using cache.
CachingSha2FullAuth is sent when server requests un-scrambled password to authenticate.
CachingSha2Password uses a salt and transmits a SHA256 hash on the wire.
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.
CLIENT_SESSION_TRACK 1 << 23 Can set ServerSessionStateChanged in the Status Flags and send session-state change data after a OK packet.
CapabilityClientSSL is CLIENT_SSL.
CapabilityClientTransactions is CLIENT_TRANSACTIONS.
CapabilityFlags are client capability flag sent to mysql on connect.
CapabilityFlagsSsl signals that we can handle SSL as well.
ComBinlogDump is COM_BINLOG_DUMP.
ComBinlogDumpGTID is COM_BINLOG_DUMP_GTID.
ComFieldList is COM_Field_List.
ComInitDB is COM_INIT_DB.
ComPing is COM_PING.
ComPrepare is COM_PREPARE.
ComQuery is COM_QUERY.
ComQuit is COM_QUIT.
ComRegisterReplica is COM_REGISTER_SLAVE https://dev.mysql.com/doc/internals/en/com-register-slave.html.
ComResetConnection is COM_RESET_CONNECTION.
ComSemiSyncAck is SEMI_SYNC_ACK.
ComSetOption is COM_SET_OPTION.
ComStmtClose is COM_STMT_CLOSE.
ComStmtExecute is COM_STMT_EXECUTE.
ComStmtFetch is COM_STMT_FETCH.
ComStmtReset is COM_STMT_RESET.
ComStmtSendLongData is COM_STMT_SEND_LONG_DATA.
No description provided by the author
The directory used for redo logs within innodb_log_group_home_dir in MySQL 8.0.30 and later.
EOFPacket is the header of the EOF packet.
ErrPacket is the header of the error packet.
Use as `maxrows` in `ExecuteFetch` and related functions, to indicate no rows should be fetched.
No description provided by the author
GetColumnNamesQueryPatternForTable is used for mocking queries in unit tests.
GRFlavorID is the string identifier for the MysqlGR flavor.
IntVarInsertID is INSERT_ID_EVENT.
IntVarInvalidInt is INVALID_INT_EVENT.
IntVarLastInsertID is LAST_INSERT_ID_EVENT.
https://dev.mysql.com/doc/refman/en/identifier-length.html.
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.
Status flags.
Status flags.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Status flags.
Status flags.
Status flags.
connection state information has changed.
auto-commit is enabled.
Used by Binary Protocol Resultset to signal that COM_STMT_FETCH must be used to fetch the row-data.
Status flags.
a transaction is active.
in a read-only transaction.
Status flags.
Status flags.
Status flags.
Status flags.
Status flags.
"track GTIDs" changed.
schema changed.
"track state change" changed.
one or more system variables changed.
ShowRowsRead is the query used to find the number of rows read.
TablesWithSize56 is a query to select table along with size for mysql 5.6.
TablesWithSize57 is a query to select table along with size for mysql 5.7.
TablesWithSize80 is a query to select table along with size for mysql 8.0 Note the following: - We use a single query to fetch both partitioned and non-partitioned tables.
Compression algorithms that are supported (only zstd today in MySQL 8.0): https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html.
Compression algorithms that are supported (only zstd today in MySQL 8.0): https://dev.mysql.com/doc/refman/8.0/en/binary-log-transaction-compression.html.

# Variables

BaseShowTablesFields contains the fields returned by a BaseShowTables or a BaseShowTablesForTable command.
No description provided by the author
BinglogMagicNumber is 4-byte number at the beginning of every binary log.
No description provided by the author
ErrNoGroupStatus means no status for group replication.
ErrNoPrimaryStatus means no status was returned by ShowPrimaryStatus().
ErrNotReplica means there is no replication status.
IntVarNames maps a InVar type to the variable name it represents.
ShowPrimaryFields contains the fields for a BaseShowPrimary.
No description provided by the author

# Structs

AuthServerClientCert implements AuthServer which enforces client side certificates.
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.
NoneGetter holds the empty string.
PacketComStmtPrepareOK contains the COM_STMT_PREPARE_OK packet details.
PacketOK contains the ok packet details.
PrepareData is a buffer used for store prepare statement meta data.
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.
StaticUserData holds the username and groups.
TableMap contains data from a TABLE_MAP_EVENT.
No description provided by the author
UnimplementedHandler implemnts all of the optional callbacks so as to satisy the Handler interface.

# Interfaces

AuthMethod interface for concrete auth method implementations.
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.
CachingStorage describes an object that is suitable to retrieve user information based on a hashed value of the password.
A Getter has a Get().
A Handler is an interface used by Listener to send queries.
HashStorage describes an object that is suitable to retrieve user information based on the hashed authentication response for mysql_native_password.
PlainTextStorage describes an object that is suitable to retrieve user information based on the plain text password of a user.
UserValidator is an interface that allows checking if a specific user will work for an auth method.

# Type aliases

AuthMethodDescription is the type for different supported and implemented authentication methods.
CacheState is a state that is returned by the UserEntryWithCacheHash method from the CachingStorage interface.
No description provided by the author