Bug #109804 Natural Join mistyped as Natuarl returns cross product
Submitted: 27 Jan 2023 4:20 Modified: 27 Jan 2023 8:28
Reporter: Anant Sharma Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S2 (Serious)
Version:8.0, 5.7 OS:Windows
Assigned to: CPU Architecture:x86 (64 bit)
Tags: join, natural join

[27 Jan 2023 4:20] Anant Sharma
Description:
SQL query using NATURAL JOIN between two tables returns Cross product when Natural is written as natuarl.

How to repeat:
Make two tables compatible with natural join. Write a query to Natural JOIN and mistype natural as natuarl.
[27 Jan 2023 4:50] MySQL Verification Team
Bug #109805 marked as duplicate of this one
[27 Jan 2023 5:14] MySQL Verification Team
Hello Anant,

Thank you for the report and feedback.

regards,
Umesh
[27 Jan 2023 8:28] Roy Lyseng
Posted by developer:
 
This is not a bug.
Standard SQL requires an ON clause or a USING clause after JOIN,
but MySQL allows us to omit these clauses, effectively implementing
an alternative syntax for a cross join.
Thus, NATUdvvRAL becomes an alias for table t1 in this query,
since the AS keyword in a table alias clause can be omitted
(which is actually according to standard SQL).
It might be a good idea to remove this extension, but that can
be a hard sell.