MySQL, 2nd Edition (03-1 printing) - Errata

This document lists the known errors for the book:

MySQL, 2nd Edition (03-1 printing)
Paul DuBois
Sams
2003
ISBN 0-7357-1212-3
[book information]
Number of items: 54
Date of most recently reported item: 2005-11-30

Sort by: [page number] [most recent errata first]
Date 2005-11-30
Page 597, second paragraph
Reported by Chang-Ping Hsiao
Description "If the file you want to use it doesn't exist" should be "If the file you want to use doesn't exist".

Date 2005-02-19
Page 775
Description Extraneous word in CHAR description: Delete "prior" in "M should be an integer from 0 to 255 prior".

Date 2005-02-18
Page 776
Reported by Paul White
Description Extraneous word in VARCHAR description: Delete "prior" in "M should be an integer from 0 to 255 prior".

Date 2004-08-12
Page 966
Description The MYSQL_HISTORY environment variable mentioned in the last paragraph actually is named MYSQL_HISTFILE

Date 2004-08-01
Page 475, second listing
Description The display that shows three URLs contains extraneous text. It reads:
<ul>
<li><a href="/cgi-bin/localhost/db_browse.pl?tbl_name=absence">absence</a></li>
<li><a href="/cgi-bin/localhost/db_browse.pl?tbl_name=event">event</a></li>
<li><a href="/cgi-bin/localhost/db_browse.pl?tbl_name=member">member</a></li>
...
</ul>
"localhost/" in each URL is extraneous. The display should read:
<ul>
<li><a href="/cgi-bin/db_browse.pl?tbl_name=absence">absence</a></li>
<li><a href="/cgi-bin/db_browse.pl?tbl_name=event">event</a></li>
<li><a href="/cgi-bin/db_browse.pl?tbl_name=member">member</a></li>
...
</ul>

Date 2004-06-29
Page 152, third bullet
Reported by Dade Veron
Description The third bullet contains a sentence beginning with "You choices here" that should say "Your choices here".

Date 2004-02-06
Page 1213, T index, first entry
Reported by Bryn Dyment
Description Typo. First entry in "T" index section says "informatin", should be "information".

Date 2004-01-09
Page 591, third paragraph
Reported by Andrew MacRae
Description Duplicated words. The sentence that begins "This means the server does not have not have ..." should begin "This means the server does not have ..."

Date 2003-10-10
Page 186, middle of page
Reported by Paul White
Description Missing word. "depend on what you referring to" should be "depend on what you are referring to".

Date 2003-10-10
Page 209, middle of page
Reported by Paul White
Description Typo. "constrains that changes that" should be "constrains the changes that".

Date 2003-10-10
Page 211, middle of page
Reported by Paul White
Description Error. The RENAME TABLE table to swap the names of two tables is incorrect. It says:
RENAME TABLE t1 TO tmp, t2 TO t1, tmp TO t1;
It should say:
RENAME TABLE t1 TO tmp, t2 TO t1, tmp TO t2;

Date 2003-10-10
Page 217, middle of page
Reported by Paul White
Description Typo. "because is runs quickly" should be "because it runs quickly".

Date 2003-10-10
Page 225, bottom of page
Reported by Paul White
Description Typo. "to be nested inside other" should be "to be nested inside another".

Date 2003-10-10
Page 503, first line
Reported by Paul White
Description Missing word. "script's main purpose presenting" should be "script's main purpose of presenting".

Date 2003-10-10
Page 512, second line
Reported by Paul White
Description Typo. "The two are generally" should be "Two are generally".

Date 2003-10-10
Page 514, bottom of page
Reported by Paul White
Description Missing word. "based a function" should be "based on a function".

Date 2003-10-10
Page 614, bottom of page
Reported by Paul White
Description Missing word. "issue a GRANT statement grants the USAGE privilege" should be "issue a GRANT statement that grants the USAGE privilege".

Date 2003-10-10
Page 1006, --show-slave-auth-info option
Description The --show-slave-auth-info option affects the output of the SHOW SLAVE HOSTS statement, not the SHOW SLAVE STATUS statement.

Date 2003-09-30
Page 400, second-to-last listing
Reported by Holger Detering
Description Typo. The third line of this listing is incorrect:
my $dbh = DBI->connect ($dsn, $user_name, $password,
                        { RaiseError => 0, PrintError => 0 })
    or die "Could not connect to server: $DBI::err ($DBI::errstr)\en";
The \en near the end of the line should be \n:
my $dbh = DBI->connect ($dsn, $user_name, $password,
                        { RaiseError => 0, PrintError => 0 })
    or die "Could not connect to server: $DBI::err ($DBI::errstr)\n";

Date 2003-09-30
Page 517, line 5
Reported by Holger Detering
Description Typo. Line 5 of the page is incorrect:
<a href="score_entry.pl">Enter or edit</a> test and quiz scores
The script name should end with .php, not .pl:
<a href="score_entry.php">Enter or edit</a> test and quiz scores

Date 2003-09-30
Page 519, second paragraph
Reported by Holger Detering
Description Typo. The first line of the second paragraph says, "$_GET and $_PUT". It should say, "$_GET and $_POST" instead.

Date 2003-09-30
Page 542, last line
Reported by Holger Detering
Description Typo. The last line on the page says:
$query .= "\''";     # enter empty string
The \ character is superfluous and should not be present:
$query .= "''";     # enter empty string

Date 2003-09-30
Page 632, first listing
Reported by Holger Detering
Description Typo. The first listing says:
TZ=U.S./Central
export TZ
The dots in "U.S." should not be present. The listing should say:
TZ=US/Central
export TZ

Date 2003-09-06
Page 141, first bullet item
Reported by Barrie Stott
Description Typo. "normally to not reuse" should be "normally do not reuse".

Date 2003-09-06
Page 442, first listing
Reported by Barrie Stott
Description The first line of the first listing says:
Name: Mike Artel
However, as shown by the second listing, the word "Name:" is also included within the \b and \b0 boldface markup. So "Name:" also should be shown in boldface in the first listing, like this:
Name: Mike Artel

Date 2003-09-06
Page 678, Table 12.2
Description The tables_priv table has privilege columns of Table_priv and Column_priv, not just Table_priv.

Date 2003-09-01
Page 527, enter_scores() function listing
Reported by Thomas Barker
Description In the enter_scores() function of the score_entry.php script, the boolean test on the following line is reversed:
else if (!preg_match ('/^\d+$/', $newscore)) # must look like integer
The "!" should be removed to make the line look like this:
else if (preg_match ('/^\d+$/', $newscore)) # must look like integer
Versions 1.03 and up of the sampdb distribution contain the corrected score_entry.php script.

Date 2003-07-20
Page 451, first listing
Reported by Emile State
Description The new_member() function contains these two lines:
return if $col_val eq lc ("exit");  # early exit
$col_val = undef if $col_val eq lc ("none");
The intent is to recognize responses of "exit" and "none" in case-insensitive fashion, but the code fails to do so. The lines should read like this:
return if lc ($col_val) eq "exit";  # early exit
$col_val = undef if lc ($col_val) eq "none";

Date 2003-07-20
Page 453, first listing
Reported by Emile State
Description The edit_member() function contains these two lines:
return if $col_val eq lc ("exit");  # early exit
$col_val = undef if $col_val eq lc ("none");
The intent is to recognize responses of "exit" and "none" in case-insensitive fashion, but the code fails to do so. The lines should read like this:
return if lc ($col_val) eq "exit";  # early exit
$col_val = undef if lc ($col_val) eq "none";

Date 2003-07-16
Page 336
Description The sentence at the top of the page says that load_defaults() reads the my.cnf file in the MySQL data directory. That is incorrect, it reads only my.ini in the Windows directory and C:\my.cnf

Date 2003-07-16
Page 597, second paragraph
Description The second paragraph says that on Windows you can place options in the my.cnf file in the data directory. That is incorrect, you can use only my.ini in the Windows directory and C:\my.cnf

Date 2003-07-16
Page 652, third bullet
Description The third bullet discusses using the my.cnf file in the data directory. This strategy applies only to Unix.

Date 2003-07-16
Page 949
Description The list of option files for Windows is incorrect. DATADIR\my.cnf is not read on Windows.

Date 2003-07-14
Page 847
Reported by Dan Liberatore
Description Missing word. The last sentence of the first paragraph says, "FIRST or AFTER be..." It should say, "FIRST or AFTER may be..."

Date 2003-07-14
Page 860-861
Reported by Dan Liberatore
Description The unit size for RAID_CHUNKSIZE is described at the bottom of page 860 as "MB (1024 bytes)"; it should say "KB (1024 bytes)". The example at the top of page 861 indicates that the file size is "1000MB"; it should say "1000KB".

Date 2003-06-26
Page 58, second paragraph
Reported by Noel Rasmussen
Description Missing word. In the second paragraph, "even if specify DESC" should say "even if you specify DESC". Also note that as of MySQL 4.0.11, the behavior described in the paragraph has changed anyway: NULL values now sort at the beginning for ascending sorts, and at the end if DESC is specified.

Date 2003-05-12
Page 563
Reported by Deborah Gawlik
Description Missing word. In the third paragraph, SHOW TABLES db_name should be SHOW TABLES FROM db_name.

Date 2003-04-30
Page 51, end of first paragraph
Reported by Michael Young
Description The last sentence of the first paragraph says, "The following query retrieves all rows from the student table..." That's true enough, but the context is the use of * as a column specifier, so the sentence should say, "The following query retrieves all columns from the student table..."

Date 2003-04-21
Page 870, last line of table
Description Font glitch. In the last line of the table, "tbl_name" should be mono italic (tbl_name), not mono (tbl_name)

Date 2003-04-11
Page 325, second line on page
Reported by Richard Warrington
Description Missing word. The second line on the page says "may need include"; it should say "may need to include".

Date 2003-04-11
Page 1064-1065
Description There are four instances of the function name mysql_free() on these two pages. They should all say mysql_free_result() instead.

Date 2003-04-09
Page 1054, discussion of mysql_num_fields() function
Reported by David Christensen
Description In the discussion of the mysql_num_fields() function, the paragraph says mysql_num_rows(). It should say mysql_num_fields() instead.

Date 2003-04-09
Page 1055, discussion of mysql_num_rows() function
Reported by David Christensen
Description In the discussion of the mysql_num_rows() function, the following lines occur:
if ((res_set = mysql_store_result (conn)) == NULL)

if ((res_set = mysql_use_result (conn)) == NULL)
The == should be != in both instances:
if ((res_set = mysql_store_result (conn)) != NULL)

if ((res_set = mysql_use_result (conn)) != NULL)

Date 2003-03-20
Page 858, AVG_ROW_LENGTH description
Description The description for AVG_ROW_LENGTH says that the MyISAM handler can use row pointers from 1 to 8 bytes wide. Pointers actually can be 2 to 8 bytes wide.

Date 2003-03-10
Page 584, second bullet item
Description Typo. In the second bullet item on the page, the last sentence ends with "or any database having a name that begins with test." There is a missing underscore; this should say "or any database having a name that begins with test_." (Note that this change does not apply to the final bullet item at the bottom of the page.)

Date 2003-02-21
Page 187, second bullet
Description

In the "Alias names" bullet, change this:

Aliases are case sensitive. You can specify an alias in any lettercase (upper, lower, or mixed), but you must refer to it elsewhere in the query using the same case.

To:

Aliases are not case sensitive, except for table aliases. You can specify an alias in any lettercase (upper, lower, or mixed), but you must refer to a table alias using the same lettercase consistently throughout the query.


Date 2003-02-20
Page 918, final two lines
Description Typo. The final two lines on the page are each missing a quote. Change:
SHOW GLOBAL VARIABLES [LIKE pattern'];
SHOW SESSION VARIABLES [LIKE pattern'];
To:
SHOW GLOBAL VARIABLES [LIKE 'pattern'];
SHOW SESSION VARIABLES [LIKE 'pattern'];

Date 2003-02-20
Page 1049, mysql_fetch_fields() entry
Description Typo. The res_set argument is a pointer. Change:
MYSQL_FIELD *
mysql_fetch_fields (MYSQL_RES res_set);
To:
MYSQL_FIELD *
mysql_fetch_fields (MYSQL_RES *res_set);

Date 2003-02-18
Page 966, table at bottom of page
Reported by Jeremy Cole
Description Two of the key sequences in the table are incorrect. The sequences for moving backward and forward a word at a time are Escape b and Escape f, not Escape Ctrl-B and Escape Ctrl-F.

Date 2003-02-12
Page 935, UPDATE syntax
Reported by Sinisa Milivojevic
Description The ORDER BY and LIMIT clauses work only for single-table updates, not for multiple-table updates. Those clauses should be omitted from the second UPDATE syntax description, which applies to multiple-table updates.

Date 2003-01-31
Page 88, Table 1.4
Reported by Jeremy Cole
Description Two of the key sequences in the table are incorrect. The sequences for moving backward and forward a word at a time are Escape b and Escape f, not Escape Ctrl-B and Escape Ctrl-F.

Date 2003-01-28
Page 885, SELECT section
Description Font glitch. Five lines from the bottom, "where_expr" after HAVING should be mono italic (where_expr), not mono (where_expr).

Date 2003-01-23
Page Copyright page
Description There is a little confusion about a third of the way down the page: It says "First edition: January 2003" but that should really be "First printing: January 2003". (That is, it's the first printing of the second edition.)

Date 2003-01-21
Page Back cover, bio paragraph
Description Missing word. "is the author" should be "is the author of".

This document is maintained by Paul DuBois. Please report any errors you find in the book that are not already listed here.