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
4d39221a
Commit
4d39221a
authored
Jun 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.0
parents
306942c9
073de02c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
mysql-test/r/range.result
mysql-test/r/range.result
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-1
No files found.
mysql-test/r/range.result
View file @
4d39221a
...
@@ -255,7 +255,7 @@ t1 ref y y 5 const 1 Using where
...
@@ -255,7 +255,7 @@ t1 ref y y 5 const 1 Using where
t2 range x x 5 NULL 2 Using where
t2 range x x 5 NULL 2 Using where
explain select count(*) from t1 where x in (1);
explain select count(*) from t1 where x in (1);
table type possible_keys key key_len ref rows Extra
table type possible_keys key key_len ref rows Extra
t1 r
ange x x 5 NULL
1 Using where; Using index
t1 r
ef x x 5 const
1 Using where; Using index
explain select count(*) from t1 where x in (1,2);
explain select count(*) from t1 where x in (1,2);
table type possible_keys key key_len ref rows Extra
table type possible_keys key key_len ref rows Extra
t1 range x x 5 NULL 2 Using where; Using index
t1 range x x 5 NULL 2 Using where; Using index
...
...
sql/sql_select.cc
View file @
4d39221a
...
@@ -1590,12 +1590,14 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
...
@@ -1590,12 +1590,14 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level,
// BETWEEN or IN
// BETWEEN or IN
if
(
cond_func
->
key_item
()
->
type
()
==
Item
::
FIELD_ITEM
)
if
(
cond_func
->
key_item
()
->
type
()
==
Item
::
FIELD_ITEM
)
add_key_field
(
key_fields
,
*
and_level
,
add_key_field
(
key_fields
,
*
and_level
,
((
Item_field
*
)
(
cond_func
->
key_item
()))
->
field
,
0
,
((
Item_field
*
)
(
cond_func
->
key_item
()))
->
field
,
#ifndef TO_BE_REMOVED_IN_4_1
#ifndef TO_BE_REMOVED_IN_4_1
/* special treatment for IN. Not necessary in 4.1 */
/* special treatment for IN. Not necessary in 4.1 */
cond_func
->
argument_count
()
==
1
,
cond_func
->
arguments
()
+
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
cond_func
->
arguments
()
+
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
cond_func
->
argument_count
()
-
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
cond_func
->
argument_count
()
-
(
cond_func
->
functype
()
!=
Item_func
::
IN_FUNC
),
#else
#else
cond_func
->
argument_count
()
==
2
,
cond_func
->
arguments
()
+
1
,
cond_func
->
argument_count
()
-
1
,
cond_func
->
arguments
()
+
1
,
cond_func
->
argument_count
()
-
1
,
#endif
#endif
usable_tables
);
usable_tables
);
...
...
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