diff options
author | Monty <monty@mariadb.org> | 2015-07-15 16:27:14 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-07-16 10:36:58 +0300 |
commit | 872a953b228e93553ed056d8fa035ff06e884bc8 (patch) | |
tree | a90958d21c610b2517705ab79666aacd8c837e84 /mysql-test | |
parent | df0498fd76897c0e034ab3f0598972f0e2419b02 (diff) | |
download | mariadb-git-872a953b228e93553ed056d8fa035ff06e884bc8.tar.gz |
MDEV-8469 Add RESET MASTER TO x to allow specification of binlog file nr
Other things:
- Avoid calling init_and_set_log_file_name() when opening binary log.
- Remove newlines early when reading from index file.
- Ensure that reset_logs() will work even if thd is 0 (Can happen on startup)
- Added thd to sart_slave_threads() for better error handling.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/create_drop_binlog.result | 12 | ||||
-rw-r--r-- | mysql-test/t/create_drop_binlog.test | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/create_drop_binlog.result b/mysql-test/r/create_drop_binlog.result index a1108890208..4a6fa7a8d14 100644 --- a/mysql-test/r/create_drop_binlog.result +++ b/mysql-test/r/create_drop_binlog.result @@ -333,3 +333,15 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Gtid 1 # GTID #-#-# # # Query 1 # use `test`; DROP TABLE `t1` /* generated by server */ RESET MASTER; +RESET MASTER; +SHOW MASTER STATUS; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 313 +RESET MASTER TO 100; +SHOW MASTER STATUS; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000100 313 +RESET MASTER; +SHOW MASTER STATUS; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 313 diff --git a/mysql-test/t/create_drop_binlog.test b/mysql-test/t/create_drop_binlog.test index 775c7bec12a..06fd1c6c1dd 100644 --- a/mysql-test/t/create_drop_binlog.test +++ b/mysql-test/t/create_drop_binlog.test @@ -160,3 +160,12 @@ DROP TABLE t1; --replace_regex /xid=[0-9]+/xid=XX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Server.ver.*/VER/ SHOW BINLOG EVENTS; RESET MASTER; + +# Test RESET MASTER TO + +RESET MASTER; +SHOW MASTER STATUS; +RESET MASTER TO 100; +SHOW MASTER STATUS; +RESET MASTER; +SHOW MASTER STATUS; |