Rechercher dans le manuel MySQL

13.1.16 CREATE LOGFILE GROUP Syntax

  1. CREATE LOGFILE GROUP logfile_group
  2.     ADD UNDOFILE 'undo_file'
  3.     [INITIAL_SIZE [=] initial_size]
  4.     [UNDO_BUFFER_SIZE [=] undo_buffer_size]
  5.     [REDO_BUFFER_SIZE [=] redo_buffer_size]
  6.     [NODEGROUP [=] nodegroup_id]
  7.     [WAIT]
  8.     [COMMENT [=] 'string']
  9.     ENGINE [=] engine_name

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”.

Note

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:

  1. mysql> CREATE LOGFILE GROUP lg1
  2.     ->     ADD UNDOFILE 'undo.dat' INITIAL_SIZE = 10M;
  3. Query OK, 0 rows affected, 1 warning (0.00 sec)
  4.  
  5. mysql> SHOW WARNINGS;
  6. +-------+------+------------------------------------------------------------------------------------------------+
  7. | Level | Code | Message                                                                                        |
  8. +-------+------+------------------------------------------------------------------------------------------------+
  9. | Error | 1478 | Table storage engine 'InnoDB' does not support the create option 'TABLESPACE or LOGFILE GROUP' |
  10. +-------+------+------------------------------------------------------------------------------------------------+
  11. 1 row in set (0.00 sec)
  12.  
  13. mysql> DROP LOGFILE GROUP lg1 ENGINE = NDB;            
  14. ERROR 1529 (HY000): Failed to drop LOGFILE GROUP
  15.  
  16. mysql> CREATE LOGFILE GROUP lg1
  17.     ->     ADD UNDOFILE 'undo.dat' INITIAL_SIZE = 10M
  18.     ->     ENGINE = NDB;
  19. 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:

  1. mysql> SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER, EXTRA
  2.     -> FROM INFORMATION_SCHEMA.FILES
  3.     -> WHERE FILE_NAME = 'undo_10.dat';
  4. +--------------------+----------------------+----------------+
  5. | LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA          |
  6. +--------------------+----------------------+----------------+
  7. | lg_3               |                   11 | CLUSTER_NODE=3 |
  8. | lg_3               |                   11 | CLUSTER_NODE=4 |
  9. +--------------------+----------------------+----------------+
  10. 2 rows in set (0.06 sec)

CREATE LOGFILE GROUP is useful only with Disk Data storage for NDB Cluster. See Section 22.5.13, “NDB Cluster Disk Data Tables”.


Zoek in de MySQL-handleiding

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 26/06/2006 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/mysql-rf-create-logfile-group.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:en Manuel MySQL : https://dev.mysql.com/

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut