Removing unused mysqld parameter for method.

This commit is contained in:
Alain Jobart 2015-05-21 19:12:46 -07:00
Родитель 80678fa46b
Коммит a5b3f2aa53
6 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -63,7 +63,7 @@ type MysqlFlavor interface {
// SendBinlogDumpCommand sends the flavor-specific version of
// the COM_BINLOG_DUMP command to start dumping raw binlog
// events over a slave connection, starting at a given GTID.
SendBinlogDumpCommand(mysqld *Mysqld, conn *SlaveConnection, startPos proto.ReplicationPosition) error
SendBinlogDumpCommand(conn *SlaveConnection, startPos proto.ReplicationPosition) error
// MakeBinlogEvent takes a raw packet from the MySQL binlog
// stream connection and returns a BinlogEvent through which

Просмотреть файл

@ -138,7 +138,7 @@ func (*mariaDB10) ParseReplicationPosition(s string) (proto.ReplicationPosition,
}
// SendBinlogDumpCommand implements MysqlFlavor.SendBinlogDumpCommand().
func (*mariaDB10) SendBinlogDumpCommand(mysqld *Mysqld, conn *SlaveConnection, startPos proto.ReplicationPosition) error {
func (*mariaDB10) SendBinlogDumpCommand(conn *SlaveConnection, startPos proto.ReplicationPosition) error {
const ComBinlogDump = 0x12
// Tell the server that we understand GTIDs by setting our slave capability

Просмотреть файл

@ -134,7 +134,7 @@ func (*mysql56) ParseReplicationPosition(s string) (proto.ReplicationPosition, e
}
// SendBinlogDumpCommand implements MysqlFlavor.SendBinlogDumpCommand().
func (flavor *mysql56) SendBinlogDumpCommand(mysqld *Mysqld, conn *SlaveConnection, startPos proto.ReplicationPosition) error {
func (flavor *mysql56) SendBinlogDumpCommand(conn *SlaveConnection, startPos proto.ReplicationPosition) error {
const ComBinlogDumpGTID = 0x1E // COM_BINLOG_DUMP_GTID
gtidSet, ok := startPos.GTIDSet.(proto.Mysql56GTIDSet)

Просмотреть файл

@ -24,7 +24,7 @@ func (fakeMysqlFlavor) MakeBinlogEvent(buf []byte) blproto.BinlogEvent { return
func (fakeMysqlFlavor) ParseReplicationPosition(string) (proto.ReplicationPosition, error) {
return proto.ReplicationPosition{}, nil
}
func (fakeMysqlFlavor) SendBinlogDumpCommand(mysqld *Mysqld, conn *SlaveConnection, startPos proto.ReplicationPosition) error {
func (fakeMysqlFlavor) SendBinlogDumpCommand(conn *SlaveConnection, startPos proto.ReplicationPosition) error {
return nil
}
func (fakeMysqlFlavor) WaitMasterPos(mysqld *Mysqld, targetPos proto.ReplicationPosition, waitTimeout time.Duration) error {

Просмотреть файл

@ -72,7 +72,7 @@ func (sc *SlaveConnection) StartBinlogDump(startPos proto.ReplicationPosition) (
}
log.Infof("sending binlog dump command: startPos=%v, slaveID=%v", startPos, sc.slaveID)
if err = flavor.SendBinlogDumpCommand(sc.mysqld, sc, startPos); err != nil {
if err = flavor.SendBinlogDumpCommand(sc, startPos); err != nil {
log.Errorf("couldn't send binlog dump command: %v", err)
return nil, err
}

Просмотреть файл

@ -37,7 +37,7 @@ type BinlogPlayerController struct {
// Configuration parameters (set at construction, immutable).
ts topo.Server
dbConfig *sqldb.ConnParams
mysqld *mysqlctl.Mysqld
mysqld mysqlctl.MysqlDaemon
// Information about us (set at construction, immutable).
cell string
@ -72,7 +72,7 @@ type BinlogPlayerController struct {
lastError error
}
func newBinlogPlayerController(ts topo.Server, dbConfig *sqldb.ConnParams, mysqld *mysqlctl.Mysqld, cell string, keyspaceIdType key.KeyspaceIdType, keyRange key.KeyRange, sourceShard topo.SourceShard, dbName string) *BinlogPlayerController {
func newBinlogPlayerController(ts topo.Server, dbConfig *sqldb.ConnParams, mysqld mysqlctl.MysqlDaemon, cell string, keyspaceIdType key.KeyspaceIdType, keyRange key.KeyRange, sourceShard topo.SourceShard, dbName string) *BinlogPlayerController {
blc := &BinlogPlayerController{
ts: ts,
dbConfig: dbConfig,
@ -283,7 +283,7 @@ type BinlogPlayerMap struct {
// Immutable, set at construction time.
ts topo.Server
dbConfig *sqldb.ConnParams
mysqld *mysqlctl.Mysqld
mysqld mysqlctl.MysqlDaemon
// This mutex protects the map and the state.
mu sync.Mutex
@ -299,7 +299,7 @@ const (
)
// NewBinlogPlayerMap creates a new map of players.
func NewBinlogPlayerMap(ts topo.Server, dbConfig *sqldb.ConnParams, mysqld *mysqlctl.Mysqld) *BinlogPlayerMap {
func NewBinlogPlayerMap(ts topo.Server, dbConfig *sqldb.ConnParams, mysqld mysqlctl.MysqlDaemon) *BinlogPlayerMap {
return &BinlogPlayerMap{
ts: ts,
dbConfig: dbConfig,