Rechercher dans le manuel MySQL
13.1.16 CREATE LOGFILE GROUP Syntax
This statement creates a new log file group named
logfile_group
having a single
UNDO
file named
'undo_file
'. A
CREATE LOGFILE GROUP
statement has
one and only one ADD UNDOFILE
clause. For rules
covering the naming of log file groups, see
Section 9.2, “Schema Object Names”.
All NDB Cluster Disk Data objects share the same namespace. This means that each Disk Data object must be uniquely named (and not merely each Disk Data object of a given type). For example, you cannot have a tablespace and a log file group with the same name, or a tablespace and a data file with the same name.
There can be only one log file group per NDB Cluster instance at any given time.
The optional INITIAL_SIZE
parameter sets the
UNDO
file's initial size; if not specified, it
defaults to 128M
(128 megabytes). The optional
UNDO_BUFFER_SIZE
parameter sets the size used
by the UNDO
buffer for the log file group; The
default value for UNDO_BUFFER_SIZE
is
8M
(eight megabytes); this value cannot exceed
the amount of system memory available. Both of these parameters
are specified in bytes. You may optionally follow either or both
of these with a one-letter abbreviation for an order of magnitude,
similar to those used in my.cnf
. Generally,
this is one of the letters M
(for megabytes)
or G
(for gigabytes).
Memory used for UNDO_BUFFER_SIZE
comes from the
global pool whose size is determined by the value of the
SharedGlobalMemory
data
node configuration parameter. This includes any default value
implied for this option by the setting of the
InitialLogFileGroup
data
node configuration parameter.
The maximum permitted for UNDO_BUFFER_SIZE
is
629145600 (600 MB).
On 32-bit systems, the maximum supported value for
INITIAL_SIZE
is 4294967296 (4 GB). (Bug #29186)
The minimum allowed value for INITIAL_SIZE
is
1048576 (1 MB).
The ENGINE
option determines the storage engine
to be used by this log file group, with
engine_name
being the name of the
storage engine. In MySQL 8.0, this must be
NDB
(or
NDBCLUSTER
). If
ENGINE
is not set, MySQL tries to use the
engine specified by the
default_storage_engine
server
system variable (formerly
storage_engine
). In any case, if
the engine is not specified as NDB
or
NDBCLUSTER
, the CREATE
LOGFILE GROUP
statement appears to succeed but actually
fails to create the log file group, as shown here:
- mysql> CREATE LOGFILE GROUP lg1
- Query OK, 0 rows affected, 1 warning (0.00 sec)
- +-------+------+------------------------------------------------------------------------------------------------+
- | Level | Code | Message |
- +-------+------+------------------------------------------------------------------------------------------------+
- +-------+------+------------------------------------------------------------------------------------------------+
- mysql> CREATE LOGFILE GROUP lg1
- Query OK, 0 rows affected (2.97 sec)
The fact that the CREATE LOGFILE GROUP
statement does not actually return an error when a
non-NDB
storage engine is named, but rather
appears to succeed, is a known issue which we hope to address in a
future release of NDB Cluster.
REDO_BUFFER_SIZE
,
NODEGROUP
, WAIT
, and
COMMENT
are parsed but ignored, and so have no
effect in MySQL 8.0. These options are intended for
future expansion.
When used with ENGINE [=] NDB
, a log file group
and associated UNDO
log file are created on
each Cluster data node. You can verify that the
UNDO
files were created and obtain information
about them by querying the
INFORMATION_SCHEMA.FILES
table. For
example:
- -> FROM INFORMATION_SCHEMA.FILES
- +--------------------+----------------------+----------------+
- | LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
- +--------------------+----------------------+----------------+
- | lg_3 | 11 | CLUSTER_NODE=3 |
- | lg_3 | 11 | CLUSTER_NODE=4 |
- +--------------------+----------------------+----------------+
CREATE LOGFILE GROUP
is useful only
with Disk Data storage for NDB Cluster. See
Section 22.5.13, “NDB Cluster Disk Data Tables”.
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-create-logfile-group.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.