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
a7de21c3
Commit
a7de21c3
authored
Sep 10, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
thd pointer fixed
parent
763c57d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
.bzrignore
.bzrignore
+1
-0
mysql-test/r/merge.result
mysql-test/r/merge.result
+2
-0
sql/item_subselect.cc
sql/item_subselect.cc
+12
-3
sql/item_subselect.h
sql/item_subselect.h
+1
-1
No files found.
.bzrignore
View file @
a7de21c3
...
...
@@ -919,3 +919,4 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
libmysqld/sql_trigger.cc
mysql-test/r/merge.result
View file @
a7de21c3
...
...
@@ -650,4 +650,6 @@ create table t3 engine=merge union=(t1, t2) select * from t1;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
create table t3 engine=merge union=(t1, t2) select * from t2;
ERROR HY000: You can't specify target table 't2' for update in FROM clause
create table t3 engine=merge union=(t1, t2) select (select max(a) from t2);
ERROR HY000: You can't specify target table 't2' for update in FROM clause
drop table t1, t2;
sql/item_subselect.cc
View file @
a7de21c3
...
...
@@ -272,7 +272,8 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex)
DBUG_VOID_RETURN
;
}
Item_maxmin_subselect
::
Item_maxmin_subselect
(
Item_subselect
*
parent
,
Item_maxmin_subselect
::
Item_maxmin_subselect
(
THD
*
thd_param
,
Item_subselect
*
parent
,
st_select_lex
*
select_lex
,
bool
max_arg
)
:
Item_singlerow_subselect
()
...
...
@@ -291,6 +292,12 @@ Item_maxmin_subselect::Item_maxmin_subselect(Item_subselect *parent,
used_tables_cache
=
parent
->
get_used_tables_cache
();
const_item_cache
=
parent
->
get_const_item_cache
();
/*
this subquery alwais creates during preparation, so we can assign
thd here
*/
thd
=
thd_param
;
DBUG_VOID_RETURN
;
}
...
...
@@ -316,6 +323,8 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
SELECT_LEX
*
select_lex
=
join
->
select_lex
;
/* Juggle with current arena only if we're in prepared statement prepare */
DBUG_PRINT
(
"TANSF:"
,
(
"thd %p, select_lex->join->thd: %s"
,
thd
,
select_lex
->
join
->
thd
));
Item_arena
*
arena
=
thd
->
current_arena
;
Item_arena
backup
;
if
(
arena
->
is_conventional
())
...
...
@@ -723,7 +732,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
// remove LIMIT placed by ALL/ANY subquery
select_lex
->
master_unit
()
->
global_parameters
->
select_limit
=
HA_POS_ERROR
;
subs
=
new
Item_maxmin_subselect
(
this
,
select_lex
,
func
->
l_op
());
subs
=
new
Item_maxmin_subselect
(
th
d
,
th
is
,
select_lex
,
func
->
l_op
());
}
// left expression belong to outer select
SELECT_LEX
*
current
=
thd
->
lex
->
current_select
,
*
up
;
...
...
@@ -899,7 +908,7 @@ Item_in_subselect::row_value_transformer(JOIN *join)
}
thd
->
where
=
"row IN/ALL/ANY subquery"
;
Item_arena
*
arena
=
join
->
thd
->
current_arena
,
backup
;
Item_arena
*
arena
=
thd
->
current_arena
,
backup
;
if
(
arena
->
is_conventional
())
arena
=
0
;
else
...
...
sql/item_subselect.h
View file @
a7de21c3
...
...
@@ -154,7 +154,7 @@ class Item_maxmin_subselect :public Item_singlerow_subselect
{
bool
max
;
public:
Item_maxmin_subselect
(
Item_subselect
*
parent
,
Item_maxmin_subselect
(
THD
*
thd
,
Item_subselect
*
parent
,
st_select_lex
*
select_lex
,
bool
max
);
void
print
(
String
*
str
);
};
...
...
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