thd pointer fixed
BitKeeper/etc/ignore: Added libmysqld/sql_trigger.cc to the ignore list mysql-test/r/merge.result: fix of test
This commit is contained in:
parent
f3d4db99c3
commit
76001900fd
@ -919,3 +919,4 @@ vio/test-ssl
|
||||
vio/test-sslclient
|
||||
vio/test-sslserver
|
||||
vio/viotest-ssl
|
||||
libmysqld/sql_trigger.cc
|
||||
|
@ -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;
|
||||
|
@ -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(thd, this, 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
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user