Author: paul
Date: 2006-05-17 19:52:13 +0200 (Wed, 17 May 2006)
New Revision: 2115
Log:
r7580@polar: paul | 2006-05-17 12:53:03 -0500
mysqltest edits.
Modified:
trunk/
trunk/mysqltest/command-reference.xml
trunk/mysqltest/mysqltest.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7578
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10475
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7580
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10475
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
Modified: trunk/mysqltest/command-reference.xml
===================================================================
--- trunk/mysqltest/command-reference.xml 2006-05-17 17:24:08 UTC (rev 2114)
+++ trunk/mysqltest/command-reference.xml 2006-05-17 17:52:13 UTC (rev 2115)
@@ -994,7 +994,7 @@
<para>
[Q: The <literal>$</literal> seems to be implied if not
- present?]
+ present. Is this a bug?]
</para>
<para>
@@ -1029,7 +1029,7 @@
</para>
<para>
- [BUG: <literal>query</literal> appears to be broken, anyway.
+ [BUG (filed as #19890): <literal>query</literal> is broken.
The entire command, <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
@@ -1107,20 +1107,24 @@
</para>
<para>
- [Q: Can values be quoted or specified using variables?]
+ A replacement value can be double-quoted. (Use
+ ‘<literal>\"</literal>’ to specify a double quote
+ within a replacement string.) Variables can be used in a
+ replacement value if it is not double-quoted.
</para>
<para>
- [Q: If mixed
+ If mixed
<literal>replace_<replaceable>xxx</replaceable></literal>
- commands are given, only the final one applies? ]
+ commands are given, only the final one applies.
</para>
<para>
- [Q: <literal>replace_column</literal> does not appears to
- apply to the output from <literal>exec</literal>, whereas
+ [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>replace_result</literal> do. (<literal>exec</literal>
+ has no columns)]
</para>
</listitem>
@@ -1203,19 +1207,20 @@
</para>
<para>
- [Q: Should these inconsistencies exist?
- <literal>replace_column</literal> applies only to the data
- rows, and not to the row of column headers.
+ [Q: Inconsistencies: <literal>replace_column</literal> applies
+ only to the data rows, and not to the row of column headers.
<literal>replace_regex</literal> applies both to the column
header row and to the data rows.
<literal>replace_result</literal> applies to the column header
row, the data rows, <emphasis>and</emphasis> to the SQL
- statement that generates the query output!]
+ statement that generates the query output. {Perhaps
+ <literal>replace_regex</literal> also should apply to the
+ query)]
</para>
<para>
- [Q: The behavior for <literal>replace_result</literal> also
- differs from <literal>replace_regex</literal> this way:
+ [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?]
@@ -1229,18 +1234,12 @@
</para>
<para>
- Compare the result 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.
+ This command specifies a file to be used for comparison
+ against the results of the next query. If the contents of the
+ file do not match or there is some other error, the test
+ aborts with a <quote>this test is not supported</quote> error
+ message.
</para>
-
- <para>
- [Q: Does this command specify a file to be used for comparison
- when the test case completes? Or does the comparison take
- place immediately, using test case result output generated so
- far? Is the effect of this command modified if the
- <option>--record</option> command-line option is given?]
- </para>
</listitem>
<listitem>
@@ -1259,29 +1258,16 @@
</para>
<para>
- Compare the result with the contents of the named file. If the
- content does not match or there is some other error, write the
- result to
+ This command specifies a file to be used for comparison when
+ the test case completes. 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>
- [Q: Does this command specify a file to be used for comparison
- when the test case completes? Or does the comparison take
- place immediately, using test case result output generated so
- far? Is the effect of this command modified if the
- <option>--record</option> command-line option is given?]
+ If the <option>--record</option> command-line option is given,
+ this command changes the file.
</para>
-
- <para>
- [Q: What is the expected format of
- <replaceable>file_name</replaceable>? Is it the pathname to
- the <literal>.result</literal> file, so that the name of the
- <filename>.reject</filename> file can be determined just be
- changing the extension? (Otherwise, doesn't this command
- assume that there is an <filename>r</filename> directory under
- the current directory?)]
- </para>
</listitem>
<listitem>
@@ -1309,7 +1295,7 @@
<listitem>
<para>
- <literal>send <replaceable>statement</replaceable></literal>
+ <literal>send [<replaceable>statement</replaceable>]</literal>
</para>
<para>
@@ -1319,10 +1305,24 @@
</para>
<para>
- [Q: It appears that <replaceable>statement</replaceable> is
- optional? What is the effect of the command if the statement
- is omitted?]
+ If <replaceable>statement</replaceable> is omitted, the
+ <literal>send</literal> command applies to the next statement
+ executed. This means that <literal>send</literal> can be used
+ on a line by itself before a statement. Thus, this command:
</para>
+
+<programlisting>
+send <literal>statement</literal>;
+</programlisting>
+
+ <para>
+ Is equivalent to these commands:
+ </para>
+
+<programlisting>
+send;
+<literal>statement</literal>;
+</programlisting>
</listitem>
<listitem>
@@ -1331,6 +1331,11 @@
<replaceable>server_name</replaceable></literal>
</para>
+ <remark role="note">
+ The "manager" here is not mysqlmanager. It is/was used by a
+ few tests. It's from tools/mysqlmanager.c.
+ </remark>
+
<para>
Contact the manager to start a server. The timeout value is 10
seconds.
@@ -1640,9 +1645,13 @@
</para>
<para>
- [Q: Variable names appear not to be case sensitive. Is that
- correct? If so, that leads to an ambiguity: If you refer to a
- variable named <literal>$path</literal>, is that a
+ <command>mysqltest</command> first checks
+ <command>mysqltest</command> variables and then environment
+ variables. <command>mysqltest</command> variable names are not
+ case sensitive. Environment variable names are case sensitive. [Q:
+ Variable names appear not to be case sensitive. Is that correct?
+ If so, that 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>
@@ -1654,8 +1663,8 @@
<title><command>mysqltest</command> Flow Control Constructs</title>
<para>
- [Q: There is no provision for <literal>else</literal> with
- <literal>if</literal>?]
+ There is no provision for <literal>else</literal> with
+ <literal>if</literal>.
</para>
<para>
@@ -1678,8 +1687,9 @@
</programlisting>
<para>
- If the expression begins with <literal>!</literal>, the sense of
- the test is reversed.
+ An expression result is true if non-zero, false if zero. If the
+ expression begins with <literal>!</literal>, the sense of the test
+ is reversed.
</para>
<para>
@@ -1690,36 +1700,23 @@
</para>
<para>
- [Q: The opening <literal>{</literal> must be on the next line
- following <literal>if</literal> or <literal>while</literal>?]
+ The allowable syntax for <replaceable>expr</replaceable> is
+ <literal>$<replaceable>var_name</replaceable></literal>,
+ <literal>!$<replaceable>var_name</replaceable></literal>, a string
+ or integer, or <literal>`query`</literal>.
</para>
<para>
- [Q: No spaces allowed between parens and the expression within the
- parens? What is the allowable syntax for
- <replaceable>expr</replaceable>?]
+ The opening <literal>{</literal> must be separated from the
+ preceding <literal>)</literal> by whitespace (such as a space or a
+ line break).
</para>
<para>
- [Q: Is a block written using <literal>{</literal> and
- <literal>}</literal>, or does it end with <literal>end</literal>?
- Or is either syntax allowable?]
+ [Q: No spaces allowed between parens and the expression within the
+ parens?
</para>
- <para>
- [Hmm: A block can begin with <literal>{</literal> and end with
- <literal>end</literal>.]
- </para>
-
- <para>
- [Q: The comments in the source 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 conditions. What if
- <replaceable>expr</replaceable> is less than zero?]
- </para>
-
</section>
</chapter>
Modified: trunk/mysqltest/mysqltest.xml
===================================================================
--- trunk/mysqltest/mysqltest.xml 2006-05-17 17:24:08 UTC (rev 2114)
+++ trunk/mysqltest/mysqltest.xml 2006-05-17 17:52:13 UTC (rev 2115)
@@ -3866,19 +3866,25 @@
[TODO: All this stuff needs to be moved somewhere else]
</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 id="error-handling">
- <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>
+ <title>Error Handling</title>
+ <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>
+ 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>
+
+ </section>
+
<section id="environment-overview">
<title>Test Environment Overview</title>
@@ -3900,16 +3906,6 @@
<title>Language Overview</title>
<para>
- [Q: What does the following paragraph mean?]
- </para>
-
- <para>
- FIXME make descriptions shorter by introducing a syntax to
- inform that an argument could be a test language variable. Why
- not all?
- </para>
-
- <para>
The <command>mysqltest</command> program is a small interpreter
for a special test language. Lines that it doesn't recognize as
its own commands are assumed to be SQL statements to be sent to
@@ -3924,7 +3920,9 @@
</para>
<para>
- FIXME what is @filename ?!
+ Mention that <command>make test</command> in the top directory
+ of a source directory also run <command>mysql-test-run</command>
+ as one of its effects.
</para>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2115 - in trunk: . mysqltest | paul | 17 May |