From: Date: November 14 2008 9:19pm
Subject: svn commit - mysqldoc@docsrva: r12486 - in trunk: refman-5.1 refman-6.0
List-Archive: http://lists.mysql.com/commits/58843
Message-Id: <200811142019.mAEKJCR2011825@docsrva.mysql.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jstephens
Date: 2008-11-14 21:19:11 +0100 (Fri, 14 Nov 2008)
New Revision: 12486
Log:
Clarify that online alter operations cause the table to be locked on the
same API node, but not from other API nodes.
Fixes Docs Bug #40452 (Thanks, Hartmut!)
Modified:
trunk/refman-5.1/mysql-cluster-roadmap.xml
trunk/refman-5.1/sql-syntax-data-definition.xml
trunk/refman-6.0/sql-syntax-data-definition.xml
Modified: trunk/refman-5.1/mysql-cluster-roadmap.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-roadmap.xml 2008-11-14 19:22:52 UTC (rev 12485)
+++ trunk/refman-5.1/mysql-cluster-roadmap.xml 2008-11-14 20:19:11 UTC (rev 12486)
Changed blocks: 1, Lines Added: 10, Lines Deleted: 1; 1020 bytes
@@ -779,8 +779,17 @@
- Tables being altered online are not locked.
+ Tables being altered online are not locked against
+ access by other SQL nodes.
+
+
+ However, such tables are locked against other
+ operations on the same SQL node
+ for the duration of the ALTER
+ TABLE. We are working to overcome this
+ limitation in a future MySQL Cluster release.
+
Modified: trunk/refman-5.1/sql-syntax-data-definition.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-data-definition.xml 2008-11-14 19:22:52 UTC (rev 12485)
+++ trunk/refman-5.1/sql-syntax-data-definition.xml 2008-11-14 20:19:11 UTC (rev 12486)
Changed blocks: 7, Lines Added: 59, Lines Deleted: 35; 8739 bytes
@@ -895,25 +895,29 @@
The ONLINE keyword can be used to perform
online ADD COLUMN, ADD
- INDEX, and DROP INDEX
+ INDEX (including CREATE INDEX
+ statements), and DROP INDEX
operations on NDB tables beginning with
MySQL Cluster NDB 6.2.5 and MySQL Cluster NDB 6.3.3, as well
as online renaming of tables and columns. Online renaming
operations (but not online adding or dropping of columns or
indexes) are also supported for MyISAM
tables. Online operations are non-copying; that is, they do
- not require that indexes be re-created, and they do not lock
- the table being changed. Such operations do not require single
- user mode for NDB table alterations made in
- a cluster with multiple API nodes; transactions can continue
+ not require that indexes be re-created. They do not lock the
+ table being altered from access my other API nodes in a MySQL
+ Cluster (but see Limitations later in
+ this section). Such operations do not require single user mode
+ for NDB table alterations made in a cluster
+ with multiple API nodes; transactions can continue
uninterrupted during online DDL operations.
The ONLINE and OFFLINE
keywords are supported only in MySQL Cluster NDB 6.2 and 6.3
- (beginning with versions 6.2.5 and 6.3.3). In other versions
- of MySQL (5.1.17 and later):
+ (beginning with versions 6.2.5 and 6.3.3) and later MySQL
+ Cluster NDB 6.x release series. In other versions of MySQL
+ (5.1.17 and later):
@@ -953,6 +957,20 @@
+ The table being altered is not locked with respect to
+ API nodes other than the one on which an online
+ ALTER TABLE,
+ ADD COLUMN, CREATE
+ INDEX or DROP INDEX
+ statement is run. However, the table is locked against
+ any other operations originating on the
+ same API node while the online
+ operation is being executed.
+
+
+
+
+
The table to be altered must have an explicit primary
key; the hidden primary key created by the
NDB storage engine is not
@@ -1028,8 +1046,8 @@
- These limitations do not apply to operations that
- merely rename tables or columns.
+ The preceding limitations do not apply to operations
+ that merely rename tables or columns.
@@ -3501,10 +3519,13 @@
Beginning with MySQL 5.1.7, indexes on variable-width columns are
created online; that is, creating the indexes does not require any
- copying or locking of the table. This is done automatically by the
- server whenever it determines that it is possible to do so; you do
- not have to use any special SQL syntax or server options to cause
- it to happen.
+ copying of the table. For NDBCLUSTER tables,
+ the table is not locked against access from other MySQL Cluster
+ API nodes, although it is locked against other operations on the
+ same API node for the duration of the online
+ operation. This is done automatically by the server whenever it
+ determines that it is possible to do so; you do not have to use
+ any special SQL syntax or server options to cause it to happen.
@@ -3512,15 +3533,15 @@
override the server when it determines that an index is to be
created online. In MySQL Cluster, beginning with MySQL Cluster NDB
6.2.5 and MySQL Cluster NDB 6.3.3, you can create indexes offline
- (which causes the table to be locked) using the
- OFFLINE keyword. The rules and limitations
- governing online CREATE OFFLINE INDEX and
- CREATE ONLINE INDEX are the same as for
- ALTER OFFLINE TABLE ... ADD INDEX and
- ALTER ONLINE TABLE ... ADD INDEX. You cannot
- cause the online creation of an index that would normally be
- created offline by using the ONLINE keyword (if
- it is not possible to perform the CREATE
+ (which causes the table to be locked to all API nodes in the
+ cluster) using the OFFLINE keyword. The rules
+ and limitations governing online CREATE OFFLINE
+ INDEX and CREATE ONLINE INDEX are the
+ same as for ALTER OFFLINE TABLE ... ADD INDEX
+ and ALTER ONLINE TABLE ... ADD INDEX. You
+ cannot cause the online creation of an index that would normally
+ be created offline by using the ONLINE keyword
+ (if it is not possible to perform the CREATE
INDEX operation online, then the
ONLINE keyword is ignored). For more
information, see .
@@ -8609,10 +8630,13 @@
Beginning with MySQL 5.1.7, indexes on variable-width columns are
dropped online; that is, dropping the indexes does not require any
- copying or locking of the table. This is done automatically by the
- server whenever it determines that it is possible to do so; you do
- not have to use any special SQL syntax or server options to cause
- it to happen.
+ copying of the table. For NDBCLUSTER tables,
+ the table is not locked against access from other MySQL Cluster
+ API nodes, although it is locked against other operations on the
+ same API node for the duration of the online
+ operation. This is done automatically by the server whenever it
+ determines that it is possible to do so; you do not have to use
+ any special SQL syntax or server options to cause it to happen.
@@ -8620,15 +8644,15 @@
override the server when it determines that an index is to be
dropped online. In MySQL Cluster, beginning with MySQL Cluster NDB
6.2.5 and MySQL Cluster NDB 6.3.3, you can drop indexes offline
- (which causes the table to be locked) using the
- OFFLINE keyword. The rules and limitations
- governing online DROP OFFLINE INDEX and
- DROP ONLINE INDEX are the same as for
- ALTER OFFLINE TABLE ... DROP INDEX and
- ALTER ONLINE TABLE ... DROP INDEX. You cannot
- cause the online dropping of an index that would normally be
- dropped offline by using the ONLINE keyword (if
- it is not possible to perform the DROP
+ (which causes the table to be locked for all API nodes in the
+ cluster) using the OFFLINE keyword. The rules
+ and limitations governing online DROP OFFLINE
+ INDEX and DROP ONLINE INDEX are the
+ same as for ALTER OFFLINE TABLE ... DROP INDEX
+ and ALTER ONLINE TABLE ... DROP INDEX. You
+ cannot cause the online dropping of an index that would normally
+ be dropped offline by using the ONLINE keyword
+ (if it is not possible to perform the DROP
operation online, then the ONLINE keyword is
ignored). For more information, see .
Modified: trunk/refman-6.0/sql-syntax-data-definition.xml
===================================================================
--- trunk/refman-6.0/sql-syntax-data-definition.xml 2008-11-14 19:22:52 UTC (rev 12485)
+++ trunk/refman-6.0/sql-syntax-data-definition.xml 2008-11-14 20:19:11 UTC (rev 12486)
Changed blocks: 2, Lines Added: 8, Lines Deleted: 8; 1639 bytes
@@ -2864,10 +2864,10 @@
Indexes on variable-width columns are created online; that is,
- creating the indexes does not require any copying or locking of
- the table. This is done automatically by the server whenever it
- determines that it is possible to do so; you do not have to use
- any special SQL syntax or server options to cause it to happen.
+ creating the indexes does not require any copying. This is done
+ automatically by the server whenever it determines that it is
+ possible to do so; you do not have to use any special SQL syntax
+ or server options to cause it to happen.
@@ -7485,10 +7485,10 @@
Indexes on variable-width columns are dropped online; that is,
- dropping the indexes does not require any copying or locking of
- the table. This is done automatically by the server whenever it
- determines that it is possible to do so; you do not have to use
- any special SQL syntax or server options to cause it to happen.
+ dropping the indexes does not require any copying of the table.
+ This is done automatically by the server whenever it determines
+ that it is possible to do so; you do not have to use any special
+ SQL syntax or server options to cause it to happen.