[MDEV-20867] Perform careful review of "Server crashes with BACKUP STAGE and FLUSH TABLE table_name" Created: 2019-10-20 Updated: 2023-05-16 Resolved: 2020-02-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Fix Version/s: | 10.5.1, 10.4.13 |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Revision: https://github.com/MariaDB/server/commit/c2e0a0b17544bf984e21094252528110e5a323f6 It definitely has a few minor glitches, doesn't seem to go well inline with the design. |
| Comments |
| Comment by Sergey Vojtovich [ 2019-10-22 ] | |||||||||||||||
|
The following diff crashes the server:
| |||||||||||||||
| Comment by Sergey Vojtovich [ 2019-10-22 ] | |||||||||||||||
|
FLUSH TABLE t1 FOR EXPORT is allowed under BACKUP STAGE while LOCK TABLE t1 READ is forbidden. | |||||||||||||||
| Comment by Sergey Vojtovich [ 2019-10-22 ] | |||||||||||||||
|
mdl.cc change doesn't go inline with what we have in THD::leave_locked_tables_mode(). To be inline with that code the fix should look as following:
| |||||||||||||||
| Comment by Michael Widenius [ 2020-02-11 ] | |||||||||||||||
|
The above patch will not work, as backup_flush_ticket is set once when backup is started and never reset. At end of backup it will point to something that doesn't exist anymore. I agree with Svoj's first comment that if one has a backup lock, one should not be able to do FLUSH TABLES FOR EXPORT when one has backup stage's active. A better fix is to give an error for this command if thd->read_only_protection() is set. | |||||||||||||||
| Comment by Michael Widenius [ 2020-02-11 ] | |||||||||||||||
|
Need a better fix | |||||||||||||||
| Comment by Sergey Vojtovich [ 2020-02-11 ] | |||||||||||||||
|
Which patch was reviewed, this one?
| |||||||||||||||
| Comment by Michael Widenius [ 2020-02-12 ] | |||||||||||||||
|
I reviewed the patch that was part of the Jira entry (2 line patch for sql_class.cc) |