mysql - SQL Like or REGEXP filter results even when everything should be matched -
this have
select node.nid nid, node.type node_type, product.* ml_node node left join ml_content_type_product product on node.vid = product.vid (node.type in('product')) , product.field_sockel_value regexp '.*' , product.field_artikel_value regexp '.*' , product.field_leistung_value regexp '.*' , product.field_licht_farbe_value regexp '.*' , product.field_rubrik_value regexp '.*' , product.field_artikelgruppe_value regexp '.*' order product.field_artikel_value having these where-conditions assume gives same results as:
select node.nid nid, node.type node_type, product.* ml_node node left join ml_content_type_product product on node.vid = product.vid (node.type in('product')) order product.field_artikel_value but not. first returns 494 rows , last 1 gives 717. there's missing bunch of rows. when use query
select node.nid nid, node.type node_type, product.* ml_node node left join ml_content_type_product product on node.vid = product.vid (node.type in('product')) , product.field_artikel_value regexp '.*' , product.field_leistung_value regexp '.*' , product.field_rubrik_value regexp '.*' , product.field_artikelgruppe_value regexp '.*' order product.field_artikel_value i 717 rows. so… makes removed conditions special? columns of type longtext (because cms so) , have exact same attributes.
btw noticed same behavior when using instead of regexp.
since have left join lines product.field_sockel_value or product.field_licht_farbe_value null. these line got filtered in where clause
Comments
Post a Comment