A number of limitations and related issues existing in earlier versions of MySQL Cluster have been resolved:
Variable-length column support. The
NDBCLUSTERstorage engine now supports variable-length column types for in-memory tables.
Previously, for example, any Cluster table having one or more
VARCHARfields which contained only relatively small values, much more memory and disk space were required when using the
NDBCLUSTERstorage engine than would have been the case for the same table and data using the
MyISAMengine. In other words, in the case of a
VARCHARcolumn, such a column required the same amount of storage as a
CHARcolumn of the same size. In MySQL 5.1, this is no longer the case for in-memory tables, where storage requirements for variable-length column types such as
BINARYare comparable to those for these column types when used in
MyISAMtables (see Data Type Storage Requirements).Important
For MySQL Cluster Disk Data tables, the fixed-width limitation continues to apply. See Section 7.12, “MySQL Cluster Disk Data Tables”.
Replication with MySQL Cluster. It is now possible to use MySQL replication with Cluster databases. For details, see Chapter 8, MySQL Cluster Replication.
Circular Replication. Circular replication is also supported with MySQL Cluster, beginning with MySQL 5.1.18. See Section 8.10, “MySQL Cluster Replication: Multi-Master and Circular Replication”.
auto_increment_increment and auto_increment_offset. The
auto_increment_offsetserver system variables are supported for Cluster replication beginning with MySQL 5.1.20, MySQL Cluster NDB 6.2.5, and MySQL Cluster 6.3.2.
Database autodiscovery and online schema changes. Autodiscovery of databases is now supported for multiple MySQL servers accessing the same MySQL Cluster. Formerly, autodiscovery in MySQL Cluster 5.1 and MySQL Cluster NDB 6.x releases required that a given mysqld was already running and connected to the cluster at the time that the database was created on a different mysqld—in other words, when a mysqld process connected to the cluster after a database named
db_namewas created, it was necessary to issue a
CREATE SCHEMAstatement on the “new” MySQL server when it first accessed that MySQL Cluster. Beginning with MySQL Cluster NDB 6.2.16 and MySQL Cluster NDB 6.3.18, such a
CREATEstatement is no longer required. (Bug #39612)
This also means that online schema changes in
NDBtables are now possible. That is, the result of operations such as
CREATE INDEXperformed on one SQL node in the cluster are now visible to the cluster's other SQL nodes without any additional action being taken.
Backup and restore between architectures. Beginning with MySQL 5.1.10, it is possible to perform a Cluster backup and restore between different architectures. Previously—for example—you could not back up a cluster running on a big-endian platform and then restore from that backup to a cluster running on a little-endian system. (Bug #19255)
Character set directory. Beginning with MySQL 5.1.10, it is possible to install MySQL with Cluster support to a nondefault location and change the search path for font description files using either the
--character-sets-diroptions. (Previously, ndbd in MySQL 5.1 searched only the default path—typically
/usr/local/mysql/share/mysql/charsets—for character sets.)
Multiple management servers. In MySQL 5.1 (including all MySQL Cluster NDB 6.x and later versions), it is no longer necessary, when running multiple management servers, to restart all the cluster's data nodes to enable the management nodes to see one another.
Also, when using multiple management servers and starting concurrently several API nodes (possibly including one or more SQL nodes) whose connection strings listed the management servers in different order, it was possible for 2 API nodes to be assigned the same node ID. This issue is resolved in MySQL Cluster NDB 6.2.17, 6.3.23, and 6.4.3. (Bug #42973)
If any of the management servers are running on the same host, you must give nodes explicit IDs in connection strings because automatic allocation of node IDs does not work across multiple management servers on the same host. This is not required if every management server resides on a different host.
Multiple data node processes per host. Beginning with MySQL Cluster NDB 6.2.0, you can use multiple data node processes on a single host. (In MySQL Cluster NDB 6.1, MySQL 5.1, and earlier release series, we did not support production MySQL Cluster deployments in which more than one ndbd process was run on a single physical machine.)
In addition, MySQL Cluster NDB 7.0 introduces support for multi-threaded data nodes (ndbmtd). See Section 3.4.3, “What is New in MySQL Cluster NDB 7.0”, and Section 6.3, “ndbmtd — The MySQL Cluster Data Node Daemon (Multi-Threaded)”, for more information.
Identifiers. Formerly (in MySQL 5.0 and earlier), database names, table names and attribute names could not be as long for
NDBtables as tables using other storage engines, because attribute names were truncated internally. In MySQL 5.1 and later, names of MySQL Cluster databases, tables, and table columns follow the same rules regarding length as they do for any other storage engine.
Length of CREATE TABLE statements.
CREATE TABLEstatements may be no more than 4096 characters in length. This limitation affects MySQL 5.1.6, 5.1.7, and 5.1.8 only. (See Bug #17813)
IGNORE and REPLACE functionality. In MySQL 5.1.7 and earlier,
UPDATE IGNORE, and
REPLACEwere supported only for primary keys, but not for unique keys. It was possible to work around this issue by removing the constraint, then dropping the unique index, performing any inserts, and then adding the unique index again.
AUTO_INCREMENT columns. In MySQL 5.1.10 and earlier versions, the maximum number of tables having
AUTO_INCREMENTcolumns—including those belonging to hidden primary keys—was 2048.
This limitation was lifted in MySQL 5.1.11.
Maximum number of cluster nodes. Prior to MySQL Cluster NDB 6.1.1, the total maximum number of nodes in a MySQL Cluster was 63, including all SQL nodes (MySQL Servers), API nodes (applications accessing the cluster other than MySQL servers), data nodes, and management servers.
Starting with MySQL Cluster NDB 6.1.1, the total maximum number of nodes in a MySQL Cluster is 255, including all SQL nodes (MySQL Servers), API nodes (applications accessing the cluster other than MySQL servers), data nodes, and management servers. The total number of data nodes and management nodes beginning with this version is 63, of which up to 48 can be data nodes.Note
The limitation that a data node cannot have a node ID greater than 49 continues to apply.
Recovery of memory from deleted rows. Beginning with MySQL Cluster NDB 6.3.7, memory can be reclaimed from an
NDBtable for reuse with any
NDBtable by employing
OPTIMIZE TABLE, subject to the following limitations:
Only in-memory tables are supported; the
OPTIMIZE TABLEstatement still has no effect on MySQL Cluster Disk Data tables.
You can regulate the effects of
OPTIMIZEon performance by adjusting the value of the global system variable
ndb_optimization_delay, which sets the number of milliseconds to wait between batches of rows being processed by
OPTIMIZE. The default value is 10 milliseconds. It is possible to set a lower value (to a minimum of
0), but not recommended. The maximum is 100000 milliseconds (that is, 100 seconds).
Implicit Rollbacks. Prior to MySQL Cluster NDB 6.2.17 and MySQL Cluster NDB 6.3.19, MySQL Cluster did not automatically roll back a transaction that was aborted by a duplicate key or similar error, and subsequent statements raised ERROR 1296 (HY000): Got error 4350 'Transaction already aborted' from NDBCLUSTER. In such cases, it was necessary to issue an explicit
ROLLBACKstatement first, and then to retry the entire transaction.
Beginning with MySQL Cluster NDB 6.2.17 and MySQL Cluster NDB 6.3.19, this limitation has been removed; now, an error which causes a transaction to be aborted generates an implicit rollback of the entire transaction. This is logged with the warning Storage engine NDB does not support rollback for this statement. Transaction rolled back and must be restarted. A statement subsequent to this starts a new transaction. (Bug #32656)Note
NDBCLUSTERstorage engine does not support partial transactions or partial rollbacks of transactions in any version of MySQL Cluster.
Number of tables. Previously, the maximum number of
NDBCLUSTERtables in a single MySQL Cluster was 1792, but this is no longer the case in MySQL 5.1 and later MySQL Cluster releases. However, the number of tables is still included in the total maximum number of
NDBCLUSTERdatabase objects (20320). (See Section 3.6.5, “Limits Associated with Database Objects in MySQL Cluster”.)
DDL operations. Beginning with MySQL Cluster NDB 6.4.0, DDL operations (such as
ALTER TABLE) are protected from data node failures. Previously, if a data node failed while trying to perform one of these, the data dictionary became locked and no further DDL statements could be executed without restarting the cluster (Bug #36718).
Adding and dropping of data nodes. In MySQL Cluster NDB 6.3 and previous versions of MySQL Cluster, the online adding or dropping of data nodes was not possible; such operations required a complete shutdown and restart of the entire cluster. In MySQL Cluster NDB 7.0 (beginning with MySQL Cluster NDB 6.4.0) and later MySQL Cluster release series, it is possible to add new data nodes to a running MySQL Cluster by performing a rolling restart, so that the cluster and the data stored in it remain available to applications.
When planning to increase the number of data nodes in the cluster online in MySQL Cluster NDB 7.0 or MySQL Cluster NDB 7.1, you should be aware of and take into account the following issues:
New data nodes can be added online to a MySQL Cluster only as part of a new node group.
New data nodes can be added online, but cannot yet be dropped online. Reducing the number of data nodes still requires a system restart of the cluster.
As in previous MySQL Cluster releases, it is not possible to change online either the number of replicas (
NoOfReplicasconfiguration parameter) or the number of data nodes per node group. These changes require a system restart.
Redistribution of existing cluster data using the new data nodes is not automatic; however, this can be accomplished using simple SQL statements in the mysql client or other MySQL client application once the nodes have been added. During this procedure, it is not possible to perform DDL operations, although DML operations can continue as normal.
The distribution of new cluster data (that is, data stored in the cluster after the new nodes have been added) uses the new nodes without manual intervention.
For more information, see Section 7.13, “Adding MySQL Cluster Data Nodes Online”.
Native support for default column values. Starting with MySQL Cluster NDB 7.1.0, default values for table columns are stored by
NDBCLUSTER, rather than by the MySQL server as was previously the case. Because less data must be sent from an SQL node to the data nodes, inserts on tables having column value defaults can be performed more efficiently than before.
Tables created using previous MySQL Cluster releases can still be used in MySQL Cluster 7.1.0 and later, although they do not support native default values and continue to use defaults supplied by the MySQL server until they are upgraded. This can be done by means of an offline
You cannot set or change a table column's default value using an online
InnoDB plugin support. Previously,
InnoDBsupport in MySQL Cluster was limited to the version built in to the MySQl Server. Beginning with MySQL Cluster NDB 7.1.9, MySQL Cluster also provides support for the
InnoDBPlugin. See Chapter 4, MySQL Cluster Installation and Upgrades, for information about enabling
InnoDBstorage engine and plugin support with MySQL Cluster.
Distribution of MySQL users and privileges. Previously, MySQL users and privileges created on one SQL node were unique to that SQL node, due to the fact that the MySQL grant tables were restricted to using the
MyISAMstorage engine. Beginning with MySQL Cluster NDB 7.2.0, it is possible, following installation of the MySQL Cluster software and setup of the desired users and privileges on one SQL node, to convert the grant tables to use
NDBand thus to distribute the users and privileges across all SQL nodes connected to the cluster. You can do this by loading and making use of a set of stored procedures defined in an SQL script supplied with the MySQL Cluster distribution. For more information, see Section 7.14, “Distributed MySQL Privileges for MySQL Cluster”.
Number of rows per partition. Previously, a single MySQL Cluster partition could hold a maximum of 46137488 rows. This limitation was removed in MySQL Cluster NDB 7.0.36 and MySQL Cluster NDB 7.1.25. (Bug #13844405, Bug #14000373)
If you are still using a previous MySQL Cluster release, you can work around this limitation by taking advantage of the fact that the number of partitions is the same as the number of data nodes in the cluster (see Section 3.2, “MySQL Cluster Nodes, Node Groups, Replicas, and Partitions”). This means that, by increasing the number of data nodes, you can increase the available space for storing data.
In MySQL Cluster NDB 7.0 and later, you can increase the number of data nodes in the cluster while the cluster remains in operation. See Section 7.13, “Adding MySQL Cluster Data Nodes Online”, for more information.