List:Commits« Previous MessageNext Message »
From:jon Date:November 11 2007 5:59pm
Subject:svn commit - mysqldoc@docsrva: r8654 - in trunk: refman-5.1 refman-6.0
View as plain text  
Author: jstephens
Date: 2007-11-11 18:59:23 +0100 (Sun, 11 Nov 2007)
New Revision: 8654

Log:

Only one clause changing a table's partitioning can be used in a single
ALTER TABLE statement

Fixes Docs Bug #32154



Modified:
   trunk/refman-5.1/partitioning.xml
   trunk/refman-5.1/sql-syntax.xml
   trunk/refman-6.0/partitioning.xml
   trunk/refman-6.0/sql-syntax.xml


Modified: trunk/refman-5.1/partitioning.xml
===================================================================
--- trunk/refman-5.1/partitioning.xml	2007-11-11 13:38:42 UTC (rev 8653)
+++ trunk/refman-5.1/partitioning.xml	2007-11-11 17:59:23 UTC (rev 8654)
Changed blocks: 1, Lines Added: 19, Lines Deleted: 7; 2029 bytes

@@ -2725,15 +2725,27 @@
       PARTITION BY KEY(id) PARTITIONS 2;</literal>.
     </para>
 
+    <para>
+      In MySQL 5.1.7 and earlier MySQL 5.1 releases, <literal>ALTER
+      TABLE ... ENGINE = ...</literal> removed all partitioning from the
+      affected table. Beginning with MySQL 5.1.8, this statement changes
+      only the storage engine used by the table, and leaves the table's
+      partitioning scheme intact. As of MySQL 5.1.8, use <literal>ALTER
+      TABLE ... REMOVE PARTITIONING</literal> to remove a table's
+      partitioning. See <xref linkend="alter-table"/>.
+    </para>
+
     <important>
       <para>
-        In MySQL 5.1.7 and earlier MySQL 5.1 releases, <literal>ALTER
-        TABLE ... ENGINE = ...</literal> removed all partitioning from
-        the affected table. Beginning with MySQL 5.1.8, this statement
-        changes only the storage engine used by the table, and leaves
-        the table's partitioning scheme intact. As of MySQL 5.1.8, use
-        <literal>ALTER TABLE ... REMOVE PARTITIONING</literal> to remove
-        a table's partitioning. See <xref linkend="alter-table"/>.
+        Only a single <literal>PARTITION BY</literal>, <literal>ADD
+        PARTITION</literal>, <literal>DROP PARTITION</literal>,
+        <literal>REORGANIZE PARTITION</literal>, or <literal>COALESCE
+        PARTITION</literal> clause can be used in a given <literal>ALTER
+        TABLE</literal> statement. If you (for example) wish to drop a
+        partition and reorganize a table&apos;s remaining partitions,
+        you must do so in two separate <literal>ALTER TABLE</literal>
+        statements (one using <literal>DROP PARTITION</literal> and then
+        a second one using <literal>REORGANIZE PARITITIONS</literal>).
       </para>
     </important>
 


Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml	2007-11-11 13:38:42 UTC (rev 8653)
+++ trunk/refman-5.1/sql-syntax.xml	2007-11-11 17:59:23 UTC (rev 8654)
Changed blocks: 3, Lines Added: 26, Lines Deleted: 12; 2723 bytes

@@ -575,11 +575,12 @@
             <literal>ADD</literal> or <literal>COALESCE</literal>
             operations for <literal>HASH</literal> or
             <literal>KEY</literal> partitions copy data between changed
-            partitions; unless <literal>LINEAR HASH/KEY</literal> was
-            used, this is much the same as creating a new table
-            (although the operation is done partition by partition).
-            <literal>REORGANIZE</literal> operations copy only changed
-            partitions and do not touch unchanged ones.
+            partitions; unless <literal>LINEAR HASH</literal> or
+            <literal>LINEAR KEY</literal> was used, this is much the
+            same as creating a new table (although the operation is done
+            partition by partition). <literal>REORGANIZE</literal>
+            operations copy only changed partitions and do not touch
+            unchanged ones.
           </para>
         </listitem>
 

@@ -1594,13 +1595,15 @@
 ALTER TABLE t1 DROP PARTITION p0, p1;
 </programlisting>
 
-          <para>
-            Note that <literal>DROP PARTITION</literal> does not work
-            with tables that use the <literal>NDB Cluster</literal>
-            storage engine. See
-            <xref linkend="partitioning-management-range-list"/>, and
-            <xref linkend="mysql-cluster-limitations"/>.
-          </para>
+          <note>
+            <para>
+              <literal>DROP PARTITION</literal> does not work with
+              tables that use the <literal>NDB Cluster</literal> storage
+              engine. See
+              <xref linkend="partitioning-management-range-list"/>, and
+              <xref linkend="mysql-cluster-limitations"/>.
+            </para>
+          </note>
 
           <para>
             <literal>ADD PARTITION</literal> and <literal>DROP

@@ -1704,6 +1707,17 @@
             <literal>ALTER TABLE ... REORGANIZE PARTITION</literal>
             statements, see <xref linkend="partitioning-management"/>.
           </para>
+
+          <important>
+            <para>
+              Only a single <literal>PARTITION BY</literal>,
+              <literal>ADD PARTITION</literal>, <literal>DROP
+              PARTITION</literal>, <literal>REORGANIZE
+              PARTITION</literal>, or <literal>COALESCE
+              PARTITION</literal> clause can be used in a given
+              <literal>ALTER TABLE</literal> statement.
+            </para>
+          </important>
         </listitem>
 
         <listitem>


Modified: trunk/refman-6.0/partitioning.xml
===================================================================
--- trunk/refman-6.0/partitioning.xml	2007-11-11 13:38:42 UTC (rev 8653)
+++ trunk/refman-6.0/partitioning.xml	2007-11-11 17:59:23 UTC (rev 8654)
Changed blocks: 1, Lines Added: 17, Lines Deleted: 5; 1683 bytes

@@ -2647,13 +2647,25 @@
       PARTITION BY KEY(id) PARTITIONS 2;</literal>.
     </para>
 
+    <para>
+      <literal>ALTER TABLE ... ENGINE = ...</literal> changes only the
+      storage engine used by the table, and leaves the table's
+      partitioning scheme intact. Use <literal>ALTER TABLE ... REMOVE
+      PARTITIONING</literal> to remove a table's partitioning. See
+      <xref linkend="alter-table"/>.
+    </para>
+
     <important>
       <para>
-        <literal>ALTER TABLE ... ENGINE = ...</literal> changes only the
-        storage engine used by the table, and leaves the table's
-        partitioning scheme intact. Use <literal>ALTER TABLE ... REMOVE
-        PARTITIONING</literal> to remove a table's partitioning. See
-        <xref linkend="alter-table"/>.
+        Only a single <literal>PARTITION BY</literal>, <literal>ADD
+        PARTITION</literal>, <literal>DROP PARTITION</literal>,
+        <literal>REORGANIZE PARTITION</literal>, or <literal>COALESCE
+        PARTITION</literal> clause can be used in a given <literal>ALTER
+        TABLE</literal> statement. If you (for example) wish to drop a
+        partition and reorganize a table&apos;s remaining partitions,
+        you must do so in two separate <literal>ALTER TABLE</literal>
+        statements (one using <literal>DROP PARTITION</literal> and then
+        a second one using <literal>REORGANIZE PARITITIONS</literal>).
       </para>
     </important>
 


Modified: trunk/refman-6.0/sql-syntax.xml
===================================================================
--- trunk/refman-6.0/sql-syntax.xml	2007-11-11 13:38:42 UTC (rev 8653)
+++ trunk/refman-6.0/sql-syntax.xml	2007-11-11 17:59:23 UTC (rev 8654)
Changed blocks: 4, Lines Added: 27, Lines Deleted: 21; 3638 bytes

@@ -574,11 +574,12 @@
             <literal>ADD</literal> or <literal>COALESCE</literal>
             operations for <literal>HASH</literal> or
             <literal>KEY</literal> partitions copy data between changed
-            partitions; unless <literal>LINEAR HASH/KEY</literal> was
-            used, this is much the same as creating a new table
-            (although the operation is done partition by partition).
-            <literal>REORGANIZE</literal> operations copy only changed
-            partitions and do not touch unchanged ones.
+            partitions; unless <literal>LINEAR HASH</literal> or
+            <literal>LINEAR KEY</literal> was used, this is much the
+            same as creating a new table (although the operation is done
+            partition by partition). <literal>REORGANIZE</literal>
+            operations copy only changed partitions and do not touch
+            unchanged ones.
           </para>
         </listitem>
 

@@ -610,21 +611,13 @@
         </listitem>
 
         <listitem>
-          <remark role="TODO">
-            [js] Uncomment reference to Falcon when Falcon is merged
-            into mainline tree.
-          </remark>
-
           <para>
             The <literal>ONLINE</literal> keyword can be used to perform
             online <literal>ADD COLUMN</literal>, <literal>ADD
             INDEX</literal>, and <literal>DROP INDEX</literal>
             operations on <literal>NDB</literal> tables. Online adding
             and dropping of indexes is also supported for
-            <literal>MyISAM</literal>
-
-<!--and <literal>Falcon</literal>-->
-
+            <literal>MyISAM</literal> and <literal>Falcon</literal>
             tables. Online operations are non-copying; that is, they do
             not require that indexes be re-created. Such operations do
             not require single user mode for <literal>NDB</literal>

@@ -1569,13 +1562,15 @@
 ALTER TABLE t1 DROP PARTITION p0, p1;
 </programlisting>
 
-          <para>
-            Note that <literal>DROP PARTITION</literal> does not work
-            with tables that use the <literal>NDB Cluster</literal>
-            storage engine. See
-            <xref linkend="partitioning-management-range-list"/>, and
-            <xref linkend="mysql-cluster-limitations"/>.
-          </para>
+          <note>
+            <para>
+              <literal>DROP PARTITION</literal> does not work with
+              tables that use the <literal>NDB Cluster</literal> storage
+              engine. See
+              <xref linkend="partitioning-management-range-list"/>, and
+              <xref linkend="mysql-cluster-limitations"/>.
+            </para>
+          </note>
 
           <para>
             <literal>ADD PARTITION</literal> and <literal>DROP

@@ -1679,6 +1674,17 @@
             <literal>ALTER TABLE ... REORGANIZE PARTITION</literal>
             statements, see <xref linkend="partitioning-management"/>.
           </para>
+
+          <important>
+            <para>
+              Only a single <literal>PARTITION BY</literal>,
+              <literal>ADD PARTITION</literal>, <literal>DROP
+              PARTITION</literal>, <literal>REORGANIZE
+              PARTITION</literal>, or <literal>COALESCE
+              PARTITION</literal> clause can be used in a given
+              <literal>ALTER TABLE</literal> statement.
+            </para>
+          </important>
         </listitem>
 
         <listitem>


Thread
svn commit - mysqldoc@docsrva: r8654 - in trunk: refman-5.1 refman-6.0jon11 Nov