Rechercher dans le manuel MySQL
13.3.5 LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Syntax
- LOCK INSTANCE FOR BACKUP
- UNLOCK INSTANCE
LOCK INSTANCE FOR BACKUP
acquires an
instance-level backup lock that permits DML
during an online backup while preventing operations that could
result in an inconsistent snapshot.
Executing the LOCK INSTANCE FOR BACKUP
statement requires the BACKUP_ADMIN
privilege. The BACKUP_ADMIN
privilege is automatically granted to users with the
RELOAD
privilege when performing an
in-place upgrade to MySQL 8.0 from an earlier
version.
Multiple sessions can hold a backup lock simultaneously.
UNLOCK INSTANCE
releases a backup lock held by
the current session. A backup lock held by a session is also
released if the session is terminated.
LOCK INSTANCE FOR BACKUP
prevents files from
being created, renamed, or removed. REPAIR
TABLE
TRUNCATE TABLE
,
OPTIMIZE TABLE
, and account
management statements are blocked. See
Section 13.7.1, “Account Management Statements”. Operations that modify
InnoDB
files that are not recorded in the
InnoDB
redo log are also blocked.
LOCK INSTANCE FOR BACKUP
permits DDL operations
that only affect user-created temporary tables. In effect, files
that belong to user-created temporary tables can be created,
renamed, or removed while a backup lock is held. Creation of
binary log files is also permitted.
A backup lock acquired by LOCK INSTANCE FOR
BACKUP
is independent of transactional locks and locks
taken by
FLUSH
TABLES
,
and the following sequences of statements are permitted:
tbl_name
[,
tbl_name
] ... WITH READ LOCK
The lock_wait_timeout
setting
defines the amount of time that a LOCK INSTANCE FOR
BACKUP
statement waits to acquire a lock before giving
up.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-lock-instance-for-backup.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.