Bug #1262 | LEFT JOIN of a table with an INNER JOIN returns cartesian product | ||
---|---|---|---|
Submitted: | 12 Sep 2003 8:10 | Modified: | 21 Oct 2003 9:50 |
Reporter: | Aleksander Adamowski | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 4.0.11a | OS: | Linux (Mandrake Linux 9.1) |
Assigned to: | CPU Architecture: | Any |
If the data you need to attach is more than 50MB, you should create a compressed archive of the data, split it to 50MB chunks, and upload each of them as a separate attachment.
To split a large file:
- On *nix platforms use the split command e.g.
split -b 50MB <my_large_archive> <my_split_archive_prefix>
- On windows use WinZip or a similar utility to split the large file
[12 Sep 2003 8:12]
Aleksander Adamowski
[12 Sep 2003 8:13]
Aleksander Adamowski
PNG image showing ERD of testcase
Attachment: testcase.png (image/png, text), 8.99 KiB.
[12 Sep 2003 8:13]
Aleksander Adamowski
DBDesigner4 file with the ERD
Attachment: testcase.xml (text/xml), 23.25 KiB.
[12 Sep 2003 8:14]
Aleksander Adamowski
The first step in developing a query - INNER JOIN. It works fine.
Attachment: 01_INNER_JOIN.sql (application/octet-stream, text), 245 bytes.
[12 Sep 2003 8:15]
Aleksander Adamowski
The second step - LEFT JOIN of groups with the previous INNER JOIN. Triggers this bug.
Attachment: 02_LEFT_JOIN_to_INNER_JOIN.sql (application/octet-stream, text), 319 bytes.
[12 Sep 2003 8:16]
Aleksander Adamowski
The third step - IS NULL check. Triggers "Impossible WHERE" error message
Attachment: 03_LEFT_JOIN_to_INNER_JOIN_with_IS_NULL_condition.sql (application/octet-stream, text), 359 bytes.
[12 Sep 2003 8:17]
Aleksander Adamowski
LEFT JOIN of 2 ordinary tables to show that this works fine - it shows groups with no permission as expected
Attachment: 04_LEFT_JOIN_to_groups_has_permissions_with_IS_NULL_condition.sql (application/octet-stream, text), 238 bytes.