diff options
Diffstat (limited to 'mysql-test/t/null.test')
-rw-r--r-- | mysql-test/t/null.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test index f1fe2cf2c9f..a010ab38e07 100644 --- a/mysql-test/t/null.test +++ b/mysql-test/t/null.test @@ -20,3 +20,18 @@ create table t1 (x int); insert into t1 values (null); select * from t1 where x != 0; drop table t1; + +# +# Test problem med index on NULL columns and testing with =NULL; +# + +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( + indexed_field int default NULL, + KEY indexed_field (indexed_field) +); +INSERT INTO t1 VALUES (NULL),(NULL); +SELECT * FROM t1 WHERE indexed_field=NULL; +SELECT * FROM t1 WHERE indexed_field IS NULL; +SELECT * FROM t1 WHERE indexed_field<=>NULL; +DROP TABLE t1; |