MySQL 8.0-13.1.6 ALTER LOGFILE GROUP Statement

ALTER LOGFILE GROUP logfile_group
    ADD UNDOFILE 'file_name'
    [INITIAL_SIZE [=] size]
    [WAIT]
    ENGINE [=] engine_name

This statement adds an UNDO file named 'file_name' to an existing log file group logfile_group. An ALTER LOGFILE GROUP statement has one and only one ADD UNDOFILE clause. No DROP UNDOFILE clause is currently supported.

该语句将一个名为'file_name'的UNDO文件添加到现有日志文件组logfile_group。ALTER LOGFILE GROUP语句有且只有一个ADD UNDOFILE子句。目前不支持DROP UNDOFILE子句。

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 an undo log file with the same name, or an undo log file and a data file with the same name.

所有NDB集群磁盘数据对象共享同一个命名空间。这意味着每个Disk Data对象必须唯一命名(而不仅仅是给定类型的每个Disk Data对象)。例如,表空间和undo日志文件不能同名,undo日志文件和数据文件不能同名。

The optional INITIAL_SIZE parameter sets the UNDO file's initial size in bytes; if not specified, the initial size defaults to 134217728 (128 MB). You may optionally follow size 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 (megabytes) or G (gigabytes). (Bug #13116514, Bug #16104705, Bug #62858)

可选的INITIAL_SIZE参数以字节为单位设置UNDO文件的初始大小;如果没有指定,初始大小默认为134217728 (128 MB)。您可以选择在size后面用一个字母缩写表示数量级,类似于my.cnf中使用的那些。通常,这是字母M (megabytes)或G (gigabytes)之一。(Bug #13116514, Bug #16104705, Bug #62858)

On 32-bit systems, the maximum supported value for INITIAL_SIZE is 4294967296 (4 GB). (Bug #29186)

在32位系统上,INITIAL_SIZE的最大支持值为4294967296 (4gb)。(错误# 29186)

The minimum allowed value for INITIAL_SIZE is 1048576 (1 MB). (Bug #29574)

INITIAL_SIZE允许的最小值是1048576 (1mb)。(错误# 29574)

Note

WAIT is parsed but otherwise ignored. This keyword currently has no effect, and is intended for future expansion.

WAIT被解析,但在其他方面被忽略。该关键字目前没有作用,并打算在未来扩展。

The ENGINE parameter (required) determines the storage engine which is used by this log file group, with engine_name being the name of the storage engine. Currently, the only accepted values for engine_name are “NDBCLUSTER” and “NDB”. The two values are equivalent.

ENGINE参数(必选)决定了该日志文件组使用的存储引擎,其中engine_name是存储引擎的名称。目前,engine_name只能接受“NDBCLUSTER”和“NDB”。这两个值是等价的。

Here is an example, which assumes that the log file group lg_3 has already been created using CREATE LOGFILE GROUP (see Section 13.1.16, “CREATE LOGFILE GROUP Statement”):

下面是一个示例,假设已经使用CREATE LOGFILE group创建了日志文件组lg_3(参见13.1.16节“CREATE LOGFILE group Statement”):

ALTER LOGFILE GROUP lg_3
    ADD UNDOFILE 'undo_10.dat'
    INITIAL_SIZE=32M
    ENGINE=NDBCLUSTER;

When ALTER LOGFILE GROUP is used with ENGINE = NDBCLUSTER (alternatively, ENGINE = NDB), an UNDO log file is created on each NDB 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:

当ALTER LOGFILE GROUP与ENGINE = NDBCLUSTER(或者ENGINE = NDB)一起使用时,会在每个NDB集群数据节点上创建一个UNDO日志文件。您可以验证UNDO文件是否已经创建,并通过查询INFORMATION_SCHEMA来获取关于它们的信息。文件表。例如:

mysql> SELECT FILE_NAME, LOGFILE_GROUP_NUMBER, EXTRA
    -> FROM INFORMATION_SCHEMA.FILES
    -> WHERE LOGFILE_GROUP_NAME = 'lg_3';
+-------------+----------------------+----------------+
| FILE_NAME   | LOGFILE_GROUP_NUMBER | EXTRA          |
+-------------+----------------------+----------------+
| newdata.dat |                    0 | CLUSTER_NODE=3 |
| newdata.dat |                    0 | CLUSTER_NODE=4 |
| undo_10.dat |                   11 | CLUSTER_NODE=3 |
| undo_10.dat |                   11 | CLUSTER_NODE=4 |
+-------------+----------------------+----------------+
4 rows in set (0.01 sec)

(See Section 26.3.15, “The INFORMATION_SCHEMA FILES Table”.)

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.

用于UNDO_BUFFER_SIZE的内存来自全局池,其大小由SharedGlobalMemory数据节点配置参数的值决定。这包括InitialLogFileGroup数据节点配置参数的设置为该选项隐含的任何默认值。

ALTER LOGFILE GROUP is useful only with Disk Data storage for NDB Cluster. For more information, see Section 23.6.10, “NDB Cluster Disk Data Tables”.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值