[MDEV-16931] Slave crashes on DROP DATABASE command when there is an orphaned table in the schema Created: 2018-08-09 Updated: 2018-10-05 Resolved: 2018-10-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.1.31 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Chris Calender (Inactive) | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Description |
|
We see a slave crash on a DROP DATABASE command (from the master) when there is an orphaned table in the schema (on the slave). Here is the stack trace:
Unfortunately, I am currently unable to reproduce, and the instance was recovered from a backup, so I cannot see what happened at the file level. I presume the table was orphaned because it showed in SHOW TABLES output, but SELECTs, INSERTs, UPDATEs, and even DROP TABLE all failed. The log shows it as using XtraDB. However, line 166 in dict0dict.ic are the same in the source code for both InooDB and XtraDB. |
| Comments |
| Comment by Elena Stepanova [ 2018-08-12 ] | ||||||||||||||||
|
How exactly (with which errors) DROP TABLE and DML were failing? | ||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2018-08-13 ] | ||||||||||||||||
|
elenst Unfortunately, they could not provide me with the exact errors they saw. However, I mocked up this example, and they said those looked like the errors they saw: 1. I created a table, t1 ("create table t1 (id int);"). 2. Then I stopped the mariadb instance, so I could remove the t1.ibd file. 3. I then restarted mariadb. 4. Then I performed the actions they performed and saw similar results:
However, 2 major differences in my test compared to what they saw: 1. I was able to issue a DROP TABLE (on the slave and/or master) and it worked as expected. Their DROP TABLE failed, hence their attempt to DROP DATABASE. 2. I see errors in the error log about missing .ibd files, but they said they did not see any error in the error log (which I don't see a mention about it in the above error log snippet, which I see it straight-away in my error log). | ||||||||||||||||
| Comment by Elena Stepanova [ 2018-08-13 ] | ||||||||||||||||
|
Yes, your mock-up only exhibits valid and expected behavior.
and most likely this
indicates that there was either a problematic upgrade, or some tampering with the data directory (copying files from different versions around, partial backup/restore, etc.). |