[MDEV-12397] Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine Created: 2017-03-29 Updated: 2021-05-31 Resolved: 2017-11-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.29 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Julien Palard | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 1 |
| Labels: | gtid | ||
| Environment: |
Debian GNU/Linux 8.7 (jessie) |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
On a fresh (if I remember well) install of MariaDB on Debian, as a replication slave, I'm getting, in "show slave status": Last_SQL_Error: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine So I tried a `mysql_upgrad` which told me to try --force as it looked already up to date, legit, so I tried --force, which gave: mysql.gtid_slave_pos Don't know what to do from now, I expected to mysql_upgrade to fix it þ |
| Comments |
| Comment by Elena Stepanova [ 2017-05-01 ] |
|
Please attach your cnf file(s) and the full error log since server startup and till the problem occurs. |
| Comment by Elena Stepanova [ 2017-06-01 ] |
|
If you have further information on the issue, please comment and it will be re-opened. |
| Comment by Elena Stepanova [ 2017-10-30 ] |
|
Awaiting information from the reporter of |
| Comment by Ulrich Moser (Inactive) [ 2017-11-29 ] |
|
We get the same error in the folowing situation: |
| Comment by Elena Stepanova [ 2017-11-29 ] |
|
In the described scenario, InnoDB does not "ignore" tables, it's just a totally wrong way of doing things which has never been supported or recommended in any documentation. Every InnoDB table has an frm file, ibd file (assuming innodb_log_file_per_table=1 which is default in 10.2), and certain information in the system table space (ibdata), and maybe even in iblogs. By removing a part of it (ibdata and iblogs) but keeping frm and ibd files, you simply leave the database in an inconsistent corrupt state, the server and the engine don't have enough information to do anything with these tables, it's quite natural that they cannot be created, removed, or updated. |
| Comment by Ulrich Moser (Inactive) [ 2017-11-29 ] |
|
Hi Elena, |
| Comment by Marko Mäkelä [ 2017-11-30 ] |
|
umoser, I really wish it worked like you describe. The system tablespace contains the following information:
With the exception of the doublewrite buffer, all of this is covered by write-ahead logging (writing to ib_logfile* first, then to the persistent data files). The InnoDB redo log files (ib_logfile*) are safe to remove only in the case when the redo log is logically empty, that is, when there are no logged changes since the latest redo log checkpoint. A normal InnoDB shutdown (innodb_fast_shutdown<2) will perform a redo log checkpoint at the very end. The InnoDB system tablespace or the InnoDB undo files are never safe to remove. I wonder where you got that advice from.
I believe that we need major changes to make InnoDB be more maintainable, or behave more logically:
Basically, I would eliminate the system tablespace, or only support it for the purpose of reading old tables when upgrading. |
| Comment by Sergei Golubchik [ 2017-11-30 ] |
|
Closing again, because there was no feedback from the original reporter, and the following discussion in comments appears to be unrelated (and not a bug). |
| Comment by Ulrich Moser (Inactive) [ 2017-11-30 ] |
|
Thank you Marko for the explanation. |