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
f8b8ae8a
Commit
f8b8ae8a
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
c8e41b5d
86da2cda
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 @
f8b8ae8a
...
...
@@ -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 @
f8b8ae8a
...
...
@@ -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 @
f8b8ae8a
...
...
@@ -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