I’ve done it before, and I’m sure many others have. You type:
SELECT * FROM t1,t2;
Without any conditions, and then just wait as your console spews out every combination of the two tables possible in what is called an implicit cartesian join. Worst still when you are hosting and one of your client’s apps does this (I’ve seen this too many moons ago).
So, in Drizzle trunk today and in our RC release next week we have a new error “Implicit cartesian join attempted.” which will fire every time you try a query such as the one above. If you really want a full cartesian join without a WHERE or ON condition (sometimes, it is needed) then you can use the CROSS keyword. For example:
SELECT * FROM t1 CROSS JOIN t2;
Image may be NSFW.
Clik here to view.
PlanetMySQL Voting: Vote UP / Vote DOWN