Page Chapter 5. Working with Databases, Page 55

Location on the page: 
Section "Exposing Queries to Other Modules with hook_db_rewrite_sql()"
Error: 

The initial paragraphs in this section confuse the core function db_rewrite_sql() with the hook hook_db_rewrite_sql() (which can be implemented in modules). This confusion is cleared up in Table 5-2, but it would be preferable if the confusion were not created in the first place!

For a start, the hook does not expose queries to other modules, so the title of the section is itself confusing.

Then the first paragraph starts by talking about the hook, but in the 2nd sentence changes tack and talks about the function.

On p. 56, in subsection "Wrapping Queries", the hook is described where the function should be described (actually the description would be the same, but the given "function signature" should be for the function, not the hook).

Correction: 

Change the section title to something like "Drupal's Query Rewriting Mechanism: db_rewrite_sql() and hook_db_rewrite_sql()".

Delete the first sentence of the first paragraph in this section.

After the short paragraph "If you are not ... in your module." add the following sentence: "This allows your module to modify queries created elsewhere in Drupal so that you do not have to hack modules directly."

Description of the Error: 

The text confuses the function db_rewrite_sql() with the hook hook_db_rewrite_sql().