Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stubbing out support for COM_BINLOG_DUMP_GTID command #2380

Merged
merged 5 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81
github.com/dolthub/vitess v0.0.0-20240307173128-5f7f58927aec
github.com/dolthub/vitess v0.0.0-20240308192106-c4763c1b44f7
github.com/go-kit/kit v0.10.0
github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d
github.com/gocraft/dbr/v2 v2.7.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9X
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY=
github.com/dolthub/vitess v0.0.0-20240307173128-5f7f58927aec h1:H1tHx26oby26Ig8SkFLIu/L5w3bFhAHOONMhJc0iE4A=
github.com/dolthub/vitess v0.0.0-20240307173128-5f7f58927aec/go.mod h1:IwjNXSQPymrja5pVqmfnYdcy7Uv7eNJNBPK/MEh9OOw=
github.com/dolthub/vitess v0.0.0-20240308192106-c4763c1b44f7 h1:xySLa7LhFRRYR6lcKMPTUM4a3yViDxD+vgykwk6kwXo=
github.com/dolthub/vitess v0.0.0-20240308192106-c4763c1b44f7/go.mod h1:IwjNXSQPymrja5pVqmfnYdcy7Uv7eNJNBPK/MEh9OOw=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
Expand Down
8 changes: 8 additions & 0 deletions server/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ type interceptorHandler struct {
h mysql.Handler
}

func (ih *interceptorHandler) ComRegisterReplica(c *mysql.Conn, replicaHost string, replicaPort uint16, replicaUser string, replicaPassword string) error {
panic("not implemented")
}

func (ih *interceptorHandler) ComBinlogDumpGTID(c *mysql.Conn, logFile string, logPos uint64, gtidSet mysql.GTIDSet) error {
panic("not implemented")
}

func (ih *interceptorHandler) NewConnection(c *mysql.Conn) {
ih.h.NewConnection(c)
}
Expand Down
8 changes: 8 additions & 0 deletions server/golden/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ type MySqlProxy struct {
conns map[uint32]proxyConn
}

func (h MySqlProxy) ComRegisterReplica(c *mysql.Conn, replicaHost string, replicaPort uint16, replicaUser string, replicaPassword string) error {
panic("not implemented")
}

func (h MySqlProxy) ComBinlogDumpGTID(c *mysql.Conn, logFile string, logPos uint64, gtidSet mysql.GTIDSet) error {
panic("not implemented")
}

func (h MySqlProxy) ParserOptionsForConnection(_ *mysql.Conn) (sqlparser.ParserOptions, error) {
return sqlparser.ParserOptions{}, nil
}
Expand Down
8 changes: 8 additions & 0 deletions server/golden/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ type Validator struct {
logger *logrus.Logger
}

func (v Validator) ComRegisterReplica(c *mysql.Conn, replicaHost string, replicaPort uint16, replicaUser string, replicaPassword string) error {
panic("not implemented")
}

func (v Validator) ComBinlogDumpGTID(c *mysql.Conn, logFile string, logPos uint64, gtidSet mysql.GTIDSet) error {
panic("not implemented")
}

// NewValidatingHandler creates a new Validator wrapping a MySQL connection.
func NewValidatingHandler(handler mysql.Handler, mySqlConn string, logger *logrus.Logger) (Validator, error) {
golden, err := NewMySqlProxyHandler(logger, mySqlConn)
Expand Down
8 changes: 8 additions & 0 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ type Handler struct {
sel ServerEventListener
}

func (h *Handler) ComRegisterReplica(c *mysql.Conn, replicaHost string, replicaPort uint16, replicaUser string, replicaPassword string) error {
return fmt.Errorf("ComRegisterReplica not implemented")
}

func (h *Handler) ComBinlogDumpGTID(c *mysql.Conn, logFile string, logPos uint64, gtidSet mysql.GTIDSet) error {
return fmt.Errorf("ComBinlogDumpGTID not implemented")
}

var _ mysql.Handler = (*Handler)(nil)
var _ mysql.ExtendedHandler = (*Handler)(nil)

Expand Down
8 changes: 8 additions & 0 deletions sql/variables/system_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ var systemVars = map[string]sql.SystemVariable{
Type: types.NewSystemStringType("bind_address"),
Default: "*",
},
"binlog_checksum": {
Name: "binlog_checksum",
Scope: sql.SystemVariableScope_Global,
Dynamic: true,
SetVarHintApplies: false,
Type: types.NewSystemStringType("binlog_checksum"),
Default: "NONE", // TODO: MySQL's default is CRC32
},
"binlog_gtid_simple_recovery": {
Name: "binlog_gtid_simple_recovery",
Scope: sql.SystemVariableScope_Global,
Expand Down
Loading