Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
Anthony Yeh fb78c13b51 mysqlctl: Allow setting slave pos without starting slave.
Replace StartReplicationCommands with SetSlavePositionCommands.
This makes it possible to set the slave pos without knowing who the
master is yet.
2015-10-21 01:29:17 -07:00
Alain Jobart 5b039af896 Revert "Removing now empty {Enable,Disable}BinlogServer methods."
This reverts commit 80678fa46b.
2015-05-22 12:55:06 -07:00
Alain Jobart a5b3f2aa53 Removing unused mysqld parameter for method. 2015-05-21 19:12:46 -07:00
Alain Jobart 80678fa46b Removing now empty {Enable,Disable}BinlogServer methods.
(they were useful before we switched to using a MySQL connection).
2015-05-21 19:01:53 -07:00
Alain Jobart d5c0a692ba Making restore code only use MysqlDaemon.
(for easier soon-to-be unit testing)
2015-05-19 14:31:54 -07:00
Alain Jobart 9ad065b906 Fixing reparent code to restart replication appropriately.
EmergencyReparent used to stop replication on all slaves,
then SetMaster would see replication is off, and not restart it.

Fixed unit and intergration tests to test this case.
MysqlDaemon fake now only has one place to store replication status.

API changes:
- SlaveStatus returns a myproto.ReplicationStatus (not a pointer any more)
- StopReplicationAndGetPosition is changed to StopReplicationAndGetStatus
- SetMaster has an extra forceStartSlave boolean.
2015-05-13 10:20:51 -07:00
Alain Jobart 00d5262fa8 Now reparent doesn't interfere with slave replication status.
If they were replicating, we stop / set master / start, if they were
not, we just set master. Side effect is ReparentTablet may not
start replication if it was stopped, but it's better that way.
2015-05-06 08:52:57 -07:00
Alain Jobart af206c9ad7 Updating comments. 2015-04-27 14:55:06 -07:00
Alain Jobart a77526dea2 Adding a ResetReplication command (nuclear command for replication
logs and state). Calling it at InitShardMaster time.
2015-04-23 16:11:40 -07:00
Alain Jobart 810aca09a3 More PlannedShardReparent work. Need a fix in InitShardMaster to make
more progress, I want to do it in a separate commmit.
2015-04-22 16:05:35 -07:00
Shengzhe Yao defc9d9398 add sqldb.Conn interface for low level db connection
1. add sqldb.Conn and move mysql.ConnectionParams to sqldb package.
2. change mysql.Connect function to return sqldb.Conn.
3. update places using *mysql.Connection to sqldb.Conn.
4. update places using *mysql.ConnectionParams to *sqldb.ConnParams.
5. changes places that use mysql.Connect to sqldb.Get().
6. Some randome go style fix (suggested by golint).
7. define package level variable DefaultDB in sqldb.
8. go/mysql will register its Connect func in init function.
2015-03-24 15:31:11 -07:00
Anthony Yeh 5bedc350e0 Create mysqlctld service for remote mysqlctl actions.
This is intended for use internally by vttablet, in cases when it cannot
directly access the mysqld process because they are running in separate
cgroups (containers). Since vttablet and mysqld can share files, many
actions can still be done directly by vttablet. However, starting and
stopping mysqld must be done from within mysqld's cgroup, so these
actions are executed remotely by mysqlctld.
2014-10-24 15:52:18 -07:00
Anthony Yeh 98dd0fd931 Return an error instead of dying if flavor can't be detected. 2014-09-30 16:54:41 -07:00
Anthony Yeh 315a7c9e0e Auto-detect MySQL flavor. 2014-09-18 00:02:50 -07:00
Anthony Yeh 6a7da978e5 Let site-local files override MysqlFlavor implementations. 2014-09-12 01:26:38 -07:00
Anthony Yeh 59e84b83ff Move Google-specific super_to_set_timestamp setting to flavor interface. 2014-09-11 18:56:21 -07:00
Anthony Yeh 5b8415ec87 Use GTIDSet to specify replication position. 2014-09-03 17:45:10 -07:00
Anthony Yeh fa8e131f61 Connect to mysqld as a slave to stream binlogs instead of polling files. 2014-08-12 10:21:04 -07:00
Anthony Yeh 5c600a35aa Refactor mysqlctl for GTID support. 2014-07-24 00:31:09 -07:00
Anthony Yeh d131bc199c Add GTID interface and implement for Google MySQL and MariaDB. 2014-07-23 12:17:32 -07:00
Alain Jobart 8302b2ae94 First pass at MariaDB support.
test/tabletmanager.py passes!
It's enabled by setting MYSQL_FLAVOR=MariaDB before anything.
2014-04-02 14:52:07 -07:00