 |
| Login |  |
|
Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name. | |
| Modules |  |
| Who's Online |  |
There are currently, 7 guest(s) and 2 member(s) that are online.
You are Anonymous user. You can register for free by clicking here | |
| Languages |  |
|
Select Interface Language:
| |
|  |
 | Information Pages: Errata |
 - Here's a list of corrections and improvements that we and some of our readers have suggested after the book went into its first print run:
- page xi: "the staff is" should be "the staff are"
- page xv: "Ttahaghoghi" should be "Tahaghoghi"
- page 8: "won't spent" should be "won't spend"
- page 10: "and Perl on your system." should be "Perl to work together on your system".
- page 16: Change:
Our previous two examples would be written as: $ chmod 644 myfile.txt and: $ chmod 777 mydir
To:
Using this notation our previous three examples would be written as: $ chmod 644 myfile.txt $ chmod 600 myfile.txt $ chmod 777 mydir
- page 19: "filename" should be "myfile.txt" in the examples.
- page 23: "dialog looks like" should be "dialog box looks like".
- page 26: After "something like MySQL-server-5.0.22-0.i386.rpm and MySQL-
client-5.0.22-0.i386.rpm", add the sentence: "Packages with higher CPU numbers, such as i586 or i686, are better tuned for newer machines, but won't work on older machines.
- page 58: Figure 2-14: the command prompt should be "C:mysql-5.0.22-win32>"
- page 61: "The XAMPP installation has PHP configured" should be "The XAMPP installation may have PHP configured"
- page 61: "noninstallation" should be "non-installation"
- page 69: "may wonder whether you it's" should be "may wonder whether it's"
- page 71: "newer than 4.1.0" should be "from 4.1.0 onwards".
- page 73: mysql_fix_privilege_tables can also be in the bin directory for a Linux installation; check in bin if you don't find it in the scripts directory.
- page 74: You may need to run mysql_secure_installation as root (su -, or sudo on Mac OS X);
on Mac OS X, you may also need to create a symbolic link to the mysql program by typing:
sudo ln -s /usr/local/mysql/bin/mysql /opt/local/bin/mysql
sudo bin/mysql_secure_installation
- page 75: "adam:password" should be "adam:mypass" (two lines)
- page 79: "Hold down Ctrl-C" should be "Press Ctrl-C".
- page 80:
"You can do this by specifying the username from the command line:
$ bin/mysqladmin --user=root shutdown" should be:
"You can do this by specifying the root username and password from the command line:
$ bin/mysqladmin --user=root --password=the-root-password shutdown"
- page 83: change "or the apachectl command" to "or the apachectl or apache2ctl commands".
- page 84: "/mnt/c/Program Files/xampp/apache/conf/httpd.conf for an XAMPP installation" should be "C:[backslash]Program Files[backslash]xampp[backslash]apache[backslash]conf[backslash]httpd.conf for an XAMPP installation".
- page 85: "On Linux systems, it's increasingly" should be "It's increasingly"; "typically under the directory /etc/httpd/modules.d" should be "for example under the directory /etc/httpd/modules.d on a Linux system, or in the apache[backslash]conf[backslash]extra directory under the XAMPP install directory."
- page 85: In the Section: "Starting and Stopping Apache", change:
"You can generally start an installed Apache server by using the command: apachectl start If this fails because the command isn't found, use the find command to try and locate the apachectl script file: find / -type f -name apachectl If it's reported as being"
to:
"Apache web server installations usually include a control script called apachectl that you can use to start or stop the server. On newer installations this is sometimes called apache2ctl; if the examples below don't work for you, try replacing apachectl with apache2ctl or rcapache2. You can generally start an installed Apache server by using the command: apachectl start If you get an error message saying the apachectl file can't be found, try locating it yourself. On a Linux or Mac OS X system use: find / -type f -name apachectl while on a Windows system, use the built-in search. If the apachectl file is reported as being"
- page 87: "nontrivial" should be "complex"
- page 91: see the updated instructions for Mac OS X Leopard and XAMPP
- page 97: before "There are two databases here", add "You may see different results on your MySQL server."
- page 98" in this chapter, the HELP command need not be in the emphasised (user input) font.
- page 99: "typing rebuild" should be "typing rehash".
- page 100: before "You can get information", add "You may see more or less help content depending on the help files that have been installed with your server".
- page 104: "use the_database_name" should be "USE the_database_name" (for consistent style).
- page 109: "each of his courses" should be "each of their courses".
- page 110: "has failed the Computing Mathematics course once with 45 percent" should be "has failed the Computing Mathematics course once with 43 percent"
- page 116: Figure 4-4, The "M" on Buys should be to the left (on the Customer side).
- page 118: Figure 4-5, "Appplications" should be "Applications"
- page 123: The entity names "artist", "album", "track", and "played" in typewriter font should be "Artist", "Album", "Track" and "Played" respectively (to clarify we're referring to the entities in the figure).
- page 126: Figure 4-13: there should be a line from the Flight entity to the ArrivalTime attribute.
- Page 127: "Melbourne-Christchurch trips" should be "Melbourne-Christchurch legs".
- page 128: Subsection "Map the entities to database
tables": "because it's the not of this table" should be "because it's a key not of this table".
- page 131: Please use this updated image for Figure 4-15.
- page 145: "contain a percentage character" should be "contain the percentage character"
- page 145: the query should be as below:
SELECT * FROM track WHERE track_name LIKE "R__ %";
- page 149: the query examples should include parentheses as below
mysql> SELECT * FROM album WHERE album_id > 2
-> AND (NOT album_id) = 4 OR album_id = 6;
...
mysql> SELECT * FROM album WHERE (NOT album_id) = 4;
...
mysql> SELECT * FROM album WHERE (NOT album_id) != 4;
- page 154: the second query should have "binary" in uppercase:
SELECT track_name FROM track WHERE track_name < BINARY 'b';
- page 156: "LIMIT 5 OFFSET 10" should be "LIMIT 10 OFFSET 5".
- page 163: second-last paragraph: "auto_increment" should be "AUTO_INCREMENT" for consistency.
- page 164: "decimal(3,2)" should be "decimal(5,2)"
- page 165: "one whose primary key" should be "for which the primary key"
- page 168: "discuss multitable deletes" should be "discuss multi-table deletes"
- page 170: ["Keys and Indexes" in Chapter 4"] should be ["Keys and Indexes" in Chapter 6].
- page 175: "decimal(3,2)" should be "decimal(5,2)"
- page 176: "decimal(3,2)" should be "decimal(5,2)"
- page 182: "drop it temporarily" should be "drop it"
- page 182, item 2 at bottom of page: default should be uppercase:
"artist_id SMALLINT(5) NOT NULL DEFAULT 0 and artist_name CHAR(128)
DEFAULT NULL."
- page 183: "The basic syntax is as follows: name type [NOT NULL | NULL] [DEFAULT value]. The name field is the table name" should be "The basic syntax is as follows: name type [NOT NULL | NULL] [DEFAULT value]. The name field is the column name"
- page 183: "characters than require you" should be "characters that require you"
- page 187: "it'll instead be removed" should be "it'll be removed"
- page 191: "command to reports the details" should be "command to report the details"
-
- page 197: in the first two examples, "SELECT * from" should be "SELECT * FROM"
- page 203: "SET('value1'[,'value2'[, ...]]" should be "SET('value1'[,'value2'[, ...]])" (add closing parenthesis)
- page 205: last example: there should be no blank lines before "Query OK".
- page 206: insert this text after paragraph 3 (before "You can use":
First, let's insert data for three fictional customers:
mysql> INSERT INTO customer VALUES -> (1,'Lucy','Elizabeth','Williams'), -> (2,'Rose','Isabella','Williams'), -> (3,'Sanaa','Sadat','Tahaghoghi');
Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0
- page 213: "despite the file being" should be "despite the files being".
- page 213: "We haven't added a
NOT NULL clause to the artist_name. Instead we'll assume that whatever
application we build will do the checking for us. The fewer the constraints and
conditions that are built into the database, the faster it is for MySQL to work
with" to
We haven't added a
NOT NULL clause to the artist_name, and have instead assumed that whatever
application we build will do the checking for us. In general, the fewer the constraints and
conditions that are built into the database, the faster it is for MySQL to work
with. However, MySQL now optimizes for NOT NULL columns, so it is better to declare NOT NULL where the data will never be NULL. See the "Data Size" section of the MySQL manual for details".
[References:]
- page 214: first paragraph: change:
CREATE TABLE track ( track_id SMALLINT(3) NOT NULL DEFAULT 0, track_name CHAR(128) DEFAULT NULL, artist_id SMALLINT(5) NOT NULL DEFAULT 0, album_id SMALLINT(4) NOT NULL DEFAULT 0, time TIME DEFAULT NULL, PRIMARY KEY (artist_id,album_id,track_id) ); to:
CREATE TABLE track ( track_id SMALLINT(3) NOT NULL DEFAULT 0, track_name CHAR(128) DEFAULT NULL, artist_id SMALLINT(5) NOT NULL DEFAULT 0, album_id SMALLINT(4) NOT NULL DEFAULT 0, time DECIMAL(5,2) DEFAULT NULL, PRIMARY KEY (artist_id,album_id,track_id) );
Also delete the following paragraph "The reasoning behind ... and unambiguous."
- page 225: the query:
"SELECT CONCAT(artist_name, " recorded ", album_name) AS recording
FROM artist INNER JOIN album USING (artist_id)
ORDER BY CONCAT(artist_name, " recorded ", album_name);"
should drop the "AS recording" to be
"SELECT CONCAT(artist_name, " recorded ", album_name)
FROM artist INNER JOIN album USING (artist_id)
ORDER BY CONCAT(artist_name, " recorded ", album_name);"
- page 233: the queries should be:
mysql> SELECT * FROM track GROUP BY artist_id;
+----------+----------------------+-----------+----------+-------+
| track_id | track_name | artist_id | album_id | time |
+----------+----------------------+-----------+----------+-------+
| 0 | Elegia | 1 | 1 | 4.93 |
| 0 | Do You Love Me? | 2 | 1 | 5.95 |
| 0 | In A Silent Way | 3 | 1 | 1.81 |
| 0 | Rocks Off | 4 | 1 | 4.54 |
| 0 | Breaking Into Heaven | 5 | 1 | 11.37 |
| 0 | Spinning Around | 6 | 1 | 3.46 |
+----------+----------------------+-----------+----------+-------+
6 rows in set (0.01 sec)
and:
mysql> SELECT * FROM track WHERE artist_id=1;
+----------+-------------------+-----------+----------+------+
| track_id | track_name | artist_id | album_id | time |
+----------+-------------------+-----------+----------+------+
| 0 | Elegia | 1 | 1 | 4.93 |
| 1 | In A Lonely Place | 1 | 1 | 6.26 |
...
+----------+-------------------+-----------+----------+------+
86 rows in set (0.00 sec)
- page 234, penultimate paragraph: "to use it find" should be "to use it to find".
- page 248: The query:
SELECT artist_name, album_name, COUNT(*) FROM
artist INNER JOIN album USING (artist_id)
INNER JOIN track USING (artist_id, album_id)
LEFT JOIN played USING (artist_id, album_id, track_id)
GROUP BY album.artist_id, album.album_id;
should correctly be:
SELECT artist_name, album_name, COUNT(played) FROM
artist INNER JOIN album USING (artist_id)
INNER JOIN track USING (artist_id, album_id)
LEFT JOIN played USING (artist_id, album_id, track_id)
GROUP BY album.artist_id, album.album_id;
- page 248, last paragraph: "use rollRIGHT join" should be "use RIGHT join"
- page 252: remove parentheses from the first sentence on this page.
- page 254: Delete the sentence: "Similarly, <> ANY or != ANY has the alias NOT IN."
- page 255: Replace "Let’s try an example using NOT IN. We’ll find all the engineers who aren’t producers:" with "We can use the alias NOT IN in place of <> ANY or != ANY. Let's find all the engineers who aren't producers:".Move this modified example, from "We can" to "as a join query"
down to just before "The ALL keyword has a few tricks and traps".
- page 255: "(Boolean OR), the ANY keyword" should be "(Boolean OR), the ALL keyword".
- page 262, paragraph 2: change:
"The outer query is straightforward: it just returns the producer_name and the month value created through the subquery." to: "The outer query here is very simple and just picks up the producer_name and the month value created through the subquery." - page 284, last line: "c:artists_and_albums" should be "C:artists_and_albums.csv"
- page 311: "yazd.invy.com" should be "yazd.invyhome.com".
- page 320, line 3: "the database ResearchPeople" should be "the database music".
- page 349: "set" and "password" should be uppercase in the example:
"mysql> set password for 'root'@'localhost'=password('the_new_mysql_root_password');"
should be:
"mysql> SET PASSWORD for 'root'@'localhost'=PASSWORD('the_new_mysql_root_password');"
- page 356: the correct insertion values for the track table are:
INSERT INTO `track` VALUES (0,'Do You Love Me?',2,1,'5.95'),(1,'Nobody's Baby Now',2,1,'3.87'),(2,'Loverman',2,1,'6.37'),(3,'Jangling Jack',2,1,'2.78'),(4,'Red Right Hand',2,1,'6.18'),(5,'I Let Love In',2,1,'4.25'),(6,'Thirsty Dog',2,1,'3.81'),
- page 358, bottom: "set-charset" shouldn't be in italics.
- page 363: "typing crontab -l" should be "typing crontab -l (the "l" stands for list)"
- page 363: "In the Run tab, type in the full command above." should be "In the Run tab, type in the full command below."
- page 390: in the first mysqladmin example on the page, "status" shuld be in the same user input font as the mysqladmin command.
- page 391: "connection (see how the new process number (26535) is different?):" should be:
"connection --- see how the new process number (26535) is different?:"
- page 395: first line: "wePHPMyb" should be "web".
- page 409 code excerpt:
"while($row = @ mysql_fetch_array($result))" should be: "while($row = @ mysql_fetch_array($result, MYSQL_ASSOC))"
- page 436: middle of the page: "for ($x=0;$x<$count;$x++)" should be "for ($x=0;$x<$count;$x++)"
- page 456: bottom of the page: "for($x=0; $x&<$len; $x++)" should be "for($x=0; $x<$len; $x++)"
- page 463 code excerpt:
"// Connect to the MySQL DBMS and use the wedding database" should be: "// Connect to the MySQL DBMS and use the music database"
- page 502: the second-last closing brace "}" on the page should be omitted (some code, including braces, is implicit in the "..." there).
- page 506: the code:
// Try to unreserve the gift with the matching username and gift ID
$query = "UPDATE gifts SET username = NULL WHERE gift_id = {$gift_id}".
" AND username={$_SESSION['username']}";
should be modified to:
// Try to unreserve the gift with the matching username and gift ID
$query = "UPDATE gifts SET username = NULL WHERE gift_id = {$gift_id}".
" AND username='{$_SESSION['username']}'";
(add single quotes on either side of the braces on the last line)
- page 514: middle of the page:
print "nThe temperature difference is: " . $TemperatureToday-$TemperatureYesterday. "n"; should be: print "nThe temperature difference is: " . ($TemperatureToday-$TemperatureYesterday). "n";
- page 542, code excerpt near the top:
while(my $val=$sth->fetchrow_hashref()) { printf ("%-5s %-128sn", $ref->{artist_id}, $ref->{artist_name}); } should be: while(my $ref=$sth->fetchrow_hashref()) { printf ("%-5s %-128sn", $ref->{artist_id}, $ref->{artist_name}); }
- page 579, top: "for($matchedrows=0;($row = @ mysqli_fetch_array($result));$matchedrows++);" should be
"for($matchedrows=0;($tmprow = @ mysqli_fetch_array($result));$matchedrows++) $row=$tmprow;"
You can also visit the O'Reilly errata page for Learning MySQL.
|
|
|
|
| |
| Related Links |  |
| Article Rating |  |
Average Score: 5 Votes: 2

| |
| Options |  |
|
|
Sorry, Comments are not available for this article. |
|
| 
|