[MDEV-29103] Aria Table Data Loss Created: 2022-07-14 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Encryption, Storage Engine - Aria |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Chris Haddon | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Aria, Windows, data-loss, encryption, repair, use_frm | ||
| Environment: |
Reproduced on Windows 10 and Windows Server 2016 |
||
| Attachments: |
|
| Description |
|
I have found a critical bug in Aria (Page storage format) where tables are wiped if someone runs a repair command with the USE_FRM flag. REPAIR TABLE X USE_FRM This bug only exists for databases that use an encryption plugin. In our case we use a file encryption plugin, however it is likely this bug affects all types of encryption plugin. Disabling the encryption plugin or changing the storage format to Dynamic will prevent the USE_FRM from wiping the table. However, since we require Data Encryption at Rest, we have to use encryption and Page storage format. To reproduce, set up a Windows VM with MariaDB 10.5.13 (or later) installed. Then create a database and some tables and add data. Now disconnect and reconnect to the Database and you will see all data has been removed. A proposed dirty fix could be the following: |
| Comments |
| Comment by Chris Haddon [ 2022-07-15 ] | ||||||||||||||||||||
|
There also seems to be the same issue with auto-recovery when using encryption. Is it possible auto-recovery also uses USE_FRM ? If so, this might need fixing/tweaking so that USE_FRM isn't used. | ||||||||||||||||||||
| Comment by Chris Haddon [ 2022-07-21 ] | ||||||||||||||||||||
|
We just had a power cut at one of our sites. I believe this is related to auto crash recovery built into Aria when Please see attached mariadb err log (zipped up). | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-07-25 ] | ||||||||||||||||||||
|
Thanks for the report. Reproducible as described.
|