MySQL, 1st Edition (00-4 printing) - Errata

This document lists the known errors for the book:

MySQL, 1st Edition (00-4 printing)
Paul DuBois
New Riders
1999
ISBN 0-7357-0921-1
[book information]
Number of items: 20
Date of most recently reported item: 2003-09-06

Sort by: [page number] [most recent errata first]
Date 2003-09-06
Page 452, Table 12.2
Description Column_name is listed as a column of the tables_priv table. It should be shoved right, to appear as a column of the columns_priv table. Also, the tables_priv table has privilege columns of Table_priv and Column_priv, not just Table_priv.

Date 2003-07-16
Page 239
Description The first paragraph says that load_defaults() reads the C:\mysql\data\my.cnf file. That is incorrect, it reads only my.ini in the Windows directory and C:\my.cnf

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

Date 2003-04-09
Page 647, 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 648, discussion of mysql_num_rows() function
Reported by David Christensen
Description In the discussion of the mysql_num_rows() function, the following line occurs twice:
if ((res_set = mysql_store_result (conn)) == NULL)
The == should be != in both instances:
if ((res_set = mysql_store_result (conn)) != NULL)

Date 2002-12-18
Page 595
Description

One of the commands two-thirds down the page is incorrect. The commands read as follows:

% isamchk *.ISD
% myisamchk
*.MYI

They should read like this:

%
isamchk *.ISM
% myisamchk
*.MYI

Date 2002-11-14
Page 142, name qualifiers section
Reported by Ralf Stahnke
Description

The second SHOW TABLES() statement says this:

SHOW TABLES FROM
db_name.tbl_name

It makes no sense to show tables for a table. A better example using SHOW for a fully qualified name would be:

SHOW COLUMNS FROM
db_name.tbl_name

Date 2002-07-05
Page 250, first code listing
Reported by Amittai F. Aviram
Description

The invocation of print_error() has a missing first argument. It should be written like this:

print_error (conn, "INSERT
statement
failed");

Date 2001-11-27
Page 247, last paragraph
Reported by Norman Brandinger
Description

"...disconnecting to and disconnecting from..." should read "...connecting to and disconnecting from...".


Date 2001-11-27
Page 261, second sentence after code listing
Reported by Norman Brandinger
Description

mysql_fetch_seek() should say mysql_field_seek().


Date 2001-08-13
Page 169, top of page
Reported by Urb LeJeune
Description

The first section on sequencing/resequencing a column is confused. In the first paragraph, delete the parenthesized phrase; the first example works only for sequencing an unsequenced column that is not already a PRIMARY KEY.

The second example (dropping the column and adding it again) will work better with an additional clause and should read like this:

ALTER TABLE t
    DROP
PRIMARY KEY,
    DROP i,
    ADD i INT UNSIGNED AUTO_INCREMENT NOT NULL
PRIMARY KEY

Date 2001-07-24
Page 109, Table 2.12
Reported by Jeff Oien
Description

The TIMESTAMP(12) line, second column says:

YYYYMMDDhhmm

It should say:

YYMMDDhhmmss

Date 2001-06-08
Page 497
Description

A better location from which to download the samp_db distribution now is the Kitebird Web site. This site also provides the distribution in Zip format, which the site listed in the book does not.


Date 2001-05-03
Page 534
Description

The third form shown for the SUBSTRING() function is missing a space between FROM and str.


Date 2001-02-21
Page 457, 563
Reported by Scott Baker
Description

The discussion on these two pages says that you can specify the host part of a user@host grant specifier in IP/netmask form, where the IP number is specified in dotted-quad form, and the netmask is specified as the number of bits to use for the network number.

That was the original notation, but it is now different. The netmask should also be specified in dotted-quad form. For example, instead of specifying something like 192.168.1.0/24 to indicate that the first 24 bits of the IP number are the network number, you would write 192.168.1.0/255.255.255.0.


Date 2001-01-19
Page 460, third paragraph
Reported by Aurelien Marchand
Description

Change 192.168.3.4 in the following sentence to 192.168.3.14:

For a client connecting from a host with an IP number of 192.168.3.14, entries with Host values of 192.168.3.4, 192.168.3.%, 192.168.%, 192.%, and % will match, in that order.


Date 2001-01-17
Page 188, first bullet
Description

ORDER BY RAND() is available as of MySQL 3.23.2, not 3.23.3.


Date 2000-12-12
Page Chapter 6. The MySQL C API
Description

If you get compiler errors regarding an argument type mismatch for the second argument to the load_defaults() function, try adding the word const to the beginning of the declaration for the array you're using for that argument.


Date 2000-08-19
Page 566, code example
Reported by Floyd Baker
Description

The syntax for the import_options clause of the LOAD DATA statement is incorrect. The book says:

[FIELDS
   [TERMINATED BY
'string']
   [OPTIONALLY] ENCLOSED BY 'char']
   [ESCAPED BY
'char']]
[LINES TERMINATED BY 'string']

There is a missing opening bracket on the OPTIONALLY line. The syntax should look like this:

[FIELDS
   [TERMINATED BY
'string']
   [[OPTIONALLY] ENCLOSED BY 'char']
   [ESCAPED BY
'char']]
[LINES TERMINATED BY
'string']

Date 2000-05-03
Page 327, last code listing
Description

Change the first four lines from:

<HTML>                        <- beginning
of document
<HEAD>                        <- end of document
head
<TITLE>My Page Title</TITLE>  <- title of
document
</HEAD>                       <- beginning of document
head

To:

<HTML>
<- beginning of document
<HEAD>                        <-
beginning of document head
<TITLE>My Page Title</TITLE>  <-
title of document
</HEAD>                       <- end of document
head

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