List:Commits« Previous MessageNext Message »
From:paul Date:March 7 2006 9:41pm
Subject:svn commit - mysqldoc@docsrva: r1522 - in trunk: . mysqltest
View as plain text  
Author: paul
Date: 2006-03-07 22:41:47 +0100 (Tue, 07 Mar 2006)
New Revision: 1522

Log:
 r8431@frost:  paul | 2006-03-07 15:40:36 -0600
 mysqltest material.


Modified:
   trunk/
   trunk/mysqltest/mysqltest.xml


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

Modified: trunk/mysqltest/mysqltest.xml
===================================================================
--- trunk/mysqltest/mysqltest.xml	2006-03-06 19:46:41 UTC (rev 1521)
+++ trunk/mysqltest/mysqltest.xml	2006-03-07 21:41:47 UTC (rev 1522)
@@ -9,6 +9,8 @@
 <!ENTITY title-mysqltest-for-manual "Program to Run Test Cases">
 <!ENTITY title-mysql-test-run-for-manpage "<command>mysqltest</command> driver program">
 <!ENTITY title-mysql-test-run-for-manual "<command>mysqltest</command> Driver Program">
+<!ENTITY title-mysql-test-run-pl-for-manpage "<command>mysqltest</command> driver program">
+<!ENTITY title-mysql-test-run-pl-for-manual "<command>mysqltest</command> Driver Program">
 <!ENTITY title-mysql-stress-test-for-manpage "server stress test program">
 <!ENTITY title-mysql-stress-test-for-manual "Server Stress Test Program">
 ]>
@@ -25,6 +27,13 @@
       </para>
 
       <para>
+        <emphasis>Please be aware that this document is a work in
+        progress.</emphasis> Unresolved questions are marked in the text
+        as [Q: ...]. If you can contribute the answers to any of them,
+        please do.
+      </para>
+
+      <para>
         Document generated on:
 
 <?dbtimestamp format="Y-m-d"?>
@@ -57,11 +66,6 @@
     <title>Introduction</title>
 
     <para>
-      <emphasis>Please be aware that this document is a work in
-      progress.</emphasis>
-    </para>
-
-    <para>
       Note: The <command>mysql-test-run</command> shell script is being
       replaced by the <command>mysql-test-run.pl</command> Perl script.
       Need to account for that in this document.
@@ -80,7 +84,10 @@
       test case is stored in a file, and the expected result from
       running the test is stored in another file. The expected result
       can be compared to the actual result from running a test to verify
-      program operation.
+      proper processing of the input by MySQL. Test case and result
+      files are stored in the <filename>t</filename> and
+      <filename>r</filename> subdirectories, respectively, of the
+      <filename>mysql-test</filename> directory.
     </para>
 
     <para>
@@ -88,9 +95,9 @@
       located in the <filename>client</filename> directory.
       <command>mysql-test-run</command> and the test input and result
       files are located in the <filename>mysql-test</filename>
-      directory. Both <filename>client</filename> and
-      <filename>mysql-test</filename> are located in the root directory
-      of the distribution.
+      directory. The <filename>client</filename> and
+      <filename>mysql-test</filename> directories are located in the
+      root directory of the distribution.
     </para>
 
     <para>
@@ -99,15 +106,15 @@
       <command>mysql</command> or <command>mysqladmin</command> are
       installed. <command>mysql-test-run</command> and the test input
       and result files are located in the
-      <filename>mysql-test</filename> directory. The location of these
-      directories depends on the particular layout of the distribution
-      format.
+      <filename>mysql-test</filename> directory. The locations of the
+      <filename>client</filename> and <filename>mysql-test</filename>
+      directories depend on the layout used for the distribution format.
     </para>
 
     <para>
-      This document describes how the test programs work, the language
-      used for writing test cases, and the layout of the
-      <filename>mysql-test</filename> directory.
+      This document describes the layout of the
+      <filename>mysql-test</filename> directory, how the test programs
+      work, and the language used for writing test cases.
     </para>
 
   </chapter>
@@ -120,8 +127,9 @@
       The test suite is located in the <filename>mysql-test</filename>
       directory. For a source distribution,
       <filename>mysql-test</filename> is found under the source tree
-      root. For a binary distribution, [might vary? Generally under the
-      MySQL installation directory?]
+      root. For a binary distribution, the location of
+      <filename>mysql-test</filename> depends on the layout used for the
+      distribution format.
     </para>
 
     <para>
@@ -141,14 +149,20 @@
           <listitem>
             <para>
               The <command>mysql-test-run</command> script that is used
-              to run the test suite (and
-              <command>mysql-test-run.pl</command>, which eventually
-              will replace <command>mysql-test-run</command>).
+              to run the test suite.
             </para>
           </listitem>
 
           <listitem>
             <para>
+              The <command>mysql-test-run.pl</command> script that is
+              currently in development (and that eventually will replace
+              <command>mysql-test-run</command>).
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
               The <command>mysql-stress-test.pl</command> stress-testing
               script. (MySQL 5.0 and up only)
             </para>
@@ -157,10 +171,12 @@
         </itemizedlist>
 
         <para>
-          Note: <command>mysqltest</command> is located elsewhere. For a
-          source distribution, it is in the <filename>client</filename>
-          directory. For a binary distribution, it is in the MySQL
-          <filename>bin</filename> directory.
+          Note: The <command>mysqltest</command> program is used by
+          <command>mysql-test-run</command> but is located elsewhere.
+          For a source distribution, <command>mysqltest</command> is in
+          the <filename>client</filename> directory. For a binary
+          distribution, it is in the MySQL <filename>bin</filename>
+          directory.
         </para>
       </listitem>
 
@@ -175,8 +191,12 @@
 
           <listitem>
             <para>
-              A filename ending with <filename>.test</filename> is a
-              test case file.
+              A filename of the form
+              <filename><replaceable>test_name</replaceable>.test</filename>
+              is a test case file for a test named
+              <replaceable>test_name</replaceable>. For example,
+              <filename>subselect.test</filename> is the test case file
+              for the test named <literal>subselect</literal>.
             </para>
           </listitem>
 
@@ -185,11 +205,16 @@
               A filename of the form
               <filename><replaceable>test_name</replaceable>-master.opt</filename>
               provides options to associate with the named test case.
-              <literal>mysql-test-run</literal> [?] restarts the server
-              with the options given in the file before running the test
+              <literal>mysql-test-run</literal> restarts the server with
+              the options given in the file before running the test
               case. Then it restarts the server with default options
               before running the next test case.
             </para>
+
+            <para>
+              [Q: Is the -master.opt file used for the "main" server in
+              a test, even if no replication is involved.
+            </para>
           </listitem>
 
           <listitem>
@@ -204,21 +229,23 @@
             <para>
               A filename of the form
               <filename><replaceable>test_name</replaceable>-im.opt</filename>
-              [is for ...?]
+              [Q: is for ...?]
             </para>
           </listitem>
 
         </itemizedlist>
 
         <para>
-          [What other <quote>magic</quote> filenames are there?]
+          [Q: Are there other <quote>magic</quote> filenames?
+          <literal>disabled.def</literal> contains info about
+          deferred/disabled tests?]
         </para>
       </listitem>
 
       <listitem>
         <para>
           The <filename>r</filename> directory contains test case result
-          files:.
+          files:
         </para>
 
         <itemizedlist>
@@ -227,8 +254,10 @@
             <para>
               A filename of the form
               <filename><replaceable>test_name</replaceable>.result</filename>
-              is the expected result for the named test case. This file
-              corresponds to the test case file
+              is the expected result for the named test case. A file
+              <filename>r/<replaceable>test_name</replaceable>.result</filename>
+              is the output that corresponds to the input in the test
+              case file
               <filename>t/<replaceable>test_name</replaceable>.test</filename>.
             </para>
           </listitem>
@@ -239,9 +268,24 @@
               <filename><replaceable>test_name</replaceable>.reject</filename>
               contains output for the named test case if the test fails.
             </para>
+
+            <para>
+              [Q: If a .reject file is created because a test fails,
+              does the file get removed automatically later the next
+              time the test succeeds?]
+            </para>
           </listitem>
 
         </itemizedlist>
+
+        <para>
+          For a test case that succeeds, the
+          <filename>.result</filename> file represents both the expected
+          and actual result. For a test case that fails, the
+          <filename>.result</filename> file represents the expected
+          result, and the <filename>.reject</filename> file represents
+          the actual result.
+        </para>
       </listitem>
 
       <listitem>
@@ -250,82 +294,174 @@
           are included by test case files using the
           <literal>source</literal> command.
         </para>
-
-        <para>
-          If you find that several test case files contain a common
-          section of commands (for example, statements that create a
-          standard set of tables), you can put that section in another
-          file and include it into the test cases that need it by means
-          of a <literal>source
-          <replaceable>file_name</replaceable></literal> command. This
-          enables you to write the code just once rather than in
-          multiple test cases.
-        </para>
       </listitem>
 
       <listitem>
         <para>
-          The <filename>lib</filename> directory contains [What?]
+          The <filename>lib</filename> directory contains library files
+          used by <command>mysql-test-run.pl</command>, and database
+          initialization SQL code.
         </para>
       </listitem>
 
       <listitem>
         <para>
-          The <filename>std_data</filename> directory contains [What?]
+          The <filename>std_data</filename> directory contains [Q:
+          What?]
         </para>
       </listitem>
 
       <listitem>
         <para>
-          The <filename>var</filename> directory contains [What? various
-          output or temp files?]. This directory cannot be shared by
-          simultaneous test runs.
+          The <filename>var</filename> directory is used turning test
+          runs for log and temporary files. [Q: and anything else?] This
+          directory cannot be shared by simultaneous test runs.
         </para>
       </listitem>
 
     </itemizedlist>
 
     <para>
+      [The following stuff would be better for an overview section?]
+    </para>
+
+    <para>
       A <quote>test case</quote> is a single file. The case might
-      contain multiple individual tests. If any individual test fails,
-      the entire test case is considered to fail. Note that
-      <quote>fail</quote> means <quote>does not produce the expected
-      result.</quote> It does not necessarily mean <quote>executes
-      without error,</quote> because some tests are written precisely to
-      verify that an illegal statement does in fact produce an error. In
-      such an instance, if the statement executes successfully without
-      producing the expected error, that is considered failure of the
-      test.
+      contain multiple individual test commands. If any individual
+      command fails, the entire test case is considered to fail. Note
+      that <quote>fail</quote> means <quote>does not produce the
+      expected result.</quote> It does <emphasis>not</emphasis>
+      necessarily mean <quote>executes without error,</quote> because
+      some tests are written precisely to verify that an illegal
+      statement does in fact produce an error. In such an instance, if
+      the statement executes successfully without producing the expected
+      error, that is considered failure of the test.
     </para>
 
     <para>
-      The test result consists of the input SQL statements and their
-      output. The <literal>disable_query_log</literal> and
+      Test case output (the test result) consists of:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          Input SQL statements and their output. That is, each statement
+          is written to the result followed by its output.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          The result from <command>mysqltest</command> commands such as
+          <literal>echo</literal> and <literal>exec</literal>. That is,
+          the commands themselves are not echoed to the result, only
+          their output.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Columns in output resulting from SQL statements are separated
+          by tab characters. [Q: Is there any way to change the
+          separator?]
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      The <literal>disable_query_log</literal> and
       <literal>enable_query_log</literal> commands control logging of
-      input statements. The <literal>disable_result_log</literal> and
-      <literal>enable_result_log</literal> commands control logging of
-      statement results. [I believe this includes not just normal
-      results, but also warning or error messages.]
+      input SQL statements. The <literal>disable_result_log</literal>
+      and <literal>enable_result_log</literal> commands control logging
+      of SQL statement results.
     </para>
 
     <para>
-      Previous para isn't quite right. The test result also contains
-      output from input commands like <literal>echo</literal> and
-      <literal>exec</literal> (but not the input commands themselves).
-      This command output also seems to be controlled by the
-      <literal>disable_result_log</literal> and
-      <literal>enable_result_log</literal> commands.
+      [Q: I believe the _result_log commands affect not just normal
+      statement output, but also warning or error messages.] [Q: I'm not
+      sure how the _result_log commands affect logging of
+      <command>mysqltest</command> command output.
+      <literal>echo</literal> command output seems to appear regardless,
+      <literal>eval</literal> command output seems to be turned off/on.]
     </para>
 
     <para>
       Result files are sometimes called <quote>protocol files.</quote>
+      [Q: Why? What is the meaning of that designation?]
     </para>
 
     <para>
-      Result output columns are separated by tab characters. [Is there
-      any way to change the separator?]
+      <command>mysqltest</command> reads a test case file from its
+      standard input by default. The <option>--test-file</option> or
+      <option>-x</option> option can be given to name a test case file
+      explicitly.
     </para>
 
+    <para>
+      <command>mysqltest</command> writes test case output to the
+      standard output by default. The <option>--result-file</option> or
+      <option>-R</option> option can be used to indicate the location of
+      the result file. That option, together with the
+      <option>--record</option> option, determine how
+      <command>mysqltest</command> treats the test actual and expected
+      results for a test case:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          If the test produces no results, <command>mysqltest</command>
+          exits with an error message to that effect.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Otherwise, if <option>--result-file</option> is not given,
+          <command>mysqltest</command> sends test results to the
+          standard output.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          With <option>--result-file</option> but not
+          <option>--record</option>, <command>mysqltest</command> reads
+          the expected results from the given file and compares them
+          with the actual results.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          With both <option>--result-file</option> and
+          <option>--record</option>, <command>mysqltest</command>
+          updates the given file by writing the actual test results to
+          it.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
+      [Q: <command>mysqltest</command> does not write the
+      <filename>.reject</filename> files?
+    </para>
+
+    <para>
+      <command>mysqltest</command> itself knows nothing of the
+      <filename>t</filename> and <filename>r</filename> directories
+      under the <filename>mysql-test</filename> directory. The use of
+      files in those directories is a convention followed by
+      <command>mysql-test-run</command>, which invokes
+      <command>mysqltest</command> with the appropriate options for each
+      test case to tell <command>mysqltest</command> where to read input
+      and write output.
+    </para>
+
   </chapter>
 
   <chapter id="test-programs">
@@ -340,26 +476,43 @@
     </remark>
 
     <para>
-      This chapter describes the test programs that run test cases:
+      This chapter describes the test programs that run test cases. For
+      information about the language used for writing test cases, see
+      <xref linkend="mysqltest-language"/>.
     </para>
 
+    <para>
+      The test suite uses the following programs:
+    </para>
+
     <itemizedlist>
 
       <listitem>
         <para>
-          <command>mysqltest</command> runs individual test cases.
+          <command>mysqltest</command> runs individual test cases. A
+          version named <command>mysqltest_embedded</command> is similar
+          but is build with support for the <literal>libmysqld</literal>
+          embedded server.
         </para>
       </listitem>
 
       <listitem>
         <para>
-          <command>mysql-test-run</command> uses
+          <command>mysql-test-run</command> (a shell script) uses
           <command>mysqltest</command> to run a suite of test cases.
         </para>
       </listitem>
 
       <listitem>
         <para>
+          <command>mysql-test-run.pl</command> (a Perl script) is
+          currently in development as a replacement for
+          <command>mysql-test-run</command>.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
           <command>mysql-stress-test.pl</command> performs
           stress-testing of the MySQL server.
         </para>
@@ -367,11 +520,6 @@
 
     </itemizedlist>
 
-    <para>
-      For information about the language used for writing test cases,
-      see <xref linkend="mysqltest-language"/>.
-    </para>
-
     <section id="fake-id-for-mysqltest-manpage-section-wrapper">
 
       <title>fake title for mysqltest manpage section wrapper</title>
@@ -409,8 +557,14 @@
           <title>Description</title>
 
           <para>
+            The <command>mysqltest</command> program runs
             <command>mysqltest</command> runs a test case against a
-            MySQL server and compares the output with a result file.
+            MySQL server and optionally compares the output with a
+            result file. This program reads input written in a special
+            test language. Typically, you invoke
+            <command>mysqltest</command> via
+            <command>mysql-test-run</command> rather than invoking it
+            directly.
           </para>
 
           <para>
@@ -429,22 +583,22 @@
 
             <listitem>
               <para>
-                Can connect to standalone servers.
+                Can connect to one or more standalone
+                <command>mysqld</command> servers and switch between
+                connections.
               </para>
             </listitem>
 
             <listitem>
               <para>
-                Can start embedded servers, if MySQL is compiled with
-                support for <literal>libmysqld</literal>.
+                Can connect to an embedded server
+                (<literal>libmysqld</literal>), if MySQL is compiled
+                with support for <literal>libmysqld</literal>.
               </para>
             </listitem>
 
             <listitem>
-              <para>
-                Can connect to multiple servers and switch between
-                connections.
-              </para>
+              <para></para>
             </listitem>
 
           </itemizedlist>
@@ -475,14 +629,6 @@
             Also supports the standard SSL options. (And what else?)
           </remark>
 
-          <para>
-            The <command>mysqltest</command> program runs test cases.
-            This program reads input written in a special test language.
-            Typically, you invoke <command>mysqltest</command> via
-            <command>mysql-test-run</command> rather than invoking it
-            directly.
-          </para>
-
 <!-- THIS IS FOR MANPAGE IN REFMAN, NOT mysql manual itself
       <para>
         This section describes the command options that
@@ -557,7 +703,8 @@
               </para>
 
               <para>
-                Define <literal>BIG_TEST</literal> as 1.
+                Define the <command>mysqlcommand</command> variable
+                <literal>$BIG_TEST</literal> as 1.
               </para>
             </listitem>
 
@@ -621,7 +768,7 @@
               </para>
 
               <para>
-                The database to use.
+                The default database to use.
               </para>
             </listitem>
 
@@ -973,8 +1120,9 @@
               <para>
                 This option specifies the file for test case expected
                 results. <option>--result-file</option>, together with
-                <option>--record</option> determine how test actual and
-                expected results are treated:
+                <option>--record</option> determine how
+                <command>mysqltest</command> treats the test actual and
+                expected results for a test case:
               </para>
 
               <itemizedlist>
@@ -1003,6 +1151,12 @@
                     results from the given file and compares them with
                     the actual results.
                   </para>
+
+                  <para>
+                    [Q: And does what with the result from the
+                    comparison? Is this similar to using the
+                    <literal>result</literal> command?
+                  </para>
                 </listitem>
 
                 <listitem>
@@ -1040,7 +1194,7 @@
               </para>
 
               <para>
-                [Max 64 args allowed?]
+                [Q: Max 64 args allowed?]
               </para>
             </listitem>
 
@@ -1066,7 +1220,8 @@
               </para>
 
               <para>
-                [What's the format of this file? One option per line?]
+                [Q: What's the format of this file? One option per
+                line?]
               </para>
             </listitem>
 
@@ -1133,9 +1288,10 @@
               </para>
 
               <para>
-                [Bug: --sleep=0 has no effect. That is, it doesn't cause
-                a sleep of 0 seconds. Instead, sleep commands in the
-                test file sleep by the amount specified in the file.]
+                [Bug: <option>--sleep=0</option> has no effect. That is,
+                it doesn't cause a sleep of 0 seconds. Instead,
+                <literal>sleep</literal> commands in the test file sleep
+                by the amount specified in the file.]
               </para>
             </listitem>
 
@@ -1178,13 +1334,9 @@
               </para>
 
               <para>
-                Use stored procedures for select. This option was added
-                in MySQL 5.0.19.
+                Use stored procedures for select. [Q: Which means what,
+                exactly?] This option was added in MySQL 5.0.19.
               </para>
-
-              <para>
-                [Which means what, exactly?]
-              </para>
             </listitem>
 
             <listitem>
@@ -1295,6 +1447,10 @@
                 Verbose mode. Print out more information what the
                 program does.
               </para>
+
+              <para>
+                [Q: what kind of information?]
+              </para>
             </listitem>
 
             <listitem>
@@ -1333,13 +1489,9 @@
               </para>
 
               <para>
-                Use views for select. This option was added in MySQL
-                5.0.19.
+                Use views for select. [Q: Which means what, exactly?]
+                This option was added in MySQL 5.0.19.
               </para>
-
-              <para>
-                [Which means what, exactly?]
-              </para>
             </listitem>
 
           </itemizedlist>
@@ -1389,6 +1541,9 @@
           <para>
             <command>mysql-test-run</command> invokes
             <command>mysqltest</command> to run test cases.
+          </para>
+
+          <para>
             <command>mysql-test-run</command> is a shell script, so it
             does not run on Windows. A replacement script
             (<command>mysql-test-run.pl</command>) is being developed
@@ -1411,11 +1566,11 @@
 
           <para>
             For each <replaceable>test_case</replaceable> argument,
-            <command>mysql-test-run</command> runs [the test found in
+            <command>mysql-test-run</command> runs [Q: the test found in
             the
             <filename>t/<replaceable>test_case</replaceable>.test</filename>
             file?] With no <replaceable>test_case</replaceable>
-            arguments, <command>mysql-test-run</command> [does what?
+            arguments, <command>mysql-test-run</command> [Q: does what?
             Runs all <filename>.test</filename> files in the
             <filename>t</filename> subdirectory?]
           </para>
@@ -1428,7 +1583,7 @@
           <para>
             <literal>MYSQL_TEST</literal> (path to
             <command>mysqltest</command> binary?),
-            <literal>MYSQLTEST_VARDIR</literal>, [what else?]
+            <literal>MYSQLTEST_VARDIR</literal>, [Q: what else?]
           </para>
 
           <informaltable>
@@ -1446,13 +1601,13 @@
                 </row>
                 <row>
                   <entry><literal>MYSQL_TEST_WINDIR</literal></entry>
-                  <entry>Pathname to the <filename>mysql-test</filename> directory on Windows
-                    [???]</entry>
+                  <entry>Pathname to the <filename>mysql-test</filename> directory on Windows [Q:
+                    ???]</entry>
                 </row>
                 <row>
                   <entry><literal>MYSQLTEST_VARDIR</literal></entry>
-                  <entry>Pathname to the <filename>var</filename> directory [for logs, temporary
-                    files, etc. ???]</entry>
+                  <entry>Pathname to the <filename>var</filename> directory [Q: for logs,
+                    temporary files, etc. ???]</entry>
                 </row>
                 <row>
                   <entry><literal>MASTER_MYPORT</literal></entry>
@@ -1467,8 +1622,9 @@
           </informaltable>
 
           <para>
-            [Are there other important variables that should be
-            mentioned here?]
+            [Q: Are there other important variables that should be
+            mentioned here? Does the Perl script export the same
+            environment variables?]
           </para>
 
           <para>
@@ -1486,9 +1642,9 @@
           <title><command>mysql-test-run</command> Options</title>
 
           <para>
-            [Is there an option to display the commands being run? Or a
-            <quote>dry run</quote> option to display the commands
-            without executing them?]
+            [Q: Is there an option to display the commands being run? Or
+            a <quote>dry run</quote> option to display the commands
+            without executing them? Apparently not.]
           </para>
 
           <para>
@@ -1497,8 +1653,10 @@
           </para>
 
           <para>
-            <command>mysql-test-run</command> supports the following
-            options:
+            <command>mysql-test-run</command> supports the options in
+            the following list. An argument of <option>--</option> tells
+            <command>mysql-test-run</command> not to process any
+            following arguments as options.
           </para>
 
           <itemizedlist>
@@ -1534,6 +1692,139 @@
               <para>
                 <indexterm>
                   <primary>mysql-test-run</primary>
+                  <secondary>bench option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>bench option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--bench</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>big option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>big option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--big-test</option>
+              </para>
+
+              <para>
+                Pass the <option>--big-test</option> option to
+                <command>mysql-test</command>.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>client-gdb option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>client-gdb option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--client-gdb</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>comment option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>comment option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--comment=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>compress option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>compress option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--compress</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ddd option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ddd option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ddd</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>debug option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>debug option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--debug</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>do-test option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>do-test option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--do-test=<replaceable>prefix</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
                   <secondary>embedded-server option</secondary>
                 </indexterm>
 
@@ -1575,6 +1866,22 @@
               <para>
                 <indexterm>
                   <primary>mysql-test-run</primary>
+                  <secondary>fast option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>fast option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--fast</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
                   <secondary>force option</secondary>
                 </indexterm>
 
@@ -1597,6 +1904,54 @@
               <para>
                 <indexterm>
                   <primary>mysql-test-run</primary>
+                  <secondary>gcov option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>gcov option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--gcov</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>gdb option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>gdb option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--gdb</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>gprof option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>gprof option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--gprof</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
                   <secondary>local option</secondary>
                 </indexterm>
 
@@ -1614,11 +1969,1075 @@
               </para>
 
               <para>
-                [So what does this mean? Tell mysqltest to start its own
-                server?]
+                [Q: So what does this mean? Tell
+                <command>mysqltest</command> to start its own server?]
               </para>
             </listitem>
 
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>local-master option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>local-master option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--local-master</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>manager option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>manager option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--manager</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>manager-port option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>manager-port option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--manager-port=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>manual-gdb option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>manual-gdb option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--manual-gdb</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>master-binary option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>master-binary option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--master-binary=<replaceable>path</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>master_port option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>master_port option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--master_port=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>mysqld option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>mysqld option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--mysqld=<replaceable>path</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb-connectstring-slave option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb-connectstring-slave option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb-connectstring-slave=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb-connectstring option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb-connectstring option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb-connectstring=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb-extra-test option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb-extra-test option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb-extra-test</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb-verbose option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb-verbose option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb-verbose</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb_mgm-extra-opts option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb_mgm-extra-opts option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb_mgm-extra-opts=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndb_mgmd-extra-opts option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndb_mgmd-extra-opts option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndb_mgmd-extra-opts=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndbcluster-port-slave option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndbcluster-port-slave option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndbcluster-port-slave=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndbcluster-port option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndbcluster-port option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndbcluster-port=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndbcluster_port option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndbcluster_port option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndbcluster_port=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ndbd-extra-opts option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ndbd-extra-opts option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ndbd-extra-opts=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>no-manager option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>no-manager option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--no-manager</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-manager option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-manager option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-manager</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>old-master option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>old-master option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--old-master</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>ps-protocol option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>ps-protocol option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--ps-protocol</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>purify option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>purify option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--purify</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>record option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>record option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--record</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <option>--skip-*</option>
+              </para>
+
+              <para>
+                [Q: This is a bit of an odd one.
+                <option>--skip-*</option> is what's given in the code,
+                following all the other <option>--skip</option> options.
+                What's it supposed to stand for?
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-master-binlog option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-master-binlog option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-master-binlog</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-ndbcluster option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-ndbcluster option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-ndbcluster</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-ndb option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-ndb option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-ndb</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-ndbcluster-slave option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-ndbcluster-slave option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-ndbcluster-slave</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-ndb-slave option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-ndb-slave option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-ndb-slave</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-rpl option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-rpl option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-rpl</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-slave-binlog option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-slave-binlog option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-slave-binlog</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>skip-test option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>skip-test option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--skip-test=<replaceable>[Q: WHAT GOES
+                HERE?]</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>slave-binary option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>slave-binary option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--slave-binary=<replaceable>path</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>slave_port option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>slave_port option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--slave_port=<replaceable>port_num</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>sleep option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>sleep option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--sleep=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>small-bench option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>small-bench option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--small-bench</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>socket option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>socket option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--socket=<replaceable>file_name</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>start-and-exit option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>start-and-exit option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--start-and-exit</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>start-from option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>start-from option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--start-from=<replaceable>[Q: WHAT GOES
+                HERE?]</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>strace-client option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>strace-client option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--strace-client</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-init-file option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-init-file option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-init-file=<replaceable>file_name</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-loop-count option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-loop-count option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-loop-count=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-mode option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-mode option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-mode=<replaceable>mode</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-suite option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-suite option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-suite=<replaceable>suite_name</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-test-count option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-test-count option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-test-count=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-test-duration option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-test-duration option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-test-duration=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-test-file option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-test-file option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-test-file=<replaceable>file_name</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>stress-threads option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>stress-threads option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--stress-threads=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>timer option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>timer option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--timer</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>tmpdir option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>tmpdir option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--tmpdir=<replaceable>path</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>use-old-data option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>use-old-data option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--use-old-data</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>user-test option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>user-test option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--user-test=<replaceable>[Q: WHAT GOES
+                HERE]</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>user option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>user option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--user=<replaceable>user_name</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>valgrind option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>valgrind option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--valgrind</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>valgrind-all option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>valgrind-all option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--valgrind-all</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>valgrind-mysqltest option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>valgrind-mysqltest option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--valgrind-mysqltest</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>valgrind-mysqltest-all option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>valgrind-mysqltest-all option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--valgrind-mysqltest-all</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>valgrind-options option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>valgrind-options option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--valgrind-options=<replaceable>str</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>verbose-manager option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>verbose-manager option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--verbose-manager</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>wait-timeout option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>wait-timeout option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--wait-timeout=<replaceable>N</replaceable></option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>warnings option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>warnings option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--warnings</option>,
+
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>log-warnings option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>log-warnings option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--log-warnings</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>with-ndbcluster option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>with-ndbcluster option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--with-ndbcluster</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>with-ndbcluster-all option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>with-ndbcluster-all option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--with-ndbcluster-all</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>with-ndbcluster-only option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>with-ndbcluster-only option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--with-ndbcluster-only</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>with-ndbcluster-slave option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>with-ndbcluster-slave option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--with-ndbcluster-slave</option>
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run</primary>
+                  <secondary>with-openssl option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>with-openssl option</primary>
+                  <secondary>mysql-test-run</secondary>
+                </indexterm>
+
+                <option>--with-openssl</option>
+              </para>
+            </listitem>
+
           </itemizedlist>
 
           <para>
@@ -1632,6 +3051,108 @@
 
     </section>
 
+    <section id="fake-id-for-mysql-test-run-pl-manpage-section-wrapper">
+
+      <title>fake title for mysql-test-run.pl manpage section wrapper</title>
+
+      <refentry id="mysql-test-run-pl">
+
+        <indexterm>
+          <primary><command>mysql-test-run.pl</command></primary>
+        </indexterm>
+
+        <refmeta>
+          <refentrytitle>mysql-test-run.pl</refentrytitle>
+           
+          <manvolnum>1</manvolnum>
+          <refmiscinfo class="manual">MySQL Database System</refmiscinfo>
+          <refmiscinfo class="source">MySQL</refmiscinfo>
+          <refmiscinfo class="version">&current-series;</refmiscinfo>
+          <refmiscinfo class="refman">&title-mysql-test-run-pl-for-manual;</refmiscinfo>
+        </refmeta>
+
+        <refnamediv>
+          <refname>mysql-test-run.pl</refname>
+           
+          <refpurpose>&title-mysql-test-run-pl-for-manpage;</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+          <cmdsynopsis>
+            <command>mysql-test-run.pl [<replaceable>options</replaceable>]</command>
+          </cmdsynopsis>
+        </refsynopsisdiv>
+
+        <refsection id="mysql-test-run-pl-description">
+
+          <title>Description</title>
+
+          <para>
+            [Fill in]
+          </para>
+
+          <para>
+            Invoke <command>mysql-test-run.pl</command> like this:
+          </para>
+
+<programlisting>
+shell&gt; <userinput>mysql-test-run.pl [<replaceable>options</replaceable>]</userinput>
+</programlisting>
+
+        </refsection>
+
+        <refsection id="mysql-test-run-pl-options">
+
+          <title><command>mysql-test-run.pl</command> Options</title>
+
+          <para>
+            [Because the options for the Perl script are so similar to
+            those for the shell script, just describe here by referring
+            to <command>mysql-test-run</command>, plus noting which
+            options have been dropped and which added in
+            <command>mysql-test-run.pl</command>.
+          </para>
+
+          <para>
+            <command>mysql-test-run.pl</command> supports the following
+            options:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                <indexterm>
+                  <primary>mysql-test-run.pl</primary>
+                  <secondary>help option</secondary>
+                </indexterm>
+
+                <indexterm>
+                  <primary>help option</primary>
+                  <secondary>mysql-test-run.pl</secondary>
+                </indexterm>
+
+                <option>--help</option>
+              </para>
+
+              <para>
+                Display a help message and exit.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            [Fill in this section with all
+            <command>mysql-test-run.pl</command> options]
+          </para>
+
+        </refsection>
+
+      </refentry>
+
+    </section>
+
     <section id="fake-id-for-mysql-stress-test-manpage-section-wrapper">
 
       <title>fake title for mysql-stress-test.pl manpage section wrapper</title>
@@ -1673,6 +3194,11 @@
           </para>
 
           <para>
+            This program requires a version of Perl that has been built
+            with threads support.
+          </para>
+
+          <para>
             Invoke <command>mysql-stress-test.pl</command> like this:
           </para>
 
@@ -1753,25 +3279,20 @@
 
       <listitem>
         <para>
-          <emphasis>Explain</emphasis> what the disable/enable commands
-          actually <emphasis>mean</emphasis>. The current descriptions
-          are pathetic.
+          Note: For now, the commands are in a single lexical list.
+          Eventually, they should probably be categorized.
         </para>
       </listitem>
 
     </itemizedlist>
 
     <para>
-      Note: For now, the commands are in a single lexical list.
-      Eventually, they need to be categorized.
-    </para>
-
-    <para>
       This chapter describes the test language implemented by
       <command>mysqltest</command>. The language allows input to contain
       a mix of comments, commands executed by
-      <command>mysqltest</command>, and SQL statements to be sent to a
-      MySQL server for execution. Here is an example of input for
+      <command>mysqltest</command> itself, and SQL statements that
+      <command>mysqltest</command> sends to a MySQL server for
+      execution. Here is an example of input for
       <command>mysqltest</command>:
     </para>
 
@@ -1784,83 +3305,116 @@
 </programlisting>
 
     <para>
-      [Define <quote>end of line</quote> as meaning newline. CRLF is
-      allowable as a line terminator as well (the carriage return is
-      ignored), but carriage return by itself is not allowed.
+      When <command>mysqltest</command> starts, it opens a connection
+      named <literal>default</literal>, using any connection parameters
+      specified by the command options. [Q: When run from
+      <command>mysql-test-run</command>, the default username will be
+      <literal>root</literal>?]
     </para>
 
     <para>
-      <command>mysqltest</command> reads input lines and processes them
-      as follows:
+      You can use the <literal>connection</literal> command to open
+      other connections, the <literal>connection</literal> command to
+      switch between connections, and the <literal>disconnect</literal>
+      command to close connections. The capability for switching
+      connections which means that <literal>default</literal> need not
+      be the connection in use at a given time. To avoid ambiguity, this
+      document uses the term <quote>current connection</quote> to
+      indicate the connection currently in use, which might be different
+      from <quote>the connection named
+      <literal>default</literal>.</quote>
     </para>
 
-    <itemizedlist>
+    <section id="mysqltest-input-conventions">
 
-      <listitem>
-        <para>
-          A line that begins with &lsquo;<literal>#</literal>&rsquo; as
-          the first non-whitespace character is treated as a comment
-          that extends to the end of the line and is ignored. Example:
-        </para>
+      <title><command>mysqltest</command> Input Conventions</title>
 
+      <para>
+        <command>mysqltest</command> reads input lines and processes
+        them as follows:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            <quote>End of line</quote> means a newline (linefeed)
+            character. A carriage return/linefeed (CRLF) pair also is
+            allowable as as a line terminator (the carriage return is
+            ignored), but carriage return by itself is
+            <emphasis>not</emphasis> allowed as a line terminator..
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            A line that begins with &lsquo;<literal>#</literal>&rsquo;
+            as the first non-whitespace character is treated as a
+            comment that extends to the end of the line and is ignored.
+            Example:
+          </para>
+
 <programlisting>
 # this is a comment
 </programlisting>
-      </listitem>
+        </listitem>
 
-      <listitem>
-        <para>
-          A line that begins with &lsquo;<literal>--</literal>&rsquo; as
-          the first non-whitespace content also is treated as a comment
-          that extends to the end of the line. However, if the first
-          word of the comment is a valid <command>mysqltest</command>
-          command, <command>mysqltest</command> executes the line from
-          that word to the end of the line as a comment. This can be
-          useful for writing commands that contain embedded instances of
-          the command delimiter. Examples:
-        </para>
+        <listitem>
+          <para>
+            A line that begins with &lsquo;<literal>--</literal>&rsquo;
+            as the first non-whitespace content also is treated as a
+            comment that extends to the end of the line. However, unlike
+            &lsquo;<literal>#</literal>&rsquo; comments, if the first
+            word of the comment is a valid <command>mysqltest</command>
+            command, <command>mysqltest</command> executes the line from
+            that word to the end of the line as a command. This syntax
+            is useful for writing commands that contain embedded
+            instances of the command delimiter. Examples:
+          </para>
 
 <programlisting>
 --disconnect conn1
 -- echo write this text; it goes to the result file
 </programlisting>
-      </listitem>
+        </listitem>
 
-      <listitem>
-        <para>
-          Other input is taken as normal command input. The command
-          extends to the next occurrence of the command delimiter, which
-          is semicolon (&lsquo;<literal>;</literal>&rsquo;) by default.
-          The delimiter can be changed with the
-          <literal>delimiter</literal> command.
-        </para>
+        <listitem>
+          <para>
+            Other input is taken as normal command input. The command
+            extends to the next occurrence of the command delimiter,
+            which is semicolon (&lsquo;<literal>;</literal>&rsquo;) by
+            default. The delimiter can be changed with the
+            <literal>delimiter</literal> command.
+          </para>
 
-        <para>
-          Because the command extends to the delimiter, a line can
-          contain multiple commands, or a command can span multiple
-          lines. If the first line of the delimiter-terminated input
-          begins with a word that is a <command>mysqltest</command>
-          command, <command>mysqltest</command> executes it as such.
-          Otherwise, <command>mysqltest</command> assumes that the input
-          contains an SQL statement and sends it to the server to be
-          executed.
-        </para>
+          <para>
+            Because the command extends to the delimiter, a given input
+            line can contain multiple commands, and a given command can
+            span multiple lines. If the first line of the
+            delimiter-terminated command begins with a word that is a
+            <command>mysqltest</command> command,
+            <command>mysqltest</command> executes it as such. Otherwise,
+            <command>mysqltest</command> assumes that the command is an
+            SQL statement and sends it to the MySQL server to be
+            executed.
+          </para>
 
-        <para>
-          Input reading restarts following the delimiter and any
-          following input on the line that contains the delimiter is
-          treated as though it begins on a new line. Consider the
-          following two input lines:
-        </para>
+          <para>
+            After <command>mysqltest</command> reads a command up to a
+            delimiter and executes it, input reading restarts following
+            the delimiter and any following input on the line that
+            contains the delimiter is treated as though it begins on a
+            new line. Consider the following two input lines:
+          </para>
 
 <programlisting>
 select 1; select 'hello'; select
 'goodbye';
 </programlisting>
 
-        <para>
-          Three separate commands result from that input:
-        </para>
+          <para>
+            Three separate commands result from that input:
+          </para>
 
 <programlisting>
 select 1
@@ -1868,1250 +3422,1310 @@
 select 'goodbye'
 </programlisting>
 
-        <para>
-          Similarly, &lsquo;<literal>#</literal>&rsquo; comments or
-          &lsquo;<literal>--</literal>&rsquo; comments can be given on a
-          command line following a delimiter:
-        </para>
+          <para>
+            Similarly, &lsquo;<literal>#</literal>&rsquo; comments or
+            &lsquo;<literal>--</literal>&rsquo; comments can be given on
+            a command line following a delimiter:
+          </para>
 
 <programlisting>
 select 'hello'; # select a string value
 select 'hello'; -- echo some text
 </programlisting>
 
-        <para>
-          The ability to write multiple-line statements is useful for
-          making long statements more readable, such as a
-          <literal>create table</literal> statement for a table with
-          many columns.
-        </para>
-      </listitem>
+          <para>
+            The ability to write multiple-line statements is useful for
+            making long statements more readable, such as a
+            <literal>create table</literal> statement for a table that
+            has many columns.
+          </para>
+        </listitem>
 
-    </itemizedlist>
+      </itemizedlist>
 
-    <para>
-      In other words, to write a comment line, begin it with
-      &lsquo;<literal>#</literal>&rsquo;. To write a command to be
-      executed by <command>mysqltest</command>, begin it with
-      &lsquo;<literal>--</literal>&rsquo;. To write a statement to be
-      sent to the server for execution, do not begin it with
-      &lsquo;<literal>#</literal>&rsquo; or
-      &lsquo;<literal>--</literal>&rsquo;.
-    </para>
+      <para>
+        Note that &lsquo;<literal>--</literal>&rsquo; comments and
+        normal commands have complementary properties with regard to how
+        <command>mysqltest</command> reads them:
+      </para>
 
-    <para>
-      <command>mysqltest</command> commands can be written either as
-      comments (preceded by &lsquo;<literal>--</literal>&rsquo;) or as
-      normal command input (no leading
-      &lsquo;<literal>--</literal>&rsquo;). Use the command delimiter
-      only in the latter case. Thus, these two lines are equivalent:
-    </para>
+      <itemizedlist>
 
+        <listitem>
+          <para>
+            A &lsquo;<literal>--</literal>&rsquo; comment is terminated
+            by a newline, regardless of how many delimiters it contains.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            A normal command (without
+            &lsquo;<literal>--</literal>&rsquo;) is terminated by the
+            delimiter (semicolon), no matter how many newlines it
+            contains.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+
+      <para>
+        <command>mysqltest</command> commands can be written either as
+        comments (with a leading &lsquo;<literal>--</literal>&rsquo;) or
+        as normal command input (no leading
+        &lsquo;<literal>--</literal>&rsquo;). Use the command delimiter
+        only in the latter case. Thus, these two lines are equivalent:
+      </para>
+
 <programlisting>
 --sleep 2
 sleep 2;
 </programlisting>
 
-    <para>
-      The equivalence is true even for the <literal>delimiter</literal>
-      command. For example, to set the delimiter to
-      <literal>//</literal>, either of these commands work:
-    </para>
+      <para>
+        The equivalence is true even for the
+        <literal>delimiter</literal> command. For example, to set the
+        delimiter to <literal>//</literal>, either of these commands
+        work:
+      </para>
 
 <programlisting>
 --delimiter //
 delimiter //;
 </programlisting>
 
-    <para>
-      To set the delimiter back to ;, use either of these commands:
-    </para>
+      <para>
+        To set the delimiter back to ;, use either of these commands:
+      </para>
 
 <programlisting>
 --delimiter ;
 delimiter ;//
 </programlisting>
 
-    <para>
-      Note that &lsquo;<literal>--</literal>&rsquo; comments and normal
-      commands have complementary properties with regard to how
-      <command>mysqltest</command> reads them:
-    </para>
+      <para>
+        [Ambiguity] Although it is <emphasis>possible</emphasis> to
+        write a non-command comment that begins with
+        &lsquo;<literal>--</literal>&rsquo;, it is better to use
+        &lsquo;<literal>#</literal>&rsquo; instead. For example, the
+        line <literal>--switch to conn1</literal> is take as a comment
+        currently, but if <command>mysqltest</command> is extended in
+        the future to add a <literal>switch</literal> command, that line
+        will be treated as a command instead. If you use
+        &lsquo;<literal>#</literal>&rsquo; for all comments, this
+        problem will not occur.
+      </para>
 
-    <itemizedlist>
+      <para>
+        [Ambiguity] Because a non-comment line can contain either a
+        <command>mysqltest</command> command or an SQL statement,
+        presumably this means that no <command>mysqltest</command>
+        command should be the same as any keyword that can begin an SQL
+        statement? Presumably also this means that, should extensions to
+        SQL be implemented in the future, it's possible that a new SQL
+        keyword could be impossible for <command>mysqltest</command> to
+        recognize as such if that keyword is already used as a
+        <command>mysqltest</command> command.
+      </para>
 
-      <listitem>
-        <para>
-          A &lsquo;<literal>--</literal>&rsquo; comment is terminated by
-          a newline, regardless of how many delimiters it contains.
-        </para>
-      </listitem>
+      <para>
+        On a multiple-line command, &lsquo;<literal>#</literal>&rsquo;
+        or &lsquo;<literal>--</literal>&rsquo; at the beginning of the
+        second or following lines is not special. Thus, the second and
+        third lines of the following command are not taken as comments:
+      </para>
 
-      <listitem>
-        <para>
-          A normal command (without &lsquo;<literal>--</literal>&rsquo;)
-          is terminated by the delimiter (semicolon), no matter how many
-          newlines it contains.
-        </para>
-      </listitem>
+<programlisting>
+let $a = This is a variable
+# assignment that sets a variable
+-- to a multiple-line value;
+      </programlisting>
 
-    </itemizedlist>
+      <para>
+        Describe quoting and escaping rules. How to include a literal
+        quote? Double it? Escape it? Can you escape a delimiter as "\;"?
+        But then what if the delimiter is multiple characters? (I guess
+        that wouldn't matter. If the first char is not taken as a
+        delimiter beginning, the rest wouldn't be recognized, either.
+        Escaping appears to be allowable only in limited contexts?
+      </para>
 
-    <para>
-      [Ambiguity] Although it is <emphasis>possible</emphasis> to write
-      a comment that begins with &lsquo;<literal>--</literal>&rsquo;, it
-      is better to use &lsquo;<literal>#</literal>&rsquo; instead. For
-      example, the line <literal>--switch to conn1</literal> is take as
-      a comment currently, but if <command>mysqltest</command> is
-      extended in the future to add a <literal>switch</literal> command,
-      that line will be treated as a command instead. If you use
-      &lsquo;<literal>#</literal>&rsquo; for all comments, this problem
-      will not occur.
-    </para>
+    </section>
 
-    <para>
-      [Ambiguity] Because a non-comment line can contain either a
-      <command>mysqltest</command> command or an SQL statement,
-      presumably this means that no <command>mysqltest</command> command
-      should be the same as any keyword that can begin an SQL statement?
-      Presumably also this means that, should extensions to SQL be
-      implemented in the future, it's possible that a new keyword could
-      be impossible for <command>mysqltest</command> to recognize as
-      such if that keyword is already used as a
-      <command>mysqltest</command> command.
-    </para>
+    <section id="mysqltest-commands">
 
-    <para>
-      On a multiple-line command, &lsquo;<literal>#</literal>&rsquo; or
-      &lsquo;<literal>--</literal>&rsquo; at the beginning of the second
-      or following lines is not special. Thus, the second and third
-      lines of the following command are not take as comments:
-    </para>
+      <title><command>mysqltest</command> Command Reference</title>
 
-    <para>
-      let $a = This is a variable # assignment that sets a variable --
-      to a multiple-line value;
-    </para>
+      <para>
+        <command>mysqltest</command> supports the following commands:
+      </para>
 
-    <para>
-      Describe quoting and escaping rules. How to include a literal
-      quote? Double it? Escape it? Can you escape a delimiter as "\;"?
-      But then what if the delimiter is multiple characters? (I guess
-      that wouldn't matter. If the first char is not taken as a
-      delimiter beginning, the rest wouldn't be recognized, either.
-    </para>
+      <itemizedlist>
 
-    <para>
-      <command>mysqltest</command> supports the following commands:
-    </para>
+        <listitem>
+          <para>
+            <literal>character_set
+            <replaceable>charset_name</replaceable></literal>
+          </para>
 
-    <itemizedlist>
+          <para>
+            Set the default character set to
+            <replaceable>charset_name</replaceable>. Initially, the
+            character set is <literal>latin1</literal>.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>character_set
-          <replaceable>charset_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>connect (<replaceable>name</replaceable>,
+            <replaceable>host_name</replaceable>,
+            <replaceable>user_name</replaceable>,
+            <replaceable>password</replaceable>,
+            <replaceable>db_name</replaceable>
+            [,<replaceable>port_num</replaceable>
+            [,<replaceable>socket</replaceable>
+            [,<replaceable>options</replaceable>]]])</literal>
+          </para>
 
-        <para>
-          Set the default character set. Initially, this is
-          <literal>latin1</literal>.
-        </para>
-      </listitem>
+          <para>
+            [Q: To omit an argument, just leave it blank? What value is
+            used then? Same as whatever the default is for
+            <literal>mysql_real_connect()</literal>?]
+          </para>
 
-      <listitem>
-        <para>
-          <literal>connect (<replaceable>name</replaceable>
-          <replaceable>host_name</replaceable>
-          <replaceable>user_name</replaceable>
-          <replaceable>password</replaceable>
-          <replaceable>db_name</replaceable>
-          [<replaceable>port_num</replaceable>
-          [<replaceable>socket</replaceable>
-          [<replaceable>options</replaceable>]]])</literal>
-        </para>
+          <para>
+            Open a connection to the server. [Q: and make the connection
+            the current connection?]
+          </para>
 
-        <para>
-          [Does this also make the connection the current connection? It
-          seems to. To omit an argument, just leave it blank?]
-        </para>
+          <para>
+            [Put a couple of examples here, including one with blank
+            arguments]
+          </para>
 
-        <para>
-          Open a connection to the server.
-        </para>
+          <para>
+            The arguments to <literal>connect</literal> are:
+          </para>
 
-        <para>
-          The arguments to <literal>connect</literal> are:
-        </para>
+          <itemizedlist>
 
-        <itemizedlist>
+            <listitem>
+              <para>
+                <replaceable>name</replaceable> is the name for the
+                connection (for use with the
+                <literal>connection</literal> and
+                <literal>disconnect</literal> commands). This name must
+                not already be in use by an open connection.
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>name</replaceable> is the name for the
-              connection (for use with the <literal>connection</literal>
-              and <literal>disconnect</literal> commands). This name
-              must not already be in use by an open connection.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>host_name</replaceable> indicates the host
+                where the server is running.
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>host_name</replaceable> indicates the host
-              where the server is running.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>user_name</replaceable> and
+                <replaceable>password</replaceable> are the username and
+                password of the MySQL account to use.
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>user_name</replaceable> and
-              <replaceable>password</replaceable> are the username and
-              password of the MySQL account to use.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>db_name</replaceable> is the default
+                database to use. As a special case,
+                <literal>*NO-ONE*</literal> means that no default
+                database should be selected.
+              </para>
 
-          <listitem>
-            <para>
-              <replaceable>db_name</replaceable> is the default database
-              to use. As a special case, <literal>*NO-ONE*</literal>
-              means that no default database should be selected.
-            </para>
-          </listitem>
+              <para>
+                [Q: you can't just leave it blank to select no
+                database?]
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>port_num</replaceable>, if given, is the
-              TCP/IP port number to use for the connection. This
-              parameter can be given by using a variable.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>port_num</replaceable>, if given, is the
+                TCP/IP port number to use for the connection. This
+                parameter can be given by using a variable.
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>socket</replaceable>, if given, is the socket
-              file to use for local connections. This parameter can be
-              given by using a variable.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>socket</replaceable>, if given, is the
+                socket file to use for connections to
+                <literal>localhost</literal>. This parameter can be
+                given by using a variable.
+              </para>
+            </listitem>
 
-          <listitem>
-            <para>
-              <replaceable>options</replaceable> can be one or more of
-              the words <literal>SSL</literal> and
-              <literal>COMPRESS</literal>. These specify the use of SSL
-              and the compressed client/server protocol, respectively.
-            </para>
-          </listitem>
+            <listitem>
+              <para>
+                <replaceable>options</replaceable> can be one or more of
+                the words <literal>SSL</literal> and
+                <literal>COMPRESS</literal>. These specify the use of
+                SSL and the compressed client/server protocol,
+                respectively.
+              </para>
+            </listitem>
 
-        </itemizedlist>
+          </itemizedlist>
 
-        <para>
-          When <command>mysqltest</command> starts, it opens a
-          connection named <literal>default</literal>, using any
-          connection parameters specified by the command options. [When
-          run from <command>mysql-test-run</command>, the default
-          username will be <literal>root</literal>?]
-        </para>
+          <para>
+            [Q: If a connection attempt fails initially, there is some
+            kind of retry behavior?]
+          </para>
 
-        <para>
-          However, you can open other connections and switch between
-          connections, which means that <literal>default</literal> need
-          not be the connection in use at a given time. To avoid
-          ambiguity, this document uses the term <quote>current
-          connection</quote> to indicate the connection in use, which
-          might be different from <quote>the connection named
-          <literal>default</literal>.</quote>
-        </para>
+          <para>
+            Syntax oddities: There must be whitespace between
+            <command>connect</command> and the opening parenthesis, and
+            no whitepace after the opening parenthesis.
+          </para>
 
-        <para>
-          [If a connection attempt fails initially, there is some kind
-          of retry behavior?]
-        </para>
+          <para>
+            Bug: leaving off the trailing parenthesis can produce a
+            weird error. For example, with no paren after the database
+            name, <command>mysqltest</command> says <literal>mysqltest:
+            At line 1: Illegal argument for port: 'h4z'</literal>.
+          </para>
+        </listitem>
 
-        <para>
-          Syntax oddities: There must be whitespace between
-          <command>connect</command> and the opening parenthesis, and no
-          whitepace after the opening parenthesis.
-        </para>
+        <listitem>
+          <para>
+            <literal>connection
+            <replaceable>connection_name</replaceable></literal>
+          </para>
 
-        <para>
-          Bug: leaving off the trailing parenthesis can produce a weird
-          error. For example, with no paren after the database name,
-          <command>mysqltest</command> says <literal>mysqltest: At line
-          1: Illegal argument for port: 'h4z'</literal>.
-        </para>
-      </listitem>
+          <para>
+            Select <replaceable>connection_name</replaceable> as the
+            current connection. To select the connection that
+            <command>mysqltest</command> opens when it starts, use the
+            name <literal>default</literal>.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>connection
-          <replaceable>connection_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>dec $<replaceable>var_name</replaceable></literal>
+          </para>
 
-        <para>
-          Select <replaceable>connection_name</replaceable> as the
-          current connection. To select the connection that
-          <command>mysqltest</command> opens when it starts, use the
-          name <literal>default</literal>.
-        </para>
-      </listitem>
+          <para>
+            Decrement a numeric variable. If the variable is not
+            numeric, the result is undefined.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>dec $<replaceable>var_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>delimiter <replaceable>str</replaceable></literal>
+          </para>
 
-        <para>
-          Decrement a numeric variable. If the variable is not numeric,
-          the result is undefined.
-        </para>
-      </listitem>
+          <para>
+            Set the command delimiter to <replaceable>str</replaceable>,
+            which may consist of 1 to 15 characters. The default
+            delimiter is the semicolon character
+            (&lsquo;<literal>;</literal>&rsquo;).
+          </para>
 
-      <listitem>
-        <para>
-          <literal>delimiter <replaceable>str</replaceable></literal>
-        </para>
+          <para>
+            [Q: The Wiki docs state a max length of 16, but that doesn't
+            work; perhaps this is a bug? Or else MAX_DELIMITER includes
+            the terminating null byte?]
+          </para>
 
-        <para>
-          Set the command delimiter to <replaceable>str</replaceable>,
-          which may consist of 1 to 15 characters. The default delimiter
-          is the semicolon character
-          (&lsquo;<literal>;</literal>&rsquo;).
-        </para>
-
-        <para>
-          [The Wiki docs state a max length of 16, but that doesn't
-          work; perhaps this is a bug? Or else MAX_DELIMITER includes
-          the terminating null byte?]
-        </para>
-
 <programlisting>
 -- delimiter 1234567890123456
 mysqltest: At line 2: End of line junk detected: "6"
 </programlisting>
-      </listitem>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>dirty_close
-          <replaceable>connection_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>dirty_close
+            <replaceable>connection_name</replaceable></literal>
+          </para>
 
-        <para>
-          Close the named connection. This is like
-          <literal>disconnect</literal> except that it calls
-          <literal>vio_delete()</literal> before it closes the
-          connection.
-        </para>
-      </listitem>
+          <para>
+            Close the named connection. This is like
+            <literal>disconnect</literal> except that it calls
+            <literal>vio_delete()</literal> before it closes the
+            connection.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_abort_on_error</literal>,
-          <literal>enable_abort_on_error</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_abort_on_error</literal>,
+            <literal>enable_abort_on_error</literal>
+          </para>
 
-        <para>
-          Disable or enable abort-on-error behavior. This setting is
-          enabled by default. With this setting enabled,
-          <command>mysqltest</command> aborts the test when a statement
-          sent to the server results in an unexpected error [or succeeds
-          when it shouldn't?], [and does not generate the
-          <filename>.reject</filename> file?]
-        </para>
+          <para>
+            Disable or enable abort-on-error behavior. This setting is
+            enabled by default. With this setting enabled,
+            <command>mysqltest</command> aborts the test when a
+            statement sent to the server results in an unexpected error
+            [Q: or succeeds when it shouldn't?], [Q: and does not
+            generate the <filename>.reject</filename> file?]
+          </para>
 
-        <para>
-          [Wiki has some why-this-is-useful notes]
-        </para>
-      </listitem>
+          <para>
+            [Wiki has some why-this-is-useful notes]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_info</literal>,
-          <literal>enable_info</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_info</literal>,
+            <literal>enable_info</literal>
+          </para>
 
-        <para>
-          Disable or enable additional information about SQL statement
-          results. This setting is disabled by default. With this
-          setting enabled, <command>mysqltest</command> displays the
-          affected-rows count and the output from the
-          <literal>mysql_info()</literal> C API function. The
-          <quote>affected-rows</quote> value is <literal>rows
-          selected</literal> for queries such as
-          <literal>SELECT</literal> and <quote>rows modified</quote> for
-          statements that change data.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable additional information about SQL statement
+            results. This setting is disabled by default. With this
+            setting enabled, <command>mysqltest</command> displays the
+            affected-rows count and the output from the
+            <literal>mysql_info()</literal> C API function. The
+            <quote>affected-rows</quote> value is <literal>rows
+            selected</literal> for queries such as
+            <literal>SELECT</literal> and <quote>rows modified</quote>
+            for statements that change data.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_metadata</literal>,
-          <literal>enable_metadata</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_metadata</literal>,
+            <literal>enable_metadata</literal>
+          </para>
 
-        <para>
-          Disable or enable query metadata display. This setting is
-          enabled by default. With this setting enabled,
-          <command>mysqltest</command> adds query metadata to the
-          result. This information consists of the values corresponding
-          to the members of the <literal>MYSQL_FIELD</literal> data
-          structure, for each column of the result.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable query metadata display. This setting is
+            enabled by default. With this setting enabled,
+            <command>mysqltest</command> adds query metadata to the
+            result. This information consists of the values
+            corresponding to the members of the
+            <literal>MYSQL_FIELD</literal> data structure, for each
+            column of the result.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_parsing</literal>,
-          <literal>enable_parsing</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_parsing</literal>,
+            <literal>enable_parsing</literal>
+          </para>
 
-        <para>
-          Increment or decrement the parsing-disabled level. The level
-          is 0 by default.
-        </para>
+          <para>
+            Increment or decrement the parsing-disabled level. The level
+            is 0 by default.
+          </para>
 
-        <para>
-          [What does this apply to? SQL statements? Non-comment
-          commands? Comment (--) commnds?]
-        </para>
+          <para>
+            [Q: What does this apply to? SQL statements? Non-comment
+            commands? Comment (--) commnds?]
+          </para>
 
-        <para>
-          [If parsing is disabled, commands are treated as comments? The
-          only commands recognized are --disable_parsing and
-          --enable_parsing until the parsing level goes > 0?]
-        </para>
+          <para>
+            [Q: If parsing is disabled, commands are treated as
+            comments? The only commands recognized are --disable_parsing
+            and --enable_parsing until the parsing level goes > 0?]
+          </para>
 
-        <para>
-          [Do these commands work only when given in "--" form?]
-        </para>
-      </listitem>
+          <para>
+            [Q: Do these commands work only when given in "--" form?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_ps_protocol</literal>,
-          <literal>enable_ps_protocol</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_ps_protocol</literal>,
+            <literal>enable_ps_protocol</literal>
+          </para>
 
-        <para>
-          Disable or enable prepared-statement protocol. This setting is
-          disabled by default unless the <option>--ps-protocol</option>
-          option is given.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable prepared-statement protocol. This setting
+            is disabled by default unless the
+            <option>--ps-protocol</option> option is given.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_ps_warnings</literal>,
-          <literal>enable_ps_warnings</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_ps_warnings</literal>,
+            <literal>enable_ps_warnings</literal>
+          </para>
 
-        <para>
-          Disable or enable prepared-statement warnings. This setting is
-          enabled by default.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable prepared-statement warnings. This setting
+            is enabled by default.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_query_log</literal>,
-          <literal>enable_query_log</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_query_log</literal>,
+            <literal>enable_query_log</literal>
+          </para>
 
-        <para>
-          Disable or enable query logging. This setting is enabled by
-          default. With this setting enabled,
-          <command>mysqltest</command> echoes input SQL statements to
-          the test result.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable query logging. This setting is enabled by
+            default. With this setting enabled,
+            <command>mysqltest</command> echoes input SQL statements to
+            the test result.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_reconnect</literal>,
-          <literal>enable_reconnect</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_reconnect</literal>,
+            <literal>enable_reconnect</literal>
+          </para>
 
-        <para>
-          Disable or enable automatic reconnect for dropped connections.
-          [Is the default whatever the default is for the client library
-          (which varies)?]
-        </para>
+          <para>
+            Disable or enable automatic reconnect for dropped
+            connections. [Q: Is the default whatever the default is for
+            the client library (which varies)?]
+          </para>
 
-        <para>
-          [When does this apply? To connections made afterward?]
-        </para>
-      </listitem>
+          <para>
+            [Q: When does this apply? To connections made afterward?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_result_log</literal>,
-          <literal>enable_result_log</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_result_log</literal>,
+            <literal>enable_result_log</literal>
+          </para>
 
-        <para>
-          Disable or enable the result log. This setting is enabled by
-          default. With this setting enabled,
-          <command>mysqltest</command> displays query results (and
-          results from commands such as <literal>echo</literal> and
-          <literal>exec</literal>).
-        </para>
-      </listitem>
+          <para>
+            Disable or enable the result log. This setting is enabled by
+            default. With this setting enabled,
+            <command>mysqltest</command> displays query results (and
+            results from commands such as <literal>echo</literal> and
+            <literal>exec</literal>).
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_rpl_parse</literal>,
-          <literal>enable_rpl_parse</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_rpl_parse</literal>,
+            <literal>enable_rpl_parse</literal>
+          </para>
 
-        <para>
-          Disable or enable parsing of statements to determine whether
-          they go to the master or slave.
-        </para>
+          <para>
+            Disable or enable parsing of statements to determine whether
+            they go to the master or slave.
+          </para>
 
-        <para>
-          [The default is whatever the default is for the C API
-          library?] [MySQL 4.0 and up only]
-        </para>
-      </listitem>
+          <para>
+            [Q: The default is whatever the default is for the C API
+            library?] [MySQL 4.0 and up only]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disable_warnings</literal>,
-          <literal>enable_warnings</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disable_warnings</literal>,
+            <literal>enable_warnings</literal>
+          </para>
 
-        <para>
-          Disable or enable warnings. This setting is enabled by
-          default. With this setting enabled,
-          <command>mysqltest</command> uses <literal>SHOW
-          WARNINGS</literal> to display any warnings produced by
-          statements.
-        </para>
-      </listitem>
+          <para>
+            Disable or enable warnings. This setting is enabled by
+            default. With this setting enabled,
+            <command>mysqltest</command> uses <literal>SHOW
+            WARNINGS</literal> to display any warnings produced by
+            statements.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>disconnect
-          <replaceable>connection_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>disconnect
+            <replaceable>connection_name</replaceable></literal>
+          </para>
 
-        <para>
-          Close the named connection. If the connection is the current
-          connection, you should use the <literal>connection</literal>
-          command to switch to a different connection before executing
-          further SQL statements.
-        </para>
-      </listitem>
+          <para>
+            Close the named connection. If the connection is the current
+            connection, you should use the <literal>connection</literal>
+            command to switch to a different connection before executing
+            further SQL statements.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>echo <replaceable>text</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>echo <replaceable>text</replaceable></literal>
+          </para>
 
-        <para>
-          Echo the text to the test result.
-        </para>
+          <para>
+            Echo the text to the test result.
+          </para>
 
-        <para>
-          [This is is supposed to allow some kind of variable expansion,
-          but I find that this works only if the text to be echoed
-          consists only of a single variable reference. That's not what
-          the comments in the code lead me to expect.]
-        </para>
-      </listitem>
+          <para>
+            [Q: This is is supposed to allow some kind of variable
+            expansion, but I find that this works only if the text to be
+            echoed consists only of a single variable reference. That's
+            not what the comments in the code lead me to expect.]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>end</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>end</literal>
+          </para>
 
-        <para>
-          End an <literal>if</literal> or <literal>while</literal>
-          block. If there is no such block open,
-          <command>mysqltest</command> exits with an error.
-        </para>
+          <para>
+            End an <literal>if</literal> or <literal>while</literal>
+            block. If there is no such block open,
+            <command>mysqltest</command> exits with an error.
+          </para>
 
-        <para>
-          [<command>mysqltest</command> appears to consider
-          <literal>}</literal> and <literal>end</literal> the same]
-        </para>
-      </listitem>
+          <para>
+            [<command>mysqltest</command> appears to consider
+            <literal>}</literal> and <literal>end</literal> the same]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>end_timer</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>end_timer</literal>
+          </para>
 
-        <para>
-          Stop the timer. By default, the timer does not stop until just
-          before <command>mysqltest</command> exits.
-        </para>
-      </listitem>
+          <para>
+            Stop the timer. By default, the timer does not stop until
+            just before <command>mysqltest</command> exits.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>error <replaceable>error_code</replaceable> [,
-          <replaceable>error_code</replaceable>] ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>error <replaceable>error_code</replaceable> [,
+            <replaceable>error_code</replaceable>] ...</literal>
+          </para>
 
-        <para>
-          Specify one or more comma-separated error values that the next
-          command is expected to return. Each
-          <replaceable>error_code</replaceable> value is either a
-          MySQL-specific error number or a SQLSTATE value. (These are
-          the kinds of values returned by the
-          <literal>mysql_errno()</literal> and
-          <literal>mysql_sqlstate()</literal> C API functions.) If you
-          specify a SQLSTATE value, it should begin with an
-          <literal>S</literal> to enable <command>mysqltest</command> to
-          distinguish it from a MySQL error number. For example, to
-          specify the SQLSTATE value <literal>42000</literal>, write it
-          as <literal>S42000</literal>:
-        </para>
+          <para>
+            Specify one or more comma-separated error values that the
+            next command is expected to return. Each
+            <replaceable>error_code</replaceable> value is either a
+            MySQL-specific error number or a SQLSTATE value. (These are
+            the kinds of values returned by the
+            <literal>mysql_errno()</literal> and
+            <literal>mysql_sqlstate()</literal> C API functions.) If you
+            specify a SQLSTATE value, it should begin with an
+            <literal>S</literal> to enable <command>mysqltest</command>
+            to distinguish it from a MySQL error number. For example, to
+            specify the SQLSTATE value <literal>42000</literal>, write
+            it as <literal>S42000</literal>:
+          </para>
 
 <programlisting>
 --error S42000
 </programlisting>
 
-        <para>
-          [Wiki has some stuff about non-obvious effects for specifying
-          error 0 in combination with non-zero error codes]
-        </para>
+          <para>
+            [Wiki has some stuff about non-obvious effects for
+            specifying error 0 in combination with non-zero error codes]
+          </para>
 
-        <para>
-          [0 and S00000 are equivalent for specifying <quote>no
-          error</quote>?]
-        </para>
+          <para>
+            [Q: 0 and S00000 are equivalent for specifying <quote>no
+            error</quote>?]
+          </para>
 
-        <para>
-          [--error 0 is the same as saying <quote>no error expected, the
-          statement must succeed</quote>?]
-        </para>
+          <para>
+            [Q: --error 0 is the same as saying <quote>no error
+            expected, the statement must succeed</quote>?]
+          </para>
 
-        <para>
-          [Can you use <literal>error</literal> to specify shell status
-          values for testing the value of shell commands
-          (<literal>exec</literal>, <literal>system</literal>)?]
-        </para>
-      </listitem>
+          <para>
+            [Q: Can you use <literal>error</literal> to specify shell
+            status values for testing the value of shell commands
+            (<literal>exec</literal>, <literal>system</literal>)?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>eval <replaceable>statement</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>eval <replaceable>statement</replaceable></literal>
+          </para>
 
-        <para>
-          Evaluate the statement and send it to the server as a
-          statement to be executed. Variable references are expanded.
-          Use &lsquo;<literal>\$</literal>&rsquo; to specify a literal
-          &lsquo;<literal>$</literal>&rsquo; character.
-        </para>
+          <para>
+            Evaluate the statement and send it to the server as a
+            statement to be executed. Variable references are expanded.
+            Use &lsquo;<literal>\$</literal>&rsquo; to specify a literal
+            &lsquo;<literal>$</literal>&rsquo; character.
+          </para>
 
-        <para>
-          [What is the advantage of using <literal>eval</literal> over
-          not using <literal>eval</literal>? Variable reference
-          expansion?]
-        </para>
-      </listitem>
+          <para>
+            [Q: What is the advantage of using <literal>eval</literal>
+            over not using <literal>eval</literal>? Variable reference
+            expansion?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>eval_result</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>eval_result</literal>
+          </para>
 
-        <para>
-          [Unknown]
-        </para>
-      </listitem>
+          <para>
+            [Unknown]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>exec <replaceable>command</replaceable>
-          [<replaceable>arg</replaceable>] ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>exec <replaceable>command</replaceable>
+            [<replaceable>arg</replaceable>] ...</literal>
+          </para>
 
-        <para>
-          Execute the shell command using the <literal>popen()</literal>
-          library call.
-        </para>
+          <para>
+            Execute the shell command using the
+            <literal>popen()</literal> library call.
+          </para>
 
-        <para>
-          On Cygwin, the command is executed from
-          <command>cmd.exe</command>, so commands such as
-          <command>rm</command> cannot be executed with
-          <literal>exec</literal>. Use <literal>system</literal>
-          instead.
-        </para>
+          <para>
+            On Cygwin, the command is executed from
+            <command>cmd.exe</command>, so commands such as
+            <command>rm</command> cannot be executed with
+            <literal>exec</literal>. Use <literal>system</literal>
+            instead.
+          </para>
 
-        <para>
-          [Are variable references expanded?]
-        </para>
-      </listitem>
+          <para>
+            [Q: Are variable references expanded?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>exit</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>exit</literal>
+          </para>
 
-        <para>
-          Terminate the test case.
-        </para>
-      </listitem>
+          <para>
+            Terminate the test case.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>horizontal_results</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>horizontal_results</literal>
+          </para>
 
-        <para>
-          Set the default query result display format to horizontal.
-          Initially, the default is to display results horizontally.
-        </para>
-      </listitem>
+          <para>
+            Set the default query result display format to horizontal.
+            Initially, the default is to display results horizontally.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>if (<replaceable>expr</replaceable>)</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>if (<replaceable>expr</replaceable>)</literal>
+          </para>
 
-        <para>
-          Begin an <literal>if</literal> block, which continues until an
-          <literal>end</literal> line. <command>mysqltest</command>
-          executes the block if the expression is true. [See XXX for
-          more information on flow-control constructs]
-        </para>
+          <para>
+            Begin an <literal>if</literal> block, which continues until
+            an <literal>end</literal> line. <command>mysqltest</command>
+            executes the block if the expression is true. [See XXX for
+            more information on flow-control constructs]
+          </para>
 
-        <para>
-          [There is no provision for <literal>else</literal>?]
-        </para>
-      </listitem>
+          <para>
+            [Q: There is no provision for <literal>else</literal>?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>inc $<replaceable>var_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>inc $<replaceable>var_name</replaceable></literal>
+          </para>
 
-        <para>
-          Increment a numeric variable. If the variable is not numeric,
-          the result is undefined.
-        </para>
-      </listitem>
+          <para>
+            Increment a numeric variable. If the variable is not
+            numeric, the result is undefined.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>let $<replaceable>var_name</replaceable> =
-          <replaceable>value</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>let $<replaceable>var_name</replaceable> =
+            <replaceable>value</replaceable></literal>
+          </para>
 
-        <para>
-          Assign a value to a variable. If the <literal>let</literal>
-          command is specified as a normal command (that is, not
-          beginning with &lsquo;<literal>--</literal>&rsquo;), the value
-          contains everything up to the command delimiter, and thus can
-          span multiple lines. <command>mysqltest</command> aborts with
-          an error if the value is erroneous.
-        </para>
+          <para>
+            Assign a value to a variable. If the <literal>let</literal>
+            command is specified as a normal command (that is, not
+            beginning with &lsquo;<literal>--</literal>&rsquo;), the
+            value contains everything up to the command delimiter, and
+            thus can span multiple lines. <command>mysqltest</command>
+            aborts with an error if the value is erroneous.
+          </para>
 
-        <para>
-          [The <literal>$</literal> seems to be implied if not present?]
-        </para>
+          <para>
+            [Q: The <literal>$</literal> seems to be implied if not
+            present?]
+          </para>
 
-        <para>
-          [The Wiki says there can be no space between the var name and
-          the <literal>=</literal> sign. Is that really true? It also
-          seems that whitespace following the <literal>=</literal> sign
-          is discarded.]
-        </para>
-      </listitem>
+          <para>
+            [Q: The Wiki says there can be no space between the var name
+            and the <literal>=</literal> sign. Is that really true? It
+            also seems that whitespace following the
+            <literal>=</literal> sign is discarded.]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>ping</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>ping</literal>
+          </para>
 
-        <para>
-          Ping the server. This executes the
-          <literal>mysql_ping()</literal> C API function. The function
-          result is discarded.
-        </para>
+          <para>
+            Ping the server. This executes the
+            <literal>mysql_ping()</literal> C API function. The function
+            result is discarded.
+          </para>
 
-        <para>
-          [I suppose the effect is that if the connection has dropped
-          and reconnect is enabled, pinging the server causes a
-          reconnect?]
-        </para>
-      </listitem>
+          <para>
+            [Q: I suppose the effect is that if the connection has
+            dropped and reconnect is enabled, pinging the server causes
+            a reconnect?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>query</literal>
-        </para>
-      </listitem>
+        <listitem>
+          <para>
+            <literal>query</literal>
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>query_horizontal
-          <replaceable>statement</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>query_horizontal
+            <replaceable>statement</replaceable></literal>
+          </para>
 
-        <para>
-          Like <literal>eval</literal>, but display the query result
-          horizontally.
-        </para>
-      </listitem>
+          <para>
+            Like <literal>eval</literal>, but display the query result
+            horizontally.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>query_vertical<replaceable>statement</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>query_vertical<replaceable>statement</replaceable></literal>
+          </para>
 
-        <para>
-          Like <literal>eval</literal>, but display the query result
-          vertically.
-        </para>
-      </listitem>
+          <para>
+            Like <literal>eval</literal>, but display the query result
+            vertically.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>real_sleep <replaceable>num</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>real_sleep <replaceable>num</replaceable></literal>
+          </para>
 
-        <para>
-          Sleep <replaceable>num</replaceable> seconds.
-          <replaceable>num</replaceable> can have a fractional part.
-          Unlike the <literal>sleep</literal> command,
-          <literal>real_sleep</literal> is not affected, by the
-          <option>--sleep</option> command option.
-        </para>
-      </listitem>
+          <para>
+            Sleep <replaceable>num</replaceable> seconds.
+            <replaceable>num</replaceable> can have a fractional part.
+            Unlike the <literal>sleep</literal> command,
+            <literal>real_sleep</literal> is not affected, by the
+            <option>--sleep</option> command option.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>reap</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>reap</literal>
+          </para>
 
-        <para>
-          Receive the result of the statement most recently sent with
-          the <literal>send</literal> command.
-        </para>
-      </listitem>
+          <para>
+            Receive the result of the statement most recently sent with
+            the <literal>send</literal> command.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>replace_column <replaceable>col_num</replaceable>
-          <replaceable>value</replaceable>
-          [<replaceable>col_num</replaceable>
-          <replaceable>value</replaceable>] ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>replace_column <replaceable>col_num</replaceable>
+            <replaceable>value</replaceable>
+            [<replaceable>col_num</replaceable>
+            <replaceable>value</replaceable>] ...</literal>
+          </para>
 
-        <para>
-          Replace strings in the result. The value in
-          <replaceable>col_num</replaceable> is replaced by the
-          corresponding <replaceable>value</replaceable>. There can be
-          more than one
-          <replaceable>col_num</replaceable>/<replaceable>value</replaceable>
-          pair. Column numbers start with 1.
-        </para>
+          <para>
+            Replace strings in the result. The value in
+            <replaceable>col_num</replaceable> is replaced by the
+            corresponding <replaceable>value</replaceable>. There can be
+            more than one
+            <replaceable>col_num</replaceable>/<replaceable>value</replaceable>
+            pair. Column numbers start with 1.
+          </para>
 
-        <para>
-          [This command applies only to the next command? Is that true
-          for all the replace_xxx commands? Can values be quoted or
-          specified using variables?]
-        </para>
-      </listitem>
+          <para>
+            [Q: This command applies only to the next command? Is that
+            true for all the replace_xxx commands? Can values be quoted
+            or specified using variables?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>replace_regex
-          /<replaceable>pattern</replaceable>/<replaceable>replacement</replaceable>/[i]
-          ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>replace_regex
+            /<replaceable>pattern</replaceable>/<replaceable>replacement</replaceable>/[i]
+            ...</literal>
+          </para>
 
-        <para>
-          Find strings that match the pattern
-          <replaceable>pattern</replaceable> and replace them with
-          <replaceable>replacement</replaceable>. Each instance of a
-          string in the line that matches the pattern is replaced.
-          Matching is case sensitive by default. Specify the optional
-          <literal>i</literal> modifier to cause matching to be case
-          insensitive.
-        </para>
+          <para>
+            Find strings that match the pattern
+            <replaceable>pattern</replaceable> and replace them with
+            <replaceable>replacement</replaceable>. Each instance of a
+            string in the line that matches the pattern is replaced.
+            Matching is case sensitive by default. Specify the optional
+            <literal>i</literal> modifier to cause matching to be case
+            insensitive.
+          </para>
 
-        <para>
-          The syntax for allowable patterns is the same as for the
-          <literal>REGEXP</literal> SQL operator. In addition, the
-          pattern can contain parentheses to mark substrings matched by
-          parts of the pattern. These substrings can be referenced in
-          the replacement string: An instance of
-          <literal>\<replaceable>N</replaceable></literal> in the
-          replacement string causes insertion of the
-          <replaceable>N</replaceable>-th substring matched by the
-          pattern. For example, the following command matches
-          <literal>strawberry</literal> and replaces it with
-          <literal>raspberry and strawberry</literal>:
-        </para>
+          <para>
+            The syntax for allowable patterns is the same as for the
+            <literal>REGEXP</literal> SQL operator. In addition, the
+            pattern can contain parentheses to mark substrings matched
+            by parts of the pattern. These substrings can be referenced
+            in the replacement string: An instance of
+            <literal>\<replaceable>N</replaceable></literal> in the
+            replacement string causes insertion of the
+            <replaceable>N</replaceable>-th substring matched by the
+            pattern. For example, the following command matches
+            <literal>strawberry</literal> and replaces it with
+            <literal>raspberry and strawberry</literal>:
+          </para>
 
 <programlisting>
 --replace_regex /(strawberry)/raspberry and \1/
 </programlisting>
 
-        <para>
-          Multiple pattern/replacement pairs may be given. The following
-          command replaces instances of <literal>A</literal> with
-          <literal>C</literal> (the first pattern replaces
-          <literal>A</literal> with <literal>B</literal>, the second
-          replaces <literal>B</literal> with <literal>C</literal>):
-        </para>
+          <para>
+            Multiple pattern/replacement pairs may be given. The
+            following command replaces instances of <literal>A</literal>
+            with <literal>C</literal> (the first pattern replaces
+            <literal>A</literal> with <literal>B</literal>, the second
+            replaces <literal>B</literal> with <literal>C</literal>):
+          </para>
 
 <programlisting>
 --replace_regex /A/B/ /B/C/
 </programlisting>
 
-        <para>
-          [Better to use patterns with metacharacters for this example]
-        </para>
+          <para>
+            [Better to use patterns with metacharacters for this
+            example]
+          </para>
 
-        <para>
-          If a pattern is not found, no error occurs and the input is
-          unchanged.
-        </para>
+          <para>
+            If a pattern is not found, no error occurs and the input is
+            unchanged.
+          </para>
 
-        <para>
-          The <literal>replace_regex</literal> command was added in
-          MySQL 5.1.6.
-        </para>
-      </listitem>
+          <para>
+            The <literal>replace_regex</literal> command was added in
+            MySQL 5.1.6.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>replace_result <replaceable>from_val
-          to_val</replaceable> [<replaceable>from_val
-          to_val</replaceable>] ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>replace_result <replaceable>from_val
+            to_val</replaceable> [<replaceable>from_val
+            to_val</replaceable>] ...</literal>
+          </para>
 
-        <para>
-          Replace strings in the result. Each occurrence of
-          <replaceable>from_val</replaceable> is replaced by the
-          corresponding <replaceable>to_val</replaceable>. There can be
-          more than
-          <replaceable>from_val</replaceable>/<replaceable>to_val</replaceable>
-          pair. Arguments can be quoted with single quotes or double
-          quotes. [Variable references within the arguments are expanded
-          before replacement occurs?] Values are matched literally. To
-          use patterns, use the <literal>replace_regex</literal>
-          command.
-        </para>
+          <para>
+            Replace strings in the result. Each occurrence of
+            <replaceable>from_val</replaceable> is replaced by the
+            corresponding <replaceable>to_val</replaceable>. There can
+            be more than
+            <replaceable>from_val</replaceable>/<replaceable>to_val</replaceable>
+            pair. Arguments can be quoted with single quotes or double
+            quotes. [Q: Variable references within the arguments are
+            expanded before replacement occurs?] Values are matched
+            literally. To use patterns, use the
+            <literal>replace_regex</literal> command.
+          </para>
 
-        <para>
-          [This applies both to the line of column names at the
-          beginning of statement output, and to the data lines that
-          follow? (Is that true for other replace_xxx commands?)]
-        </para>
+          <para>
+            [Q: This applies both to the line of column names at the
+            beginning of statement output, and to the data lines that
+            follow? (Is that true for other replace_xxx commands?)]
+          </para>
 
-        <para>
-          [The behavior differs from <literal>replace_regex</literal>.
-          For example <literal>replace_result a b b c</literal> does not
-          change a to c. Apparently, result replacement for a column
-          stops as soon as a match is found?]
-        </para>
-      </listitem>
+          <para>
+            [Q: The behavior differs from
+            <literal>replace_regex</literal>. For example
+            <literal>replace_result a b b c</literal> does not change a
+            to c. Apparently, result replacement for a column stops as
+            soon as a match is found?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>require
-          <replaceable>file_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>require
+            <replaceable>file_name</replaceable></literal>
+          </para>
 
-        <para>
-          Compare the result [from the current test?] with the contents
-          of the named file. If the content does not match or there is
-          some other error, the test aborts with an
-          "abort_not_supported_test" error message.
-        </para>
-      </listitem>
+          <para>
+            Compare the result [Q: from the current test?] with the
+            contents of the named file. If the content does not match or
+            there is some other error, the test aborts with an
+            "abort_not_supported_test" error message.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>require_manager</literal>
-        </para>
-      </listitem>
+        <listitem>
+          <para>
+            <literal>require_manager</literal>
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>result <replaceable>file_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>result
+            <replaceable>file_name</replaceable></literal>
+          </para>
 
-        <para>
-          Compare the result from the current test? with the contents of
-          the named file. If the content does not match or there is some
-          other error, write the result to
-          <filename>r/<replaceable>file_name</replaceable>.reject</filename>.
-        </para>
+          <para>
+            Compare the result from the current test? with the contents
+            of the named file. If the content does not match or there is
+            some other error, write the result to
+            <filename>r/<replaceable>file_name</replaceable>.reject</filename>.
+          </para>
 
-        <para>
-          [Ask these questions, but base them on the Wiki text, not my
-          rewrite in the previous para.] [So, does that mean
-          <replaceable>file_name</replaceable> is given without the
-          <filename>.result</filename> extension? Is the "current" test
-          the most recent command executed within the test case, or the
-          result of the entire test case up to the
-          <literal>result</literal> command? Is "write the result"
-          actually "write the diff of the expected and actual results"?]
-        </para>
-      </listitem>
+          <para>
+            [Ask these questions, but base them on the Wiki text, not my
+            rewrite in the previous para.] [Q: So, does that mean
+            <replaceable>file_name</replaceable> is given without the
+            <filename>.result</filename> extension? Is the "current"
+            test the most recent command executed within the test case,
+            or the result of the entire test case up to the
+            <literal>result</literal> command? Is "write the result"
+            actually "write the diff of the expected and actual
+            results"?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>rpl_probe</literal>
-        </para>
-      </listitem>
+        <listitem>
+          <para>
+            <literal>rpl_probe</literal>
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>save_master_pos</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>save_master_pos</literal>
+          </para>
 
-        <para>
-          For a master replication server, save the current binary log
-          filename and position. These values can be used for subsequent
-          <literal>sync_with_master</literal> or
-          <literal>sync_slave_with_master</literal> commands.
-        </para>
-      </listitem>
+          <para>
+            For a master replication server, save the current binary log
+            filename and position. These values can be used for
+            subsequent <literal>sync_with_master</literal> or
+            <literal>sync_slave_with_master</literal> commands.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>send <replaceable>statement</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>send <replaceable>statement</replaceable></literal>
+          </para>
 
-        <para>
-          Send a statement to the server but do not wait for the result.
-          The result must be received with the <literal>reap</literal>
-          command.
-        </para>
-      </listitem>
+          <para>
+            Send a statement to the server but do not wait for the
+            result. The result must be received with the
+            <literal>reap</literal> command.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>server_start
-          <replaceable>server_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>server_start
+            <replaceable>server_name</replaceable></literal>
+          </para>
 
-        <para>
-          Contact the manager to start a server. The timeout value is 10
-          seconds.
-        </para>
+          <para>
+            Contact the manager to start a server. The timeout value is
+            10 seconds.
+          </para>
 
-        <para>
-          [Does "manager" mean the Instance Manager? If so, is the
-          connection to the manager made using the parameters specified
-          by the
-          <option>--manager-<replaceable>xxx</replaceable></option>
-          command-line options?]
-        </para>
+          <para>
+            [Q: Does "manager" mean the Instance Manager? If so, is the
+            connection to the manager made using the parameters
+            specified by the
+            <option>--manager-<replaceable>xxx</replaceable></option>
+            command-line options?]
+          </para>
 
-        <para>
-          [This command is unavailable for
-          <command>mysqltest_embedded</command>, the version of
-          <command>mysqltest</command> built with support for
-          <literal>libmysqld</literal>?]
-        </para>
-      </listitem>
+          <para>
+            [Q: This command is unavailable for
+            <command>mysqltest_embedded</command>, the version of
+            <command>mysqltest</command> built with support for
+            <literal>libmysqld</literal>?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>server_stop
-          <replaceable>server_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>server_stop
+            <replaceable>server_name</replaceable></literal>
+          </para>
 
-        <para>
-          Contact the manager to stop a server. The timeout value is 10
-          seconds.
-        </para>
+          <para>
+            Contact the manager to stop a server. The timeout value is
+            10 seconds.
+          </para>
 
-        <para>
-          [This command is unavailable for
-          <command>mysqltest_embedded</command>, the version of
-          <command>mysqltest</command> built with support for
-          <literal>libmysqld</literal>?]
-        </para>
-      </listitem>
+          <para>
+            [Q: This command is unavailable for
+            <command>mysqltest_embedded</command>, the version of
+            <command>mysqltest</command> built with support for
+            <literal>libmysqld</literal>?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>sleep <replaceable>num</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>sleep <replaceable>num</replaceable></literal>
+          </para>
 
-        <para>
-          Sleep <replaceable>num</replaceable> seconds.
-          <replaceable>num</replaceable> can have a fractional part. If
-          the <option>--sleep</option> command option was given, the
-          option value overrides the value given in the
-          <literal>sleep</literal> command. For example, if
-          <command>mysqltest</command> is started with
-          <option>--sleep=10</option>, the command <literal>sleep
-          15</literal> sleeps 10 seconds, not 15.
-        </para>
-      </listitem>
+          <para>
+            Sleep <replaceable>num</replaceable> seconds.
+            <replaceable>num</replaceable> can have a fractional part.
+            If the <option>--sleep</option> command option was given,
+            the option value overrides the value given in the
+            <literal>sleep</literal> command. For example, if
+            <command>mysqltest</command> is started with
+            <option>--sleep=10</option>, the command <literal>sleep
+            15</literal> sleeps 10 seconds, not 15.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>source <replaceable>file_name</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>source
+            <replaceable>file_name</replaceable></literal>
+          </para>
 
-        <para>
-          Reads test input from the named file.
-        </para>
+          <para>
+            Reads test input from the named file.
+          </para>
 
-        <para>
-          [Can this be used recursively? Max recursion level?]
-        </para>
-      </listitem>
+          <para>
+            If you find that several test case files contain a common
+            section of commands (for example, statements that create a
+            standard set of tables), you can put those commands in
+            another file and those test cases that need the file can
+            include it by means of a <literal>source
+            <replaceable>file_name</replaceable></literal> command. This
+            enables you to write the code just once rather than in
+            multiple test cases.
+          </para>
 
-      <listitem>
-        <para>
-          <literal>start_timer</literal>
-        </para>
+          <para>
+            [Q: Can this be used recursively? Max recursion level?]
+          </para>
+        </listitem>
 
-        <para>
-          Restart the timer, overriding any timer start that occurred
-          earlier. By default, the timer starts when
-          <command>mysqltest</command> begins execution.
-        </para>
-      </listitem>
+        <listitem>
+          <para>
+            <literal>start_timer</literal>
+          </para>
 
-      <listitem>
-        <para>
-          <literal>sync_slave_with_master
-          [<replaceable>connection_name</replaceable>]</literal>
-        </para>
+          <para>
+            Restart the timer, overriding any timer start that occurred
+            earlier. By default, the timer starts when
+            <command>mysqltest</command> begins execution.
+          </para>
+        </listitem>
 
-        <para>
-          Executing this command is equivalent to executing the
-          following commands:
-        </para>
+        <listitem>
+          <para>
+            <literal>sync_slave_with_master
+            [<replaceable>connection_name</replaceable>]</literal>
+          </para>
 
+          <para>
+            Executing this command is equivalent to executing the
+            following commands:
+          </para>
+
 <programlisting>
 save_master_pos
 connection <replaceable>connection_name</replaceable>
 sync_with_master 0
 </programlisting>
 
-        <para>
-          If <replaceable>connection_name</replaceable> is not
-          specified, the connection named <literal>slave</literal> is
-          used.
-        </para>
+          <para>
+            If <replaceable>connection_name</replaceable> is not
+            specified, the connection named <literal>slave</literal> is
+            used.
+          </para>
 
-        <para>
-          The effect is to save the replication coordinates (binary log
-          filename and position) for the server on the current
-          connection (which is assumed to be a master replication
-          server), and then switch to a slave server and wait until it
-          catches up with the saved coordinates. Note that this command
-          implicitly changes the current connection.
-        </para>
-      </listitem>
+          <para>
+            The effect is to save the replication coordinates (binary
+            log filename and position) for the server on the current
+            connection (which is assumed to be a master replication
+            server), and then switch to a slave server and wait until it
+            catches up with the saved coordinates. Note that this
+            command implicitly changes the current connection.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>sync_with_master
-          <replaceable>offset</replaceable></literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>sync_with_master
+            <replaceable>offset</replaceable></literal>
+          </para>
 
-        <para>
-          For a slave replication server, wait until it has caught up
-          with the master. The position to synchronize to is the
-          position saved by the most recent
-          <literal>save_master_pos</literal> command plus
-          <replaceable>offset</replaceable>.
-        </para>
+          <para>
+            For a slave replication server, wait until it has caught up
+            with the master. The position to synchronize to is the
+            position saved by the most recent
+            <literal>save_master_pos</literal> command plus
+            <replaceable>offset</replaceable>.
+          </para>
 
-        <para>
-          To use this command, <literal>save_master_pos</literal> must
-          have been executed at some point earlier in the test case to
-          cause <command>mysqltest</command> to save the master's
-          replication coordinates.
-        </para>
-      </listitem>
+          <para>
+            To use this command, <literal>save_master_pos</literal> must
+            have been executed at some point earlier in the test case to
+            cause <command>mysqltest</command> to save the master's
+            replication coordinates.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>system <replaceable>command</replaceable>
-          [<replaceable>arg</replaceable>] ...</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>system <replaceable>command</replaceable>
+            [<replaceable>arg</replaceable>] ...</literal>
+          </para>
 
-        <para>
-          Execute the shell command using the
-          <literal>system()</literal> library call.
-        </para>
+          <para>
+            Execute the shell command using the
+            <literal>system()</literal> library call.
+          </para>
 
-        <para>
-          On Cygwin, the command is executed from
-          <command>cmd.exe</command>, so commands such as
-          <command>rm</command> cannot be executed with
-          <literal>exec</literal>. Use <literal>system</literal>
-          instead.
-        </para>
+          <para>
+            On Cygwin, the command is executed from
+            <command>cmd.exe</command>, so commands such as
+            <command>rm</command> cannot be executed with
+            <literal>exec</literal>. Use <literal>system</literal>
+            instead.
+          </para>
 
-        <para>
-          [Are variable references expanded?]
-        </para>
-      </listitem>
+          <para>
+            [Q: Are variable references expanded?]
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>vertical_results</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>vertical_results</literal>
+          </para>
 
-        <para>
-          Set the default query result display format to vertical.
-          Initially, the default is to display results horizontally.
-        </para>
-      </listitem>
+          <para>
+            Set the default query result display format to vertical.
+            Initially, the default is to display results horizontally.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>wait_for_slave_to_stop</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>wait_for_slave_to_stop</literal>
+          </para>
 
-        <para>
-          Poll the current connection, which is assumed to be a
-          connection to a slave replication server, by using the
-          <literal>SHOW STATUS LIKE 'Slave_running'</literal> statement
-          until the result is <literal>OFF</literal>.
-        </para>
-      </listitem>
+          <para>
+            Poll the current connection, which is assumed to be a
+            connection to a slave replication server, by using the
+            <literal>SHOW STATUS LIKE 'Slave_running'</literal>
+            statement until the result is <literal>OFF</literal>.
+          </para>
+        </listitem>
 
-      <listitem>
-        <para>
-          <literal>while (<replaceable>expr</replaceable>)</literal>
-        </para>
+        <listitem>
+          <para>
+            <literal>while (<replaceable>expr</replaceable>)</literal>
+          </para>
 
-        <para>
-          Begin a <literal>while</literal> loop block, which continues
-          until an <literal>end</literal> line.
-          <command>mysqltest</command> executes the block repeatedly as
-          long as the expression is true. [See XXX for more information
-          on flow-control constructs]
-        </para>
+          <para>
+            Begin a <literal>while</literal> loop block, which continues
+            until an <literal>end</literal> line.
+            <command>mysqltest</command> executes the block repeatedly
+            as long as the expression is true. [See XXX for more
+            information on flow-control constructs]
+          </para>
 
-        <para>
-          Make sure that the loop includes some exit condition that
-          eventually occurs. This can be done by writing
-          <replaceable>expr</replaceable> so that it goes false at some
-          point.
-        </para>
-      </listitem>
+          <para>
+            Make sure that the loop includes some exit condition that
+            eventually occurs. This can be done by writing
+            <replaceable>expr</replaceable> so that it goes false at
+            some point.
+          </para>
+        </listitem>
 
-    </itemizedlist>
+      </itemizedlist>
 
-    <para>
-      The syntax for <literal>if</literal> and <literal>while</literal>
-      blocks looks like this:
-    </para>
+    </section>
 
+    <section id="mysqltest-variables">
+
+      <title><command>mysqltest</command> Variables</title>
+
+      <para>
+        Variables:
+      </para>
+
+      <para>
+        <literal>$mysql_errno</literal> is a built-in variable that
+        contains the numeric error returned by the most recent statement
+        sent to the server, or 0 if the command executes successfully.
+        <literal>$mysql_errno</literal> has a value of &minus;1 if no
+        command has yet been sent.
+      </para>
+
+      <para>
+        [Q: Is $mysql_errno set only by SQL statements, or is it also
+        set by exec, system, mysqltest internal commands?]
+      </para>
+
+      <para>
+        You can refer to environment variables. [Q: How is a variable
+        determined to be such? If it's not recognized as a built-in
+        variable or a variable defined in the script?]
+      </para>
+
+      <para>
+        [Q: Variable names appear not to be case sensitive. This leads
+        to an ambiguity: If you refer to a variable named
+        <literal>$path</literal>, is that a <command>mysqltest</command>
+        variable, or the <literal>$PATH</literal> environment variable?]
+      </para>
+
+    </section>
+
+    <section id="mysqltest-flow-control">
+
+      <title><command>mysqltest</command> Flow Control Constructs</title>
+
+      <para>
+        The syntax for <literal>if</literal> and
+        <literal>while</literal> blocks looks like this:
+      </para>
+
 <programlisting>
 if (<replaceable>expr</replaceable>)
 {
@@ -3126,80 +4740,59 @@
 }
 </programlisting>
 
-    <para>
-      If the expression begins with <literal>!</literal>, the sense of
-      the test is reversed.
-    </para>
+      <para>
+        If the expression begins with <literal>!</literal>, the sense of
+        the test is reversed.
+      </para>
 
-    <para>
-      [The opening <literal>{</literal> must be on the next line
-      following <literal>if</literal> or <literal>while</literal>?]
-    </para>
+      <para>
+        [Q: The opening <literal>{</literal> must be on the next line
+        following <literal>if</literal> or <literal>while</literal>?]
+      </para>
 
-    <para>
-      No spaces allowed between parens and the expression within the
-      parens? What is the allowable syntax for <literal>expr</literal>?]
-    </para>
+      <para>
+        No spaces allowed between parens and the expression within the
+        parens? What is the allowable syntax for
+        <literal>expr</literal>?]
+      </para>
 
-    <para>
-      [I'm confused by this in several respects. Is a block written
-      using <literal>{</literal> and <literal>}</literal>, or does it
-      end with <literal>end</literal>? Also, the comments in the code
-      indicate that <replaceable>expr</replaceable> is true if greater
-      than zero and that adding <literal>!</literal> makes
-      <replaceable>expr</replaceable> true if it's zero. But those are
-      not complementary. What if <replaceable>expr</replaceable> is less
-      than zero?]
-    </para>
+      <para>
+        [Q: I'm confused by this in several respects. Is a block written
+        using <literal>{</literal> and <literal>}</literal>, or does it
+        end with <literal>end</literal>? Also, the comments in the code
+        indicate that <replaceable>expr</replaceable> is true if greater
+        than zero and that adding <literal>!</literal> makes
+        <replaceable>expr</replaceable> true if it's zero. But those are
+        not complementary. What if <replaceable>expr</replaceable> is
+        less than zero?]
+      </para>
 
-    <para>
-      Hmm: A block can begin with <literal>{</literal> and end with
-      <literal>end</literal>.
-    </para>
+      <para>
+        Hmm: A block can begin with <literal>{</literal> and end with
+        <literal>end</literal>.
+      </para>
 
-    <para>
-      Variables:
-    </para>
+    </section>
 
-    <para>
-      <literal>$mysql_errno</literal> is a built-in variable that
-      contains the numeric error returned by the most recent statement
-      sent to the server, or 0 if the command executes successfully.
-      <literal>$mysql_errno</literal> has a value of &minus;1 if no
-      command has yet been sent.
-    </para>
+    <section id="mysqltest-misc">
 
-    <para>
-      [Is $mysql_errno set only by SQL statements, or is it also set by
-      exec, system, mysqltest internal commands?]
-    </para>
+      <title><command>mysqltest</command> Misc. Stuff</title>
 
-    <para>
-      You can refer to environment variables. [How is a variable
-      determined to be such? If it's not recognized as a built-in
-      variable or a variable defined in the script?]
-    </para>
+      <para>
+        If an expected error is specified and that error occurs,
+        <command>mysqltest</command> continues reading input. If the
+        command is successful or a different error occurs,
+        <command>mysqltest</command> aborts.
+      </para>
 
-    <para>
-      [Variable names appear not to be case sensitive. This leads to an
-      ambiguity: If you refer to a variable named
-      <literal>$path</literal>, is that a <command>mysqltest</command>
-      variable, or the <literal>$PATH</literal> environment variable?]
-    </para>
+      <para>
+        If no expected error is specified, <command>mysqltest</command>
+        aborts unless the command is successful. (It is implicit that
+        you expect <literal>$mysql_errno</literal> to be 0.)
+      </para>
 
-    <para>
-      If an expected error is specified and that error occurs,
-      <command>mysqltest</command> continues reading input. If the
-      command is successful or a different error occurs,
-      <command>mysqltest</command> aborts.
-    </para>
+    </section>
 
-    <para>
-      If no expected error is specified, <command>mysqltest</command>
-      aborts unless the command is successful. (It is implicit that you
-      expect <literal>$mysql_errno</literal> to be 0.)
-    </para>
-
   </chapter>
 
 </book>

Thread
svn commit - mysqldoc@docsrva: r1522 - in trunk: . mysqltestpaul7 Mar