Author: jstephens
Date: 2009-02-15 14:10:15 +0100 (Sun, 15 Feb 2009)
New Revision: 13769
Log:
Documented fix for Cluster Bug #42549
Modified:
trunk/dynamic-docs/changelog/mysqld-1.xml
trunk/refman-5.1/mysql-cluster-management.xml
trunk/refman-5.1/sql-syntax-data-definition.xml
Modified: trunk/dynamic-docs/changelog/mysqld-1.xml
===================================================================
--- trunk/dynamic-docs/changelog/mysqld-1.xml 2009-02-15 04:18:11 UTC (rev 13768)
+++ trunk/dynamic-docs/changelog/mysqld-1.xml 2009-02-15 13:10:15 UTC (rev 13769)
Changed blocks: 1, Lines Added: 34, Lines Deleted: 0; 1276 bytes
@@ -9,6 +9,40 @@
<logentry entrytype="bug">
<tags>
+ <highlight type="diskdata"/>
+ <manual type="ALTER ONLINE TABLE"/>
+ <manual type="ADD COLUMN"/>
+ <manual type="REORGANIZE PARTITION"/>
+ <manual type="STORAGE DISK"/>
+ </tags>
+
+ <bugs>
+ <fixes bugid="42549"/>
+ </bugs>
+
+ <versions>
+ <version ver="5.1.31-ndb-6.2.17"/>
+ <version ver="5.1.31-ndb-6.3.23"/>
+ <version ver="5.1.31-ndb-6.4.3"/>
+ </versions>
+
+ <message>
+
+ <para>
+ It was not possible to add an in-memory column online to a table
+ that used a table-level or column-level <literal>STORAGE
+ DISK</literal> option. The same issue prevented <literal>ALTER
+ ONLINE TABLE ... REORGANIZE PARTITION</literal> from working on
+ Disk Data tables.
+ </para>
+
+ </message>
+
+ </logentry>
+
+ <logentry entrytype="bug">
+
+ <tags>
<highlight type="replication"/>
<manual type="binlog"/>
<manual type="STATEMENT mode"/>
Modified: trunk/refman-5.1/mysql-cluster-management.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-management.xml 2009-02-15 04:18:11 UTC (rev 13768)
+++ trunk/refman-5.1/mysql-cluster-management.xml 2009-02-15 13:10:15 UTC (rev 13769)
Changed blocks: 1, Lines Added: 10, Lines Deleted: 0; 993 bytes
@@ -9894,6 +9894,16 @@
</para>
<para>
+ Prior to MySQL Cluster NDB 6.4.3, <literal>ALTER ONLINE
+ TABLE ... REORGANIZE PARTITION</literal> with no
+ <literal><replaceable>partition_names</replaceable> INTO
+ (<replaceable>partition_definitions</replaceable>)</literal>
+ option did not work correctly with Disk Data tables or
+ with in-memory <literal role="se">NDBCLUSTER</literal>
+ tables having one or more disk-based columns. (Bug #42549)
+ </para>
+
+ <para>
For more information, see <xref linkend="alter-table"/>.
</para>
</note>
Modified: trunk/refman-5.1/sql-syntax-data-definition.xml
===================================================================
--- trunk/refman-5.1/sql-syntax-data-definition.xml 2009-02-15 04:18:11 UTC (rev 13768)
+++ trunk/refman-5.1/sql-syntax-data-definition.xml 2009-02-15 13:10:15 UTC (rev 13769)
Changed blocks: 2, Lines Added: 94, Lines Deleted: 0; 4840 bytes
@@ -967,6 +967,90 @@
</para>
<para>
+ Currently you cannot add disk-based columns to
+ <literal role="se">NDBCLUSTER</literal> tables online. This
+ means that, if you wish to add an in-memory column to an
+ <literal role="se">NDBCLUSTER</literal> table that uses a
+ table-level <literal>STORAGE DISK</literal> option, you must
+ declare the new column as using memory-based storage
+ explicitly. For example — assuming that you have already
+ created tablespace <literal>ts1</literal> — suppose that
+ you create table <literal>t1</literal> as follows:
+ </para>
+
+<programlisting>
+mysql> <userinput>CREATE TABLE t1 (</userinput>
+ > <userinput>c1 INT NOT NULL PRIMARY KEY,</userinput>
+ > <userinput>c2 VARCHAR(30)</userinput>
+ > <userinput>)</userinput>
+ > <userinput>TABLESPACE ts1 STORAGE DISK</userinput>
+ > <userinput>ENGINE NDBCLUSTER;</userinput>
+Query OK, 0 rows affected (1.73 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+</programlisting>
+
+ <para>
+ You can add a new in-memory column to this table online as
+ shown here:
+ </para>
+
+<programlisting>
+mysql> <userinput>ALTER ONLINE TABLE t1 ADD COLUMN c3 INT COLUMN_FORMAT DYNAMIC STORAGE MEMORY;</userinput>
+Query OK, 0 rows affected (1.25 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+</programlisting>
+
+ <para>
+ This statement fails if the <literal>STORAGE MEMORY</literal>
+ option is omitted:
+ </para>
+
+<programlisting>
+mysql> <userinput>ALTER ONLINE TABLE t1 ADD COLUMN c3 INT COLUMN_FORMAT DYNAMIC;</userinput>
+<errortext>ERROR 1235 (42000): This version of MySQL doesn't yet support
+'ALTER ONLINE TABLE t1 ADD COLUMN c3 INT COLUMN_FORMAT DYNAMIC'</errortext>
+</programlisting>
+
+ <para>
+ If you omit the <literal>COLUMN_FORMAT DYNAMIC</literal>
+ option, the dynamic column format is employed automatically,
+ but a warning is issued, as shown here:
+ </para>
+
+<programlisting>
+mysql> <userinput>ALTER ONLINE TABLE t1 ADD COLUMN c3 INT STORAGE MEMORY;</userinput>
+Query OK, 0 rows affected, 1 warning (1.17 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+
+mysql> <userinput>SHOW WARNINGS;</userinput>
++---------+------+---------------------------------------------------------------+
+| Level | Code | Message |
++---------+------+---------------------------------------------------------------+
+| Warning | 1478 | Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN |
++---------+------+---------------------------------------------------------------+
+1 row in set (0.00 sec)
+
+mysql> <userinput>SHOW CREATE TABLE t1\G</userinput>
+*************************** 1. row ***************************
+ Table: t1
+Create Table: CREATE TABLE `t1` (
+ `c1` int(11) NOT NULL,
+ `c2` varchar(30) DEFAULT NULL,
+ `c3` int(11) /*!50120 STORAGE MEMORY */ /*!50120 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+ `t4` int(11) /*!50120 STORAGE MEMORY */ DEFAULT NULL,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE ts_1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
+1 row in set (0.03 sec)
+</programlisting>
+
+ <para>
+ Prior to MySQL Cluster NDB 6.2.17, 6.3.23, and 6.4.3, adding
+ in-memory columns to tables that were created using a
+ table-level or column-level <literal>STORAGE DISK</literal>
+ option did not work correctly. (Bug #42549)
+ </para>
+
+ <para>
It is also possible to rename
<literal role="se">MyISAM</literal> tables and columns online.
However, you cannot use <literal>ONLINE</literal> with
@@ -1001,6 +1085,16 @@
</para>
<para>
+ Prior to MySQL Cluster NDB 6.4.3, <literal>ALTER ONLINE TABLE
+ ... REORGANIZE PARTITION</literal> with no
+ <literal><replaceable>partition_names</replaceable> INTO
+ (<replaceable>partition_definitions</replaceable>)</literal>
+ option did not work correctly with Disk Data tables or with
+ in-memory <literal role="se">NDBCLUSTER</literal> tables
+ having one or more disk-based columns. (Bug #42549)
+ </para>
+
+ <para>
The <literal>ONLINE</literal> and <literal>OFFLINE</literal>
keywords are supported only in MySQL Cluster NDB 6.2, 6.3, and
6.4 (beginning with versions 6.2.5, 6.3.3, and 6.4.0) and
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r13769 - in trunk: dynamic-docs/changelog refman-5.1 | jon.stephens | 15 Feb |