<?xml version="1.0"?>
<faq>
	<header>
		<title>MySQL Errata Sheet</title>
		<version>1.00, 2000-03-20</version>
	</header>

<overview>
	<p>This document lists the known errors for the book:</p>
	<blockquote>
	MySQL<br/>
	Paul DuBois<br/>
	New Riders Publishers<br/>
	1999<br/>
	</blockquote>

	<p>The document is maintained by Paul DuBois,
	<a href="mailto:paul@snake.net">paul@snake.net</a>. Please report to
	that address any errors you find in the book that are not already listed
	here.</p>
	<p>The current version of this document is available at the MySQL Web site,
	in the
	<a href="http://www.mysql.com/Contrib/Examples/">Examples</a> area.</p>
</overview>

<erratum>
<p>
The output from some of the example queries in Chapter 1 differs from
what you will see if you run the queries yourself.  This is because
I changed some of the sample data, but forgot to change a few of
the examples in the book.  There are also a couple of instances
where you may see different output, depending on your version of
MySQL.  The corrected output for such examples is shown below.
</p>
</erratum>

<erratum>
<location>Page 43, query 1.</location>

<p>
The version number shown in the final column will depend on the
version of MySQL that you are running.
</p>
</erratum>

<erratum>
<location>Page 43, query 2.</location>

<p>
The output should look like this:
</p>

<pre>
+-----------+-----+------------+
| name      | sex | student_id |
+-----------+-----+------------+
| Megan     | F   |          1 |
| Joseph    | M   |          2 |
| Kyle      | M   |          3 |
| Katie     | F   |          4 |
...
</pre>
</erratum>

<erratum>
<location>Page 43, query 3.</location>

<p>
The output should look like this:
</p>

<pre>
+-----------+
| name      |
+-----------+
| Megan     |
| Joseph    |
| Kyle      |
| Katie     |
...
</pre>
</erratum>

<erratum>
<location>Page 43, query 4.</location>

<p>
The output should look like this:
</p>

<pre>
+-----------+-----+------------+
| name      | sex | student_id |
+-----------+-----+------------+
| Megan     | F   |          1 |
| Joseph    | M   |          2 |
| Kyle      | M   |          3 |
| Katie     | F   |          4 |
...
</pre>
</erratum>

<erratum>
<location>Page 44, query 1.</location>

<p>
The output should look like this:
</p>

<pre>
+------------+----------+-------+
| student_id | event_id | score |
+------------+----------+-------+
|          5 |        3 |    97 |
|         18 |        3 |    96 |
|          1 |        6 |   100 |
|          5 |        6 |    97 |
|         11 |        6 |    98 |
|         16 |        6 |    98 |
+------------+----------+-------+
</pre>
</erratum>

<erratum>
<location>Page 50, query 3.</location>

<p>
The output will vary depending on the value returned by
the <code>RAND()</code> function.
</p>
</erratum>

<erratum>
<location>Page 56, query 1.</location>

<p>
The output is missing from the book.  It should look like this:
</p>

<pre>
+-----------+------------+
| last_name | first_name |
+-----------+------------+
| Polk      | James K.   |
| Taft      | William H. |
| Ford      | Gerald R   |
| Bush      | George W.  |
+-----------+------------+
</pre>
</erratum>

<erratum>
<location>Page 58, query 3.</location>

<p>
The rows of the output are reversed.  They should look like this:
</p>

<pre>
+-----+----------+
| sex | COUNT(*) |
+-----+----------+
| F   |       15 |
| M   |       16 |
+-----+----------+
</pre>
</erratum>

<erratum>
<location>Page 65, query 1.</location>

<p>
The query produces no more lines of output than are shown.  The
"..." is incorrect.
</p>
</erratum>

<erratum>
<location>Page 42. middle of page.</location>
<date>2000-02-08</date>
<submitter>Derick Siddoway</submitter>

<p>
Change the query that says:
</p>

<pre>
SELECT birth_date FROM ...
</pre>

<p>
To:
</p>

<pre>
SELECT birth FROM ...
</pre>
</erratum>

<erratum>
<location>Page 338, paragraph following second bullet.</location>
<date>2000-02-09</date>
<submitter>Derick Siddoway</submitter>

<p>
Change:
</p>
<p>
The tables in the <code>samp_db</code> table are relatively ...
</p>
<p>
To:
</p>
<p>
The tables in the <code>samp_db</code> database are relatively ...
</p>

<p>
And change:
</p>
<p>
If you edit <code>samp_db</code> to display tables from ...
</p>
<p>
To:
</p>
<p>
If you edit <code>samp_browse</code> to display tables from ...
</p>
</erratum>

<erratum>
<location>Page 372, listing for <code>add_new_event()</code>
function.</location>
<date>2000-02-12</date>
<submitter>Marc Infield</submitter>

<p>
There is an instance of <code>addslashes()</code> written incorrectly as
<code>$addslashes()</code>.
</p>

<p>
Change:
</p>

<pre>
addslashes ($date), $addslashes ($type));
</pre>

<p>
To:
</p>

<pre>
addslashes ($date), addslashes ($type));
</pre>
</erratum>

<erratum>
<location>Page 527, description of the <code>SIN()</code> function.</location>
<date>2000-02-15</date>
<submitter>David Block</submitter>

<p>There should not be two bullets for the <code>SIN()</code> function.
The text of the second <code>SIN()</code> bullet is part of the
preceding description.</p>
</erratum>

<erratum>
<location>Page 125, second paragraph after first code listing.</location>
<date>2000-03-01</date>
<submitter>Ryan Caveney</submitter>

<p>
Change:
</p>
<p>
For example, <code>(4*3)/(4-2)</code> evaluates to the value <code>2</code>.
</p>

<p>
To:
</p>
<p>
For example, <code>(4*3)/(4-2)</code> evaluates to the value <code>6</code>.
</p>
</erratum>

<erratum>
<location>Page 56, last code listing, page 58, last code listing, page
59 last code listing.</location>
<date>2000-03-20</date>
<submitter>John P. McDaniel</submitter>

<p>
The state abbreviation for Arkansas is AR, not AK.
Change the AK in the three listings to AR.
</p>
</erratum>

</faq>
