Hi.

I was able to reproduce the behaviour on MySQL 3.23.46. CC'ed to
[EMAIL PROTECTED]

Regards,

        Benjamin.


On Mon, May 20, 2002 at 09:40:20PM +0900, [EMAIL PROTECTED] wrote:
> Description:
> 
> Query returns an unexpected result.
> 
> How-To-Repeat:
> 
> run the script below:
> ---------------------------------------------------------------------
> create table member
> (
>  userid int(11) primary key auto_increment,
>  mailaddress char(40) not null
> );
> 
> insert into member values (null,'[EMAIL PROTECTED]');
> insert into member values (null,'[EMAIL PROTECTED]');
> 
> create table orders
> (
>  orderid int(11) primary key auto_increment,
>  userid int(11) not null,
>  placedate datetime,
>  status enum('WORKING','ACCEPTED','CANCELED','SHIPPED'),
>  comments char(255)
> );
> 
> insert into orders values (null,1,sysdate(),'ACCEPTED',null);
> insert into orders values (null,2,sysdate(),'ACCEPTED',null);
> 
> alter table orders add
> (
>  contact_date datetime,
>  payment_date datetime,
>  shipping_date datetime,
>  followup_date datetime,
>  cancel_date datetime
> );
> 
> update orders set shipping_date=sysdate();
> update orders set cancel_date=sysdate() where orderid=1;
> 
> select
> o.orderid,
> o.shipping_date,
> o.cancel_date
> from orders o, member u
> where o.userid = u.userid;
> 
> select
> o.orderid,
> o.shipping_date,
> o.cancel_date
> from orders o, member u
> where o.userid = u.userid
> and o.orderid = 1;
> ---------------------------------------------------------------------
> the results of the last two queries are:
> 
> orderid shipping_date   cancel_date
> 1       2002-05-20 21:50:24     NULL
> 2       2002-05-20 21:50:24     NULL
> orderid shipping_date   cancel_date
> 1       2002-05-20 21:50:24     2002-05-20 21:50:24
> 
> in the first query, cancel_date should not be null for orderid=1.
> 
> 
> 
> MySQL support:  none
> Severity:     serious
> Priority:     high
> Category:     mysqld
> Class:                support
> Release:      mysql-3.23.38
> 
> Exectutable:   mysqld-nt
> System:        Win200

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to