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
dac1551a
Commit
dac1551a
authored
Dec 20, 2004
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Condition pushdown to storage engine, optimizations
parent
2836376a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
12 deletions
+31
-12
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+2
-2
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+14
-5
sql/item_func.cc
sql/item_func.cc
+15
-5
No files found.
sql/ha_ndbcluster.cc
View file @
dac1551a
...
...
@@ -5426,8 +5426,6 @@ void ndb_serialize_cond(const Item *item, void *arg)
if
(
context
->
table
==
field
->
table
)
{
const
NDBTAB
*
tab
=
(
const
NDBTAB
*
)
context
->
ndb_table
;
const
NDBCOL
*
col
=
tab
->
getColumn
(
field
->
field_name
);
DBUG_ASSERT
(
col
);
DBUG_PRINT
(
"info"
,
(
"FIELD_ITEM"
));
DBUG_PRINT
(
"info"
,
(
"table %s"
,
tab
->
getName
()));
DBUG_PRINT
(
"info"
,
(
"column %s"
,
field
->
field_name
));
...
...
@@ -5442,6 +5440,8 @@ void ndb_serialize_cond(const Item *item, void *arg)
*
context
->
supported_ptr
=
FALSE
;
else
{
const
NDBCOL
*
col
=
tab
->
getColumn
(
field
->
field_name
);
DBUG_ASSERT
(
col
);
curr_cond
->
ndb_item
=
new
Ndb_item
(
field
,
col
->
getColumnNo
());
context
->
dont_expect
(
Item
::
FIELD_ITEM
);
context
->
expect_no_field_result
();
...
...
sql/item_cmpfunc.cc
View file @
dac1551a
...
...
@@ -2044,12 +2044,21 @@ void Item_cond::traverse_cond(Item_cond_traverser traverser,
List_iterator
<
Item
>
li
(
list
);
Item
*
item
;
if
(
order
==
PREFIX
)
(
*
traverser
)(
this
,
arg
);
while
((
item
=
li
++
))
{
item
->
traverse_cond
(
traverser
,
arg
,
order
);
switch
(
order
)
{
case
(
PREFIX
):
(
*
traverser
)(
this
,
arg
);
while
((
item
=
li
++
))
{
item
->
traverse_cond
(
traverser
,
arg
,
order
);
}
break
;
case
(
POSTFIX
):
while
((
item
=
li
++
))
{
item
->
traverse_cond
(
traverser
,
arg
,
order
);
}
(
*
traverser
)(
this
,
arg
);
}
if
(
order
==
POSTFIX
)
(
*
traverser
)(
this
,
arg
);
}
void
Item_cond
::
split_sum_func
(
THD
*
thd
,
Item
**
ref_pointer_array
,
...
...
sql/item_func.cc
View file @
dac1551a
...
...
@@ -349,13 +349,23 @@ void Item_func::traverse_cond(Item_cond_traverser traverser,
if
(
arg_count
)
{
Item
**
arg
,
**
arg_end
;
if
(
order
==
PREFIX
)
(
traverser
)(
this
,
argument
);
for
(
arg
=
args
,
arg_end
=
args
+
arg_count
;
arg
!=
arg_end
;
arg
++
)
{
(
*
arg
)
->
traverse_cond
(
traverser
,
argument
,
order
);
switch
(
order
)
{
case
(
PREFIX
):
(
traverser
)(
this
,
argument
);
for
(
arg
=
args
,
arg_end
=
args
+
arg_count
;
arg
!=
arg_end
;
arg
++
)
{
(
*
arg
)
->
traverse_cond
(
traverser
,
argument
,
order
);
}
break
;
case
(
POSTFIX
):
for
(
arg
=
args
,
arg_end
=
args
+
arg_count
;
arg
!=
arg_end
;
arg
++
)
{
(
*
arg
)
->
traverse_cond
(
traverser
,
argument
,
order
);
}
(
traverser
)(
this
,
argument
);
}
}
if
(
order
==
POSTFIX
)
(
traverser
)(
this
,
argument
);
}
...
...
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