List:Commits« Previous MessageNext Message »
From:paul Date:April 6 2006 7:40pm
Subject:svn commit - mysqldoc@docsrva: r1742 - in trunk: . refman-5.1
View as plain text  
Author: paul
Date: 2006-04-06 21:40:26 +0200 (Thu, 06 Apr 2006)
New Revision: 1742

Log:
 r4329@kite-hub:  paul | 2006-04-06 11:35:38 -0500
 Extend list of ALTER TABLE ops that don't need a temp table.


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


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:9272
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4318
   + b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:9272
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4329

Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml	2006-04-06 13:45:55 UTC (rev 1741)
+++ trunk/refman-5.1/sql-syntax.xml	2006-04-06 19:40:26 UTC (rev 1742)
@@ -261,24 +261,50 @@
       </para>
 
       <para>
-        If you use <literal>ALTER TABLE
-        <replaceable>tbl_name</replaceable> RENAME TO
-        <replaceable>new_tbl_name</replaceable></literal> without any
-        other options, MySQL simply renames any files that correspond to
-        the table <replaceable>tbl_name</replaceable>. There is no need
-        to create a temporary table. (You can also use the
-        <literal>RENAME TABLE</literal> statement to rename tables. See
-        <xref linkend="rename-table"/>.)
+        In some cases, no temporary table is necessary:
       </para>
 
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            If you use <literal>ALTER TABLE
+            <replaceable>tbl_name</replaceable> RENAME TO
+            <replaceable>new_tbl_name</replaceable></literal> without
+            any other options, MySQL simply renames any files that
+            correspond to the table <replaceable>tbl_name</replaceable>.
+            (You can also use the <literal>RENAME TABLE</literal>
+            statement to rename tables. See
+            <xref linkend="rename-table"/>.)
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            <literal>ALTER TABLE ... ADD PARTITION</literal> creates no
+            temporary table except for MySQL Cluster.
+            <literal>ADD</literal> or <literal>DROP</literal> operations
+            for <literal>RANGE</literal> or <literal>LIST</literal>
+            partitions are immediate operations or nearly so.
+            <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.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
       <para>
-        If you use any option to <literal>ALTER TABLE</literal> other
-        than <literal>RENAME</literal>, MySQL always creates a temporary
-        table, even if the data wouldn't strictly need to be copied
-        (such as when you change the name of a column). For
-        <literal>MyISAM</literal> tables, you can speed up the index
-        re-creation operation (which is the slowest part of the
-        alteration process) by setting the
+        If other cases, MySQL creates a temporary table, even if the
+        data wouldn't strictly need to be copied (such as when you
+        change the name of a column). For <literal>MyISAM</literal>
+        tables, you can speed up the index re-creation operation (which
+        is the slowest part of the alteration process) by setting the
         <literal>myisam_sort_buffer_size</literal> system variable to a
         high value.
       </para>

Thread
svn commit - mysqldoc@docsrva: r1742 - in trunk: . refman-5.1paul6 Apr