diff options
author | unknown <igor@rurik.mysql.com> | 2005-07-16 18:06:34 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-07-16 18:06:34 -0700 |
commit | e155a0c01d6c672e92d70abc24e6630a802be391 (patch) | |
tree | 4128519205136a868c8d10951424cfe3a72c116d /mysql-test/t/func_in.test | |
parent | e2bd74015c5cda61912b265c408471ef6a4293d2 (diff) | |
download | mariadb-git-e155a0c01d6c672e92d70abc24e6630a802be391.tar.gz |
func_in.result, func_in.test:
Fixed bug #11885.
sql_select.cc:
Fixed bug #11885.
Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now
is replaced by 'a=v' and 'a<>v' at the parsing stage.
sql_yacc.yy:
Fixed bug #11885.
Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now
is replaced by 'a=v' and 'a<>v' at the parsing stage.
sql/sql_yacc.yy:
Fixed bug #11885.
Predicates of the forms 'a IN (v)' 'a NOT IN (v) now
is replaced by 'a=v' and 'a<>v' at the parsing stage.
sql/sql_select.cc:
Fixed bug #11885.
Predicates of the forms 'a IN (v)' 'a NOT IN (v) now
is replaced by 'a=v' and 'a<>v' at the parsing stage.
mysql-test/t/func_in.test:
Fixed bug #11885.
mysql-test/r/func_in.result:
Fixed bug #11885.
Diffstat (limited to 'mysql-test/t/func_in.test')
-rw-r--r-- | mysql-test/t/func_in.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 6e0883b821f..3a6b6653098 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -101,3 +101,21 @@ create table t1 (a char(20) character set binary); insert into t1 values ('aa'), ('bb'); select * from t1 where a in (NULL, 'aa'); drop table t1; + +# +# Bug #11885: WHERE condition with NOT IN (one element) +# + +CREATE TABLE t1 (a int PRIMARY KEY); +INSERT INTO t1 VALUES (44), (45), (46); + +SELECT * FROM t1 WHERE a IN (45); +SELECT * FROM t1 WHERE a NOT IN (0, 45); +SELECT * FROM t1 WHERE a NOT IN (45); + +CREATE VIEW v1 AS SELECT * FROM t1 WHERE a NOT IN (45); +SHOW CREATE VIEW v1; +SELECT * FROM v1; + +DROP VIEW v1; +DROP TABLE t1; |