summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_in.test
diff options
context:
space:
mode:
authorkroki/tomash@moonlight.intranet <>2006-11-16 13:25:55 +0300
committerkroki/tomash@moonlight.intranet <>2006-11-16 13:25:55 +0300
commit23efecdb3c2b69fd327ec7cebe398f2884c54eb4 (patch)
treec90d750e2c924c20e2f6b64eb1a1fc607e924038 /mysql-test/t/func_in.test
parent5196eadc060843665eb007498fa174ba43b4b989 (diff)
parentb8d545156589a9a2d4297e3338498bf8362a559b (diff)
downloadmariadb-git-23efecdb3c2b69fd327ec7cebe398f2884c54eb4.tar.gz
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
Diffstat (limited to 'mysql-test/t/func_in.test')
-rw-r--r--mysql-test/t/func_in.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 8ddf1fbe314..d48606ac6e6 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -109,7 +109,28 @@ select count(*) from t1 where id not in (1);
select count(*) from t1 where id not in (1,2);
drop table t1;
-# End of 4.1 tests
+
+#
+# BUG#17047: CHAR() and IN() can return NULL without signaling NULL
+# result
+#
+# The problem was in the IN() function that ignored maybe_null flags
+# of all arguments except the first (the one _before_ the IN
+# keyword, '1' in the test case below).
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 SELECT 1 IN (2, NULL);
+--echo SELECT should return NULL.
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+
+--echo End of 4.1 tests
+
#
# Bug #11885: WHERE condition with NOT IN (one element)
@@ -232,3 +253,6 @@ select some_id from t1 where some_id not in(2,-1);
select some_id from t1 where some_id not in(-4,-1,-4);
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
drop table t1;
+
+
+--echo End of 5.0 tests