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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d47f99eb
Commit
d47f99eb
authored
Sep 01, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
parents
11746ac9
c9be040c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
mysql-test/r/range.result
mysql-test/r/range.result
+6
-0
mysql-test/t/range.test
mysql-test/t/range.test
+3
-0
sql/sql_select.cc
sql/sql_select.cc
+6
-0
No files found.
mysql-test/r/range.result
View file @
d47f99eb
...
...
@@ -253,4 +253,10 @@ explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
table type possible_keys key key_len ref rows Extra
t1 ref y y 5 const 1 Using where
t2 range x x 5 NULL 2 Using where
explain select count(*) from t1 where x in (1);
table type possible_keys key key_len ref rows Extra
t1 range x x 5 NULL 1 Using where; Using index
explain select count(*) from t1 where x in (1,2);
table type possible_keys key key_len ref rows Extra
t1 range x x 5 NULL 2 Using where; Using index
drop table t1;
mysql-test/t/range.test
View file @
d47f99eb
...
...
@@ -198,5 +198,8 @@ explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1
# equation propagation
explain
select
*
from
t1
,
t1
t2
where
t1
.
y
=
2
and
t2
.
x
between
0
and
t1
.
y
;
explain
select
*
from
t1
,
t1
t2
where
t1
.
y
=
2
and
t2
.
x
>=
0
and
t2
.
x
<=
t1
.
y
;
# testing IN
explain
select
count
(
*
)
from
t1
where
x
in
(
1
);
explain
select
count
(
*
)
from
t1
where
x
in
(
1
,
2
);
drop
table
t1
;
sql/sql_select.cc
View file @
d47f99eb
...
...
@@ -1556,7 +1556,13 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
if
(
cond_func
->
key_item
()
->
type
()
==
Item
::
FIELD_ITEM
)
add_key_field
(
key_fields
,
*
and_level
,
((
Item_field
*
)
(
cond_func
->
key_item
()))
->
field
,
0
,
#ifndef TO_BE_REMOVED_IN_4_1
/* special treatment for IN. Not necessary in 4.1 */
cond_func
->
arguments
()
+
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
cond_func
->
argument_count
()
-
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
#else
cond_func
->
arguments
()
+
1
,
cond_func
->
argument_count
()
-
1
,
#endif
usable_tables
);
break
;
case
Item_func
:
:
OPTIMIZE_OP
:
...
...
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