1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

join_outer.result, null.result, null.test:

Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (bug #1990).
item_cmpfunc.h:
  Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (bug #1990).


sql/item_cmpfunc.h:
  Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (big #1990).
mysql-test/t/null.test:
  Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (bug #1990).
mysql-test/r/null.result:
  Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (bug #1990).
mysql-test/r/join_outer.result:
  Fixed inconsistency of values of used_tables_cache
  and const_item_cache for Item_func_isnull objects (bug #1990).
This commit is contained in:
unknown
2003-12-01 16:12:05 -08:00
parent 6573b851e3
commit a65c6989d4
4 changed files with 24 additions and 1 deletions

View File

@ -91,7 +91,7 @@ grp a c id a c d
NULL NULL NULL NULL NULL NULL
explain select t1.*,t2.* from t1,t2 where t1.a=t2.a and isnull(t2.a)=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7

View File

@ -142,3 +142,14 @@ a b c d
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
drop table t1;
create table t1 (a int not null, b int not null, index idx(a));
insert into t1 values
(1,1), (2,2), (3,3), (4,4), (5,5), (6,6),
(7,7), (8,8), (9,9), (10,10), (11,11), (12,12);
explain select * from t1 where a between 2 and 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx idx 4 NULL 2 Using where
explain select * from t1 where a between 2 and 3 or b is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx idx 4 NULL 2 Using where
drop table t1;

View File

@ -86,3 +86,14 @@ INSERT INTO t1 (d) values (null),(null);
select * from t1;
drop table t1;
#
# Test to check elimination of IS NULL predicate for a non-nullable attribute
# (bug #1990)
#
create table t1 (a int not null, b int not null, index idx(a));
insert into t1 values
(1,1), (2,2), (3,3), (4,4), (5,5), (6,6),
(7,7), (8,8), (9,9), (10,10), (11,11), (12,12);
explain select * from t1 where a between 2 and 3;
explain select * from t1 where a between 2 and 3 or b is null;
drop table t1;