Andrew,

you can tell the answer from Brent's info (not obvious in your mail, as
you put your new text above the quote):


Am Di, den 05.04.2005 schrieb Andrew um 18:05:
> Hello Brent,
> 
>    Thanks for reply.
>    
>    But I would like to know if we have desired behavior in latest
>    versions of MySQL or it is a bug.
> 
> -- 
> Best regards,
>  Andrew                            mailto:[EMAIL PROTECTED]
> 
> Tuesday, April 5, 2005, 11:46:57 AM, you wrote:
> 
> BB> I'm not sure what may have changed, but what you are searching on is
> BB> really a partial value of a field. You wouldn't normally think of \r\n
> BB> as characters, but they are are, just like a or b.
> BB> Whenever you are searching  on a partial value, you should use LIKE and
> BB> %.
> BB> SELECT * FROM table_name WHERE column_name LIKE 'value%';

As '\r\n' are characters, and you yourself wrote you store them in your
data, it is correct that MySQL does not return data for your "equals"
query:
   'value' = 'value\r\n'  MUST return "false".

To get that row returned,
1) either use "LIKE" (as Brent proposed), or
2) include the '\r\n' in the string you search for, or
3) modify your data so that trailing control characters are not stored.

IMO, 3) might be the best way, depending on your application's neds.


HTH,
Joerg

-- 
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to