MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jon.stephens Date:September 20 2010 4:36pm
Subject:svn commit - mysqldoc@docsrva: r22781 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2010-09-20 18:36:14 +0200 (Mon, 20 Sep 2010)
New Revision: 22781

Log:

De-gunk ClusterRep conflict resolution section



Modified:
   trunk/refman-5.1/mysql-cluster-replication-core.xml


Modified: trunk/refman-5.1/mysql-cluster-replication-core.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-replication-core.xml	2010-09-20 15:56:47 UTC (rev 22780)
+++ trunk/refman-5.1/mysql-cluster-replication-core.xml	2010-09-20 16:36:14 UTC (rev 22781)
Changed blocks: 12, Lines Added: 445, Lines Deleted: 453; 41969 bytes

@@ -3257,58 +3257,58 @@
       <para>
         Preparations for conflict resolution must be made on both the
         master and the slave:
+      </para>
 
-        <itemizedlist>
+    </formalpara>
 
-          <listitem>
-            <para>
-              On the master writing the binlogs, you must determine
-              which columns are sent (all columns or only those that
-              have been updated). This is done for the MySQL Server as a
-              whole by applying the <command>mysqld</command> startup
-              option <option>-–ndb-log-updated-only</option>
-              (described later in this section) or on a per-table basis
-              by entries in the <literal>mysql.ndb_replication</literal>
-              table.
-            </para>
+    <itemizedlist>
 
-            <note>
-              <para>
-                If you are replicating tables with very large columns
-                (such as <literal role="type">TEXT</literal> or
-                <literal role="type">BLOB</literal> columns),
-                <option>-–ndb-log-updated-only</option> can also be
-                useful for reducing the size of the master and slave
-                binary logs and avoiding possible replication failures
-                due to exceeding
-                <literal role="sysvar">max_allowed_packet</literal>.
-              </para>
+      <listitem>
+        <para>
+          On the master writing the binlogs, you must determine which
+          columns are sent (all columns or only those that have been
+          updated). This is done for the MySQL Server as a whole by
+          applying the <command>mysqld</command> startup option
+          <option>-–ndb-log-updated-only</option> (described later in
+          this section) or on a per-table basis by entries in the
+          <literal>mysql.ndb_replication</literal> table.
+        </para>
 
-              <para>
-                See
-                <xref linkend="replication-features-max-allowed-packet"/>,
-                for more information about this issue.
-              </para>
-            </note>
-          </listitem>
+        <note>
+          <para>
+            If you are replicating tables with very large columns (such
+            as <literal role="type">TEXT</literal> or
+            <literal role="type">BLOB</literal> columns),
+            <option>-–ndb-log-updated-only</option> can also be useful
+            for reducing the size of the master and slave binary logs
+            and avoiding possible replication failures due to exceeding
+            <literal role="sysvar">max_allowed_packet</literal>.
+          </para>
 
-          <listitem>
-            <para>
-              On the slave, you must determine which type of conflict
-              resolution to apply (<quote>latest timestamp wins</quote>,
-              <quote>same timestamp wins</quote>, or none). This is done
-              using the <literal>mysql.ndb_replication</literal> system
-              table, on a per-table basis.
-            </para>
-          </listitem>
+          <para>
+            See
+            <xref linkend="replication-features-max-allowed-packet"/>,
+            for more information about this issue.
+          </para>
+        </note>
+      </listitem>
 
-        </itemizedlist>
+      <listitem>
+        <para>
+          On the slave, you must determine which type of conflict
+          resolution to apply (<quote>latest timestamp wins</quote>,
+          <quote>same timestamp wins</quote>, or none). This is done
+          using the <literal>mysql.ndb_replication</literal> system
+          table, on a per-table basis.
+        </para>
+      </listitem>
 
-        If only some but not all columns are sent, then the master and
-        slave can diverge.
-      </para>
+    </itemizedlist>
 
-    </formalpara>
+    <para>
+      If only some but not all columns are sent, then the master and
+      slave can diverge.
+    </para>
 
     <note>
       <para>

@@ -3344,21 +3344,21 @@
         <option role="mysqld">--ndb-log-update-as-write</option> option
         for <command>mysqld</command>, as described later in this
         section.
-
-        <important>
-          <para>
-            Whether logging of complete rows or of updated columns only
-            is done is decided when the MySQL server is started, and
-            cannot be changed online; you must either restart
-            <command>mysqld</command>, or start a new
-            <command>mysqld</command> instance with different logging
-            options.
-          </para>
-        </important>
       </para>
 
     </formalpara>
 
+    <important>
+      <para>
+        Whether logging of complete rows or of updated columns only is
+        done is decided when the MySQL server is started, and cannot be
+        changed online; you must either restart
+        <command>mysqld</command>, or start a new
+        <command>mysqld</command> instance with different logging
+        options.
+      </para>
+    </important>
+
     <indexterm>
       <primary>conflict resolution</primary>
       <secondary>mysqld startup options</secondary>

@@ -3477,7 +3477,10 @@
         (that is, which conflict resolution function, if any, to use)
         for that table. The definition of the
         <literal>mysql.ndb_replication</literal> table is shown here:
+      </para>
 
+    </formalpara>
+
 <programlisting>
 CREATE TABLE mysql.ndb_replication  (
     db VARBINARY(63),

@@ -3490,155 +3493,157 @@
 PARTITION BY KEY(db,table_name);
 </programlisting>
 
-        The columns in this table are described in the following list:
+    <para>
+      The columns in this table are described in the following list:
+    </para>
 
-        <itemizedlist>
+    <itemizedlist>
 
-          <listitem>
-            <formalpara>
+      <listitem>
+        <formalpara>
 
-              <title><literal>db</literal></title>
+          <title><literal>db</literal></title>
 
-              <para>
-                The name of the database containing the table to be
-                replicated.
-              </para>
+          <para>
+            The name of the database containing the table to be
+            replicated.
+          </para>
 
-            </formalpara>
-          </listitem>
+        </formalpara>
+      </listitem>
 
-          <listitem>
-            <formalpara>
+      <listitem>
+        <formalpara>
 
-              <title><literal>table_name</literal></title>
+          <title><literal>table_name</literal></title>
 
-              <para>
-                The name of the table to be replicated.
-              </para>
+          <para>
+            The name of the table to be replicated.
+          </para>
 
-            </formalpara>
-          </listitem>
+        </formalpara>
+      </listitem>
 
-          <listitem>
-            <formalpara>
+      <listitem>
+        <formalpara>
 
-              <title><literal role="sysvar">server_id</literal></title>
+          <title><literal role="sysvar">server_id</literal></title>
 
-              <para>
-                The unique server ID of the MySQL instance (SQL node)
-                where the table resides.
-              </para>
+          <para>
+            The unique server ID of the MySQL instance (SQL node) where
+            the table resides.
+          </para>
 
-            </formalpara>
-          </listitem>
+        </formalpara>
+      </listitem>
 
-          <listitem>
-            <formalpara>
+      <listitem>
+        <formalpara>
 
-              <title><literal>binlog_type</literal></title>
+          <title><literal>binlog_type</literal></title>
 
-              <para>
-                The type of binary logging to be employed. This is
-                determined as shown in the following table:
+          <para>
+            The type of binary logging to be employed. This is
+            determined as shown in the following table:
+          </para>
 
-                <informaltable>
-                  <tgroup cols="3">
-                    <colspec colwidth="15*"/>
-                    <colspec colwidth="30*"/>
-                    <colspec colwidth="55*"/>
-                    <thead>
-                      <row>
-                        <entry>Value</entry>
-                        <entry>Internal Value</entry>
-                        <entry>Description</entry>
-                      </row>
-                    </thead>
-                    <tbody>
-                      <row>
-                        <entry>0</entry>
-                        <entry><literal>NBT_DEFAULT</literal></entry>
-                        <entry>Use server default</entry>
-                      </row>
-                      <row>
-                        <entry>1</entry>
-                        <entry><literal>NBT_NO_LOGGING</literal></entry>
-                        <entry>Do not log this table in the binary log</entry>
-                      </row>
-                      <row>
-                        <entry>2</entry>
-                        <entry><literal>NBT_UPDATED_ONLY</literal></entry>
-                        <entry>Only updated attributes are logged</entry>
-                      </row>
-                      <row>
-                        <entry>3</entry>
-                        <entry><literal>NBT_FULL</literal></entry>
-                        <entry>Log full row, even if not updated (MySQL server default behavior)</entry>
-                      </row>
-                      <row>
-                        <entry>4</entry>
-                        <entry><literal>NBT_USE_UPDATE</literal></entry>
-                        <entry>(For generating <literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> and
-                          <literal>NBT_FULL_USE_UPDATE</literal> values
-                          only&mdash;not intended for separate use)</entry>
-                      </row>
-                      <row>
-                        <entry>5</entry>
-                        <entry>[<emphasis>Not used</emphasis>]</entry>
-                        <entry>---</entry>
-                      </row>
-                      <row>
-                        <entry>6</entry>
-                        <entry><literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> (equal to
-                          <literal>NBT_UPDATED_ONLY |
-                          NBT_USE_UPDATE</literal>)</entry>
-                        <entry>Use updated attributes, even if values are unchanged</entry>
-                      </row>
-                      <row>
-                        <entry>7</entry>
-                        <entry><literal>NBT_FULL_USE_UPDATE</literal> (equal to <literal>NBT_FULL |
-                          NBT_USE_UPDATE</literal>)</entry>
-                        <entry>Use full row, even if values are unchanged</entry>
-                      </row>
-                    </tbody>
-                  </tgroup>
-                </informaltable>
-              </para>
+        </formalpara>
 
-            </formalpara>
-          </listitem>
+        <informaltable>
+          <tgroup cols="3">
+            <colspec colwidth="15*"/>
+            <colspec colwidth="30*"/>
+            <colspec colwidth="55*"/>
+            <thead>
+              <row>
+                <entry>Value</entry>
+                <entry>Internal Value</entry>
+                <entry>Description</entry>
+              </row>
+            </thead>
+            <tbody>
+              <row>
+                <entry>0</entry>
+                <entry><literal>NBT_DEFAULT</literal></entry>
+                <entry>Use server default</entry>
+              </row>
+              <row>
+                <entry>1</entry>
+                <entry><literal>NBT_NO_LOGGING</literal></entry>
+                <entry>Do not log this table in the binary log</entry>
+              </row>
+              <row>
+                <entry>2</entry>
+                <entry><literal>NBT_UPDATED_ONLY</literal></entry>
+                <entry>Only updated attributes are logged</entry>
+              </row>
+              <row>
+                <entry>3</entry>
+                <entry><literal>NBT_FULL</literal></entry>
+                <entry>Log full row, even if not updated (MySQL server default behavior)</entry>
+              </row>
+              <row>
+                <entry>4</entry>
+                <entry><literal>NBT_USE_UPDATE</literal></entry>
+                <entry>(For generating <literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> and
+                  <literal>NBT_FULL_USE_UPDATE</literal> values
+                  only&mdash;not intended for separate use)</entry>
+              </row>
+              <row>
+                <entry>5</entry>
+                <entry>[<emphasis>Not used</emphasis>]</entry>
+                <entry>---</entry>
+              </row>
+              <row>
+                <entry>6</entry>
+                <entry><literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> (equal to
+                  <literal>NBT_UPDATED_ONLY | NBT_USE_UPDATE</literal>)</entry>
+                <entry>Use updated attributes, even if values are unchanged</entry>
+              </row>
+              <row>
+                <entry>7</entry>
+                <entry><literal>NBT_FULL_USE_UPDATE</literal> (equal to <literal>NBT_FULL |
+                  NBT_USE_UPDATE</literal>)</entry>
+                <entry>Use full row, even if values are unchanged</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable>
+      </listitem>
 
-          <listitem>
-            <formalpara>
+      <listitem>
+        <formalpara>
 
-              <title><literal>conflict_fn</literal></title>
+          <title><literal>conflict_fn</literal></title>
 
-              <para>
-                The conflict resolution function to be applied. This
-                function must be specified as one of the following:
+          <para>
+            The conflict resolution function to be applied. This
+            function must be specified as one of the following: .
+          </para>
 
-                <itemizedlist>
+        </formalpara>
 
-                  <listitem>
-                    <formalpara id="mysql-cluster-replication-ndb-old">
+        <itemizedlist>
 
-                      <title><literal>NDB$OLD(<replaceable>column_name</replaceable></literal>)</title>
+          <listitem>
+            <formalpara id="mysql-cluster-replication-ndb-old">
 
-                      <indexterm>
-                        <primary>NDB$OLD</primary>
-                      </indexterm>
+              <title><literal>NDB$OLD(<replaceable>column_name</replaceable></literal>)</title>
 
-                      <para>
-                        If the value of
-                        <replaceable>column_name</replaceable> is the
-                        same on both the master and the slave, then the
-                        update is applied; otherwise, the update is not
-                        applied on the slave and an exception is written
-                        to the log. This is illustrated by the following
-                        pseudocode:
-                      </para>
+              <indexterm>
+                <primary>NDB$OLD</primary>
+              </indexterm>
 
-                    </formalpara>
+              <para>
+                If the value of <replaceable>column_name</replaceable>
+                is the same on both the master and the slave, then the
+                update is applied; otherwise, the update is not applied
+                on the slave and an exception is written to the log.
+                This is illustrated by the following pseudocode:
+              </para>
 
+            </formalpara>
+
 <programlisting>
 if (<replaceable>master_old_column_value</replaceable> == <replaceable>slave_current_column_value</replaceable>)
   perform_update();

@@ -3646,110 +3651,103 @@
   log_exception();
 </programlisting>
 
-                    <indexterm>
-                      <primary>same value wins (conflict resolution)</primary>
-                    </indexterm>
+            <indexterm>
+              <primary>same value wins (conflict resolution)</primary>
+            </indexterm>
 
-                    <para>
-                      This function can be used for <quote>same value
-                      wins</quote> conflict resolution. This type of
-                      conflict resolution ensures that updates are not
-                      applied on the slave from the wrong master.
-                    </para>
+            <para>
+              This function can be used for <quote>same value
+              wins</quote> conflict resolution. This type of conflict
+              resolution ensures that updates are not applied on the
+              slave from the wrong master.
+            </para>
 
-                    <important>
-                      <para>
-                        The column value from the master&apos;s
-                        <quote>before</quote> image is used by this
-                        function.
-                      </para>
-                    </important>
+            <important>
+              <para>
+                The column value from the master&apos;s
+                <quote>before</quote> image is used by this function.
+              </para>
+            </important>
 
-                    <para>
-                      This conflict resolution function is available
-                      beginning with MySQL Cluster NDB 6.3.4.
-                    </para>
-                  </listitem>
+            <para>
+              This conflict resolution function is available beginning
+              with MySQL Cluster NDB 6.3.4.
+            </para>
+          </listitem>
 
-                  <listitem>
-                    <formalpara id="mysql-cluster-replication-ndb-max">
+          <listitem>
+            <formalpara id="mysql-cluster-replication-ndb-max">
 
-                      <title><literal>NDB$MAX(<replaceable>column_name</replaceable></literal>)</title>
+              <title><literal>NDB$MAX(<replaceable>column_name</replaceable></literal>)</title>
 
-                      <indexterm>
-                        <primary>NDB$MAX()</primary>
-                      </indexterm>
+              <indexterm>
+                <primary>NDB$MAX()</primary>
+              </indexterm>
 
-                      <para>
-                        If the <quote>timestamp</quote> column value for
-                        a given row coming from the master is higher
-                        than that on the slave, it is applied; otherwise
-                        it is not applied on the slave. This is
-                        illustrated by the following pseudocode:
-                      </para>
+              <para>
+                If the <quote>timestamp</quote> column value for a given
+                row coming from the master is higher than that on the
+                slave, it is applied; otherwise it is not applied on the
+                slave. This is illustrated by the following pseudocode:
+              </para>
 
-                    </formalpara>
+            </formalpara>
 
 <programlisting>
 if (<replaceable>master_new_column_value</replaceable> &gt; <replaceable>slave_current_column_value</replaceable>)
   perform_update();
 </programlisting>
 
-                    <indexterm>
-                      <primary>greatest timestamp wins (conflict resolution)</primary>
-                    </indexterm>
+            <indexterm>
+              <primary>greatest timestamp wins (conflict resolution)</primary>
+            </indexterm>
 
-                    <para>
-                      This function can be used for <quote>greatest
-                      timestamp wins</quote> conflict resolution. This
-                      type of conflict resolution ensures that, in the
-                      event of a conflict, the version of the row that
-                      was most recently updated is the version that
-                      persists.
-                    </para>
+            <para>
+              This function can be used for <quote>greatest timestamp
+              wins</quote> conflict resolution. This type of conflict
+              resolution ensures that, in the event of a conflict, the
+              version of the row that was most recently updated is the
+              version that persists.
+            </para>
 
-                    <important>
-                      <para>
-                        The column value from the master&apos;s
-                        <quote>after</quote> image is used by this
-                        function.
-                      </para>
-                    </important>
+            <important>
+              <para>
+                The column value from the master&apos;s
+                <quote>after</quote> image is used by this function.
+              </para>
+            </important>
 
-                    <para>
-                      This conflict resolution function is available
-                      beginning with MySQL Cluster NDB 6.3.0.
-                    </para>
-                  </listitem>
+            <para>
+              This conflict resolution function is available beginning
+              with MySQL Cluster NDB 6.3.0.
+            </para>
+          </listitem>
 
-                  <listitem>
-                    <formalpara id="mysql-cluster-replication-ndb-max-delete-win">
+          <listitem>
+            <formalpara id="mysql-cluster-replication-ndb-max-delete-win">
 
-                      <title><literal>NDB$MAX_DELETE_WIN(<replaceable>column_name</replaceable></literal>)</title>
+              <title><literal>NDB$MAX_DELETE_WIN(<replaceable>column_name</replaceable></literal>)</title>
 
-                      <indexterm>
-                        <primary>NDB$MAX_DELETE_WIN()</primary>
-                      </indexterm>
+              <indexterm>
+                <primary>NDB$MAX_DELETE_WIN()</primary>
+              </indexterm>
 
-                      <para>
-                        This is a variation on
-                        <literal>NDB$MAX()</literal>. Due to the fact
-                        that no timestamp is available for a delete
-                        operation, a delete using
-                        <literal>NDB$MAX()</literal> is in fact
-                        processed as <literal>NDB$OLD</literal>. Howver,
-                        for some use cases, this is not optimal. For
-                        <literal>NDB$MAX_DELETE_WIN()</literal>, if the
-                        <quote>timestamp</quote> column value for a
-                        given row adding or updating an existing row
-                        coming from the master is higher than that on
-                        the slave, it is applied; however, delete
-                        operations are treated as always having the
-                        higher value. This is illustrated by the
-                        following pseudocode:
-                      </para>
+              <para>
+                This is a variation on <literal>NDB$MAX()</literal>. Due
+                to the fact that no timestamp is available for a delete
+                operation, a delete using <literal>NDB$MAX()</literal>
+                is in fact processed as <literal>NDB$OLD</literal>.
+                Howver, for some use cases, this is not optimal. For
+                <literal>NDB$MAX_DELETE_WIN()</literal>, if the
+                <quote>timestamp</quote> column value for a given row
+                adding or updating an existing row coming from the
+                master is higher than that on the slave, it is applied;
+                however, delete operations are treated as always having
+                the higher value. This is illustrated by the following
+                pseudocode:
+              </para>
 
-                    </formalpara>
+            </formalpara>
 
 <programlisting>
 if ( (<replaceable>master_new_column_value</replaceable> &gt; <replaceable>slave_current_column_value</replaceable>)

@@ -3758,61 +3756,51 @@
   perform_update();
 </programlisting>
 
-                    <indexterm>
-                      <primary>greatest timestamp, delete wins (conflict resolution)</primary>
-                    </indexterm>
+            <indexterm>
+              <primary>greatest timestamp, delete wins (conflict resolution)</primary>
+            </indexterm>
 
-                    <para>
-                      This function can be used for <quote>greatest
-                      timestamp, delete wins</quote> conflict
-                      resolution. This type of conflict resolution
-                      ensures that, in the event of a conflict, the
-                      version of the row that was deleted or (otherwise)
-                      most recently updated is the version that
-                      persists.
-                    </para>
+            <para>
+              This function can be used for <quote>greatest timestamp,
+              delete wins</quote> conflict resolution. This type of
+              conflict resolution ensures that, in the event of a
+              conflict, the version of the row that was deleted or
+              (otherwise) most recently updated is the version that
+              persists.
+            </para>
 
-                    <para>
-                      This conflict resolution function is available
-                      beginning with MySQL Cluster NDB 6.3.31 and MySQL
-                      Cluster NDB 7.0.11.
-                    </para>
+            <para>
+              This conflict resolution function is available beginning
+              with MySQL Cluster NDB 6.3.31 and MySQL Cluster NDB
+              7.0.11.
+            </para>
 
-                    <note>
-                      <para>
-                        As with <literal>NDB$MAX()</literal>, the column
-                        value from the master&apos;s
-                        <quote>after</quote> image is the value used by
-                        this function.
-                      </para>
-                    </note>
-                  </listitem>
+            <note>
+              <para>
+                As with <literal>NDB$MAX()</literal>, the column value
+                from the master&apos;s <quote>after</quote> image is the
+                value used by this function.
+              </para>
+            </note>
+          </listitem>
 
-                  <listitem>
-                    <formalpara>
+          <listitem>
+            <formalpara>
 
-                      <title><literal>NULL</literal></title>
+              <title><literal>NULL</literal></title>
 
-                      <para>
-                        Indicates that conflict resolution is not to be
-                        used for the corresponding table.
-                      </para>
-
-                    </formalpara>
-                  </listitem>
-
-                </itemizedlist>
-
-                .
+              <para>
+                Indicates that conflict resolution is not to be used for
+                the corresponding table.
               </para>
 
             </formalpara>
           </listitem>
 
         </itemizedlist>
-      </para>
+      </listitem>
 
-    </formalpara>
+    </itemizedlist>
 
     <formalpara>
 

@@ -3860,7 +3848,10 @@
         the name of the corresponding exception table name should be
         <literal>mytable$EX</literal>.) This table is created as
         follows:
+      </para>
 
+    </formalpara>
+
 <programlisting>
 CREATE TABLE <replaceable>original_table</replaceable>$EX  (
     server_id INT UNSIGNED,

@@ -3873,42 +3864,43 @@
 ) ENGINE=NDB;
 </programlisting>
 
-        The first four columns are required. Following these columns,
-        the columns making up the original table's primary key should be
-        copied in the order in which they are used to define the primary
-        key of the original table.
+    <para>
+      The first four columns are required. Following these columns, the
+      columns making up the original table's primary key should be
+      copied in the order in which they are used to define the primary
+      key of the original table.
+    </para>
 
-        <note>
-          <para>
-            The names of the first four columns and the columns matching
-            the original table's primary key columns are not critical;
-            however, we suggest for reasons of clarity and consistency,
-            that you use the names shown here for the
-            <literal role="sysvar">server_id</literal>,
-            <literal>master_server_id</literal>,
-            <literal>master_epoch</literal>, and
-            <literal>count</literal> columns, and that you use the same
-            names as in the original table for the columns matching
-            those in the original table's primary key.
-          </para>
+    <note>
+      <para>
+        The names of the first four columns and the columns matching the
+        original table's primary key columns are not critical; however,
+        we suggest for reasons of clarity and consistency, that you use
+        the names shown here for the
+        <literal role="sysvar">server_id</literal>,
+        <literal>master_server_id</literal>,
+        <literal>master_epoch</literal>, and <literal>count</literal>
+        columns, and that you use the same names as in the original
+        table for the columns matching those in the original table's
+        primary key.
+      </para>
 
-          <para>
-            The data types for the columns duplicating the primary key
-            columns of the original table should be the same as for (or
-            larger than) the original columns.
-          </para>
-        </note>
-
-        Additional columns may optionally be defined following these
-        columns, but not before any of them; any such extra columns
-        cannot be <literal>NOT NULL</literal>. The exception
-        table&apos;s primary key must be defined as shown. The exception
-        table must use the <literal role="se">NDB</literal> storage
-        engine. An example of use for <literal>NDB$OLD()</literal> and
-        an exception table is given later in this section.
+      <para>
+        The data types for the columns duplicating the primary key
+        columns of the original table should be the same as for (or
+        larger than) the original columns.
       </para>
+    </note>
 
-    </formalpara>
+    <para>
+      Additional columns may optionally be defined following these
+      columns, but not before any of them; any such extra columns cannot
+      be <literal>NOT NULL</literal>. The exception table&apos;s primary
+      key must be defined as shown. The exception table must use the
+      <literal role="se">NDB</literal> storage engine. An example of use
+      for <literal>NDB$OLD()</literal> and an exception table is given
+      later in this section.
+    </para>
 
     <important>
       <para>

@@ -3940,65 +3932,69 @@
         MySQL Cluster replication setup, as described in
         <xref linkend="mysql-cluster-replication-preparation"/>, and
         <xref linkend="mysql-cluster-replication-starting"/>.
+      </para>
 
-        <itemizedlist>
+    </formalpara>
 
-          <listitem>
-            <formalpara>
+    <itemizedlist>
 
-              <title><literal>NDB$MAX()</literal> example</title>
+      <listitem>
+        <formalpara>
 
-              <para>
-                Suppose you wish to enable <quote>greatest timestamp
-                wins</quote> conflict resolution on table
-                <literal>test.t1</literal>, using column
-                <literal>mycol</literal> as the
-                <quote>timestamp</quote>. This can be done using the
-                following steps:
+          <title><literal>NDB$MAX()</literal> example</title>
 
-                <orderedlist>
+          <para>
+            Suppose you wish to enable <quote>greatest timestamp
+            wins</quote> conflict resolution on table
+            <literal>test.t1</literal>, using column
+            <literal>mycol</literal> as the <quote>timestamp</quote>.
+            This can be done using the following steps:
+          </para>
 
-                  <listitem>
-                    <para>
-                      Make sure that you have started the master
-                      <command>mysqld</command> with
-                      <option>-–ndb-log-update-as-write=OFF</option>.
-                    </para>
-                  </listitem>
+        </formalpara>
 
-                  <listitem>
-                    <para>
-                      On the master, perform this
-                      <literal role="stmt">INSERT</literal> statement:
+        <orderedlist>
 
+          <listitem>
+            <para>
+              Make sure that you have started the master
+              <command>mysqld</command> with
+              <option>-–ndb-log-update-as-write=OFF</option>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              On the master, perform this
+              <literal role="stmt">INSERT</literal> statement:
+            </para>
+
 <programlisting>
 INSERT INTO mysql.ndb_replication
     VALUES ('test', 't1', 0, NULL, 'NDB$MAX(mycol)');
 </programlisting>
-                    </para>
 
-                    <para>
-                      Inserting a 0 into the
-                      <literal role="sysvar">server_id</literal>
-                      indicates that all SQL nodes accessing this table
-                      should use conflict resolution. If you want to use
-                      conflict resolution on a specific
-                      <command>mysqld</command> only, use the actual
-                      server ID.
-                    </para>
+            <para>
+              Inserting a 0 into the
+              <literal role="sysvar">server_id</literal> indicates that
+              all SQL nodes accessing this table should use conflict
+              resolution. If you want to use conflict resolution on a
+              specific <command>mysqld</command> only, use the actual
+              server ID.
+            </para>
 
-                    <para>
-                      Inserting <literal>NULL</literal> into the
-                      <literal>binlog_type</literal> column has the same
-                      effect as inserting 0
-                      (<literal>NBT_DEFAULT</literal>); the server
-                      default is used.
-                    </para>
-                  </listitem>
+            <para>
+              Inserting <literal>NULL</literal> into the
+              <literal>binlog_type</literal> column has the same effect
+              as inserting 0 (<literal>NBT_DEFAULT</literal>); the
+              server default is used.
+            </para>
+          </listitem>
 
-                  <listitem>
-                    <para>
-                      Create the <literal>test.t1</literal> table:
+          <listitem>
+            <para>
+              Create the <literal>test.t1</literal> table:
+            </para>
 
 <programlisting>
 CREATE TABLE test.t1 (

@@ -4008,41 +4004,39 @@
 ) ENGINE=NDB;
 </programlisting>
 
-                      Now, when updates are done on this table, conflict
-                      resolution will be applied, and the version of the
-                      row having the greatest value for
-                      <literal>mycol</literal> will be written to the
-                      slave.
-                    </para>
-                  </listitem>
+            <para>
+              Now, when updates are done on this table, conflict
+              resolution will be applied, and the version of the row
+              having the greatest value for <literal>mycol</literal>
+              will be written to the slave.
+            </para>
+          </listitem>
 
-                </orderedlist>
-              </para>
+        </orderedlist>
 
-            </formalpara>
+        <note>
+          <para>
+            Other <literal>binlog_type</literal> options&mdash;such as
+            <literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> should be
+            used to control logging on the master using the
+            <literal>ndb_replication</literal> table rather than by
+            using command-line options.
+          </para>
+        </note>
+      </listitem>
 
-            <note>
-              <para>
-                Other <literal>binlog_type</literal> options&mdash;such
-                as <literal>NBT_UPDATED_ONLY_USE_UPDATE</literal> should
-                be used to control logging on the master using the
-                <literal>ndb_replication</literal> table rather than by
-                using command-line options.
-              </para>
-            </note>
-          </listitem>
+      <listitem>
+        <formalpara>
 
-          <listitem>
-            <formalpara>
+          <title><literal>NDB$OLD()</literal> example</title>
 
-              <title><literal>NDB$OLD()</literal> example</title>
+          <para>
+            Suppose an <literal role="se">NDB</literal> table such as
+            the one defined here is being replicated, and you wish to
+            enable <quote>same timestamp wins</quote> conflict
+            resolution for updates to this table:
+          </para>
 
-              <para>
-                Suppose an <literal role="se">NDB</literal> table such
-                as the one defined here is being replicated, and you
-                wish to enable <quote>same timestamp wins</quote>
-                conflict resolution for updates to this table:
-
 <programlisting>
 CREATE TABLE test.t2  (
     a INT UNSIGNED NOT NULL,

@@ -4054,40 +4048,41 @@
 )   ENGINE=NDB;
 </programlisting>
 
-                The following steps are required, in the order shown:
+          <para>
+            The following steps are required, in the order shown:
+          </para>
 
-                <orderedlist>
+          <orderedlist>
 
-                  <listitem>
-                    <para>
-                      First&mdash;and <emphasis>prior</emphasis> to
-                      creating <literal>test.t2</literal>&mdash;you must
-                      insert a row into the
-                      <literal>mysql.ndb_replication</literal> table, as
-                      shown here:
+            <listitem>
+              <para>
+                First&mdash;and <emphasis>prior</emphasis> to creating
+                <literal>test.t2</literal>&mdash;you must insert a row
+                into the <literal>mysql.ndb_replication</literal> table,
+                as shown here:
+              </para>
 
 <programlisting>
 INSERT INTO mysql.ndb_replication
     VALUES ('test', 't2', 0, NULL, 'NDB$OLD(mycol)');
 </programlisting>
 
-                      Possible values for the
-                      <literal>binlog_type</literal> column are shown
-                      earlier in this section. The value
-                      <literal>'NDB$OLD(mycol)'</literal> should be
-                      inserted into the <literal>conflict_fn</literal>
-                      column.
-                    </para>
-                  </listitem>
+              <para>
+                Possible values for the <literal>binlog_type</literal>
+                column are shown earlier in this section. The value
+                <literal>'NDB$OLD(mycol)'</literal> should be inserted
+                into the <literal>conflict_fn</literal> column.
+              </para>
+            </listitem>
 
-                  <listitem>
-                    <para>
-                      Create an appropriate exceptions table for
-                      <literal>test.t2</literal>. The table creation
-                      statement shown here includes all required
-                      columns; any additional columns must be declared
-                      following these columns, and before the definition
-                      of the table's primary key.
+            <listitem>
+              <para>
+                Create an appropriate exceptions table for
+                <literal>test.t2</literal>. The table creation statement
+                shown here includes all required columns; any additional
+                columns must be declared following these columns, and
+                before the definition of the table's primary key.
+              </para>
 
 <programlisting>
 CREATE TABLE test.t2$EX  (

@@ -4101,35 +4096,32 @@
     PRIMARY KEY(server_id, master_server_id, master_epoch, count)
 )   ENGINE=NDB;
 </programlisting>
-                    </para>
-                  </listitem>
+            </listitem>
 
-                  <listitem>
-                    <para>
-                      Create the table <literal>test.t2</literal> as
-                      shown previously.
-                    </para>
-                  </listitem>
-
-                </orderedlist>
-
-                These steps must be followed for every table for which
-                you wish to perform conflict resolution using
-                <literal>NDB$OLD()</literal>. For each such table, there
-                must be a corresponding row in
-                <literal>mysql.ndb_replication</literal>, and there must
-                be an exceptions table in the same database as the table
-                being replicated.
+            <listitem>
+              <para>
+                Create the table <literal>test.t2</literal> as shown
+                previously.
               </para>
+            </listitem>
 
-            </formalpara>
-          </listitem>
+          </orderedlist>
 
-        </itemizedlist>
-      </para>
+          <para>
+            These steps must be followed for every table for which you
+            wish to perform conflict resolution using
+            <literal>NDB$OLD()</literal>. For each such table, there
+            must be a corresponding row in
+            <literal>mysql.ndb_replication</literal>, and there must be
+            an exceptions table in the same database as the table being
+            replicated.
+          </para>
 
-    </formalpara>
+        </formalpara>
+      </listitem>
 
+    </itemizedlist>
+
   </section>
 
 </section>


Thread
svn commit - mysqldoc@docsrva: r22781 - trunk/refman-5.1jon.stephens20 Sep