Bug #1190 Problem in JOIN

Submitted: 4 Sep 2003 1:04 Modified: 4 Oct 2003 6:06
Reporter: Deivanaathan A Krishnan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:3.23.56 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[4 Sep 2003 1:04] Deivanaathan A Krishnan
Description:
Hi,
       I tried to execute the statement

"Select m.message_id,m.message_subject,u.user_name from message m
 LEFT JOIN users u on u.user_id=m.message_user"

where as a user is not in the users table. For example (message_user has a user_id with a value of 10 and that is not available in users table.) The query results return Null for u.user_name for all the subsequent rows that return after the message_id having user_id 10.

Could anyone please let me know how to solve this issue.

Thanks,
Deiva.

How to repeat:
"Select m.message_id,m.message_subject,u.user_name from message m
 LEFT JOIN users u on u.user_id=m.message_user"

messages
mesasge_id message_subject message_user
1             xxx            2
2             aaa            10
3             ddd            1

users
user_id   user_name
1         deiva
2         raja

the query result is returning the nulls (it seems it works fine when ids or other are matched. but problem with date or lesser or grater than functions used.)
[4 Sep 2003 6:06] Indrek Siitan
Is the problem reproducable for you with the exact data that you provided here
(2+3 rows)? Also, can you post CREATE TABLE statements for both tables,
including indices created on the tables.

Also, you could try upgrading to the latest MySQL version - I wasn't able to
reproduce this on 3.23.58 at this moment.
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.