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 @@
<listitem>
<para>
- Tables being altered online are not locked.
+ Tables being altered online are not locked against
+ access by other SQL nodes.
</para>
+
+ <para>
+ However, such tables are locked against other
+ operations on the <emphasis>same</emphasis> SQL node
+ for the duration of the <literal role="stmt">ALTER
+ TABLE</literal>. We are working to overcome this
+ limitation in a future MySQL Cluster release.
+ </para>
</listitem>
</itemizedlist>
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 @@
<para>
The <literal>ONLINE</literal> keyword can be used to perform
online <literal>ADD COLUMN</literal>, <literal>ADD
- INDEX</literal>, and <literal role="stmt">DROP INDEX</literal>
+ INDEX</literal> (including <literal>CREATE INDEX</literal>
+ statements), and <literal role="stmt">DROP INDEX</literal>
operations on <literal>NDB</literal> 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 <literal>MyISAM</literal>
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 <literal>NDB</literal> 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 <citetitle>Limitations</citetitle> later in
+ this section). Such operations do not require single user mode
+ for <literal>NDB</literal> table alterations made in a cluster
+ with multiple API nodes; transactions can continue
uninterrupted during online DDL operations.
</para>
<para>
The <literal>ONLINE</literal> and <literal>OFFLINE</literal>
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):
<orderedlist>
@@ -953,6 +957,20 @@
<listitem>
<para>
+ The table being altered is not locked with respect to
+ API nodes other than the one on which an online
+ <literal role="stmt">ALTER TABLE</literal>,
+ <literal>ADD COLUMN</literal>, <literal>CREATE
+ INDEX</literal> or <literal>DROP INDEX</literal>
+ statement is run. However, the table is locked against
+ any other operations originating on the
+ <emphasis>same</emphasis> API node while the online
+ operation is being executed.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
The table to be altered must have an explicit primary
key; the hidden primary key created by the
<literal>NDB</literal> storage engine is not
@@ -1028,8 +1046,8 @@
</itemizedlist>
<para>
- 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.
</para>
<para>
@@ -3501,10 +3519,13 @@
<para>
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 <literal>NDBCLUSTER</literal> tables,
+ the table is not locked against access from other MySQL Cluster
+ API nodes, although it is locked against other operations on the
+ <emphasis>same</emphasis> 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.
</para>
<para>
@@ -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
- <literal>OFFLINE</literal> keyword. The rules and limitations
- governing online <literal>CREATE OFFLINE INDEX</literal> and
- <literal>CREATE ONLINE INDEX</literal> are the same as for
- <literal>ALTER OFFLINE TABLE ... ADD INDEX</literal> and
- <literal>ALTER ONLINE TABLE ... ADD INDEX</literal>. You cannot
- cause the online creation of an index that would normally be
- created offline by using the <literal>ONLINE</literal> keyword (if
- it is not possible to perform the <literal role="stmt">CREATE
+ (which causes the table to be locked to all API nodes in the
+ cluster) using the <literal>OFFLINE</literal> keyword. The rules
+ and limitations governing online <literal>CREATE OFFLINE
+ INDEX</literal> and <literal>CREATE ONLINE INDEX</literal> are the
+ same as for <literal>ALTER OFFLINE TABLE ... ADD INDEX</literal>
+ and <literal>ALTER ONLINE TABLE ... ADD INDEX</literal>. You
+ cannot cause the online creation of an index that would normally
+ be created offline by using the <literal>ONLINE</literal> keyword
+ (if it is not possible to perform the <literal role="stmt">CREATE
INDEX</literal> operation online, then the
<literal>ONLINE</literal> keyword is ignored). For more
information, see <xref linkend="alter-table"/>.
@@ -8609,10 +8630,13 @@
<para>
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 <literal>NDBCLUSTER</literal> tables,
+ the table is not locked against access from other MySQL Cluster
+ API nodes, although it is locked against other operations on the
+ <emphasis>same</emphasis> 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.
</para>
<para>
@@ -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
- <literal>OFFLINE</literal> keyword. The rules and limitations
- governing online <literal>DROP OFFLINE INDEX</literal> and
- <literal>DROP ONLINE INDEX</literal> are the same as for
- <literal>ALTER OFFLINE TABLE ... DROP INDEX</literal> and
- <literal>ALTER ONLINE TABLE ... DROP INDEX</literal>. You cannot
- cause the online dropping of an index that would normally be
- dropped offline by using the <literal>ONLINE</literal> keyword (if
- it is not possible to perform the <literal>DROP</literal>
+ (which causes the table to be locked for all API nodes in the
+ cluster) using the <literal>OFFLINE</literal> keyword. The rules
+ and limitations governing online <literal>DROP OFFLINE
+ INDEX</literal> and <literal>DROP ONLINE INDEX</literal> are the
+ same as for <literal>ALTER OFFLINE TABLE ... DROP INDEX</literal>
+ and <literal>ALTER ONLINE TABLE ... DROP INDEX</literal>. You
+ cannot cause the online dropping of an index that would normally
+ be dropped offline by using the <literal>ONLINE</literal> keyword
+ (if it is not possible to perform the <literal>DROP</literal>
operation online, then the <literal>ONLINE</literal> keyword is
ignored). For more information, see <xref linkend="alter-table"/>.
</para>
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 @@
<para>
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.
</para>
<para>
@@ -7485,10 +7485,10 @@
<para>
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.
</para>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r12486 - in trunk: refman-5.1 refman-6.0 | jon | 14 Nov |