Tested on the following versions of mysql: 3.22.32, 3.23.31 on Linux

Description:
"where not field like pattern" gives empty set, while
"where field not like pattern" return what i expect

How-To-Repeat:
create table testtabell(test varchar(10));
insert into testtabell values('test.com')
insert into testtabell values('test.no')
insert into testtabell values('test2.com')
insert into testtabell values('test2.no')
 
select * from testtabell where not test like '%.no';
This returns an empty set
 
select * from testtabell where test not like '%.no';
This one returns:
+-----------+
| test      |
+-----------+
| test.com  |
| test2.com |
+-----------+
2 rows in set (0.00 sec)

That is right.

I don't know if the first one is legal syntax, but it should
then return an parse error on the sql, not an empty set.


MySQL support: none
Severity:      non-critical
Priority:      low
Category:      mysql
Class:         sw-bug
Release:       mysql-3.23.31 (Source distribution)

Environment:
        <machine, os, target, libraries (multiple lines)>
System: Linux zalo 2.2.16 #73 Fri Jun 16 18:48:22 PDT 2000 i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure  --without-bench

Reply via email to