List:Commits« Previous MessageNext Message »
From:paul Date:January 27 2006 4:01am
Subject:svn commit - mysqldoc@docsrva: r1054 - in trunk: . refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-01-27 05:01:47 +0100 (Fri, 27 Jan 2006)
New Revision: 1054

Log:
 r6726@frost:  paul | 2006-01-26 20:24:09 -0600
 General revisions.


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


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

Modified: trunk/refman-4.1/sql-syntax.xml
===================================================================
--- trunk/refman-4.1/sql-syntax.xml	2006-01-26 23:48:21 UTC (rev 1053)
+++ trunk/refman-4.1/sql-syntax.xml	2006-01-27 04:01:47 UTC (rev 1054)
@@ -9451,8 +9451,8 @@
         occurs). Because of this, <literal>SHOW PROCESSLIST</literal>
         displays <literal>Rolling back</literal> in the
         <literal>State</literal> column for the connection during
-        implicit and explicit (<literal>ROLLBACK</literal> SQL command)
-        rollbacks, starting from MySQL 4.1.8.
+        implicit and explicit (<literal>ROLLBACK</literal> SQL
+        statement) rollbacks, starting from MySQL 4.1.8.
       </para>
 
     </section>
@@ -10185,7 +10185,7 @@
           <emphasis role="bold">Note</emphasis>: <literal>DROP
           USER</literal> does not automatically close any open user
           sessions. Rather, in the event that a user with an open
-          session is dropped, the command does not take effect until
+          session is dropped, the statement does not take effect until
           that user's session is closed. Once the session is closed, the
           user is dropped, and that user's next attempt to log in will
           fail. <emphasis>This is by design</emphasis>.
@@ -11951,7 +11951,7 @@
           4.1.1, they are written to the binary log unless the optional
           <literal>NO_WRITE_TO_BINLOG</literal> keyword(or its alias
           <literal>LOCAL</literal>) is used. This has been done so that
-          <literal>OPTIMIZE TABLE</literal> commands used on a MySQL
+          <literal>OPTIMIZE TABLE</literal> statements used on a MySQL
           server acting as a replication master will be replicated by
           default to the replication slave.
         </para>
@@ -12356,8 +12356,9 @@
 
       <para>
         <emphasis>Note</emphasis>: Older versions of MySQL employed
-        <literal>SET OPTION</literal> for this command, but this usage
-        is now deprecated in favor of <literal>SET</literal>.
+        <literal>SET OPTION</literal> for this statement, but this usage
+        is now deprecated in favor of <literal>SET</literal> without
+        <literal>OPTION</literal>.
       </para>
 
       <para>
@@ -14819,13 +14820,13 @@
             </para>
 
             <para>
-              Someone has sent a <literal>KILL</literal> command to the
-              thread and it should abort next time it checks the kill
-              flag. The flag is checked in each major loop in MySQL, but
-              in some cases it might still take a short time for the
-              thread to die. If the thread is locked by some other
-              thread, the kill takes effect as soon as the other thread
-              releases its lock.
+              Someone has sent a <literal>KILL</literal> statement to
+              the thread and it should abort next time it checks the
+              kill flag. The flag is checked in each major loop in
+              MySQL, but in some cases it might still take a short time
+              for the thread to die. If the thread is locked by some
+              other thread, the kill takes effect as soon as the other
+              thread releases its lock.
             </para>
           </listitem>
 
@@ -15560,7 +15561,7 @@
 
         <para>
           If the default values are unsuitable, you can set most of
-          these variables using command-line options when
+          these variables using command options when
           <command>mysqld</command> starts or at runtime with the
           <literal>SET</literal> statement. See
           <xref linkend="server-options"/>, and
@@ -16504,18 +16505,18 @@
       <title>&title-replication-master-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication masters</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -16693,11 +16694,10 @@
         <para>
           Disables or enables binary logging for the current connection
           (<literal>SQL_LOG_BIN</literal> is a session variable) if the
-          client connects using an account that has the
-          <literal>SUPER</literal> privilege. The statement is refused
-          with an error if the client does not have that privilege.
-          (Before MySQL 4.1.2, the statement was simply ignored in that
-          case.)
+          client that has the <literal>SUPER</literal> privilege. The
+          statement is refused with an error if the client does not have
+          that privilege. (Before MySQL 4.1.2, the statement was simply
+          ignored in that case.)
         </para>
 
         <remark role="help-description-end"/>
@@ -16729,8 +16729,8 @@
 
         <para>
           Shows the events in the binary log. If you do not specify
-          <literal>'log_name'</literal>, the first binary log is
-          displayed.
+          <literal>'<replaceable>log_name</replaceable>'</literal>, the
+          first binary log is displayed.
         </para>
 
         <remark role="help-description-end"/>
@@ -16781,8 +16781,8 @@
         <para>
           Lists the binary log files on the server. This statement is
           used as part of the procedure described in
-          <xref linkend="purge-master-logs"/>, for determining which
-          logs can be purged.
+          <xref linkend="purge-master-logs"/>, that shows how to
+          determine which logs can be purged.
         </para>
 
 <programlisting>
@@ -16832,12 +16832,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on the binary log files of the
+          Provides status information about the binary log files of the
           master. Example:
         </para>
 
 <programlisting>
-mysql &gt; SHOW MASTER STATUS;
+mysql &gt; <userinput>SHOW MASTER STATUS;</userinput>
 +---------------+----------+--------------+------------------+
 | File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +---------------+----------+--------------+------------------+
@@ -16893,18 +16893,18 @@
       <title>&title-replication-slave-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication slaves</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -16934,31 +16934,34 @@
         <remark role="help-syntax"/>
 
 <programlisting>
-  CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
+CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
 
-master_def:
-      MASTER_HOST = '<replaceable>host_name</replaceable>'
-    | MASTER_USER = '<replaceable>user_name</replaceable>'
-    | MASTER_PASSWORD = '<replaceable>password</replaceable>'
-    | MASTER_PORT = <replaceable>port_num</replaceable>
-    | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
-    | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
-    | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
-    | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
-    | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
-    | MASTER_SSL = {0|1}
-    | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
-    | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
-    | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
-    | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
-    | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
+<replaceable>master_def</replaceable>:
+    MASTER_HOST = '<replaceable>host_name</replaceable>'
+  | MASTER_USER = '<replaceable>user_name</replaceable>'
+  | MASTER_PASSWORD = '<replaceable>password</replaceable>'
+  | MASTER_PORT = <replaceable>port_num</replaceable>
+  | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
+  | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
+  | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
+  | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
+  | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
+  | MASTER_SSL = {0|1}
+  | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
+  | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
+  | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
+  | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
+  | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
 </programlisting>
 
         <remark role="help-description-begin"/>
 
         <para>
-          Changes the parameters that the slave server uses for
-          connecting to and communicating with the master server.
+          <literal>CHANGE MASTER TO</literal> changes the parameters
+          that the slave server uses for connecting to and communicating
+          with the master server. It also updates the contents of the
+          <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files.
         </para>
 
         <para>
@@ -17001,9 +17004,9 @@
         </para>
 
 <programlisting>
-mysql&gt; <userinput>STOP SLAVE; -- if replication was running</userinput>
-mysql&gt; <userinput>CHANGE MASTER TO MASTER_PASSWORD='new3cret';</userinput>
-mysql&gt; <userinput>START SLAVE; -- if you want to restart replication</userinput>
+STOP SLAVE; -- if replication was running
+CHANGE MASTER TO MASTER_PASSWORD='new3cret';
+START SLAVE; -- if you want to restart replication
 </programlisting>
 
         <para>
@@ -17017,14 +17020,14 @@
           address) of the master host and its TCP/IP port. Note that if
           <literal>MASTER_HOST</literal> is equal to
           <literal>localhost</literal>, then, like in other parts of
-          MySQL, the port may be ignored (if Unix socket files can be
-          used, for example).
+          MySQL, the port number might be ignored (if Unix socket files
+          can be used, for example).
         </para>
 
         <para>
           If you specify <literal>MASTER_HOST</literal> or
           <literal>MASTER_PORT</literal>, the slave assumes that the
-          master server is different than before (even if you specify a
+          master server is different from before (even if you specify a
           host or port value that is the same as the current value.) In
           this case, the old values for the master binary log name and
           position are considered no longer applicable, so if you do not
@@ -17067,12 +17070,6 @@
         </para>
 
         <para>
-          <literal>CHANGE MASTER TO</literal> updates the contents of
-          the <filename>master.info</filename> and
-          <filename>relay-log.info</filename> files.
-        </para>
-
-        <para>
           <literal>CHANGE MASTER</literal> is useful for setting up a
           slave when you have the snapshot of the master and have
           recorded the log and the offset corresponding to it. After
@@ -17084,41 +17081,39 @@
         </para>
 
         <para>
-          Examples:
+          The following example changes the master and master's binary
+          log coordinates. This is used when you want to set up the
+          slave to replicate the master:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>MASTER_HOST='master2.mycompany.com',</userinput>
-    -&gt;     <userinput>MASTER_USER='replication',</userinput>
-    -&gt;     <userinput>MASTER_PASSWORD='bigs3cret',</userinput>
-    -&gt;     <userinput>MASTER_PORT=3306,</userinput>
-    -&gt;     <userinput>MASTER_LOG_FILE='master2-bin.001',</userinput>
-    -&gt;     <userinput>MASTER_LOG_POS=4,</userinput>
-    -&gt;     <userinput>MASTER_CONNECT_RETRY=10;</userinput>
-
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='slave-relay-bin.006',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=4025;</userinput>
+CHANGE MASTER TO
+  MASTER_HOST='master2.mycompany.com',
+  MASTER_USER='replication',
+  MASTER_PASSWORD='bigs3cret',
+  MASTER_PORT=3306,
+  MASTER_LOG_FILE='master2-bin.001',
+  MASTER_LOG_POS=4,
+  MASTER_CONNECT_RETRY=10;
 </programlisting>
 
-        <remark role="help-description-end"/>
-
         <para>
-          The first example changes the master and master's binary log
-          coordinates. This is used when you want to set up the slave to
-          replicate the master.
-        </para>
-
-        <para>
-          The second example shows an operation that is less frequently
+          The next example shows an operation that is less frequently
           employed. It is used when the slave has relay logs that you
           want it to execute again for some reason. To do this, the
           master need not be reachable. You need only use
           <literal>CHANGE MASTER TO</literal> and start the SQL thread
-          (<literal>START SLAVE SQL_THREAD</literal>).
+          (<literal>START SLAVE SQL_THREAD</literal>):
         </para>
 
+<programlisting>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='slave-relay-bin.006',
+  RELAY_LOG_POS=4025;
+</programlisting>
+
+        <remark role="help-description-end"/>
+
         <para>
           You can even use the second operation in a non-replication
           setup with a standalone, non-slave server for recovery
@@ -17137,30 +17132,31 @@
           <option>--replicate-same-server-id</option> option. Start it
           with <option>--relay-log=myhost-bin</option> (to make the
           server believe that these regular binary logs are relay logs)
-          and <option>--skip-slave-start</option> options. Once the
+          and <option>--skip-slave-start</option> options. After the
           server starts, issue these statements:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='myhost-bin.153',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=410,</userinput>
-    -&gt;     <userinput>MASTER_HOST='some_dummy_string';</userinput>
-mysql&gt; <userinput>START SLAVE SQL_THREAD;</userinput>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='myhost-bin.153',
+  RELAY_LOG_POS=410,
+  MASTER_HOST='some_dummy_string';
+START SLAVE SQL_THREAD;
 </programlisting>
 
         <para>
           The server reads and executes its own binary logs, thus
           achieving crash recovery. Once the recovery is finished, run
           <literal>STOP SLAVE</literal>, shut down the server, delete
-          <filename>master.info</filename> and
-          <filename>relay-log.info</filename>, and restart the server
-          with its original options.
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, and restart the
+          server with its original options.
         </para>
 
         <para>
-          Specifying <literal>MASTER_HOST</literal> (even with a dummy
-          value) is required to make the server think it is a slave.
+          Specifying the <literal>MASTER_HOST</literal> option (even
+          with a dummy value) is required to make the server think it is
+          a slave.
         </para>
 
       </section>
@@ -17188,7 +17184,7 @@
         <remark role="help-description-begin"/>
 
         <para>
-          This command takes a snapshot of the master and copies it to
+          This statement takes a snapshot of the master and copies it to
           the slave. It updates the values of
           <literal>MASTER_LOG_FILE</literal> and
           <literal>MASTER_LOG_POS</literal> so that the slave starts
@@ -17199,8 +17195,8 @@
           <option>--replicate-rewrite-db</option> is
           <emphasis>not</emphasis> taken into account because a user
           could use this option to set up a non-unique mapping such as
-          <option>--replicate-rewrite-db=db1-&gt;db3</option> and
-          <option>--replicate-rewrite-db=db2-&gt;db3</option>, which
+          <option>--replicate-rewrite-db="db1-&gt;db3"</option> and
+          <option>--replicate-rewrite-db="db2-&gt;db3"</option>, which
           would confuse the slave when loading tables from the master.
         </para>
 
@@ -17259,9 +17255,9 @@
         </para>
 
         <para>
-          The <literal>LOAD DATA FROM MASTER</literal> statement
-          requires the replication account that is used to connect to
-          the master to have the <literal>RELOAD</literal> and
+          To use <literal>LOAD DATA FROM MASTER</literal>, the
+          replication account that is used to connect to the master must
+          have the <literal>RELOAD</literal> and
           <literal>SUPER</literal> privileges on the master and the
           <literal>SELECT</literal> privilege for all master tables you
           want to load. All master tables for which the user does not
@@ -17273,8 +17269,8 @@
           DATABASES</literal> returns only databases for which the user
           has some privilege. See <xref linkend="show-databases"/>. On
           the slave side, the user that issues <literal>LOAD DATA FROM
-          MASTER</literal> should have grants to drop and create the
-          databases and tables that are copied.
+          MASTER</literal> must have privileges for dropping and
+          creating the databases and tables that are copied.
         </para>
 
         <remark role="help-description-end"/>
@@ -17305,14 +17301,15 @@
 
         <para>
           Transfers a copy of the table from the master to the slave.
-          This statement is implemented mainly for debugging of
-          <literal>LOAD DATA FROM MASTER</literal>. It requires that the
-          account used for connecting to the master server has the
-          <literal>RELOAD</literal> and <literal>SUPER</literal>
-          privileges on the master and the <literal>SELECT</literal>
-          privilege on the master table to load. On the slave side, the
-          user that issues <literal>LOAD TABLE FROM MASTER</literal>
-          should have privileges to drop and create the table.
+          This statement is implemented mainly debugging <literal>LOAD
+          DATA FROM MASTER</literal> operations. To use <literal>LOAD
+          TABLE</literal>, the account used for connecting to the master
+          server must have the <literal>RELOAD</literal> and
+          <literal>SUPER</literal> privileges on the master and the
+          <literal>SELECT</literal> privilege for the master table to
+          load. On the slave side, the user that issues <literal>LOAD
+          TABLE FROM MASTER</literal> must have privileges for dropping
+          and creating the table.
         </para>
 
         <para>
@@ -17372,11 +17369,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Makes the slave forget its replication position in the
-          master's binary logs. This statement is meant to be used for a
-          clean start: It deletes the <filename>master.info</filename>
-          and <filename>relay-log.info</filename> files, all the relay
-          logs, and starts a new relay log.
+          <literal>RESET SLAVE</literal> makes the slave forget its
+          replication position in the master's binary logs. This
+          statement is meant to be used for a clean start: It deletes
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, all the relay logs,
+          and starts a new relay log.
         </para>
 
         <para>
@@ -17431,9 +17429,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Skip the next <replaceable>N</replaceable> events from the
-          master. This is useful for recovering from replication stops
-          caused by a statement.
+          This statement skips the next <replaceable>N</replaceable>
+          events from the master. This is useful for recovering from
+          replication stops caused by a statement.
         </para>
 
         <para>
@@ -17473,9 +17471,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on essential parameters of the
-          slave threads. If you issue this statement using the
-          <command>mysql</command> client, you can use a
+          This statement provides status information on essential
+          parameters of the slave threads. If you issue this statement
+          using the <command>mysql</command> client, you can use a
           <literal>\G</literal> statement terminator rather than a
           semicolon to obtain a more readable vertical layout:
         </para>
@@ -17541,12 +17539,12 @@
             <para>
               A copy of the <literal>State</literal> field of the output
               of <literal>SHOW PROCESSLIST</literal> for the slave I/O
-              thread. This tells you if the thread is trying to connect
-              to the master, waiting for events from the master,
+              thread. This tells you what the thread is doing: trying to
+              connect to the master, waiting for events from the master,
               reconnecting to the master, and so on. Possible states are
               listed in
-              <xref linkend="replication-implementation-details"/>.
-              Looking at this field is necessary for older versions of
+              <xref linkend="replication-implementation-details"/>. It
+              is necessary to check this field for older versions of
               MySQL (prior to 4.1.14) because in these versions the
               thread could be running while unsuccessfully trying to
               connect to the master; only this field makes you aware of
@@ -17663,10 +17661,10 @@
             </para>
 
             <para>
-              Whether or not the I/O thread is started and has connected
+              Whether the I/O thread is started and has connected
               successfully to the master. For older versions of MySQL
               (prior to 4.1.14 and 5.0.12)
-              <literal>Slave_IO_Running</literal> will be set to
+              <literal>Slave_IO_Running</literal> is
               <literal>YES</literal> if the I/O thread is started, even
               if the slave hasn't connected to the master yet.
             </para>
@@ -17732,13 +17730,10 @@
               recently executed query. An error number of 0 and message
               of the empty string mean <quote>no error.</quote> If the
               <literal>Last_Error</literal> value is not empty, it also
-              appears as a message in the slave's error log.
+              appears as a message in the slave's error log. For
+              example:
             </para>
 
-            <para>
-              For example:
-            </para>
-
 <programlisting>
 Last_Errno: 1051
 Last_Error: error 'Unknown table 'z'' on query 'drop table z'
@@ -17914,14 +17909,34 @@
               been experimental and has been changed in MySQL 4.1.9. The
               following applies to slaves running MySQL 4.1.9 or newer.
               This field is an indication of how <quote>late</quote> the
-              slave is. When the slave SQL thread is actively running
-              (processing updates), this field is the number of seconds
-              that have elapsed since the timestamp of the most recent
-              event on the master executed by that thread. When that
-              thread has caught up on the slave I/O thread and goes idle
-              waiting for more events from the I/O thread this field is
-              zero. In sum, this field measures in seconds the time
-              difference between the slave SQL thread and the slave I/O
+              slave is:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  When the slave SQL thread is actively running
+                  (processing updates), this field is the number of
+                  seconds that have elapsed since the timestamp of the
+                  most recent event on the master executed by that
+                  thread.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  When the SQL thread thread has caught up to the slave
+                  I/O thread and goes idle waiting for more events from
+                  the I/O thread, this field is zero.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              In essence, this field measures the time difference in
+              seconds between the slave SQL thread and the slave I/O
               thread.
             </para>
 
@@ -17934,13 +17949,13 @@
               fast, the slave I/O thread is very close to the master, so
               this field is a good approximation of how late the slave
               SQL thread is compared to the master. If the network is
-              slow, this is <emphasis role="bold">not</emphasis> a good
+              slow, this is <emphasis>not</emphasis> a good
               approximation; the slave SQL thread may quite often be
               caught up with the slow-reading slave I/O thread, so
               <literal>Seconds_Behind_Master</literal> often shows a
               value of 0, even if the I/O thread is late compared to the
-              master. In other words, <emphasis role="bold">this column
-              is useful only for fast networks</emphasis>.
+              master. In other words, <emphasis>this column is useful
+              only for fast networks</emphasis>.
             </para>
 
             <para>
@@ -17953,10 +17968,11 @@
               <quote>unknown</quote>) if the slave SQL thread is not
               running, or if the slave I/O thread is not running or not
               connected to master. For example if the slave I/O thread
-              is sleeping for <literal>master-connect-retry</literal>
-              seconds before reconnecting, <literal>NULL</literal> is
-              shown, as the slave cannot know what the master is doing,
-              and so cannot say reliably how late it is.
+              is sleeping for the number of seconds given by the
+              <option>--master-connect-retry</option> option before
+              reconnecting, <literal>NULL</literal> is shown, as the
+              slave cannot know what the master is doing, and so cannot
+              say reliably how late it is.
             </para>
 
             <para>
@@ -17970,8 +17986,8 @@
               <literal>Seconds_Behind_Master</literal> is that if M1
               also receives direct updates from clients, the value
               randomly deviates, because sometimes the last M1's event
-              is from M0 and sometimes it is from a direct update, and
-              so is the most recent timestamp.
+              is from M0 and sometimes it is the most recent timestamp
+              from a direct update.
             </para>
           </listitem>
 
@@ -18002,7 +18018,7 @@
 START SLAVE [SQL_THREAD] UNTIL
     RELAY_LOG_FILE = '<replaceable>log_name</replaceable>', RELAY_LOG_POS = <replaceable>log_pos</replaceable>
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>
@@ -18118,7 +18134,7 @@
 <programlisting>
 STOP SLAVE [<replaceable>thread_type</replaceable> [, <replaceable>thread_type</replaceable>] ... ]
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>

Modified: trunk/refman-5.0/sql-syntax.xml
===================================================================
--- trunk/refman-5.0/sql-syntax.xml	2006-01-26 23:48:21 UTC (rev 1053)
+++ trunk/refman-5.0/sql-syntax.xml	2006-01-27 04:01:47 UTC (rev 1054)
@@ -9832,8 +9832,8 @@
         occurs). Because of this, <literal>SHOW PROCESSLIST</literal>
         displays <literal>Rolling back</literal> in the
         <literal>State</literal> column for the connection during
-        implicit and explicit (<literal>ROLLBACK</literal> SQL command)
-        rollbacks.
+        implicit and explicit (<literal>ROLLBACK</literal> SQL
+        statement) rollbacks.
       </para>
 
     </section>
@@ -11245,7 +11245,7 @@
           <emphasis>Important</emphasis>: <literal>DROP USER</literal>
           does not automatically close any open user sessions. Rather,
           in the event that a user with an open session is dropped, the
-          command does not take effect until that user's session is
+          statement does not take effect until that user's session is
           closed. Once the session is closed, the user is dropped, and
           that user's next attempt to log in will fail. <emphasis>This
           is by design</emphasis>.
@@ -13116,7 +13116,7 @@
           the binary log unless the optional
           <literal>NO_WRITE_TO_BINLOG</literal> keyword(or its alias
           <literal>LOCAL</literal>) is used. This has been done so that
-          <literal>OPTIMIZE TABLE</literal> commands used on a MySQL
+          <literal>OPTIMIZE TABLE</literal> statements used on a MySQL
           server acting as a replication master will be replicated by
           default to the replication slave.
         </para>
@@ -13518,8 +13518,9 @@
 
       <para>
         <emphasis>Note</emphasis>: Older versions of MySQL employed
-        <literal>SET OPTION</literal> for this command, but this usage
-        is now deprecated in favor of <literal>SET</literal>.
+        <literal>SET OPTION</literal> for this statement, but this usage
+        is now deprecated in favor of <literal>SET</literal> without
+        <literal>OPTION</literal>.
       </para>
 
       <para>
@@ -16048,13 +16049,13 @@
             </para>
 
             <para>
-              Someone has sent a <literal>KILL</literal> command to the
-              thread and it should abort next time it checks the kill
-              flag. The flag is checked in each major loop in MySQL, but
-              in some cases it might still take a short time for the
-              thread to die. If the thread is locked by some other
-              thread, the kill takes effect as soon as the other thread
-              releases its lock.
+              Someone has sent a <literal>KILL</literal> statement to
+              the thread and it should abort next time it checks the
+              kill flag. The flag is checked in each major loop in
+              MySQL, but in some cases it might still take a short time
+              for the thread to die. If the thread is locked by some
+              other thread, the kill takes effect as soon as the other
+              thread releases its lock.
             </para>
           </listitem>
 
@@ -16765,8 +16766,8 @@
         <para>
           Before MySQL 5.0.1, the output from <literal>SHOW
           TABLES</literal> contains a single column of table names.
-          Beginning with MySQL 5.0.1, this command also lists any views
-          in the database. As of MySQL 5.0.2, the
+          Beginning with MySQL 5.0.1, this statement also lists any
+          views in the database. As of MySQL 5.0.2, the
           <literal>FULL</literal> modifier is supported such that
           <literal>SHOW FULL TABLES</literal> displays a second output
           column. Values for the second column are <literal>BASE
@@ -16985,7 +16986,7 @@
 
         <para>
           If the default values are unsuitable, you can set most of
-          these variables using command-line options when
+          these variables using command options when
           <command>mysqld</command> starts or at runtime with the
           <literal>SET</literal> statement. See
           <xref linkend="server-options"/>, and
@@ -17962,18 +17963,18 @@
       <title>&title-replication-master-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication masters</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -18146,9 +18147,9 @@
         <para>
           Disables or enables binary logging for the current connection
           (<literal>SQL_LOG_BIN</literal> is a session variable) if the
-          client connects using an account that has the
-          <literal>SUPER</literal> privilege. A statement is refused
-          with an error if the client does not have that privilege.
+          client has the <literal>SUPER</literal> privilege. The
+          statement is refused with an error if the client does not have
+          that privilege.
         </para>
 
         <remark role="help-description-end"/>
@@ -18180,8 +18181,8 @@
 
         <para>
           Shows the events in the binary log. If you do not specify
-          <literal>'log_name'</literal>, the first binary log is
-          displayed.
+          <literal>'<replaceable>log_name</replaceable>'</literal>, the
+          first binary log is displayed.
         </para>
 
         <remark role="help-description-end"/>
@@ -18196,11 +18197,12 @@
           <emphasis role="bold">Note</emphasis>: Issuing a <literal>SHOW
           BINLOG EVENTS</literal> with no <literal>LIMIT</literal>
           clause could start a very time- and resource-consuming process
-          as the server dumps the complete contents of the binary log
-          (which includes most of the queries executed by MySQL) to
-          stdout. To save the binary log to a text file for later
-          examination and analysis, use the
-          <command>mysqlbinlog</command> utility. See
+          because the server returns to the client the complete contents
+          of the binary log (which includes all statements executed by
+          the server that modify data). As an alternative to
+          <literal>SHOW BINLOG EVENTS</literal>, use the
+          <command>mysqlbinlog</command> utility to save the binary log
+          to a text file for later examination and analysis. See
           <xref linkend="mysqlbinlog"/>.
         </para>
 
@@ -18240,8 +18242,8 @@
         <para>
           Lists the binary log files on the server. This statement is
           used as part of the procedure described in
-          <xref linkend="purge-master-logs"/>, for determining which
-          logs can be purged.
+          <xref linkend="purge-master-logs"/>, that shows how to
+          determine which logs can be purged.
         </para>
 
 <programlisting>
@@ -18292,12 +18294,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on the binary log files of the
+          Provides status information about the binary log files of the
           master. Example:
         </para>
 
 <programlisting>
-mysql &gt; SHOW MASTER STATUS;
+mysql &gt; <userinput>SHOW MASTER STATUS;</userinput>
 +---------------+----------+--------------+------------------+
 | File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +---------------+----------+--------------+------------------+
@@ -18353,18 +18355,18 @@
       <title>&title-replication-slave-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication slaves</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -18394,31 +18396,34 @@
         <remark role="help-syntax"/>
 
 <programlisting>
-  CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
+CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
 
-master_def:
-      MASTER_HOST = '<replaceable>host_name</replaceable>'
-    | MASTER_USER = '<replaceable>user_name</replaceable>'
-    | MASTER_PASSWORD = '<replaceable>password</replaceable>'
-    | MASTER_PORT = <replaceable>port_num</replaceable>
-    | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
-    | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
-    | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
-    | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
-    | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
-    | MASTER_SSL = {0|1}
-    | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
-    | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
-    | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
-    | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
-    | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
+<replaceable>master_def</replaceable>:
+    MASTER_HOST = '<replaceable>host_name</replaceable>'
+  | MASTER_USER = '<replaceable>user_name</replaceable>'
+  | MASTER_PASSWORD = '<replaceable>password</replaceable>'
+  | MASTER_PORT = <replaceable>port_num</replaceable>
+  | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
+  | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
+  | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
+  | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
+  | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
+  | MASTER_SSL = {0|1}
+  | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
+  | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
+  | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
+  | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
+  | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
 </programlisting>
 
         <remark role="help-description-begin"/>
 
         <para>
-          Changes the parameters that the slave server uses for
-          connecting to and communicating with the master server.
+          <literal>CHANGE MASTER TO</literal> changes the parameters
+          that the slave server uses for connecting to and communicating
+          with the master server. It also updates the contents of the
+          <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files.
         </para>
 
         <para>
@@ -18454,9 +18459,9 @@
         </para>
 
 <programlisting>
-mysql&gt; <userinput>STOP SLAVE; -- if replication was running</userinput>
-mysql&gt; <userinput>CHANGE MASTER TO MASTER_PASSWORD='new3cret';</userinput>
-mysql&gt; <userinput>START SLAVE; -- if you want to restart replication</userinput>
+STOP SLAVE; -- if replication was running
+CHANGE MASTER TO MASTER_PASSWORD='new3cret';
+START SLAVE; -- if you want to restart replication
 </programlisting>
 
         <para>
@@ -18470,14 +18475,14 @@
           address) of the master host and its TCP/IP port. Note that if
           <literal>MASTER_HOST</literal> is equal to
           <literal>localhost</literal>, then, like in other parts of
-          MySQL, the port may be ignored (if Unix socket files can be
-          used, for example).
+          MySQL, the port number might be ignored (if Unix socket files
+          can be used, for example).
         </para>
 
         <para>
           If you specify <literal>MASTER_HOST</literal> or
           <literal>MASTER_PORT</literal>, the slave assumes that the
-          master server is different than before (even if you specify a
+          master server is different from before (even if you specify a
           host or port value that is the same as the current value.) In
           this case, the old values for the master binary log name and
           position are considered no longer applicable, so if you do not
@@ -18515,12 +18520,6 @@
         </para>
 
         <para>
-          <literal>CHANGE MASTER TO</literal> updates the contents of
-          the <filename>master.info</filename> and
-          <filename>relay-log.info</filename> files.
-        </para>
-
-        <para>
           <literal>CHANGE MASTER</literal> is useful for setting up a
           slave when you have the snapshot of the master and have
           recorded the log and the offset corresponding to it. After
@@ -18532,41 +18531,39 @@
         </para>
 
         <para>
-          Examples:
+          The following example changes the master and master's binary
+          log coordinates. This is used when you want to set up the
+          slave to replicate the master:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>MASTER_HOST='master2.mycompany.com',</userinput>
-    -&gt;     <userinput>MASTER_USER='replication',</userinput>
-    -&gt;     <userinput>MASTER_PASSWORD='bigs3cret',</userinput>
-    -&gt;     <userinput>MASTER_PORT=3306,</userinput>
-    -&gt;     <userinput>MASTER_LOG_FILE='master2-bin.001',</userinput>
-    -&gt;     <userinput>MASTER_LOG_POS=4,</userinput>
-    -&gt;     <userinput>MASTER_CONNECT_RETRY=10;</userinput>
-
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='slave-relay-bin.006',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=4025;</userinput>
+CHANGE MASTER TO
+  MASTER_HOST='master2.mycompany.com',
+  MASTER_USER='replication',
+  MASTER_PASSWORD='bigs3cret',
+  MASTER_PORT=3306,
+  MASTER_LOG_FILE='master2-bin.001',
+  MASTER_LOG_POS=4,
+  MASTER_CONNECT_RETRY=10;
 </programlisting>
 
-        <remark role="help-description-end"/>
-
         <para>
-          The first example changes the master and master's binary log
-          coordinates. This is used when you want to set up the slave to
-          replicate the master.
-        </para>
-
-        <para>
-          The second example shows an operation that is less frequently
+          The next example shows an operation that is less frequently
           employed. It is used when the slave has relay logs that you
           want it to execute again for some reason. To do this, the
           master need not be reachable. You need only use
           <literal>CHANGE MASTER TO</literal> and start the SQL thread
-          (<literal>START SLAVE SQL_THREAD</literal>).
+          (<literal>START SLAVE SQL_THREAD</literal>):
         </para>
 
+<programlisting>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='slave-relay-bin.006',
+  RELAY_LOG_POS=4025;
+</programlisting>
+
+        <remark role="help-description-end"/>
+
         <para>
           You can even use the second operation in a non-replication
           setup with a standalone, non-slave server for recovery
@@ -18583,30 +18580,31 @@
           <option>--replicate-same-server-id</option>,
           <option>--relay-log=myhost-bin</option> (to make the server
           believe that these regular binary logs are relay logs) and
-          <option>--skip-slave-start</option> options. Once the server
+          <option>--skip-slave-start</option> options. After the server
           starts, issue these statements:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='myhost-bin.153',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=410,</userinput>
-    -&gt;     <userinput>MASTER_HOST='some_dummy_string';</userinput>
-mysql&gt; <userinput>START SLAVE SQL_THREAD;</userinput>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='myhost-bin.153',
+  RELAY_LOG_POS=410,
+  MASTER_HOST='some_dummy_string';
+START SLAVE SQL_THREAD;
 </programlisting>
 
         <para>
           The server reads and executes its own binary logs, thus
           achieving crash recovery. Once the recovery is finished, run
           <literal>STOP SLAVE</literal>, shut down the server, delete
-          <filename>master.info</filename> and
-          <filename>relay-log.info</filename>, and restart the server
-          with its original options.
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, and restart the
+          server with its original options.
         </para>
 
         <para>
-          Specifying <literal>MASTER_HOST</literal> (even with a dummy
-          value) is required to make the server think it is a slave.
+          Specifying the <literal>MASTER_HOST</literal> option (even
+          with a dummy value) is required to make the server think it is
+          a slave.
         </para>
 
       </section>
@@ -18634,7 +18632,7 @@
         <remark role="help-description-begin"/>
 
         <para>
-          This command takes a snapshot of the master and copies it to
+          This statement takes a snapshot of the master and copies it to
           the slave. It updates the values of
           <literal>MASTER_LOG_FILE</literal> and
           <literal>MASTER_LOG_POS</literal> so that the slave starts
@@ -18645,8 +18643,8 @@
           <option>--replicate-rewrite-db</option> is
           <emphasis>not</emphasis> taken into account because a user
           could use this option to set up a non-unique mapping such as
-          <option>--replicate-rewrite-db=db1-&gt;db3</option> and
-          <option>--replicate-rewrite-db=db2-&gt;db3</option>, which
+          <option>--replicate-rewrite-db="db1-&gt;db3"</option> and
+          <option>--replicate-rewrite-db="db2-&gt;db3"</option>, which
           would confuse the slave when loading tables from the master.
         </para>
 
@@ -18705,9 +18703,9 @@
         </para>
 
         <para>
-          The <literal>LOAD DATA FROM MASTER</literal> statement
-          requires the replication account that is used to connect to
-          the master to have the <literal>RELOAD</literal> and
+          To use <literal>LOAD DATA FROM MASTER</literal>, the
+          replication account that is used to connect to the master must
+          have the <literal>RELOAD</literal> and
           <literal>SUPER</literal> privileges on the master and the
           <literal>SELECT</literal> privilege for all master tables you
           want to load. All master tables for which the user does not
@@ -18719,8 +18717,8 @@
           DATABASES</literal> returns only databases for which the user
           has some privilege. See <xref linkend="show-databases"/>. On
           the slave side, the user that issues <literal>LOAD DATA FROM
-          MASTER</literal> should have grants to drop and create the
-          databases and tables that are copied.
+          MASTER</literal> must have privileges for dropping and
+          creating the databases and tables that are copied.
         </para>
 
         <remark role="help-description-end"/>
@@ -18751,14 +18749,15 @@
 
         <para>
           Transfers a copy of the table from the master to the slave.
-          This statement is implemented mainly for debugging of
-          <literal>LOAD DATA FROM MASTER</literal>. It requires that the
-          account used for connecting to the master server has the
-          <literal>RELOAD</literal> and <literal>SUPER</literal>
-          privileges on the master and the <literal>SELECT</literal>
-          privilege on the master table to load. On the slave side, the
-          user that issues <literal>LOAD TABLE FROM MASTER</literal>
-          should have privileges to drop and create the table.
+          This statement is implemented mainly debugging <literal>LOAD
+          DATA FROM MASTER</literal> operations. To use <literal>LOAD
+          TABLE</literal>, the account used for connecting to the master
+          server must have the <literal>RELOAD</literal> and
+          <literal>SUPER</literal> privileges on the master and the
+          <literal>SELECT</literal> privilege for the master table to
+          load. On the slave side, the user that issues <literal>LOAD
+          TABLE FROM MASTER</literal> must have privileges for dropping
+          and creating the table.
         </para>
 
         <para>
@@ -18818,11 +18817,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Makes the slave forget its replication position in the
-          master's binary logs. This statement is meant to be used for a
-          clean start: It deletes the <filename>master.info</filename>
-          and <filename>relay-log.info</filename> files, all the relay
-          logs, and starts a new relay log.
+          <literal>RESET SLAVE</literal> makes the slave forget its
+          replication position in the master's binary logs. This
+          statement is meant to be used for a clean start: It deletes
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, all the relay logs,
+          and starts a new relay log.
         </para>
 
         <para>
@@ -18872,9 +18872,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Skip the next <replaceable>N</replaceable> events from the
-          master. This is useful for recovering from replication stops
-          caused by a statement.
+          This statement skips the next <replaceable>N</replaceable>
+          events from the master. This is useful for recovering from
+          replication stops caused by a statement.
         </para>
 
         <para>
@@ -18909,9 +18909,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on essential parameters of the
-          slave threads. If you issue this statement using the
-          <command>mysql</command> client, you can use a
+          This statement provides status information on essential
+          parameters of the slave threads. If you issue this statement
+          using the <command>mysql</command> client, you can use a
           <literal>\G</literal> statement terminator rather than a
           semicolon to obtain a more readable vertical layout:
         </para>
@@ -18971,12 +18971,12 @@
             <para>
               A copy of the <literal>State</literal> field of the output
               of <literal>SHOW PROCESSLIST</literal> for the slave I/O
-              thread. This tells you if the thread is trying to connect
-              to the master, waiting for events from the master,
+              thread. This tells you what the thread is doing: trying to
+              connect to the master, waiting for events from the master,
               reconnecting to the master, and so on. Possible states are
               listed in
-              <xref linkend="replication-implementation-details"/>.
-              Looking at this field is necessary for older versions of
+              <xref linkend="replication-implementation-details"/>. It
+              is necessary to check this field for older versions of
               MySQL (prior to 5.0.12) because in these versions the
               thread could be running while unsuccessfully trying to
               connect to the master; only this field makes you aware of
@@ -19089,10 +19089,10 @@
             </para>
 
             <para>
-              Whether or not the I/O thread is started and has connected
+              Whether the I/O thread is started and has connected
               successfully to the master. For older versions of MySQL
               (prior to 4.1.14 and 5.0.12)
-              <literal>Slave_IO_Running</literal> will be set to
+              <literal>Slave_IO_Running</literal> is
               <literal>YES</literal> if the I/O thread is started, even
               if the slave hasn't connected to the master yet.
             </para>
@@ -19150,13 +19150,10 @@
               recently executed query. An error number of 0 and message
               of the empty string mean <quote>no error.</quote> If the
               <literal>Last_Error</literal> value is not empty, it also
-              appears as a message in the slave's error log.
+              appears as a message in the slave's error log. For
+              example:
             </para>
 
-            <para>
-              For example:
-            </para>
-
 <programlisting>
 Last_Errno: 1051
 Last_Error: error 'Unknown table 'z'' on query 'drop table z'
@@ -19321,14 +19318,34 @@
 
             <para>
               This field is an indication of how <quote>late</quote> the
-              slave is. When the slave SQL thread is actively running
-              (processing updates), this field is the number of seconds
-              that have elapsed since the timestamp of the most recent
-              event on the master executed by that thread. When that
-              thread has caught up on the slave I/O thread and goes idle
-              waiting for more events from the I/O thread this field is
-              zero. In sum, this field measures in seconds the time
-              difference between the slave SQL thread and the slave I/O
+              slave is:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  When the slave SQL thread is actively running
+                  (processing updates), this field is the number of
+                  seconds that have elapsed since the timestamp of the
+                  most recent event on the master executed by that
+                  thread.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  When the SQL thread thread has caught up to the slave
+                  I/O thread and goes idle waiting for more events from
+                  the I/O thread, this field is zero.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              In essence, this field measures the time difference in
+              seconds between the slave SQL thread and the slave I/O
               thread.
             </para>
 
@@ -19341,13 +19358,13 @@
               fast, the slave I/O thread is very close to the master, so
               this field is a good approximation of how late the slave
               SQL thread is compared to the master. If the network is
-              slow, this is <emphasis role="bold">not</emphasis> a good
+              slow, this is <emphasis>not</emphasis> a good
               approximation; the slave SQL thread may quite often be
               caught up with the slow-reading slave I/O thread, so
               <literal>Seconds_Behind_Master</literal> often shows a
               value of 0, even if the I/O thread is late compared to the
-              master. In other words, <emphasis role="bold">this column
-              is useful only for fast networks</emphasis>.
+              master. In other words, <emphasis>this column is useful
+              only for fast networks</emphasis>.
             </para>
 
             <para>
@@ -19360,10 +19377,11 @@
               <quote>unknown</quote>) if the slave SQL thread is not
               running, or if the slave I/O thread is not running or not
               connected to master. For example if the slave I/O thread
-              is sleeping for <literal>master-connect-retry</literal>
-              seconds before reconnecting, <literal>NULL</literal> is
-              shown, as the slave cannot know what the master is doing,
-              and so cannot say reliably how late it is.
+              is sleeping for the number of seconds given by the
+              <option>--master-connect-retry</option> option before
+              reconnecting, <literal>NULL</literal> is shown, as the
+              slave cannot know what the master is doing, and so cannot
+              say reliably how late it is.
             </para>
 
             <para>
@@ -19377,8 +19395,8 @@
               <literal>Seconds_Behind_Master</literal> is that if M1
               also receives direct updates from clients, the value
               randomly deviates, because sometimes the last M1's event
-              is from M0 and sometimes it is from a direct update, and
-              so is the most recent timestamp.
+              is from M0 and sometimes it is the most recent timestamp
+              from a direct update.
             </para>
           </listitem>
 
@@ -19409,7 +19427,7 @@
 START SLAVE [SQL_THREAD] UNTIL
     RELAY_LOG_FILE = '<replaceable>log_name</replaceable>', RELAY_LOG_POS = <replaceable>log_pos</replaceable>
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>
@@ -19499,10 +19517,10 @@
         </para>
 
         <para>
-          In previous versions of MySQL, this statement was called
-          <literal>SLAVE START</literal>. This usage is still accepted
-          in MySQL &current-series; for backward compatibility, but is
-          now deprecated.
+          In previous versions of MySQL (before 4.0.5), this statement
+          was called <literal>SLAVE START</literal>. This usage is still
+          accepted in MySQL &current-series; for backward compatibility,
+          but is deprecated.
         </para>
 
       </section>
@@ -19526,7 +19544,7 @@
 <programlisting>
 STOP SLAVE [<replaceable>thread_type</replaceable> [, <replaceable>thread_type</replaceable>] ... ]
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>
@@ -19546,10 +19564,10 @@
         <remark role="help-description-end"/>
 
         <para>
-          In previous versions of MySQL, this statement was called
-          <literal>SLAVE STOP</literal>. This usage is still accepted in
-          MySQL &current-series; for backward compatibility, but is now
-          deprecated.
+          In previous versions of MySQL (before 4.0.5), this statement
+          was called <literal>SLAVE STOP</literal>. This usage is still
+          accepted in MySQL &current-series; for backward compatibility,
+          but is deprecated.
         </para>
 
         <remark>

Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml	2006-01-26 23:48:21 UTC (rev 1053)
+++ trunk/refman-5.1/sql-syntax.xml	2006-01-27 04:01:47 UTC (rev 1054)
@@ -837,7 +837,7 @@
           <para>
             <literal>DROP PARTITION</literal> can be used to drop one or
             more <literal>RANGE</literal> or <literal>LIST</literal>
-            partitions. This command cannot be used with
+            partitions. This statement cannot be used with
             <literal>HASH</literal> or <literal>KEY</literal>
             partitions; instead, use <literal>COALESCE
             PARTITION</literal> (see below). Any data that was stored in
@@ -893,7 +893,7 @@
           <para>
             You can reduce the number of partitions used by
             <literal>t2</literal> from 6 to 4 using the following
-            command:
+            statement:
           </para>
 
 <programlisting>
@@ -911,7 +911,7 @@
           <para>
             To change some but not all the partitions used by a
             partitioned table, you can use <literal>REORGANIZE
-            PARTITION</literal>. This command can be used in several
+            PARTITION</literal>. This statement can be used in several
             ways:
           </para>
 
@@ -958,7 +958,7 @@
           <para>
             For more detailed information about and examples of
             <literal>ALTER TABLE ... REORGANIZE PARTITION</literal>
-            commands, see <xref linkend="partitioning-management"/>.
+            statements, see <xref linkend="partitioning-management"/>.
           </para>
         </listitem>
 
@@ -966,7 +966,7 @@
           <para>
             Several additional clauses provide partition maintenance and
             repair functionality analogous to that implemented for
-            non-partitioned tables by commands such as <literal>CHECK
+            non-partitioned tables by statements such as <literal>CHECK
             TABLE</literal> and <literal>REPAIR TABLE</literal> (which
             are <emphasis>not</emphasis> supported for partitioned
             tables). These include <literal>ANALYZE PARTITION</literal>,
@@ -2698,7 +2698,7 @@
             <xref linkend="partitioning"/>, for more complete
             information about the workings of and uses for partitioning
             in MySQL, as well as additional examples of table creation
-            and other commands relating to MySQL partitioning.
+            and other statements relating to MySQL partitioning.
           </para>
 
           <itemizedlist>
@@ -3172,7 +3172,7 @@
           <para>
             Partitions can be modified, merged, added to tables, and
             dropped from tables. For basic information about the MySQL
-            commands to accomplish these tasks, see
+            statements to accomplish these tasks, see
             <xref linkend="alter-table"/>. For more detailed
             descriptions and examples, see
             <xref linkend="partitioning-management"/>.
@@ -10395,8 +10395,8 @@
         occurs). Because of this, <literal>SHOW PROCESSLIST</literal>
         displays <literal>Rolling back</literal> in the
         <literal>State</literal> column for the connection during
-        implicit and explicit (<literal>ROLLBACK</literal> SQL command)
-        rollbacks.
+        implicit and explicit (<literal>ROLLBACK</literal> SQL
+        statement) rollbacks.
       </para>
 
     </section>
@@ -11746,7 +11746,7 @@
           <emphasis>Important</emphasis>: <literal>DROP USER</literal>
           does not automatically close any open user sessions. Rather,
           in the event that a user with an open session is dropped, the
-          command does not take effect until that user's session is
+          statement does not take effect until that user's session is
           closed. Once the session is closed, the user is dropped, and
           that user's next attempt to log in will fail. <emphasis>This
           is by design</emphasis>.
@@ -13607,7 +13607,7 @@
           the binary log unless the optional
           <literal>NO_WRITE_TO_BINLOG</literal> keyword(or its alias
           <literal>LOCAL</literal>) is used. This has been done so that
-          <literal>OPTIMIZE TABLE</literal> commands used on a MySQL
+          <literal>OPTIMIZE TABLE</literal> statements used on a MySQL
           server acting as a replication master will be replicated by
           default to the replication slave.
         </para>
@@ -14007,8 +14007,9 @@
 
       <para>
         <emphasis>Note</emphasis>: Older versions of MySQL employed
-        <literal>SET OPTION</literal> for this command, but this usage
-        is now deprecated in favor of <literal>SET</literal>.
+        <literal>SET OPTION</literal> for this statement, but this usage
+        is now deprecated in favor of <literal>SET</literal> without
+        <literal>OPTION</literal>.
       </para>
 
       <para>
@@ -16584,13 +16585,13 @@
             </para>
 
             <para>
-              Someone has sent a <literal>KILL</literal> command to the
-              thread and it should abort next time it checks the kill
-              flag. The flag is checked in each major loop in MySQL, but
-              in some cases it might still take a short time for the
-              thread to die. If the thread is locked by some other
-              thread, the kill takes effect as soon as the other thread
-              releases its lock.
+              Someone has sent a <literal>KILL</literal> statement to
+              the thread and it should abort next time it checks the
+              kill flag. The flag is checked in each major loop in
+              MySQL, but in some cases it might still take a short time
+              for the thread to die. If the thread is locked by some
+              other thread, the kill takes effect as soon as the other
+              thread releases its lock.
             </para>
           </listitem>
 
@@ -17293,7 +17294,7 @@
         </para>
 
         <para>
-          This command also lists any views in the database. The
+          This statement also lists any views in the database. The
           <literal>FULL</literal> modifier is supported such that
           <literal>SHOW FULL TABLES</literal> displays a second output
           column. Values for the second column are <literal>BASE
@@ -17510,7 +17511,7 @@
 
         <para>
           If the default values are unsuitable, you can set most of
-          these variables using command-line options when
+          these variables using command options when
           <command>mysqld</command> starts or at runtime with the
           <literal>SET</literal> statement. See
           <xref linkend="server-options"/>, and
@@ -18489,18 +18490,18 @@
       <title>&title-replication-master-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication masters</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication masters</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -18673,9 +18674,9 @@
         <para>
           Disables or enables binary logging for the current connection
           (<literal>SQL_LOG_BIN</literal> is a session variable) if the
-          client connects using an account that has the
-          <literal>SUPER</literal> privilege. A statement is refused
-          with an error if the client does not have that privilege.
+          client has the <literal>SUPER</literal> privilege. The
+          statement is refused with an error if the client does not have
+          that privilege.
         </para>
 
         <remark role="help-description-end"/>
@@ -18707,8 +18708,8 @@
 
         <para>
           Shows the events in the binary log. If you do not specify
-          <literal>'log_name'</literal>, the first binary log is
-          displayed.
+          <literal>'<replaceable>log_name</replaceable>'</literal>, the
+          first binary log is displayed.
         </para>
 
         <remark role="help-description-end"/>
@@ -18723,11 +18724,12 @@
           <emphasis role="bold">Note</emphasis>: Issuing a <literal>SHOW
           BINLOG EVENTS</literal> with no <literal>LIMIT</literal>
           clause could start a very time- and resource-consuming process
-          as the server dumps the complete contents of the binary log
-          (which includes most of the queries executed by MySQL) to
-          stdout. To save the binary log to a text file for later
-          examination and analysis, use the
-          <command>mysqlbinlog</command> utility. See
+          because the server returns to the client the complete contents
+          of the binary log (which includes all statements executed by
+          the server that modify data). As an alternative to
+          <literal>SHOW BINLOG EVENTS</literal>, use the
+          <command>mysqlbinlog</command> utility to save the binary log
+          to a text file for later examination and analysis. See
           <xref linkend="mysqlbinlog"/>.
         </para>
 
@@ -18767,8 +18769,8 @@
         <para>
           Lists the binary log files on the server. This statement is
           used as part of the procedure described in
-          <xref linkend="purge-master-logs"/>, for determining which
-          logs can be purged.
+          <xref linkend="purge-master-logs"/>, that shows how to
+          determine which logs can be purged.
         </para>
 
 <programlisting>
@@ -18817,12 +18819,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on the binary log files of the
+          Provides status information about the binary log files of the
           master. Example:
         </para>
 
 <programlisting>
-mysql &gt; SHOW MASTER STATUS;
+mysql &gt; <userinput>SHOW MASTER STATUS;</userinput>
 +---------------+----------+--------------+------------------+
 | File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +---------------+----------+--------------+------------------+
@@ -18878,18 +18880,18 @@
       <title>&title-replication-slave-sql;</title>
 
       <indexterm>
-        <primary>SQL commands</primary>
+        <primary>SQL statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
-        <primary>commands</primary>
+        <primary>statements</primary>
         <secondary>replication slaves</secondary>
       </indexterm>
 
       <indexterm>
         <primary>replication slaves</primary>
-        <secondary>commands</secondary>
+        <secondary>statements</secondary>
       </indexterm>
 
       <para>
@@ -18919,31 +18921,34 @@
         <remark role="help-syntax"/>
 
 <programlisting>
-  CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
+CHANGE MASTER TO <replaceable>master_def</replaceable> [, <replaceable>master_def</replaceable>] ...
 
-master_def:
-      MASTER_HOST = '<replaceable>host_name</replaceable>'
-    | MASTER_USER = '<replaceable>user_name</replaceable>'
-    | MASTER_PASSWORD = '<replaceable>password</replaceable>'
-    | MASTER_PORT = <replaceable>port_num</replaceable>
-    | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
-    | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
-    | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
-    | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
-    | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
-    | MASTER_SSL = {0|1}
-    | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
-    | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
-    | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
-    | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
-    | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
+<replaceable>master_def</replaceable>:
+    MASTER_HOST = '<replaceable>host_name</replaceable>'
+  | MASTER_USER = '<replaceable>user_name</replaceable>'
+  | MASTER_PASSWORD = '<replaceable>password</replaceable>'
+  | MASTER_PORT = <replaceable>port_num</replaceable>
+  | MASTER_CONNECT_RETRY = <replaceable>count</replaceable>
+  | MASTER_LOG_FILE = '<replaceable>master_log_name</replaceable>'
+  | MASTER_LOG_POS = <replaceable>master_log_pos</replaceable>
+  | RELAY_LOG_FILE = '<replaceable>relay_log_name</replaceable>'
+  | RELAY_LOG_POS = <replaceable>relay_log_pos</replaceable>
+  | MASTER_SSL = {0|1}
+  | MASTER_SSL_CA = '<replaceable>ca_file_name</replaceable>'
+  | MASTER_SSL_CAPATH = '<replaceable>ca_directory_name</replaceable>'
+  | MASTER_SSL_CERT = '<replaceable>cert_file_name</replaceable>'
+  | MASTER_SSL_KEY = '<replaceable>key_file_name</replaceable>'
+  | MASTER_SSL_CIPHER = '<replaceable>cipher_list</replaceable>'
 </programlisting>
 
         <remark role="help-description-begin"/>
 
         <para>
-          Changes the parameters that the slave server uses for
-          connecting to and communicating with the master server.
+          <literal>CHANGE MASTER TO</literal> changes the parameters
+          that the slave server uses for connecting to and communicating
+          with the master server. It also updates the contents of the
+          <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files.
         </para>
 
         <para>
@@ -18979,9 +18984,9 @@
         </para>
 
 <programlisting>
-mysql&gt; <userinput>STOP SLAVE; -- if replication was running</userinput>
-mysql&gt; <userinput>CHANGE MASTER TO MASTER_PASSWORD='new3cret';</userinput>
-mysql&gt; <userinput>START SLAVE; -- if you want to restart replication</userinput>
+STOP SLAVE; -- if replication was running
+CHANGE MASTER TO MASTER_PASSWORD='new3cret';
+START SLAVE; -- if you want to restart replication
 </programlisting>
 
         <para>
@@ -18995,14 +19000,14 @@
           address) of the master host and its TCP/IP port. Note that if
           <literal>MASTER_HOST</literal> is equal to
           <literal>localhost</literal>, then, like in other parts of
-          MySQL, the port may be ignored (if Unix socket files can be
-          used, for example).
+          MySQL, the port number might be ignored (if Unix socket files
+          can be used, for example).
         </para>
 
         <para>
           If you specify <literal>MASTER_HOST</literal> or
           <literal>MASTER_PORT</literal>, the slave assumes that the
-          master server is different than before (even if you specify a
+          master server is different from before (even if you specify a
           host or port value that is the same as the current value.) In
           this case, the old values for the master binary log name and
           position are considered no longer applicable, so if you do not
@@ -19040,12 +19045,6 @@
         </para>
 
         <para>
-          <literal>CHANGE MASTER TO</literal> updates the contents of
-          the <filename>master.info</filename> and
-          <filename>relay-log.info</filename> files.
-        </para>
-
-        <para>
           <literal>CHANGE MASTER</literal> is useful for setting up a
           slave when you have the snapshot of the master and have
           recorded the log and the offset corresponding to it. After
@@ -19057,41 +19056,39 @@
         </para>
 
         <para>
-          Examples:
+          The following example changes the master and master's binary
+          log coordinates. This is used when you want to set up the
+          slave to replicate the master:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>MASTER_HOST='master2.mycompany.com',</userinput>
-    -&gt;     <userinput>MASTER_USER='replication',</userinput>
-    -&gt;     <userinput>MASTER_PASSWORD='bigs3cret',</userinput>
-    -&gt;     <userinput>MASTER_PORT=3306,</userinput>
-    -&gt;     <userinput>MASTER_LOG_FILE='master2-bin.001',</userinput>
-    -&gt;     <userinput>MASTER_LOG_POS=4,</userinput>
-    -&gt;     <userinput>MASTER_CONNECT_RETRY=10;</userinput>
-
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='slave-relay-bin.006',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=4025;</userinput>
+CHANGE MASTER TO
+  MASTER_HOST='master2.mycompany.com',
+  MASTER_USER='replication',
+  MASTER_PASSWORD='bigs3cret',
+  MASTER_PORT=3306,
+  MASTER_LOG_FILE='master2-bin.001',
+  MASTER_LOG_POS=4,
+  MASTER_CONNECT_RETRY=10;
 </programlisting>
 
-        <remark role="help-description-end"/>
-
         <para>
-          The first example changes the master and master's binary log
-          coordinates. This is used when you want to set up the slave to
-          replicate the master.
-        </para>
-
-        <para>
-          The second example shows an operation that is less frequently
+          The next example shows an operation that is less frequently
           employed. It is used when the slave has relay logs that you
           want it to execute again for some reason. To do this, the
           master need not be reachable. You need only use
           <literal>CHANGE MASTER TO</literal> and start the SQL thread
-          (<literal>START SLAVE SQL_THREAD</literal>).
+          (<literal>START SLAVE SQL_THREAD</literal>):
         </para>
 
+<programlisting>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='slave-relay-bin.006',
+  RELAY_LOG_POS=4025;
+</programlisting>
+
+        <remark role="help-description-end"/>
+
         <para>
           You can even use the second operation in a non-replication
           setup with a standalone, non-slave server for recovery
@@ -19108,30 +19105,31 @@
           <option>--replicate-same-server-id</option>,
           <option>--relay-log=myhost-bin</option> (to make the server
           believe that these regular binary logs are relay logs) and
-          <option>--skip-slave-start</option> options. Once the server
+          <option>--skip-slave-start</option> options. After the server
           starts, issue these statements:
         </para>
 
 <programlisting>
-mysql&gt; <userinput>CHANGE MASTER TO</userinput>
-    -&gt;     <userinput>RELAY_LOG_FILE='myhost-bin.153',</userinput>
-    -&gt;     <userinput>RELAY_LOG_POS=410,</userinput>
-    -&gt;     <userinput>MASTER_HOST='some_dummy_string';</userinput>
-mysql&gt; <userinput>START SLAVE SQL_THREAD;</userinput>
+CHANGE MASTER TO
+  RELAY_LOG_FILE='myhost-bin.153',
+  RELAY_LOG_POS=410,
+  MASTER_HOST='some_dummy_string';
+START SLAVE SQL_THREAD;
 </programlisting>
 
         <para>
           The server reads and executes its own binary logs, thus
           achieving crash recovery. Once the recovery is finished, run
           <literal>STOP SLAVE</literal>, shut down the server, delete
-          <filename>master.info</filename> and
-          <filename>relay-log.info</filename>, and restart the server
-          with its original options.
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, and restart the
+          server with its original options.
         </para>
 
         <para>
-          Specifying <literal>MASTER_HOST</literal> (even with a dummy
-          value) is required to make the server think it is a slave.
+          Specifying the <literal>MASTER_HOST</literal> option (even
+          with a dummy value) is required to make the server think it is
+          a slave.
         </para>
 
       </section>
@@ -19159,7 +19157,7 @@
         <remark role="help-description-begin"/>
 
         <para>
-          This command takes a snapshot of the master and copies it to
+          This statement takes a snapshot of the master and copies it to
           the slave. It updates the values of
           <literal>MASTER_LOG_FILE</literal> and
           <literal>MASTER_LOG_POS</literal> so that the slave starts
@@ -19170,8 +19168,8 @@
           <option>--replicate-rewrite-db</option> is
           <emphasis>not</emphasis> taken into account because a user
           could use this option to set up a non-unique mapping such as
-          <option>--replicate-rewrite-db=db1-&gt;db3</option> and
-          <option>--replicate-rewrite-db=db2-&gt;db3</option>, which
+          <option>--replicate-rewrite-db="db1-&gt;db3"</option> and
+          <option>--replicate-rewrite-db="db2-&gt;db3"</option>, which
           would confuse the slave when loading tables from the master.
         </para>
 
@@ -19230,9 +19228,9 @@
         </para>
 
         <para>
-          The <literal>LOAD DATA FROM MASTER</literal> statement
-          requires the replication account that is used to connect to
-          the master to have the <literal>RELOAD</literal> and
+          To use <literal>LOAD DATA FROM MASTER</literal>, the
+          replication account that is used to connect to the master must
+          have the <literal>RELOAD</literal> and
           <literal>SUPER</literal> privileges on the master and the
           <literal>SELECT</literal> privilege for all master tables you
           want to load. All master tables for which the user does not
@@ -19244,8 +19242,8 @@
           DATABASES</literal> returns only databases for which the user
           has some privilege. See <xref linkend="show-databases"/>. On
           the slave side, the user that issues <literal>LOAD DATA FROM
-          MASTER</literal> should have grants to drop and create the
-          databases and tables that are copied.
+          MASTER</literal> must have privileges for dropping and
+          creating the databases and tables that are copied.
         </para>
 
         <remark role="help-description-end"/>
@@ -19276,14 +19274,15 @@
 
         <para>
           Transfers a copy of the table from the master to the slave.
-          This statement is implemented mainly for debugging of
-          <literal>LOAD DATA FROM MASTER</literal>. It requires that the
-          account used for connecting to the master server has the
-          <literal>RELOAD</literal> and <literal>SUPER</literal>
-          privileges on the master and the <literal>SELECT</literal>
-          privilege on the master table to load. On the slave side, the
-          user that issues <literal>LOAD TABLE FROM MASTER</literal>
-          should have privileges to drop and create the table.
+          This statement is implemented mainly debugging <literal>LOAD
+          DATA FROM MASTER</literal> operations. To use <literal>LOAD
+          TABLE</literal>, the account used for connecting to the master
+          server must have the <literal>RELOAD</literal> and
+          <literal>SUPER</literal> privileges on the master and the
+          <literal>SELECT</literal> privilege for the master table to
+          load. On the slave side, the user that issues <literal>LOAD
+          TABLE FROM MASTER</literal> must have privileges for dropping
+          and creating the table.
         </para>
 
         <para>
@@ -19343,11 +19342,12 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Makes the slave forget its replication position in the
-          master's binary logs. This statement is meant to be used for a
-          clean start: It deletes the <filename>master.info</filename>
-          and <filename>relay-log.info</filename> files, all the relay
-          logs, and starts a new relay log.
+          <literal>RESET SLAVE</literal> makes the slave forget its
+          replication position in the master's binary logs. This
+          statement is meant to be used for a clean start: It deletes
+          the <filename>master.info</filename> and
+          <filename>relay-log.info</filename> files, all the relay logs,
+          and starts a new relay log.
         </para>
 
         <para>
@@ -19397,9 +19397,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Skip the next <replaceable>N</replaceable> events from the
-          master. This is useful for recovering from replication stops
-          caused by a statement.
+          This statement skips the next <replaceable>N</replaceable>
+          events from the master. This is useful for recovering from
+          replication stops caused by a statement.
         </para>
 
         <para>
@@ -19434,9 +19434,9 @@
         <remark role="help-description-begin"/>
 
         <para>
-          Provides status information on essential parameters of the
-          slave threads. If you issue this statement using the
-          <command>mysql</command> client, you can use a
+          This statement provides status information on essential
+          parameters of the slave threads. If you issue this statement
+          using the <command>mysql</command> client, you can use a
           <literal>\G</literal> statement terminator rather than a
           semicolon to obtain a more readable vertical layout:
         </para>
@@ -19497,12 +19497,12 @@
             <para>
               A copy of the <literal>State</literal> field of the output
               of <literal>SHOW PROCESSLIST</literal> for the slave I/O
-              thread. This tells you if the thread is trying to connect
-              to the master, waiting for events from the master,
+              thread. This tells you what the thread is doing: trying to
+              connect to the master, waiting for events from the master,
               reconnecting to the master, and so on. Possible states are
               listed in
-              <xref linkend="replication-implementation-details"/>.
-              Looking at this field is necessary for older versions of
+              <xref linkend="replication-implementation-details"/>. It
+              is necessary to check this field for older versions of
               MySQL which allowed the thread to continue running while
               unsuccessfully trying to connect to the master. If it is
               running, there is no problem; if it is not, you can find
@@ -19613,10 +19613,10 @@
             </para>
 
             <para>
-              Whether or not the I/O thread is started and has connected
+              Whether the I/O thread is started and has connected
               successfully to the master. For older versions of MySQL
               (prior to 4.1.14 and 5.0.12)
-              <literal>Slave_IO_Running</literal> will be set to
+              <literal>Slave_IO_Running</literal> is
               <literal>YES</literal> if the I/O thread is started, even
               if the slave hasn't connected to the master yet.
             </para>
@@ -19674,13 +19674,10 @@
               recently executed query. An error number of 0 and message
               of the empty string mean <quote>no error.</quote> If the
               <literal>Last_Error</literal> value is not empty, it also
-              appears as a message in the slave's error log.
+              appears as a message in the slave's error log. For
+              example:
             </para>
 
-            <para>
-              For example:
-            </para>
-
 <programlisting>
 Last_Errno: 1051
 Last_Error: error 'Unknown table 'z'' on query 'drop table z'
@@ -19845,14 +19842,34 @@
 
             <para>
               This field is an indication of how <quote>late</quote> the
-              slave is. When the slave SQL thread is actively running
-              (processing updates), this field is the number of seconds
-              that have elapsed since the timestamp of the most recent
-              event on the master executed by that thread. When that
-              thread has caught up on the slave I/O thread and goes idle
-              waiting for more events from the I/O thread this field is
-              zero. In sum, this field measures in seconds the time
-              difference between the slave SQL thread and the slave I/O
+              slave is:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  When the slave SQL thread is actively running
+                  (processing updates), this field is the number of
+                  seconds that have elapsed since the timestamp of the
+                  most recent event on the master executed by that
+                  thread.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  When the SQL thread thread has caught up to the slave
+                  I/O thread and goes idle waiting for more events from
+                  the I/O thread, this field is zero.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+
+            <para>
+              In essence, this field measures the time difference in
+              seconds between the slave SQL thread and the slave I/O
               thread.
             </para>
 
@@ -19865,13 +19882,13 @@
               fast, the slave I/O thread is very close to the master, so
               this field is a good approximation of how late the slave
               SQL thread is compared to the master. If the network is
-              slow, this is <emphasis role="bold">not</emphasis> a good
+              slow, this is <emphasis>not</emphasis> a good
               approximation; the slave SQL thread may quite often be
               caught up with the slow-reading slave I/O thread, so
               <literal>Seconds_Behind_Master</literal> often shows a
               value of 0, even if the I/O thread is late compared to the
-              master. In other words, <emphasis role="bold">this column
-              is useful only for fast networks</emphasis>.
+              master. In other words, <emphasis>this column is useful
+              only for fast networks</emphasis>.
             </para>
 
             <para>
@@ -19884,10 +19901,11 @@
               <quote>unknown</quote>) if the slave SQL thread is not
               running, or if the slave I/O thread is not running or not
               connected to master. For example if the slave I/O thread
-              is sleeping for <literal>master-connect-retry</literal>
-              seconds before reconnecting, <literal>NULL</literal> is
-              shown, as the slave cannot know what the master is doing,
-              and so cannot say reliably how late it is.
+              is sleeping for the number of seconds given by the
+              <option>--master-connect-retry</option> option before
+              reconnecting, <literal>NULL</literal> is shown, as the
+              slave cannot know what the master is doing, and so cannot
+              say reliably how late it is.
             </para>
 
             <para>
@@ -19901,8 +19919,8 @@
               <literal>Seconds_Behind_Master</literal> is that if M1
               also receives direct updates from clients, the value
               randomly deviates, because sometimes the last M1's event
-              is from M0 and sometimes it is from a direct update, and
-              so is the most recent timestamp.
+              is from M0 and sometimes it is the most recent timestamp
+              from a direct update.
             </para>
           </listitem>
 
@@ -19933,7 +19951,7 @@
 START SLAVE [SQL_THREAD] UNTIL
     RELAY_LOG_FILE = '<replaceable>log_name</replaceable>', RELAY_LOG_POS = <replaceable>log_pos</replaceable>
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>
@@ -20023,10 +20041,10 @@
         </para>
 
         <para>
-          In previous versions of MySQL, this statement was called
-          <literal>SLAVE START</literal>. This usage is still accepted
-          in MySQL &current-series; for backward compatibility, but is
-          now deprecated.
+          In previous versions of MySQL (before 4.0.5), this statement
+          was called <literal>SLAVE START</literal>. This usage is still
+          accepted in MySQL &current-series; for backward compatibility,
+          but is deprecated.
         </para>
 
       </section>
@@ -20050,7 +20068,7 @@
 <programlisting>
 STOP SLAVE [<replaceable>thread_type</replaceable> [, <replaceable>thread_type</replaceable>] ... ]
 
-thread_type: IO_THREAD | SQL_THREAD
+<replaceable>thread_type</replaceable>: IO_THREAD | SQL_THREAD
 </programlisting>
 
         <remark role="help-description-begin"/>
@@ -20070,10 +20088,10 @@
         <remark role="help-description-end"/>
 
         <para>
-          In previous versions of MySQL, this statement was called
-          <literal>SLAVE STOP</literal>. This usage is still accepted in
-          MySQL &current-series; for backward compatibility, but is now
-          deprecated.
+          In previous versions of MySQL (before 4.0.5), this statement
+          was called <literal>SLAVE STOP</literal>. This usage is still
+          accepted in MySQL &current-series; for backward compatibility,
+          but is deprecated.
         </para>
 
         <remark>

Thread
svn commit - mysqldoc@docsrva: r1054 - in trunk: . refman-4.1 refman-5.0 refman-5.1paul27 Jan