List:Commits« Previous MessageNext Message »
From:paul Date:February 6 2006 6:17pm
Subject:svn commit - mysqldoc@docsrva: r1220 - in trunk: . refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-02-06 19:17:49 +0100 (Mon, 06 Feb 2006)
New Revision: 1220

Log:
 r7169@frost:  paul | 2006-02-06 12:15:12 -0600
 Revise replication-rule description.


Modified:
   trunk/
   trunk/refman-4.1/replication.xml
   trunk/refman-5.0/replication.xml
   trunk/refman-5.1/replication.xml


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

Modified: trunk/refman-4.1/replication.xml
===================================================================
--- trunk/refman-4.1/replication.xml	2006-02-06 18:17:25 UTC (rev 1219)
+++ trunk/refman-4.1/replication.xml	2006-02-06 18:17:49 UTC (rev 1220)
@@ -3257,32 +3257,30 @@
       with. (See <xref linkend="replication-options"/>.) The slave
       evaluates these options using the following procedure, which first
       checks the database-level options and then the table-level
-      options. In the simplest case, when there are no
-      <option>--replicate-*</option> options, the procedure yields the
-      result that the slave executes all statements that it receives
-      from the master.
-    </para>
-
-    <para>
-      <emphasis role="bold">Stage 1</emphasis>. Check the database
       options.
     </para>
 
     <para>
-      This stage can permit a statement for further option-checking, or
-      cause it to be ignored. However, statements that are permitted at
-      this stage are not actually executed yet. Instead, they pass to
-      the following stage that checks the table options.
+      In the simplest case, when there are no
+      <option>--replicate-*</option> options, the procedure yields the
+      result that the slave executes all statements that it receives
+      from the master. Otherwise, the result depends on the particular
+      options given. In general, to make it easier to determine what
+      effect an option set will have, it is recommended that you avoid
+      mixing <quote>do</quote> and <quote>ignore</quote> options, or
+      wildcard and non-wildcard options.
     </para>
 
     <para>
-      The slave performs the following test at this stage:
+      <emphasis role="bold">Stage 1. Check the database
+      options.</emphasis>
     </para>
 
     <para>
-      Are there any <option>--replicate-do-db</option> or
+      The slave performs the following test At this stage, the slave
+      checks whether there are any <option>--replicate-do-db</option> or
       <option>--replicate-ignore-db</option> options that specify
-      database-specific conditions?
+      database-specific conditions:
     </para>
 
     <itemizedlist>
@@ -3326,17 +3324,25 @@
     </itemizedlist>
 
     <para>
-      <emphasis role="bold">Stage 2</emphasis>. Check the table options.
+      This stage can permit a statement for further option-checking, or
+      cause it to be ignored. However, statements that are permitted at
+      this stage are not actually executed yet. Instead, they pass to
+      the following stage that checks the table options.
     </para>
 
     <para>
-      If the server reaches this point, it executes all statements if
+      <emphasis role="bold">Stage 2. Check the table options.</emphasis>
+    </para>
+
+    <para>
+      If the slave reaches this point, it executes all statements if
       there are no table options. If there are <quote>do</quote> table
-      options, the statement must match one of them to be executed;
-      otherwise, it is ignored. If there are any <quote>ignore</quote>
-      options, all statements are executed except those that match any
-      <literal>ignore</literal> option. The following steps describe how
-      this evaluation occurs in more detail.
+      options, the statement must match one of them if it is to be
+      executed; otherwise, it is ignored. If there are any
+      <quote>ignore</quote> options, all statements are executed except
+      those that match any <literal>ignore</literal> option. The
+      following steps describe how this evaluation occurs in more
+      detail.
     </para>
 
     <orderedlist>
@@ -3562,17 +3568,18 @@
               <listitem>
                 <para>
                   <emphasis>No</emphasis>: There were no
-                  <quote>do</quote> table options, so no explicit match
-                  is required. Execute the statement and exit.
+                  <quote>do</quote> table options, so no explicit
+                  <quote>do</quote> match is required. Execute the
+                  statement and exit.
                 </para>
               </listitem>
 
               <listitem>
                 <para>
-                  <emphasis>Yes</emphasis>: There were explicit
-                  <quote>do</quote> table options, so the statement is
-                  executed only with an explicit match to one of them.
-                  Ignore the statement and exit.
+                  <emphasis>Yes</emphasis>: There were <quote>do</quote>
+                  table options, so the statement is executed only with
+                  an explicit match to one of them. Ignore the statement
+                  and exit.
                 </para>
               </listitem>
 
@@ -3590,6 +3597,92 @@
 
     </orderedlist>
 
+    <para>
+      Examples:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          No <option>--replicate-*</option> options at all
+        </para>
+
+        <para>
+          The slave executes all statements that it receives from the
+          master.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-db</option> options, but no table
+          options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it executes all statements permitted by those
+          options because there are no table restrictions.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-table</option> options, but no database
+          options
+        </para>
+
+        <para>
+          All statements are permitted at the database-checking stage
+          because there are no database conditions. The slave executes
+          or ignores statements based on the table options.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A mix of database and table options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it evaluates all statements permitted by those
+          options according to the table options. In some cases, this
+          process can yield what might seem a counterintuitive result.
+          Consider the following set of options:
+        </para>
+
+<programlisting>
+[mysqld]
+replicate-do-db    = db1
+replicate-do-table = db2.mytbl2
+</programlisting>
+
+        <para>
+          Suppose that <literal>db1</literal> is the default database
+          and the slave receives this statement:
+        </para>
+
+<programlisting>
+INSERT INTO mytbl1 VALUES(1,2,3);
+</programlisting>
+
+        <para>
+          The database is <literal>db1</literal>, which matches the
+          <option>--replicate-do-db</option> option at the
+          database-checking stage. The algorithm then proceeds to the
+          table-checking stage. If there were no table options, the
+          statement would be executed. However, because the options
+          include a <quote>do</quote> table option, the statement must
+          match if it is to be executed. The statement does not match,
+          so it is ignored. (The same would happen for any table in
+          <literal>db1</literal>.)
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
   </section>
 
   <section id="replication-faq">

Modified: trunk/refman-5.0/replication.xml
===================================================================
--- trunk/refman-5.0/replication.xml	2006-02-06 18:17:25 UTC (rev 1219)
+++ trunk/refman-5.0/replication.xml	2006-02-06 18:17:49 UTC (rev 1220)
@@ -3122,32 +3122,30 @@
       with. (See <xref linkend="replication-options"/>.) The slave
       evaluates these options using the following procedure, which first
       checks the database-level options and then the table-level
-      options. In the simplest case, when there are no
-      <option>--replicate-*</option> options, the procedure yields the
-      result that the slave executes all statements that it receives
-      from the master.
-    </para>
-
-    <para>
-      <emphasis role="bold">Stage 1</emphasis>. Check the database
       options.
     </para>
 
     <para>
-      This stage can permit a statement for further option-checking, or
-      cause it to be ignored. However, statements that are permitted at
-      this stage are not actually executed yet. Instead, they pass to
-      the following stage that checks the table options.
+      In the simplest case, when there are no
+      <option>--replicate-*</option> options, the procedure yields the
+      result that the slave executes all statements that it receives
+      from the master. Otherwise, the result depends on the particular
+      options given. In general, to make it easier to determine what
+      effect an option set will have, it is recommended that you avoid
+      mixing <quote>do</quote> and <quote>ignore</quote> options, or
+      wildcard and non-wildcard options.
     </para>
 
     <para>
-      The slave performs the following test at this stage:
+      <emphasis role="bold">Stage 1. Check the database
+      options.</emphasis>
     </para>
 
     <para>
-      Are there any <option>--replicate-do-db</option> or
+      The slave performs the following test At this stage, the slave
+      checks whether there are any <option>--replicate-do-db</option> or
       <option>--replicate-ignore-db</option> options that specify
-      database-specific conditions?
+      database-specific conditions:
     </para>
 
     <itemizedlist>
@@ -3191,25 +3189,32 @@
     </itemizedlist>
 
     <para>
-      <emphasis role="bold">Stage 2</emphasis>. Check the table options.
+      This stage can permit a statement for further option-checking, or
+      cause it to be ignored. However, statements that are permitted at
+      this stage are not actually executed yet. Instead, they pass to
+      the following stage that checks the table options.
     </para>
 
     <para>
-      First, as a preliminary condition, check whether the statement
-      occurs within a stored function or (prior to MySQL 5.0.12) a
-      stored procedure. If so, execute the statement and exit. (Stored
-      procedures are exempt from this test as of MySQL 5.0.12 because
-      procedure logging occurs at the level of statements that are
-      executed within the routine rather than at the
+      <emphasis role="bold">Stage 2. Check the table options.</emphasis>
+    </para>
+
+    <para>
+      First, as a preliminary condition, the slave checks whether the
+      statement occurs within a stored function or (prior to MySQL
+      5.0.12) a stored procedure. If so, execute the statement and exit.
+      (Stored procedures are exempt from this test as of MySQL 5.0.12
+      because procedure logging occurs at the level of statements that
+      are executed within the routine rather than at the
       <literal>CALL</literal> level.)
     </para>
 
     <para>
-      Next, check for table options and evaluate them. If the server
-      reaches this point, it executes all statements if there are no
-      table options. If there are <quote>do</quote> table options, the
-      statement must match one of them to be executed; otherwise, it is
-      ignored. If there are any <quote>ignore</quote> options, all
+      Next, the slave checks for table options and evaluate them. If the
+      server reaches this point, it executes all statements if there are
+      no table options. If there are <quote>do</quote> table options,
+      the statement must match one of them if it is to be executed; otherwise, it
+      is ignored. If there are any <quote>ignore</quote> options, all
       statements are executed except those that match any
       <literal>ignore</literal> option. The following steps describe how
       this evaluation occurs in more detail.
@@ -3438,17 +3443,18 @@
               <listitem>
                 <para>
                   <emphasis>No</emphasis>: There were no
-                  <quote>do</quote> table options, so no explicit match
-                  is required. Execute the statement and exit.
+                  <quote>do</quote> table options, so no explicit
+                  <quote>do</quote> match is required. Execute the
+                  statement and exit.
                 </para>
               </listitem>
 
               <listitem>
                 <para>
-                  <emphasis>Yes</emphasis>: There were explicit
-                  <quote>do</quote> table options, so the statement is
-                  executed only with an explicit match to one of them.
-                  Ignore the statement and exit.
+                  <emphasis>Yes</emphasis>: There were <quote>do</quote>
+                  table options, so the statement is executed only with
+                  an explicit match to one of them. Ignore the statement
+                  and exit.
                 </para>
               </listitem>
 
@@ -3466,6 +3472,92 @@
 
     </orderedlist>
 
+    <para>
+      Examples:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          No <option>--replicate-*</option> options at all
+        </para>
+
+        <para>
+          The slave executes all statements that it receives from the
+          master.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-db</option> options, but no table
+          options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it executes all statements permitted by those
+          options because there are no table restrictions.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-table</option> options, but no database
+          options
+        </para>
+
+        <para>
+          All statements are permitted at the database-checking stage
+          because there are no database conditions. The slave executes
+          or ignores statements based on the table options.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A mix of database and table options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it evaluates all statements permitted by those
+          options according to the table options. In some cases, this
+          process can yield what might seem a counterintuitive result.
+          Consider the following set of options:
+        </para>
+
+<programlisting>
+[mysqld]
+replicate-do-db    = db1
+replicate-do-table = db2.mytbl2
+</programlisting>
+
+        <para>
+          Suppose that <literal>db1</literal> is the default database
+          and the slave receives this statement:
+        </para>
+
+<programlisting>
+INSERT INTO mytbl1 VALUES(1,2,3);
+</programlisting>
+
+        <para>
+          The database is <literal>db1</literal>, which matches the
+          <option>--replicate-do-db</option> option at the
+          database-checking stage. The algorithm then proceeds to the
+          table-checking stage. If there were no table options, the
+          statement would be executed. However, because the options
+          include a <quote>do</quote> table option, the statement must
+          match if it is to be executed. The statement does not match,
+          so it is ignored. (The same would happen for any table in
+          <literal>db1</literal>.)
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
   </section>
 
   <section id="replication-faq">

Modified: trunk/refman-5.1/replication.xml
===================================================================
--- trunk/refman-5.1/replication.xml	2006-02-06 18:17:25 UTC (rev 1219)
+++ trunk/refman-5.1/replication.xml	2006-02-06 18:17:49 UTC (rev 1220)
@@ -3303,32 +3303,30 @@
       with. (See <xref linkend="replication-options"/>.) The slave
       evaluates these options using the following procedure, which first
       checks the database-level options and then the table-level
-      options. In the simplest case, when there are no
-      <option>--replicate-*</option> options, the procedure yields the
-      result that the slave executes all statements that it receives
-      from the master.
-    </para>
-
-    <para>
-      <emphasis role="bold">Stage 1</emphasis>. Check the database
       options.
     </para>
 
     <para>
-      This stage can permit a statement for further option-checking, or
-      cause it to be ignored. However, statements that are permitted at
-      this stage are not actually executed yet. Instead, they pass to
-      the following stage that checks the table options.
+      In the simplest case, when there are no
+      <option>--replicate-*</option> options, the procedure yields the
+      result that the slave executes all statements that it receives
+      from the master. Otherwise, the result depends on the particular
+      options given. In general, to make it easier to determine what
+      effect an option set will have, it is recommended that you avoid
+      mixing <quote>do</quote> and <quote>ignore</quote> options, or
+      wildcard and non-wildcard options.
     </para>
 
     <para>
-      The slave performs the following test at this stage:
+      <emphasis role="bold">Stage 1. Check the database
+      options.</emphasis>
     </para>
 
     <para>
-      Are there any <option>--replicate-do-db</option> or
+      The slave performs the following test At this stage, the slave
+      checks whether there are any <option>--replicate-do-db</option> or
       <option>--replicate-ignore-db</option> options that specify
-      database-specific conditions?
+      database-specific conditions:
     </para>
 
     <itemizedlist>
@@ -3372,29 +3370,36 @@
     </itemizedlist>
 
     <para>
-      <emphasis role="bold">Stage 2</emphasis>. Check the table options.
+      This stage can permit a statement for further option-checking, or
+      cause it to be ignored. However, statements that are permitted at
+      this stage are not actually executed yet. Instead, they pass to
+      the following stage that checks the table options.
     </para>
 
     <para>
-      First, as a preliminary condition, check whether statement-based
-      replication is enabled. If so and the statement occurs within a
-      stored procedure or function, execute the statement and exit. (If
-      row-based replication is enabled, the slave does not know whether
-      a statement occurred within a stored function on the master, so
-      this condition does not apply.)
+      <emphasis role="bold">Stage 2. Check the table options.</emphasis>
     </para>
 
     <para>
-      Next, check for table options and evaluate them. If the server
-      reaches this point, it executes all statements if there are no
-      table options. If there are <quote>do</quote> table options, the
-      statement must match one of them to be executed; otherwise, it is
-      ignored. If there are any <quote>ignore</quote> options, all
-      statements are executed except those that match any
-      <literal>ignore</literal> option. The following steps describe how
-      this evaluation occurs in more detail.
+      First, as a preliminary condition, the slave checks whether
+      statement-based replication is enabled. If so and the statement
+      occurs within a stored procedure or function, execute the
+      statement and exit. (If row-based replication is enabled, the
+      slave does not know whether a statement occurred within a stored
+      function on the master, so this condition does not apply.)
     </para>
 
+    <para>
+      Next, the slave checks for table options and evaluates them. If
+      the server reaches this point, it executes all statements if there
+      are no table options. If there are <quote>do</quote> table
+      options, the statement must match one of them if it is to be
+      executed; otherwise, it is ignored. If there are any
+      <quote>ignore</quote> options, all statements are executed except
+      those that match any <quote>ignore</quote> option. The following
+      steps describe how this evaluation occurs in more detail.
+    </para>
+
     <orderedlist>
 
       <listitem>
@@ -3653,17 +3658,18 @@
               <listitem>
                 <para>
                   <emphasis>No</emphasis>: There were no
-                  <quote>do</quote> table options, so no explicit match
-                  is required. Execute the statement and exit.
+                  <quote>do</quote> table options, so no explicit
+                  <quote>do</quote> match is required. Execute the
+                  statement and exit.
                 </para>
               </listitem>
 
               <listitem>
                 <para>
-                  <emphasis>Yes</emphasis>: There were explicit
-                  <quote>do</quote> table options, so the statement is
-                  executed only with an explicit match to one of them.
-                  Ignore the statement and exit.
+                  <emphasis>Yes</emphasis>: There were <quote>do</quote>
+                  table options, so the statement is executed only with
+                  an explicit match to one of them. Ignore the statement
+                  and exit.
                 </para>
               </listitem>
 
@@ -3681,6 +3687,92 @@
 
     </orderedlist>
 
+    <para>
+      Examples:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          No <option>--replicate-*</option> options at all
+        </para>
+
+        <para>
+          The slave executes all statements that it receives from the
+          master.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-db</option> options, but no table
+          options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it executes all statements permitted by those
+          options because there are no table restrictions.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          <option>--replicate-*-table</option> options, but no database
+          options
+        </para>
+
+        <para>
+          All statements are permitted at the database-checking stage
+          because there are no database conditions. The slave executes
+          or ignores statements based on the table options.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A mix of database and table options
+        </para>
+
+        <para>
+          The slave permits or ignores statements using the database
+          options. Then it evaluates all statements permitted by those
+          options according to the table options. In some cases, this
+          process can yield what might seem a counterintuitive result.
+          Consider the following set of options:
+        </para>
+
+<programlisting>
+[mysqld]
+replicate-do-db    = db1
+replicate-do-table = db2.mytbl2
+</programlisting>
+
+        <para>
+          Suppose that <literal>db1</literal> is the default database
+          and the slave receives this statement:
+        </para>
+
+<programlisting>
+INSERT INTO mytbl1 VALUES(1,2,3);
+</programlisting>
+
+        <para>
+          The database is <literal>db1</literal>, which matches the
+          <option>--replicate-do-db</option> option at the
+          database-checking stage. The algorithm then proceeds to the
+          table-checking stage. If there were no table options, the
+          statement would be executed. However, because the options
+          include a <quote>do</quote> table option, the statement must
+          match if it is to be executed. The statement does not match,
+          so it is ignored. (The same would happen for any table in
+          <literal>db1</literal>.)
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
   </section>
 
   <section id="replication-faq">

Thread
svn commit - mysqldoc@docsrva: r1220 - in trunk: . refman-4.1 refman-5.0 refman-5.1paul6 Feb