diff options
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r-- | mysql-test/r/null.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 1d76fbf2fb3..bd90b3fe3f3 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -156,3 +156,22 @@ drop table t1; select cast(NULL as signed); cast(NULL as signed) NULL +create table t1(i int, key(i)); +insert into t1 values(1); +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +explain select * from t1 where i=2 or i is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null i i 5 const 10 Using where; Using index +alter table t1 change i i int not null; +explain select * from t1 where i=2 or i is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i i 4 const 7 Using where; Using index +drop table t1; |