Bug #15553 Manual for v 5.0, sect 1.6.1, has a logical error
Submitted: 7 Dec 2005 15:48 Modified: 17 Feb 2006 12:23
Reporter: Paul Bailey Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Jon Stephens CPU Architecture:Any
Triage: D4 (Minor)

[7 Dec 2005 15:48] Paul Bailey
There is a comment on the page, but no bug report (that I could find).

This section, " A new equality detector finds and optimizes “hidden” equalities in joins. For example, a WHERE clause such as

"t1.c1=t2c2 AND t2.c2=t3.c3 AND t1.c1 < 5

"can be reduced to

t1.c1=t3.c3 AND t2.c2 < 5 AND t3.c3 < 5"

has a tyop (should be "t2.c2", instead of "t2c2") and a logical error. Consider,

t1.c1=4,t2.c1=2,t3.c3=4. This row would be selected in the latter "optimized" query, but not the original query. Perhaps there is additional structure to t1, t2, t3 that you need to include?

How to repeat:
look at manual (5.0 sect 1.6.1)

Suggested fix:
update manual
[11 Dec 2005 15:03] Valeriy Kravchuk
Thank you for a bug report. This page (http://dev.mysql.com/doc/refman/5.0/en/mysql-5-0-nutshell.html) should really be updated (including not only "typo" correction, but also logical fault you found). 

Looks like we need some better examples of what our optimizer can do in version 5.
[14 Dec 2005 14:44] Jon Stephens
Fixed the typo, checking with developers to see if we can devise a better example.
[17 Feb 2006 12:23] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant

Additional info:

The Manual was updated in 12/05, and again since then. You might also want to look at the Internal documentation for additional / related info.