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
fb461728
Commit
fb461728
authored
Jun 30, 2003
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item_cmpfunc.h, opt_range.cc:
Added inequality predicate to range optimization
parent
9a446b97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+15
-0
No files found.
sql/item_cmpfunc.h
View file @
fb461728
...
...
@@ -238,7 +238,7 @@ public:
longlong
val_int
();
enum
Functype
functype
()
const
{
return
NE_FUNC
;
}
cond_result
eq_cmp_result
()
const
{
return
COND_FALSE
;
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_
NONE
;
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_
KEY
;
}
const
char
*
func_name
()
const
{
return
"<>"
;
}
};
...
...
sql/opt_range.cc
View file @
fb461728
...
...
@@ -880,10 +880,17 @@ static SEL_TREE *
get_mm_parts
(
PARAM
*
param
,
Field
*
field
,
Item_func
::
Functype
type
,
Item
*
value
,
Item_result
cmp_type
)
{
bool
ne_func
=
FALSE
;
DBUG_ENTER
(
"get_mm_parts"
);
if
(
field
->
table
!=
param
->
table
)
DBUG_RETURN
(
0
);
if
(
type
==
Item_func
::
NE_FUNC
)
{
ne_func
=
TRUE
;
type
=
Item_func
::
LT_FUNC
;
}
KEY_PART
*
key_part
=
param
->
key_parts
,
*
end
=
param
->
key_parts_end
;
SEL_TREE
*
tree
=
0
;
if
(
value
&&
...
...
@@ -913,6 +920,14 @@ get_mm_parts(PARAM *param,Field *field, Item_func::Functype type,Item *value,
tree
->
keys
[
key_part
->
key
]
=
sel_add
(
tree
->
keys
[
key_part
->
key
],
sel_arg
);
}
}
if
(
ne_func
)
{
SEL_TREE
*
tree2
=
get_mm_parts
(
param
,
field
,
Item_func
::
GT_FUNC
,
value
,
cmp_type
);
if
(
tree2
)
tree
=
tree
=
tree_or
(
param
,
tree
,
tree2
);
}
DBUG_RETURN
(
tree
);
}
...
...
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