Bug #8698 join_condition is mandatory for LEFT/RIGHT JOINs
Submitted: 22 Feb 2005 17:17 Modified: 22 Feb 2005 21:48
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:
Assigned to: Paul DuBois CPU Architecture:Any

[22 Feb 2005 17:17] Sergey Petrunya
Description:
The section "13.1.7.1. JOIN Syntax" of the user manual reads:

" MySQL supports the following JOIN syntaxes for the table_references part of SELECT statements
...
 table_reference LEFT [OUTER] JOIN table_reference [join_condition]
 table_reference RIGHT [OUTER] JOIN table_reference [join_condition]
...
"
From which one infers that join_condition is optional for LEFT/RIGHT joins. 
Actually join condition is mandatory for LEFT/RIGHT joins.

How to repeat:
mysql> explain SELECT t1.column1 FROM t1 RIGHT OUTER JOIN t2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql> explain SELECT t1.column1 FROM t1 RIGHT OUTER JOIN t2 ON TRUE;
+----+-------------+-------+-------+---------------+---------+---------+------+------+-------------+
...

Suggested fix:
update the manual
[22 Feb 2005 21:48] Paul DuBois
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
product(s).