Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e282c8cc
Commit
e282c8cc
authored
Dec 01, 2003
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-1
parents
3ed561d3
37ad3d2f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
3 deletions
+26
-3
mysql-test/r/index_merge.result
mysql-test/r/index_merge.result
+2
-2
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+1
-1
mysql-test/r/null.result
mysql-test/r/null.result
+11
-0
mysql-test/t/null.test
mysql-test/t/null.test
+11
-0
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-0
No files found.
mysql-test/r/index_merge.result
View file @
e282c8cc
...
@@ -76,13 +76,13 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -76,13 +76,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
explain select * from t0 where key2 = 45 or key1 is null;
explain select * from t0 where key2 = 45 or key1 is null;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0
ALL i1,i2 NULL NULL NULL 1024
Using where
1 SIMPLE t0
range i1,i2 i2 4 NULL 1
Using where
explain select * from t0 where key2=10 or key3=3 or key4 <=> null;
explain select * from t0 where key2=10 or key3=3 or key4 <=> null;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 index_merge i2,i3,i4 i2,i3 4,4 NULL 2 Using where
1 SIMPLE t0 index_merge i2,i3,i4 i2,i3 4,4 NULL 2 Using where
explain select * from t0 where key2=10 or key3=3 or key4 is null;
explain select * from t0 where key2=10 or key3=3 or key4 is null;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0
ALL i2,i3,i4 NULL NULL NULL 1024
Using where
1 SIMPLE t0
index_merge i2,i3,i4 i2,i3 4,4 NULL 2
Using where
explain select key1 from t0 where (key1 <=> null) or (key2 < 5) or
explain select key1 from t0 where (key1 <=> null) or (key2 < 5) or
(key3=10) or (key4 <=> null);
(key3=10) or (key4 <=> null);
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
...
...
mysql-test/r/join_outer.result
View file @
e282c8cc
...
@@ -91,7 +91,7 @@ grp a c id a c d
...
@@ -91,7 +91,7 @@ grp a c id a c d
NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
explain select t1.*,t2.* from t1,t2 where t1.a=t2.a and isnull(t2.a)=1;
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
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;
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
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7
1 SIMPLE t1 ALL NULL NULL NULL NULL 7
...
...
mysql-test/r/null.result
View file @
e282c8cc
...
@@ -142,3 +142,14 @@ a b c d
...
@@ -142,3 +142,14 @@ a b c d
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
drop table t1;
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;
mysql-test/t/null.test
View file @
e282c8cc
...
@@ -86,3 +86,14 @@ INSERT INTO t1 (d) values (null),(null);
...
@@ -86,3 +86,14 @@ INSERT INTO t1 (d) values (null),(null);
select
*
from
t1
;
select
*
from
t1
;
drop
table
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
;
sql/item_cmpfunc.h
View file @
e282c8cc
...
@@ -746,6 +746,7 @@ public:
...
@@ -746,6 +746,7 @@ public:
if
(
!
args
[
0
]
->
maybe_null
)
if
(
!
args
[
0
]
->
maybe_null
)
{
{
used_tables_cache
=
0
;
/* is always false */
used_tables_cache
=
0
;
/* is always false */
const_item_cache
=
1
;
cached_value
=
(
longlong
)
0
;
cached_value
=
(
longlong
)
0
;
}
}
else
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment