[MDEV-25571] mariadb-dump support for backup lock Created: 2021-04-30 Updated: 2022-04-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.4.18, 10.5.9, 10.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Some transactional backup can failed with Error 1412:Table definition has changed, thanks to the introduction of BACKUP STAGE that would for --single-transaction inject BACKUP STAGE START; |
| Comments |
| Comment by Daniel Black [ 2022-03-16 ] |
|
As mentioned in https://github.com/MariaDB/server/pull/2054, when doing a limited backup maybe BACKUP LOCK tbl is sufficient. monty is there a reason BACKUP LOCK tbls requires RELOAD privs? Would a table level privilege be sufficient? A SELECT statement in a transaction is sufficient to hold a metadata lock so couldn't that apply to {{BACKUP LOCK}}s too? |
| Comment by Michael Widenius [ 2022-04-12 ] |
|
About RELOAD. The documentation is: In effect having RELOAD privilege is not something that should cause any issues to give to anyone. When it comes to BACKUP LOCK, having access to the table should probably be enough. |
| Comment by Michael Widenius [ 2022-04-13 ] |
|
The conclusion would be to allow one to do a BACKUP LOCK if one has either the global RELOAD privilege or the LOCK privilege on the table. |
| Comment by VAROQUI Stephane [ 2022-04-13 ] |
|
mydumper patch on his way: https://github.com/mydumper/mydumper/issues/8 with some documented case |
| Comment by Daniel Black [ 2022-04-13 ] |
|
Agree that making an additional privilege in addition to RELOAD is the easiest compatible way. LOCK_TABLES_ACL appears to be a database level privilege, which in addition to SELECT on the table give access to LOCK TABLE, so that pattern can be copied. Which major version should this change target? |