Errata

Managing & Using MySQL

Errata for Managing & Using MySQL

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 3.4.4
Last line in section

The phrase "The MySQL ET type..." should be "The MySQL SET type..."

Anonymous   
Printed Page 3.8.2
End of section

The description of the <=> operator is wrong; it does not match
the (correct) output of the select statement.

Anonymous   
Printed Page 16
Last paragraph

On pages 16, and again on page 19, the phrase "To do this, you can copy support-
files/mysql.server to the appropriate location on your system. This is covered in
greater detail in Chapter 5."

It should actually say Chapter 4.

Anonymous   
Printed Page 33
3rd paragraph

In the last sentence of the 3rd paragraph of page 33, it is written that "On an ASCII
system, MySQL sorts binary data in a case-sensitive, ASCII order".
But I think it's not the binary data but the character data that is sorted in a case-
sensitive, ASCII order.

Anonymous   
Printed Page 34
2nd paragraph

The "SET" type is misspelled as "ET".

Anonymous   
Printed Page 38

On INSERT, is the value supposed to be:
a) the maximum value currently appearing in the table + 1 or,
b) the maximum value which ever appeared in the table + 1

A simple test script, with version 3.23.49-nt indicates
that it's b), but page 38 of your book seems to say that it's a).
"If other values are present in the table, the value inserted will be
one greater than the largest current value for id".

Anonymous   
Printed Page 42
Table 3-5

Terry Pratchett's last name is misspelled as "Pratchet".

Anonymous   
Printed Page 48
las paragraph

You say "It returns true if both sides are null or false if both sides are not null"
but if you look at the example it should be more like "It returns true if both sides
are null or both sides are not null and equal and false if one side is null and the
other one not or both sides are not equal."

(My version seems way to complicated but I4m neither author nor native english
speaker)

Anonymous   
Printed Page 48
bottom 3 paragraphs

You should keep consistent case on non-sql keywords to
avoid confusing the user.

You shifted the case on IS NULL with title/TITLE and
author/AUTHOR.

Anonymous   
Printed Page 49
Under Membership Tests

There are inconsistencies in case for the SQL syntax on this page. Since identifiers
are case-sensitive, the first two SQL queries should be:

SELECT title FROM book WHERE author IN ('Stephen King', 'Richard Bachman');
and
SELECT title FROM book WHERE book_id BETWEEN 1 AND 100;

Anonymous   
Printed Page 53
Second "user input" under "Relevance Values" subheading

The "WHERE" keyword should be removed from the select list in the statement below:

"SELECT url, WHERE MATCH ( title, page_text ) AGAINST ('java')
FROM Document;"

Anonymous   
Printed Page 59
Last paragraph

Refers to Chapter 15 for DATE_FORMAT() function reference. Should be Chapter 17.

Anonymous  Apr 06, 2009 
Printed Page 68
3rd paragraph

The 3rd command for creating startup/shutdown script isn't correct. It should be:
$ ln -s /etc/rc.d/init.d/mysql.server /etc/rc.d/rc0.d/K01mysql

instead of

$ ln -s /etc/rc.d/init.d/mysql.server /etc/rc.d/rc0.d/S01mysql

Since "S01mysql" stands for "start mysql" and you really don't want to start mysql
server again when you shutdown the system.

Anonymous   
Printed Page 69
Fourth Paragraph - Shell Script in middle of page

This formatting error creates a serious technical mistake.
The third line of the shell script appears to have been
truncated, omitting code which breaks the script.

The line currently reads:

if [ "${MYSQLSERVER:=-NO-}" = "-YES

As you can see, the line is incomplete and should read:

if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then

Anonymous   
Printed Page 72
last paragraph

The last sentence tells the user how to configure the time portion of the slow query log.
The book has:
--set-variable long_query_time=time
It should be:
--set-variable=long_query_time=time

(notice the equal sign between set-variable and long_query_time)
If you use the configuration as shown in the book, the server will not start!

Anonymous   
Printed Page 91
Near bottom

The example on the page shows the creation of an index as follows:

mysql> CREATE UNIQUE INDEX st_cd ON State (state_cd);

Below that the query plan refers to the index as st_idx.

Given the continuing examples on the following page I assume the
index should have been created as st_idx.

Anonymous   
Printed Page 103
7th Paragraph

"Specify the a specific" should be "Specify a specific" - the "the" should be
dropped.

Anonymous   
Printed Page 111
top

generally, a $ prompt is the user and the # prompt is root.

The examples show a user prompt. The text says "as root"

Anonymous   
Printed Page 148
Example 9-1, line 6

Line 6 is missing a semicolon. It reads:

my $server = 'localhost'

It should be:

my $server = 'localhost';

This minor syntax error is not present in the example file (perl1.pl) provided on the
O'Reilly website.

Anonymous   
Printed Page 151
first command line example

Is:
Identified by 'ALpaswd'
Should be:
Identified by 'ALpswd'

Anonymous   
Printed Page 214
3rd paragraph

The reader is instructed to use escapeshellcmd() to escape dangerous charachters in
queries, but escapeshellcmd() has several flaws. escapeshellarg() was introduced in
PHP 4.0.3 as a replacement, but it doesn't make sense to escape for shell use when
the string will be used in MySQL queries, clearly mysql_escape_string() should be
used.

Anonymous   
Printed Page 223
Example 11-5 index.php script (continued)

There is an inconsistency in the code used with the PHP library function crypt().
This results in an error message being displayed for all
existing users. The simple change makes the if-else consistent.

passwd = "" . crypt($passwd, substr($user, 0, 2)) . """;
passwd = "" . crypt($passwd, substr($login, 0, 2)) . """;

Anonymous   
Printed Page 233
8th or 2nd to Last paragraph

The writer incorrectly makes a distinction between using the
'mysql_fetch_row()' call in this example, and not using it in an earlier example (on
page 227) when in fact he uses the call in both examples.

Anonymous   
Printed Page 240
the 11th row before EOP in example 11-5 index.php script

passwd= "".crypt($passwd, substr($user, 0, 2))
instead of
passwd= "".crypt($passwd, substr($login, 0, 2))
Same error on O'Reilly example on line in 9780596002114_examples.tar.gz.
cfr against http://www.webdatabasebook.com/wedding.
This error prevents a registered user to gain a subsequent login
as his password is crypted against the previous user name.

Anonymous   
Printed Page 260
The last sentence of the paragraph describing "length" argument

Since the length of the string "make" is 4 (excluding the trailing null character),

...the integer referenced by length should be set to 6.

should be corrected as follows.

...the integer referenced by length suould be set to 4.

Anonymous   
Printed Page 267
2nd and 3rd comments in the code example

*/ (closing symbol for comments) are missing.

Anonymous   
Printed Page 288
Examples

CREATE TABLE emp_review shows two Table_Options "AUTO_INCREMENT = 1, TYPE=InnoDB;"

The MySQL Manual says (please note the "or"):-

TYPE = {BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM }
or AUTO_INCREMENT = #

Anonymous   
Printed Page 296
'Examples' section

The section

INSERT INTO old_data ( id, date, field )
SELECT ( id, date, field )
FROM data
WHERE date < 87459300;

should read

INSERT INTO old_data ( id, date, field )
SELECT id, date, field
FROM data
WHERE date < 87459300;

since parens in a SELECT will cause a MySQL 3.23 to throw an 'ERROR 1064: You have an
error in your SQL syntax'.

Anonymous   
Printed Page 302
next to last paragraph

The paragraph starts with "The list of tables to join..." and then goes on to specify
the syntax of the JOIN statement, although JOIN is not explicitly mentioned as the
topic for the subsection. One has to glean that from the context. It appears that a
paragraph has been omitted.

Anonymous   
Printed Page 330
next to last paragraph

For the FROM_UNIXTIME function, the description begins "Returns the date (in GMT) corresponding ..." - should be "(in the system timezone)". Also, the example conversion appears to be incorrect. On my (MySQL 4.0.17) system, I get "select from_unixtime(903981584 + 3600 * 4 + 18)" => "1998-08-24 18:00:02"

Anonymous  Apr 06, 2009 
Printed Page 381
mysql_num_rows description

int mysql_num_rows(MYSQL_RES * result)
should be
my_ulonglong mysql_num_rows(MYSQL_RES * result)

*** Safari Books Online ***

Anonymous