[MDEV-17642] mysqldump restore with specified databases wont set gtid Created: 2018-11-08 Updated: 2018-11-13 Resolved: 2018-11-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Replication |
| Affects Version/s: | 10.1.28 |
| Fix Version/s: | 10.1.28 |
| Type: | Bug | Priority: | Major |
| Reporter: | Su, Jun-Ming | Assignee: | Andrei Elkin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows Server 2012 R2 |
||
| Description |
|
I have a MariaDB Master (called A) with binlog, and a MariaDB Slave (called B) to A for some specified databases. Now I need to create another MariaDB Slave (called C) to A for some specified databases which different replicate from B. I install MariaDB, and restore with backup from mysqldump with gtid and master-data flags for specified databases. (with{{ -D database -o database}}) After complete restoration and start the slave, it says slave_io_process error, can not get latest binlog. I get into troubleshooting for this problem, and find there is no value in mysql.gtid_slave_pos. So I need to login to A and get the gtid from binlog and set it in C. But if I restore ALL database in C, there is value in mysql.gtid_slave_pos in C. Why do the specified databases restore will not execute set global gtid_slave_pos in dumpfile? |
| Comments |
| Comment by Andrei Elkin [ 2018-11-09 ] | |||||||||||||||||||||||||
|
Hello, Jun-Ming. Thanks for reporting! If I got it right, the problem seems to be in that mysqldump output misses out I checked this assumption to execute
only see
in place. I did not restore the dump neither start slave being content with I suggest you describe it in step by step, or just give us a script that reproduces Cheers, Andrei | |||||||||||||||||||||||||
| Comment by Su, Jun-Ming [ 2018-11-09 ] | |||||||||||||||||||||||||
|
Thanks for your reply. The following is to reproduce my problem. 1. mysqldump with gtid and master-data flags in Server A
And in the beginning of all_db.sql is
2. Restore with specified Databases in Server C
c. There is no value in mysql.gtid_slave_pos 3. Restore with ALL Databases in Server C
b. | |||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2018-11-12 ] | |||||||||||||||||||||||||
|
Thanks for how-to-reproduce details! I think I understood what was your problem,
I check both the current your 10.1.28 but only on Linux.
I also the query log on my server "C" to confirm that no queries from other databases but spec_db Could you check your query log ? What if you will find mysql database queries in there? Specifically DROP,CREATE for gtid_slave_pos?
also for you verify. Thank you. And if that's the case it would be mysql client issue for which you have not reported the version. Cheers. Andrei | |||||||||||||||||||||||||
| Comment by Su, Jun-Ming [ 2018-11-13 ] | |||||||||||||||||||||||||
|
I had tried the process again and got the right answer: the gtid_slave_pos would be a value even restore all or specified databases, maybe another issues for this problem. please close this issue, thanks. | |||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2018-11-13 ] | |||||||||||||||||||||||||
|
Thanks you Jun-Ming! We can only appreciate efforts like yours always contributing to quality of mariadb! | |||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2018-11-13 ] | |||||||||||||||||||||||||
|
The user sorted it out through discussion with myself. |