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
f5bb5f7f
Commit
f5bb5f7f
authored
Jul 09, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[No BUG#] Fixes for problems discovered when running mysql-trunk's subquery testsuite
parent
52a84a24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
sql/item.cc
sql/item.cc
+13
-1
sql/opt_subselect.cc
sql/opt_subselect.cc
+6
-0
sql/table.h
sql/table.h
+1
-0
No files found.
sql/item.cc
View file @
f5bb5f7f
...
...
@@ -6768,7 +6768,19 @@ my_decimal *Item_ref::val_decimal(my_decimal *decimal_value)
int
Item_ref
::
save_in_field
(
Field
*
to
,
bool
no_conversions
)
{
int
res
;
DBUG_ASSERT
(
!
result_field
);
if
(
result_field
)
{
if
(
result_field
->
is_null
())
{
null_value
=
1
;
res
=
set_field_to_null_with_conversions
(
to
,
no_conversions
);
return
res
;
}
to
->
set_notnull
();
res
=
field_conv
(
to
,
result_field
);
null_value
=
0
;
return
res
;
}
res
=
(
*
ref
)
->
save_in_field
(
to
,
no_conversions
);
null_value
=
(
*
ref
)
->
null_value
;
return
res
;
...
...
sql/opt_subselect.cc
View file @
f5bb5f7f
...
...
@@ -1215,6 +1215,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
{
tl
->
table
->
tablenr
=
table_no
;
tl
->
table
->
map
=
((
table_map
)
1
)
<<
table_no
;
if
(
tl
->
is_jtbm
())
tl
->
jtbm_table_no
=
tl
->
table
->
map
;
SELECT_LEX
*
old_sl
=
tl
->
select_lex
;
tl
->
select_lex
=
parent_join
->
select_lex
;
for
(
TABLE_LIST
*
emb
=
tl
->
embedding
;
...
...
@@ -3106,11 +3108,15 @@ bool setup_sj_materialization_part2(JOIN_TAB *sjm_tab)
if
(
item_eq
)
{
List_iterator
<
Item
>
it
(
item_eq
->
equal_items
);
/* We're interested in field items only */
if
(
item_eq
->
get_const
())
it
++
;
Item
*
item
;
while
((
item
=
it
++
))
{
if
(
!
(
item
->
used_tables
()
&
~
emb_sj_nest
->
sj_inner_tables
))
{
DBUG_ASSERT
(
item
->
real_item
()
->
type
()
==
Item
::
FIELD_ITEM
);
copy_to
=
((
Item_field
*
)
(
item
->
real_item
()))
->
field
;
break
;
}
...
...
sql/table.h
View file @
f5bb5f7f
...
...
@@ -1766,6 +1766,7 @@ struct TABLE_LIST
*/
char
*
get_table_name
()
{
return
view
!=
NULL
?
view_name
.
str
:
table_name
;
}
bool
is_active_sjm
();
bool
is_jtbm
()
{
return
test
(
jtbm_subselect
!=
NULL
);
}
st_select_lex_unit
*
get_unit
();
st_select_lex
*
get_single_select
();
void
wrap_into_nested_join
(
List
<
TABLE_LIST
>
&
join_list
);
...
...
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