Author: paul
Date: 2006-06-06 21:43:22 +0200 (Tue, 06 Jun 2006)
New Revision: 2292
Log:
r10314@polar: paul | 2006-06-06 14:42:33 -0500
mysqltest manual revisions.
Modified:
trunk/
trunk/mysqltest/command-reference.xml
trunk/mysqltest/components.xml
trunk/mysqltest/introduction.xml
trunk/mysqltest/mysqltest.xml
trunk/mysqltest/programs.xml
trunk/mysqltest/tutorial.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:10288
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10996
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:7663
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:10314
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10996
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:7663
Modified: trunk/mysqltest/command-reference.xml
===================================================================
--- trunk/mysqltest/command-reference.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/command-reference.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -62,7 +62,7 @@
local server, the default username is <literal>root</literal>.
For an external server, the default username is
<literal>test</literal> or the user specified with the
- <option>--username</option> option.) You can use the
+ <option>--user</option> option.) You can use the
<literal>connect</literal> command to open other connections,
the <literal>connection</literal> command to switch between
connections, and the <literal>disconnect</literal> command to
@@ -95,7 +95,7 @@
<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
+ ignored). Carriage return by itself is
<emphasis>not</emphasis> allowed as a line terminator.
</para>
</listitem>
@@ -181,23 +181,26 @@
such as a <literal>create table</literal> statement for a
table that has many columns.
</para>
+ </listitem>
- <para>
- After <command>mysqltest</command> reads a command up to a
- delimiter and executes it, input reading restarts following
- the delimiter and any remaining 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>
+ </itemizedlist>
+ <para>
+ After <command>mysqltest</command> reads a command up to a
+ delimiter and executes it, input reading restarts following the
+ delimiter and any remaining 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>
echo issue a select statement; select 1; echo done
issuing the select statement;
</programlisting>
- <para>
- That input contains two commands and one SQL statement:
- </para>
+ <para>
+ That input contains two commands and one SQL statement:
+ </para>
<programlisting>
echo issue a select statement
@@ -205,20 +208,32 @@
echo done issuing the select statement
</programlisting>
- <para>
- Similarly, ‘<literal>#</literal>’ comments or
- ‘<literal>--</literal>’ comments can begin on a
- command line following a delimiter:
- </para>
+ <para>
+ Similarly, ‘<literal>#</literal>’ comments or
+ ‘<literal>--</literal>’ comments can begin on a
+ command line following a delimiter:
+ </para>
<programlisting>
select 'hello'; # select a string value
select 'hello'; -- echo that was a select statement
</programlisting>
- </listitem>
- </itemizedlist>
+ <para>
+ On a multiple-line command, ‘<literal>#</literal>’ or
+ ‘<literal>--</literal>’ at the beginning of the second
+ or following lines is not special. Thus, the second and third
+ lines of the following variable-assignment command are not taken
+ as comments. Instead, the variable <literal>$a</literal> is set to
+ a value that contains two linefeed characters:
+ </para>
+<programlisting>
+let $a = This is a variable
+# assignment that sets a variable
+-- to a multiple-line value;
+ </programlisting>
+
<para>
Note that ‘<literal>--</literal>’ comments and normal
commands have complementary properties with regard to how
@@ -260,7 +275,8 @@
<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:
+ ‘<literal>//</literal>’, either of these commands
+ work:
</para>
<programlisting>
@@ -269,7 +285,8 @@
</programlisting>
<para>
- To set the delimiter back to ;, use either of these commands:
+ To set the delimiter back to ‘;’, use either of these
+ commands:
</para>
<programlisting>
@@ -331,29 +348,14 @@
</itemizedlist>
- <para>
- On a multiple-line command, ‘<literal>#</literal>’ or
- ‘<literal>--</literal>’ at the beginning of the second
- or following lines is not special. Thus, the second and third
- lines of the following variable-assignment command are not taken
- as comments. Instead, the variable <literal>$a</literal> is set to
- a value that contains two linefeed characters:
- </para>
-
-<programlisting>
-let $a = This is a variable
-# assignment that sets a variable
--- to a multiple-line value;
- </programlisting>
-
- <para>
- [TODO: 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
+ <remark role="todo">
+ 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>
+ Escaping appears to be allowable only in limited contexts?
+ </remark>
</section>
@@ -361,6 +363,11 @@
<title><command>mysqltest</command> Commands</title>
+ <remark>
+ For echo, exec, system, variable expansion does not appear to work
+ very well before MySQL 5.0.19.
+ </remark>
+
<para>
<command>mysqltest</command> supports the following commands.
Command names are not case sensitive.
@@ -491,14 +498,6 @@
<command>connect</command> and the opening parenthesis, and no
whitepace after the opening parenthesis.]
</para>
-
- <para>
- [BUG: leaving off the trailing parenthesis can produce a weird
- error. For example, with no parenthesis after the database
- name, <command>mysqltest</command> produces this error
- message: <literal>mysqltest: At line 1: Illegal argument for
- port: 'h4z'</literal>.]
- </para>
</listitem>
<listitem>
@@ -576,10 +575,6 @@
discussion of reasons why it can be useful to disable this
behavior, see <xref linkend="error-handling"/>.
</para>
-
- <para>
- [Wiki has some why-this-is-useful notes for these options]
- </para>
</listitem>
<listitem>
@@ -595,9 +590,9 @@
affected-rows count and the output from the
<literal>mysql_info()</literal> C API function. The
<quote>affected-rows</quote> value is <quote>rows
- selected</quote> for queries such as <literal>SELECT</literal>
- and <quote>rows modified</quote> for statements that change
- data.
+ selected</quote> for statements such as
+ <literal>SELECT</literal> and <quote>rows modified</quote> for
+ statements that change data.
</para>
</listitem>
@@ -628,16 +623,6 @@
default. When disabled, <command>mysqltest</command> ignores
everything until <literal>enable_parsing</literal>.
</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>
- [Q: Do these commands work only when given in "--" form?]
- </para>
</listitem>
<listitem>
@@ -758,11 +743,6 @@
Echo the text to the test result. References to variables
within the text are replaced with the corresponding values.
</para>
-
- <para>
- [Q: Variable expansion does not appear to work very well
- before MySQL 5.0.19. Some fixes were made then?]
- </para>
</listitem>
<listitem>
@@ -780,7 +760,8 @@
<para>
<command>mysqltest</command> considers <literal>}</literal>
- and <literal>end</literal> the same.
+ and <literal>end</literal> the same: Both end the current
+ block.
</para>
</listitem>
@@ -829,19 +810,12 @@
<para>
You use <literal>error</literal> to specify shell status
values for testing the value of shell commands executed via
- the <literal>exec</literal> command. This does apply to the
+ the <literal>exec</literal> command. This does not apply to
<literal>system</literal>, for which the command status is
ignored.
</para>
<para>
- [Q: There is not a strict 1−1 relationship between error
- numbers and SQLSTATE values (some SQLSTATE values are used for
- more than one error number). Is there some implication for
- error testing that we should point out here?]
- </para>
-
- <para>
[TODO: Wiki has some stuff about non-obvious effects for
specifying error 0 in combination with non-zero error codes.
Need to add that here.]
@@ -864,9 +838,9 @@
</para>
<para>
- Evaluate the statement and send it to the server to be
- executed. References to variables within the text are replaced
- with the corresponding values. Use
+ Evaluate the statement by replacing references to variables
+ within the text with the corresponding values. Then send the
+ resulting statement to the server to be executed. Use
‘<literal>\$</literal>’ to specify a literal
‘<literal>$</literal>’ character.
</para>
@@ -904,11 +878,6 @@
</para>
<para>
- [Q: Variable expansion does not appear to work very well
- before MySQL 5.0.19. Some fixes were made then?]
- </para>
-
- <para>
On Cygwin, the command is executed from
<command>cmd.exe</command>, so commands such as
<command>rm</command> cannot be executed with
@@ -924,7 +893,7 @@
<para>
Terminate the test case. This is considered a <quote>normal
- termination,</quote> such that using <literal>exit</literal>
+ termination.</quote> That is, using <literal>exit</literal>
does not result in evaluation of the test case as having
failed.
</para>
@@ -950,8 +919,8 @@
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
- <xref linkend="mysqltest-flow-control"/>, for information on
- flow-control constructs.
+ <xref linkend="mysqltest-flow-control"/>, for further
+ information about <literal>if</literal> statements.
</para>
</listitem>
@@ -1018,16 +987,21 @@
</para>
<para>
- [Q: Purpose of this command: Unknown.]
+ Send the statement to the server to be executed.
</para>
<para>
- [BUG (filed as #19890): <literal>query</literal> is broken.
- The entire command, <emphasis>including</emphasis> the leading
+ [BUG#19890: <literal>query</literal> is broken. The entire
+ command line, <emphasis>including</emphasis> the leading
<literal>query</literal> keyword, is sent to the server to be
executed as a SQL statement. That necessarily fails every
time.]
</para>
+
+ <para>
+ [Q: What happens if the optional statement is omitted? Same
+ effect as for <literal>send</literal>?]
+ </para>
</listitem>
<listitem>
@@ -1061,7 +1035,7 @@
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
+ <literal>real_sleep</literal> is not affected by the
<option>--sleep</option> command-line option.
</para>
</listitem>
@@ -1077,8 +1051,8 @@
</para>
<para>
- [BUG: If no statement has yet been sent, you'll end up waiting
- a very long time for the result.]
+ [BUG#20304: If no statement has yet been sent, you'll end up
+ waiting a very long time for the result.]
</para>
</listitem>
@@ -1113,11 +1087,11 @@
</para>
<para>
- [NOTE: <literal>replace_column</literal> does not apply to the
- output from <literal>exec</literal>, whereas
- <literal>replace_regex</literal> and
- <literal>replace_result</literal> do. (<literal>exec</literal>
- has no columns)]
+ Note: Although <literal>replace_regex</literal> and
+ <literal>replace_result</literal> affect the output from
+ <literal>exec</literal>, <literal>replace_column</literal>
+ does not because <literal>exec</literal> output is not
+ necessarily columnar.
</para>
</listitem>
@@ -1130,8 +1104,8 @@
<para>
In the output from the next statement, find strings that match
- the pattern <replaceable>pattern</replaceable> and replace
- them with <replaceable>replacement</replaceable>. Each
+ <replaceable>pattern</replaceable> (a regular expression) 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
@@ -1157,11 +1131,13 @@
</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>):
+ Multiple
+ <replaceable>pattern</replaceable>/<replaceable>replacement</replaceable>
+ 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>
@@ -1193,10 +1169,10 @@
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.
+ 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>
@@ -1214,9 +1190,10 @@
<para>
[BUG (?): The behavior for <literal>replace_result</literal>
also differs from <literal>replace_regex</literal> this way:
- <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?]
+ <literal>replace_result a b b c</literal> does not change
+ <literal>a</literal> to <literal>c</literal>. Apparently,
+ result replacement for a column stops as soon as a match is
+ found?]
</para>
</listitem>
@@ -1259,7 +1236,8 @@
<para>
If the <option>--record</option> command-line option is given,
- this command changes the file.
+ the <literal>result</literal> command changes the file by
+ writing the ew test result to it.
</para>
</listitem>
@@ -1305,7 +1283,7 @@
</para>
<programlisting>
-send <literal>statement</literal>;
+send select 1;
</programlisting>
<para>
@@ -1314,7 +1292,7 @@
<programlisting>
send;
-<literal>statement</literal>;
+select 1;
</programlisting>
</listitem>
@@ -1392,18 +1370,10 @@
</para>
<para>
- Reads test input from the named file. A sourced file can use
- <literal>source</literal> to read other files.
+ Read test input from the named file.
</para>
<para>
- Normally, the filename in the <literal>source</literal>
- command is relative to the <filename>mysql-test</filename>
- directory because <command>mysqltest</command> usually is
- invoked in that directory.
- </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 those commands in another
@@ -1415,8 +1385,17 @@
</para>
<para>
- The maximum nesting level is 16.
+ Normally, the filename in the <literal>source</literal>
+ command is relative to the <filename>mysql-test</filename>
+ directory because <command>mysqltest</command> usually is
+ invoked in that directory.
</para>
+
+ <para>
+ A sourced file can use <literal>source</literal> to read other
+ files, but take care to avoid a loop. The maximum nesting
+ level is 16.
+ </para>
</listitem>
<listitem>
@@ -1502,11 +1481,6 @@
</para>
<para>
- [Q: Variable expansion does not appear to work very well
- before MySQL 5.0.19. Some fixes were made then?]
- </para>
-
- <para>
On Cygwin, the command is executed from
<command>cmd.exe</command>, so commands such as
<command>rm</command> cannot be executed with
@@ -1548,16 +1522,16 @@
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
- <xref linkend="mysqltest-flow-control"/>, for information on
- flow-control constructs.
+ long as the expression is true. See flow-control constructs.
+ <xref linkend="mysqltest-flow-control"/>, for further
+ information about <literal>while</literal> statements.
</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.
+ <replaceable>expr</replaceable> so that it becomes false at
+ some point.
</para>
</listitem>
@@ -1570,16 +1544,9 @@
<title><command>mysqltest</command> Variables</title>
<para>
- [Cover <literal>let</literal>, <literal>dec</literal>,
- <literal>inc</literal>. Cover use in <literal>eval</literal>,
- <literal>exec</literal>, <literal>system</literal>, and
- flow-control statements.
- </para>
-
- <para>
You can define variables and refer to their values. You can also
refer to environment variables, and there is a built-in variable
- for that contains the result of the most recent SQL statement.
+ that contains the result of the most recent SQL statement.
</para>
<para>
@@ -1589,9 +1556,9 @@
<programlisting>
let $a = 14;
-let $a = this is a string;
+let $b = this is a string;
--let $a = 14
---let $a = this is a string
+--let $b = this is a string
</programlisting>
<para>
@@ -1688,7 +1655,7 @@
<para>
For a <literal>while</literal> loop, 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
+ done by writing <replaceable>expr</replaceable> so that it becomes
false at some point.
</para>
Modified: trunk/mysqltest/components.xml
===================================================================
--- trunk/mysqltest/components.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/components.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -10,7 +10,7 @@
<title>MySQL Test Framework Components</title>
<para>
- The MySQL test framework includes programs that run tests, and
+ The MySQL test framework consists of programs that run tests, and
directories and files used by those programs.
</para>
@@ -26,17 +26,18 @@
<listitem>
<para>
- The <command>mysql-test-run</command> shell script is the main
- application used to run the test suite. It invokes
- <command>mysqltest</command> to run individual test cases.
+ The <command>mysql-test-run.pl</command> Perl script is the main
+ application used to run the test suite for MySQL 5.1 and up. It
+ invokes <command>mysqltest</command> to run individual test
+ cases.
</para>
</listitem>
<listitem>
<para>
- The <command>mysql-test-run.pl</command> Perl script is
- currently in development to serve as a replacement for
- <command>mysql-test-run</command>.
+ The <command>mysql-test-run</command> shell script is the main
+ application used to run the test suite before MySQL 5.1.
+ (<command>mysql-test-run.pl</command> is preferred as of 5.1.)
</para>
</listitem>
@@ -122,9 +123,10 @@
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 if the options are different
- from those required for the currently running server.
+ <literal>mysql-test-run.pl</literal> restarts the server
+ with the options given in the file if the options are
+ different from those required for the currently running
+ server.
</para>
<para>
@@ -153,12 +155,46 @@
<listitem>
<para>
The <filename>disabled.def</filename> file contains
- information about deferred/disabled tests.
+ information about deferred/disabled tests. When a test is
+ failing because of a bug in the server and you want it to be
+ ignored by <command>mysql-test-run.pl</command>, list the
+ test in this file.
</para>
<para>
- [TODO: Describe the format of this file]
+ The format of a line in the
+ <filename>disabled.def</filename> file looks like this,
+ where fields are separated by one or more spaces (Tab
+ characters are not allowed):
</para>
+
+<programlisting>
+<replaceable>test_name</replaceable> : BUG#<replaceable>nnnnn</replaceable> <replaceable>YYYY-MM-DD</replaceable> <replaceable>disabler</replaceable> <replaceable>comment</replaceable>
+</programlisting>
+
+ <para>
+ Example:
+ </para>
+
+<programlisting>
+rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
+</programlisting>
+
+ <para>
+ <replaceable>test_name</replaceable> is the test case name.
+ <literal>BUG#<replaceable>nnnnn</replaceable></literal>
+ indicates the bug related to the test that causes it to fail
+ (and thus requires it to be disabled).
+ <replaceable>disabler</replaceable> is the name of the
+ person that disabled the test.
+ <replaceable>comment</replaceable> normally provides a
+ reason why the test was disabled.
+ </para>
+
+ <para>
+ A comment line can be written in the file by beginning the
+ line with a ‘<literal>#</literal>’ character.
+ </para>
</listitem>
</itemizedlist>
@@ -203,19 +239,10 @@
</para>
<para>
- [Q: If a <filename>.reject</filename> file is created because a
- test fails, does <command>mysql-test-run</command> remove the
- file automatically later the next time the test succeeds?
- (Apparently not.)]
+ If a <filename>.reject</filename> file is created because a test
+ fails, <command>mysql-test-run.pl</command> removes the file
+ later the next time the test succeeds.
</para>
-
- <para>
- [Q: <command>mysql-test-run</command> refers to
- <filename>.eval</filename> files. What are these for? Do they
- result from the <literal>eval_result</literal> command and if
- they exist they are used instead of the corresponding
- <filename>.result</filename> files? (No longer needed?)]
- </para>
</listitem>
<listitem>
@@ -258,10 +285,6 @@
</para>
<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 test commands. If any individual command fails,
the entire test case is considered to fail. Note that
@@ -305,17 +328,10 @@
input SQL statements. The <literal>disable_result_log</literal> and
<literal>enable_result_log</literal> commands control logging of SQL
statement results, and warning or error messages resulting from
- those statements. Output from the <literal>echo</literal> command is
- not disabled.
+ those statements.
</para>
<para>
- [Q: I'm not sure how the _result_log commands affect logging of
- <command>mysqltest</command> command output. <literal>eval</literal>
- command output seems to be turned off/on?]
- </para>
-
- <para>
<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
@@ -376,18 +392,12 @@
<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 that is used by
- <command>mysql-test-run</command>, which invokes
+ <command>mysql-test-run.pl</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>
- <para>
- [TODO: would be useful to have an example command line here showing
- how <command>mysql-test-run</command> invokes
- <command>mysqltest</command>.]
- </para>
-
<section id="tests-and-ssl">
<title>The Test Framework and SSL</title>
Modified: trunk/mysqltest/introduction.xml
===================================================================
--- trunk/mysqltest/introduction.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/introduction.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -21,8 +21,8 @@
<para>
This document describes the components of the MySQL test framework,
how the test programs work, and the language used for writing test
- cases. It also provides a tutorial for writing and running test
- cases.
+ cases. It also provides a tutorial for developing test cases and
+ executing them.
</para>
<para>
@@ -36,11 +36,12 @@
<para>
There are actually two scripts for running the test suite.
<command>mysql-test-run</command> is the original shell script and
- <command>mysql-test-run.pl</command> is the corresponding Perl
- script. From MySQL 5.1 on, <command>mysql-test-run.pl</command> is
- the preferred script and is, in general, the script name used in
- discussion and examples. If you are running MySQL 5.0 or earlier,
- substitute <command>mysql-test-run</command> appropriately.
+ <command>mysql-test-run.pl</command> is the newer Perl script.
+ From MySQL 5.1 on, <command>mysql-test-run.pl</command> is the
+ preferred script and is, in general, the script name used in
+ discussion and examples throughout this document. If you are using
+ MySQL 5.0 or earlier, substitute <command>mysql-test-run</command>
+ appropriately.
</para>
</note>
@@ -49,17 +50,16 @@
servers, restarts them as necessary when a specific test case needs
different start arguments, and presents the test result. For each
test case, <command>mysql-test-run.pl</command> invokes the
- <command>mysqltest</command> program to read the test case file,
- intepret the test language constructs, and send SQL statements to
- the server. <command>mysqltest</command> is also referred to as the
- <quote>test engine.</quote>
+ <command>mysqltest</command> program (also referred to as the
+ <quote>test engine</quote>) to read the test case file, intepret the
+ test language constructs, and send SQL statements to the server.
</para>
<para>
Input for each 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 proper processing of the input by MySQL.
+ result can be compared to the actual result produced by running a
+ test to verify proper processing of the input by MySQL.
</para>
<para>
@@ -151,7 +151,7 @@
this test framework. But the framework does support executing your
own scripts and initiating them with your own data. Also, a test
case can execute an external program, so in some respects the test
- framework can be extended for uses other than testing only SQL
+ framework can be extended for uses other than testing SQL
statements.
</para>
Modified: trunk/mysqltest/mysqltest.xml
===================================================================
--- trunk/mysqltest/mysqltest.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/mysqltest.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -61,10 +61,10 @@
<xi:include href="introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="components.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<xi:include href="tutorial.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="components.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
<xi:include href="programs.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="command-reference.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
Modified: trunk/mysqltest/programs.xml
===================================================================
--- trunk/mysqltest/programs.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/programs.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -137,8 +137,8 @@
<listitem>
<para>
- Can test whether the result from SQL statements or shell
- commands is as expected
+ Can test whether the result from a SQL statement or shell
+ command is as expected
</para>
</listitem>
@@ -154,10 +154,10 @@
<para>
Can connect to an embedded server
(<literal>libmysqld</literal>), if MySQL is compiled with
- support for <literal>libmysqld</literal> (in this case,
+ support for <literal>libmysqld</literal>. (In this case,
the executable is named
<command>mysqltest_embedded</command> rather than
- <command>mysqltest</command>)
+ <command>mysqltest</command>.)
</para>
</listitem>
@@ -732,12 +732,6 @@
<filename>.reject</filename> file in the same
directory as the result file and exits with an error.
</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>
@@ -855,17 +849,16 @@
</para>
<para>
- Cause all <literal>sleep</literal> commands to sleep
- <replaceable>num</replaceable> seconds. This option does
- not affect <literal>real_sleep</literal> commands.
+ Cause all <literal>sleep</literal> commands in the test
+ case file to sleep <replaceable>num</replaceable> seconds.
+ This option does not affect <literal>real_sleep</literal>
+ commands.
</para>
<para>
- [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. I have filed a bug
- report with a suggested patch. (Bug#18312)]
+ As of MySQL 5.0.23, an option value of 0 can be used,
+ which effectively disables <literal>sleep</literal>
+ commands in the test case.
</para>
</listitem>
@@ -1127,6 +1120,75 @@
shell> <userinput>mysql-test-run.pl [<replaceable>options</replaceable>] [<replaceable>test_name</replaceable>] ...</userinput>
</programlisting>
+ <para>
+ Each <replaceable>test_name</replaceable> argument names a
+ test case. The test case file that corresponds to the test
+ name is
+ <filename>t/<replaceable>test_name</replaceable>.test</filename>.
+ </para>
+
+ <para>
+ For each <replaceable>test_name</replaceable> argument,
+ <command>mysql-test-run.pl</command> runs the named test case.
+ With no <replaceable>test_name</replaceable> arguments,
+ <command>mysql-test-run.pl</command> runs all
+ <filename>.test</filename> files in the <filename>t</filename>
+ subdirectory.
+ </para>
+
+ <para>
+ To run a family of test cases for which the names share a
+ common prefix, use the
+ <option>--do-tests=<replaceable>prefix</replaceable></option>
+ option. For example, <option>--do-tests=rpl</option> runs the
+ replication tests (test cases that have names beginning with
+ <literal>rpl</literal>).
+ </para>
+
+ <para>
+ <command>mysql-test-run.pl</command> defines several
+ environment variables. Some of them are listed in the
+ following table.
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="30*"/>
+ <colspec colwidth="70*"/>
+ <tbody>
+ <row>
+ <entry><emphasis role="bold">Variable</emphasis></entry>
+ <entry><emphasis role="bold">Meaning</emphasis></entry>
+ </row>
+ <row>
+ <entry><literal>MYSQL_TEST</literal></entry>
+ <entry>Pathname to <command>mysqltest</command> binary</entry>
+ </row>
+ <row>
+ <entry><literal>MYSQLTEST_VARDIR</literal></entry>
+ <entry>Pathname to the <filename>var</filename> directory that is used for
+ logs, temporary files, and so forth</entry>
+ </row>
+ <row>
+ <entry><literal>MASTER_MYPORT</literal></entry>
+ <entry>???</entry>
+ </row>
+ <row>
+ <entry><literal>MASTER_MYSOCK</literal></entry>
+ <entry>???</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ Tests sometimes rely on certain environment variables being
+ defined. For example, certain tests assume that
+ <literal>MYSQL_TEST</literal> is defined so that
+ <command>mysqltest</command> can invoke itself with
+ <literal>exec $MYSQL_TEST</literal>.
+ </para>
+
</refsection>
<refsection id="mysql-test-run-pl-options">
@@ -1328,12 +1390,6 @@
</informaltable>
<para>
- [Q: Are there other important variables that should be
- mentioned here? Does the Perl script export the same
- environment variables?]
- </para>
-
- <para>
Tests sometimes rely on certain environment variables being
defined. For example, certain tests assume that
<literal>MYSQL_TEST</literal> is defined so that
@@ -1367,35 +1423,6 @@
<para>
<indexterm>
<primary>mysql-test-run</primary>
- <secondary>help option</secondary>
- </indexterm>
-
- <indexterm>
- <primary>help option</primary>
- <secondary>mysql-test-run</secondary>
- </indexterm>
-
- <option>--help</option>, <option>-?</option>
- </para>
-
- <para>
- Display a help message and exit.
- </para>
-
- <para>
- [BUG: In fact, <command>mysql-test-run</command> does not
- have a <option>--help</option> option. That is a
- deficiency that is corrected in
- <command>mysql-test-run.pl</command>, but for
- <command>mysql-test-run</command> there is no runtime
- command that you can use to discover its options.]
- </para>
- </listitem>
-
- <listitem>
- <para>
- <indexterm>
- <primary>mysql-test-run</primary>
<secondary>bench option</secondary>
</indexterm>
Modified: trunk/mysqltest/tutorial.xml
===================================================================
--- trunk/mysqltest/tutorial.xml 2006-06-06 18:27:19 UTC (rev 2291)
+++ trunk/mysqltest/tutorial.xml 2006-06-06 19:43:22 UTC (rev 2292)
@@ -15,16 +15,19 @@
</para>
<para>
- This chapter provides a tutorial on writing and running test cases
- for the MySQL test framework. Normally, you run the test suite
- during the development process to ensure that your changes do not
- cause existing test cases to break. You can also write new test
- cases or add tests to existing cases. This happens when you fix a
- bug (so that the bug cannot reappear later without being detected)
- or when you add new capabilities to the server or other MySQL
- programs.
+ Normally, you run the test suite during the development process to
+ ensure that your changes do not cause existing test cases to break.
+ You can also write new test cases or add tests to existing cases.
+ This happens when you fix a bug (so that the bug cannot reappear
+ later without being detected) or when you add new capabilities to
+ the server or other MySQL programs.
</para>
+ <para>
+ This chapter provides a tutorial on running existing test cases for
+ the MySQL test framework and developing new test cases.
+ </para>
+
<section id="tutorial-running-test-cases">
<title>Running Test Cases</title>
@@ -83,13 +86,13 @@
</para>
<para>
- Test case files have names like
+ To run one or more specific test cases, name them on the
+ <command>mysql-test-run.pl</command> command line. Test case files
+ have names like
<filename>t/<replaceable>test_name</replaceable>.test</filename>,
where <replaceable>test_name</replaceable> is the name of the test
- case. Each name should be the test case name, not the full test
- case filename. To run one or more specific test cases, name them
- on the <command>mysql-test-run.pl</command> command line. (You do
- not specify the full test case filename.) The following command
+ case, but each name given on the command line should be the test
+ case name, not the full test case filename. The following command
runs the test case named <literal>rpl_abcd</literal>, which has a
test file of <filename>t/rpl_abcd.test</filename>:
</para>
@@ -154,7 +157,7 @@
<para>
If you have multiple users that run tests simultaneously on the
same machine, you must specify to the
- <command>mysql-test-run.pl</command> program which ports to user
+ <command>mysql-test-run.pl</command> program which ports to use
so that no test run conflicts with others running concurrently.
You add unique port arguments to
<command>mysql-test-run.pl</command>, such as
@@ -163,9 +166,9 @@
</para>
<para>
- Only one person can run the <command>mysql-test-run.pl</command>
- program in the same <filename>mysql-test</filename> directory on
- a shared drive, at the same time. The
+ Only one person at a time can run the
+ <command>mysql-test-run.pl</command> program in the same
+ <filename>mysql-test</filename> directory on a shared drive. The
<filename>mysql-test/var</filename> directory created and used
by <command>mysql-test-run.pl</command> cannot be shared between
simultaneous test runs. A test run can use the
@@ -190,21 +193,19 @@
provide any way to handle variation in the output that may occur
when a test is run at different times. However, the test language
provides commands for postprocessing result output before the
- comparison occurs. This enables you to manage expected variation.
+ comparison occurs. This enables you to manage certain forms of
+ expected variation.
</para>
<para>
- Use the following procedure to write a new test case.
- <replaceable>test_name</replaceable> represents the name of the
- test case.
+ Use the following procedure to write a new test case. In the
+ examples, <replaceable>test_name</replaceable> represents the name
+ of the test case. It's assumed here that you'll be using a
+ development source tree, so that when you create a new test case,
+ you can commit the files associated with it to the source
+ repository for others to use.
</para>
- <para>
- It's assumed here that you'll be using a development source tree,
- so that when you create a new test case, you can commit the files
- associated with it to the source repository for others to use.
- </para>
-
<orderedlist>
<listitem>
@@ -262,8 +263,9 @@
empty at this point). The failure results in creation of a
reject file named
<filename>r/<replaceable>test_name</replaceable>.reject</filename>.
- Examine this file. If it looks okay, copy its content to the
- result file:
+ Examine this file. If the reject file appears to contain the
+ output that you expect the test case to produce, copy its
+ content to the result file:
</para>
<programlisting>
@@ -278,7 +280,7 @@
</para>
<programlisting>
-[SHOW, VERIFY]
+shell> <userinput>./mysql-test-run.pl --record <replaceable>test_name</replaceable></userinput>
</programlisting>
</listitem>
@@ -304,9 +306,11 @@
</orderedlist>
<para>
- The environment can also be set up so that you can invoke the
- <command>mysqltest</command> program directly. For more
- information about the <command>mysqltest</command> program, see
+ It is also possible to invoke the <command>mysqltest</command>
+ program directly. If the test case file refers to environment
+ variables, you will need to define those variables in your
+ environment first. For more information about the
+ <command>mysqltest</command> program, see
<xref linkend="mysqltest"/>.
</para>
@@ -317,38 +321,34 @@
<title>Writing a Test Case</title>
<para>
- [Q: Aren't there any test case files with non-ASCII content? For
- example, character set tests?]
- </para>
-
- <para>
- You write test case files with any text editor that uses linefeed
- (newline) as the end-of-line character. Filenames should be
+ To write a test case file, use any text editor that uses linefeed
+ (newline) as the end-of-line character. The filename should be
lowercase ASCII with no spaces.
</para>
<para>
- We are adding support for multiple <quote>suites.</quote> Until
- then, all test cases must be located in the
+ We are adding support for multiple test <quote>suites.</quote>
+ Until then, all test cases must be located in the
<filename>mysql-test/t</filename> directory. Test case filenames
consist of the test name with a <filename>.test</filename> suffix.
For example, a test named <literal>foo</literal> should be written
in the file <filename>mysql-test/t/foo.test</filename>.
</para>
- <para>
- <emphasis role="bold">Note</emphasis>: All our test cases are
- published on the Internet. Take care that their contents include
- no confidential information.
- </para>
+ <note>
+ <para>
+ All our test cases are published on the Internet. Take care that
+ their contents include no confidential information.
+ </para>
+ </note>
<para>
One test case file can be a collection of individual tests that
belong together. If one of the tests fails, the entire test case
- fails. Although this makes it tempting to write each small test
- into a single file, that will be too inefficient and makes test
- runs unbearably slow. So make the test case files not too big, not
- too small.
+ fails. Although it may be tempting to write each small test into a
+ single file, that will be too inefficient and makes test runs
+ unbearably slow. So make the test case files not too big, not too
+ small.
</para>
<para>
@@ -396,7 +396,7 @@
table created and filled with data, put the statements to do that
in a file named
<filename>mysql-test/include/create_my_table.inc</filename>. Then
- put this command in each test case file that needs the
+ put the following command in each test case file that needs the
initialization code:
</para>
@@ -412,22 +412,20 @@
<para>
A comment in a test case can be started with the
‘<literal>#</literal>’ character or the
- ‘<literal>--</literal>’ characters. Note that the
- first word after the ‘<literal>--</literal>’ might be
- a command to the test engine itself. More about that later.
+ ‘<literal>--</literal>’ characters. However, if the
+ first word after the ‘<literal>--</literal>’ is a word
+ that <command>mysqltest</command> recognizes as a command,
+ <command>mysqltest</command> will execute the comment as a
+ command. For this reason, it is safest to use the
+ ‘<literal>#</literal>’ character for comments, so as
+ not to accidentally execute a <command>mysqltest</command>
+ command. For example, <literal>-- End of test 43</literal> begins
+ with the ‘<literal>--</literal>’ characters, but will
+ result in an error message because <literal>end</literal> is
+ something that <command>mysqltest</command> thinks is a command.
</para>
<para>
- It is safest to use the ‘<literal>#</literal>’
- character for comments, so as not to accidentally execute a
- <command>mysqltest</command> command. For example, <literal>-- End
- of test 43</literal> begins with the
- ‘<literal>--</literal>’ characters, but will result in
- an error message because <literal>end</literal> is something that
- <command>mysqltest</command> thinks is a command.
- </para>
-
- <para>
<xref linkend="mysqltest-input-conventions"/>, discusses the
details of input syntax for <command>mysqltest</command> test
cases.
@@ -453,24 +451,26 @@
</programlisting>
<para>
- The first rows try to clean up from possible earlier runs of the
- test case by dropping the <literal>t1</literal> table. The test
- cases uses <literal>disable_warnings</literal> to prevent
- warnings from being written to the output. It is not of any
- interest at this point during the test to know whether the table
- <literal>t1</literal> was there. After dropping the table, the
- test case uses <literal>enable_warnings</literal> so that
- subsequent warnings will be written to the output. The test case
- also enables verbose warnings in MySQL using the <literal>SET
+ The first few lines try to clean up from possible earlier runs
+ of the test case by dropping the <literal>t1</literal> table.
+ The test case uses <literal>disable_warnings</literal> to
+ prevent warnings from being written to the output because it is
+ not of any interest at this point during the test to know
+ whether the table <literal>t1</literal> was there. After
+ dropping the table, the test case uses
+ <literal>enable_warnings</literal> so that subsequent warnings
+ will be written to the output. The test case also enables
+ verbose warnings in MySQL using the <literal>SET
SQL_WARNINGS=1;</literal> statement.
</para>
<para>
Next, the test case creates the table <literal>t1</literal> and
- tries some operations. The creation of the table and first
- insertion will not create any warnings, but the second insertion
- will. The output that results from running the test looks like
- this:
+ tries some operations. Creating the table and inserting the
+ first row are operations that should not generate any warnings.
+ The second insert should generate a warning because it inserts a
+ non-numeric string into a numeric column. The output that
+ results from running the test looks like this:
</para>
<programlisting>
@@ -494,7 +494,7 @@
<para>
If there was a test failure, it will be reported to the screen.
You can see the actual output from the last unsuccessful run of
- the test case in the test case reject file
+ the test case in the reject file
<filename>r/<replaceable>test_name</replaceable>.reject</filename>.
</para>
@@ -509,7 +509,7 @@
(Generally, we will not do that, but our customers might.) To
reduce the risk that running the test suite alters or destroys
important tables, views, or other objects, you should create
- them using names like this:
+ them using the following naming conventions:
</para>
<itemizedlist>
@@ -531,9 +531,9 @@
</itemizedlist>
<para>
- Look in the existing test cases for examples of how to name
- objects. Of course, you can name columns and other objects
- inside tables as you wish.
+ For examples of how to name objects, examine the existing test
+ cases. Of course, you can name columns and other objects inside
+ tables as you wish.
</para>
<para>
@@ -546,7 +546,7 @@
<section id="tutorial-cleaning-up">
- <title>Cleaning Up from a Previous Run</title>
+ <title>Cleaning Up from a Previous Test Run</title>
<para>
For efficiency, the <command>mysqltest</command> test engine
@@ -569,21 +569,22 @@
<para>
The <literal>disable_warnings</literal> command instructs the
- test engine not to log any warnings until
- <literal>enable_warnings</literal> or the test case is ended.
- (MySQL generates a warning if the table <literal>t1</literal> or
- <literal>t2</literal> does not exist.) Surrounding this part of
- the test case with the disable/enable warnings makes its output
- the same regardless of whether the tables exist before the test
- is started. After ensuring that the tables do not exist, we are
- free to put in any SQL statements that create and use the tables
+ test engine not to log any warnings until an
+ <literal>enable_warnings</literal> command occurs or the test
+ case is ended. (MySQL generates a warning if the table
+ <literal>t1</literal> or <literal>t2</literal> does not exist.)
+ Surrounding this part of the test case with commands to disable
+ and enable warnings makes its output the same regardless of
+ whether the tables exist before the test is started. After
+ ensuring that the tables do not exist, we are free to put in any
+ SQL statements that create and use the tables
<literal>t1</literal> and <literal>t2</literal>. The test case
should also clean up at the end of the test by dropping any
tables that it creates.
</para>
<para>
- So let's put in some SQL code into this test case:
+ Let's put in some SQL code into this test case:
</para>
<programlisting>
@@ -702,11 +703,11 @@
<title>Specifying When Tests are Expected to Fail</title>
<para>
- A good test suite not only tests that operations succeed as they
- ought, but also that they fail as they ought. For example, if a
- statement is illegal, the server should reject it with an error
- message. The test suite should verify that the statement fails
- and that it fails with the proper error message.
+ A good test suite checks not only that operations succeed as
+ they ought, but also that they fail as they ought. For example,
+ if a statement is illegal, the server should reject it with an
+ error message. The test suite should verify that the statement
+ fails and that it fails with the proper error message.
</para>
<para>
@@ -745,7 +746,7 @@
[Q: word-police note: <literal>create table</literal> is a
statement, not a query. <quote>statement</quote> would be a
better term here in the error message, because it applies to
- both queries and non-queries.]
+ queries and non-queries.]
</para>
<programlisting>
@@ -765,8 +766,8 @@
</programlisting>
<para>
- After making this change and running the test again, the end of
- the result will look like this:
+ After we make this change and run the test again, the end of the
+ result will look like this:
</para>
<programlisting>
@@ -799,8 +800,7 @@
error-reporting context and SQLSTATE values in another
error-reporting context. Wouldn't it be better for
<command>mysqltest</command> to consistently display the same
- kind of information? Or would this require many test results to
- be updated?] [TODO: File bug report]
+ kind of information? (Now filed as Bug#20299)]
</para>
</section>
@@ -822,7 +822,7 @@
result set). It also produces output from certain commands such
as <literal>echo</literal> and <literal>exec</literal>.
<command>mysqltest</command> can be instructed to be more or
- less verbose, including other data as well.
+ less verbose.
</para>
<para>
@@ -888,7 +888,7 @@
</programlisting>
<para>
- Options can in general be enabled and disabled for different
+ In general, options can be enabled and disabled for different
parts of the test file. Suppose that we are interested in the
internals of the database as well. We could enable the display
of query metadata using <literal>enable_metadata</literal>. With
@@ -899,20 +899,14 @@
</para>
<para>
- [Q: Is the following paragraph inaccurate? Don't the _query_log
- commands apply only to logging SQL statements (and not to "all
- commands in general")?]
- </para>
-
- <para>
If you perform an operation for which you have no interest in
seeing the statements logged to the result, you can disable
statement logging. For example, you might be initializing a
table where you don't really expect a failure, and you are not
interested in seeing the initialization statements in the test
result. You can use the <literal>disable_query_log</literal>
- command to temporarily disable recording of the command lines,
- and enable recording again with
+ command to temporarily disable recording of input SQL
+ statements, and enable recording again with
<literal>enable_query_log</literal>. You can disable the
recording of the output from executing commands using
<literal>disable_result_log</literal> and enable recording again
@@ -939,7 +933,7 @@
according to external factors, or perhaps there is a part of a
result that you simply do not care about.
<command>mysqltest</command> provides commands that enable you
- to postprocess test output to a more standard form, so that
+ to postprocess test output into a more standard format so that
output variation across test runs will not trigger a result
mismatch.
</para>
@@ -953,7 +947,7 @@
<para>
To see how this command works, add the following row after the
- first insert:
+ first insert in the test case:
</para>
<programlisting>
@@ -1024,7 +1018,7 @@
eliminate this mismatch is by using the
<literal>replace_column</literal> command. The duration of the
effect of this command is the next SQL statement, so we need one
- before each <literal>select</literal> statement: this:
+ before each <literal>select</literal> statement:
</para>
<programlisting>
@@ -1037,10 +1031,11 @@
</programlisting>
<para>
- Note that <literal>SECONDS</literal> could be any string. Its
- only purpose is to map variable output onto a constant value. If
- we record the test result again, we will succeed each time we
- run the test after that. The result file will look like this:
+ In the <literal>replace_column</literal> commands,
+ <literal>SECONDS</literal> could be any string. Its only purpose
+ is to map variable output onto a constant value. If we record
+ the test result again, we will succeed each time we run the test
+ after that. The result file will look like this:
</para>
<programlisting>
@@ -1083,22 +1078,6 @@
ok
</programlisting>
- <para>
- If a file exists named
- <filename>t/<replaceable>test_name</replaceable>-master.opt</filename>,
- <command>mysql-test-run.pl</command> examines it for extra
- options that the server needs to be run with when executing the
- <replaceable>test_name</replaceable> test case. If no server has
- yet been started or the current server is running with different
- options, <command>mysql-test-run.pl</command> restarts the
- server with the new options.
- </para>
-
- <para>
- [TODO: Also need to describe what other option files might be
- used (e.g., -slave.pt).
- </para>
-
</section>
<section id="tutorial-server-options">
@@ -1116,16 +1095,27 @@
</programlisting>
<para>
- But sometimes you need to restart the server to use some options
- in the form of extra command-line options. You can specify these
+ But sometimes you need to restart the server to use options in
+ the form of extra command-line options. You can specify these
options in a file named
<filename>mysql-test/t/<replaceable>test_name</replaceable>-master.opt</filename>.
- <command>mysql-test-run.pl</command> checks these
- <filename>.opt</filename> files and restarts the server if a
- test case requires different options than the previous test
- case.
+ When a file named
+ <filename>t/<replaceable>test_name</replaceable>-master.opt</filename>
+ exists, <command>mysql-test-run.pl</command> examines it for
+ extra options that the server needs to be run with when
+ executing the <replaceable>test_name</replaceable> test case. If
+ no server has yet been started or the current server is running
+ with different options, <command>mysql-test-run.pl</command>
+ restarts the server with the new options.
</para>
+ <para>
+ Files in the <filename>mysql-test/t</filename> directory with
+ names ending in <filename>-slave.opt</filename> and
+ <filename>-im.opt</filename> are similar, but they are used for
+ slave servers and the Instance Manager, respectively.
+ </para>
+
</section>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2292 - in trunk: . mysqltest | paul | 6 Jun |