summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_in.result
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-16 18:06:34 -0700
committerunknown <igor@rurik.mysql.com>2005-07-16 18:06:34 -0700
commite155a0c01d6c672e92d70abc24e6630a802be391 (patch)
tree4128519205136a868c8d10951424cfe3a72c116d /mysql-test/r/func_in.result
parente2bd74015c5cda61912b265c408471ef6a4293d2 (diff)
downloadmariadb-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/r/func_in.result')
-rw-r--r--mysql-test/r/func_in.result25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index f75fe0d1627..b0c0178328e 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -119,7 +119,7 @@ c char(1) character set latin1 collate latin1_danish_ci
insert into t1 values ('A','B','C');
insert into t1 values ('a','c','c');
select * from t1 where a in (b);
-ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation ' IN '
+ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
select * from t1 where a in (b,c);
ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT), (latin1_swedish_ci,IMPLICIT), (latin1_danish_ci,IMPLICIT) for operation ' IN '
select * from t1 where 'a' in (a,b,c);
@@ -193,3 +193,26 @@ select * from t1 where a in (NULL, 'aa');
a
aa
drop table t1;
+CREATE TABLE t1 (a int PRIMARY KEY);
+INSERT INTO t1 VALUES (44), (45), (46);
+SELECT * FROM t1 WHERE a IN (45);
+a
+45
+SELECT * FROM t1 WHERE a NOT IN (0, 45);
+a
+44
+46
+SELECT * FROM t1 WHERE a NOT IN (45);
+a
+44
+46
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE a NOT IN (45);
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` <> 45)
+SELECT * FROM v1;
+a
+44
+46
+DROP VIEW v1;
+DROP TABLE t1;