[MDEV-28951] InnoDB corrupts the database tables Created: 2022-06-27 Updated: 2022-08-30 Resolved: 2022-08-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.5.16 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | C N Helkenn | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
I have been working with MariaDB since last November; first with 10.6, & now with 10.5.16. I use MariaDB as the internal server for DigiKam photo management software. I was advised by DigiKam support that MariaDB 10.6 was not working with DigiKam 7.4. I read that MariaDB 10.7 was less stable than 10.6 & it was recommended to use 10.5. The full crash of MariaDB in early April caused DigiKam to fail to launch. I managed to completely remove MariaDB 10.6 & do a fresh install of 10.5.16. But all the additions to the database done between Nov & April were lost. Early June I was able to recover from the crash and re-edit the database. It appeared as though 10.5.16 was working well with DigiKam 7.6.0. Today it has crashed again. DigiKam will not launch. The error log says to report this as a bug. So here it is. Please see the attached error logs. I'm working with Win 10 Pro 64-bit. |
| Comments |
| Comment by Marko Mäkelä [ 2022-06-27 ] | ||||||||
|
Both logs show a crash in the function fseg_inode_get(), which was replaced in In mysql.err.old
This suggests that the ib_logfile0 had been deleted before the database was started up. If the server had not been shut down cleanly, discarding the log is a sure way to corrupt the database. MariaDB Server 10.8 or later would refuse normal startup in such a case; see What could have caused the redo log to be disappear before the attempt to start up the server? Note: After the redo log was created and anything written to the data or log files, an older log file cannot be restored without also restoring older data files. The log and the data files are tightly coupled with each other. | ||||||||
| Comment by C N Helkenn [ 2022-06-27 ] | ||||||||
|
All right. I kind of know that the errors have been on going. What I need to know is what to do to fix it. I don't use command line. MariaDB is launched by Digikam, not by any commands I execute. I rely on the DigiKam software to work with MariaDB to manage the database files. I don't make inquiries or delete any files. How can I recover from these file corruptions? What exactly is InnoDB doing that is corrupting the files? I am not a database programmer. I have minimal skills with MariaDB. Your guidance is very much appreciated. | ||||||||
| Comment by Marko Mäkelä [ 2022-06-27 ] | ||||||||
|
cnhelkenn, you’d better ask a developer of DigiKam to comment on this ticket. All that I can say is that for any database whose implementation of ACID depends on write-ahead logging (ARIES), discarding the write-ahead log (also known as redo log, recovery log, mini-transaction log) is a recipe for disaster. So is copying the data directory while the database server is running. For correct backups, you would need a file system snapshot (I do not know if anything on Microsoft Windows would support that) or a special tool, such as mariadb-backup. I would also be interested to know why anyone would think that the 10.5 series of MariaDB Server might be better in any way than the 10.6 series. | ||||||||
| Comment by Elena Stepanova [ 2022-07-25 ] | ||||||||
Quick googling shows that there was at least one incompatibility between DigiKam and MariaDB 10.6 resolved on DigiKam side only in the beginning of this year, so the advise from DigiKam support likely referred to that. I don't know of course whether there are any other problems, known or not. If DigiKam has now lifted the limitation, maybe 10.6 is worth trying again, to see if the crash is resolved by the changes which marko mentioned (maybe after the above-mentioned fix is out with 10.6.9). | ||||||||
| Comment by Marko Mäkelä [ 2022-08-01 ] | ||||||||
|
elenst, thank you. For the record, that incompatibility was apparently caused by some incorrect use of an API in Qt, as noted in |