List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 2 1999 11:50am
Subject:Strange behaviour ...
View as plain text  
>>>>> "Thomas" == Thomas Bouton <bouton@stripped> writes:

Thomas> Hello everybody !
Thomas> I have a problem with a SQL request :

Thomas> select * from cde_client as cde ,
Thomas> 	ligne_cde_client as lcde ,
Thomas> 	article as a ,
Thomas> 	prix as p
Thomas> 	left join texte_libre as tl on (tl.num=num_cde_client and
Thomas> tl.type_num=2) 
	
Thomas> where  num_cde_client=lcde.cde_client 
Thomas>               AND lcde.article=num_article 
Thomas>                 and num_cde_client=721
Thomas> 	and p.tarif=1 and p.article=num_article 
Thomas> order by  limite

Thomas> which returns no results (was waiting for 10).

Thomas> If 
Thomas>    a) I remove the "limite" field in the order by 
Thomas> or
Thomas>    b) remove the first left join

Thomas> I get 10 results (expected behaviour) !

Thomas> I am using MySQL 3.22.22 for Win32 ( :( but I have to...)

Thomas> some more informations :

Thomas> The Explains (well one only as the 

Thomas> table type    possible_keys       key	     key_len  
Thomas> ref                      rows Extra
Thomas> cde   const   PRIMARY             PRIMARY       4     
Thomas> ???                      1		
Thomas> tl    ref     type_num_2          type_num_2    5     
Thomas> ???,cde.num_cde_client   1		
Thomas> lcde  ref     article,cde_client  cde_client    4     
Thomas> ???                      10		
Thomas> a     eq_ref  PRIMARY             PRIMARY       4     
Thomas> lcde.article             1		
Thomas> p     ref     article,tarif       article       4     
Thomas> a.num_article            4   where used	

Thomas> which seems correct to me.

Thomas> indexes have been rebuilt so no trouble from here ( I hope !)

Thomas> Can anybody explain this ?? (Of course I can send any further needed
Thomas> information ...)

Thomas> Thanx a lot !

Hi!

If you could produce a full test and mail it to me, I can probably fix 
this for you.

Can you by the way test if this works in MySQL 3.22.25 ?

Regards,
Monty
Thread
Strange behaviour ...Thomas Bouton26 Jul
  • Strange behaviour ...Michael Widenius2 Aug