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
c14a724a
Commit
c14a724a
authored
Jan 18, 2024
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29363 Add with_subquery_processor
parent
c2da55ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
sql/item.h
sql/item.h
+18
-0
sql/item_subselect.h
sql/item_subselect.h
+5
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
sql/item.h
View file @
c14a724a
...
...
@@ -2208,6 +2208,11 @@ class Item :public Value_source,
virtual
bool
view_used_tables_processor
(
void
*
arg
)
{
return
0
;
}
virtual
bool
eval_not_null_tables
(
void
*
arg
)
{
return
0
;
}
virtual
bool
is_subquery_processor
(
void
*
arg
)
{
return
0
;
}
virtual
bool
with_subquery_processor
(
void
*
arg
)
{
with_flags
=
with_flags
&
~
item_with_t
::
SUBQUERY
;
return
0
;
}
virtual
bool
count_sargable_conds
(
void
*
arg
)
{
return
0
;
}
virtual
bool
limit_index_condition_pushdown_processor
(
void
*
arg
)
{
return
0
;
}
virtual
bool
exists2in_processor
(
void
*
arg
)
{
return
0
;
}
...
...
@@ -5484,6 +5489,19 @@ class Item_func_or_sum: public Item_result_field,
return
true
;
return
(
this
->*
processor
)(
arg
);
}
bool
with_subquery_processor
(
void
*
opt_arg
)
override
{
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
{
if
(
args
[
i
]
->
with_subquery
())
{
with_flags
|=
item_with_t
::
SUBQUERY
;
return
FALSE
;
}
}
with_flags
&=
~
item_with_t
::
SUBQUERY
;
return
FALSE
;
}
/*
Built-in schema, e.g. mariadb_schema, oracle_schema, maxdb_schema
*/
...
...
sql/item_subselect.h
View file @
c14a724a
...
...
@@ -265,6 +265,11 @@ class Item_subselect :public Item_result_field,
bool
expr_cache_is_needed
(
THD
*
)
override
;
void
get_cache_parameters
(
List
<
Item
>
&
parameters
)
override
;
bool
is_subquery_processor
(
void
*
opt_arg
)
override
{
return
1
;
}
bool
with_subquery_processor
(
void
*
opt_arg
)
override
{
with_flags
|=
item_with_t
::
SUBQUERY
;
return
FALSE
;
}
bool
exists2in_processor
(
void
*
opt_arg
)
override
{
return
0
;
}
bool
limit_index_condition_pushdown_processor
(
void
*
opt_arg
)
override
{
...
...
sql/sql_select.cc
View file @
c14a724a
...
...
@@ -17992,6 +17992,7 @@ static COND *build_equal_items(JOIN *join, COND *cond,
{
cond= cond->build_equal_items(thd, inherited, link_equal_fields,
cond_equal_ref);
cond->walk(&Item::with_subquery_processor, 1, 0);
if (*cond_equal_ref)
{
(*cond_equal_ref)->upper_levels= inherited;
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