Managing & Using MySQL, 2nd Edition by Randy Jay Yarger, Hugh E. Williams, George Reese, Tim King The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated March 12, 2004. UNCONFIRMED errors and comments from readers: (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. [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. (34) 2nd paragraph; The "SET" type is misspelled as "ET". {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". (42) Table 3-5; Terry Pratchett's last name is misspelled as "Pratchet". [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) (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. (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; {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;" {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. [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 [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! (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. (103) 7th Paragraph; "Specify the a specific" should be "Specify a specific" - the "the" should be dropped. [111] top; generally, a $ prompt is the user and the # prompt is root. The examples show a user prompt. The text says "as root" (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. {151} first command line example; Is: Identified by 'ALpaswd' Should be: Identified by 'ALpswd' [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. {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)) . "\""; {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. [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. [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. {267} 2nd and 3rd comments in the code example; */ (closing symbol for comments) are missing. [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 = # (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'. [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. {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 *** (3.4.4) Last line in section The phrase "The MySQL ET type..." should be "The MySQL SET type..." {3.8.2} End of section The description of the <=> operator is wrong; it does not match the (correct) output of the select statement.