Hello.
I was unable to repeat this situation on my MySQL 5.0.12. See:
mysql> create table tlike (a char(10));
Query OK, 0 rows affected (0.01 sec)
mysql> insert into tlike values('abc');
Query OK, 1 row affected (0.02 sec)
mysql> select * from tlike where a like '';
Empty set (0.00 sec)
mysql> select * from tlike where a like 'abc';
+------+
| a |
+------+
| abc |
+------+
1 row in set (0.01 sec)
Please, provide some additional information. Include the definition
of your table (use 'SHOW CREATE TABLE ...' statement), test data,
the output of the following statements:
show variables like '%char%';
show variables like '%colla%';
Check if this issue exists on the latest release (4.1.14 now). In my opinion,
this problem might be related to character sets.
[EMAIL PROTECTED] wrote:
> [-- text/plain, encoding 7bit, charset: US-ASCII, 18 lines --]
>
> Hi all,
>
> I've got a question. We were testing something on our mysql server (
> 4.0.21) with MyISAM tables.
>
> When we executed the query "select * from people where name like '';" we
> expected the same results as "select * from people where name='';" but it
> didn't.
>
> The like function returned everything instead of only the people without a
> name. Is this known (and correct) behaviour? It does not sound logical to
> me. I couldn't find anything about it on the mysql website.
>
> Thanks in advance!
>
> With regards,
>
> Casper Gondelach
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]