mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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:
@ -919,3 +919,4 @@ vio/test-ssl
|
|||||||
vio/test-sslclient
|
vio/test-sslclient
|
||||||
vio/test-sslserver
|
vio/test-sslserver
|
||||||
vio/viotest-ssl
|
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
|
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;
|
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
|
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;
|
drop table t1, t2;
|
||||||
|
@ -272,7 +272,8 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex)
|
|||||||
DBUG_VOID_RETURN;
|
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,
|
st_select_lex *select_lex,
|
||||||
bool max_arg)
|
bool max_arg)
|
||||||
:Item_singlerow_subselect()
|
:Item_singlerow_subselect()
|
||||||
@ -291,6 +292,12 @@ Item_maxmin_subselect::Item_maxmin_subselect(Item_subselect *parent,
|
|||||||
used_tables_cache= parent->get_used_tables_cache();
|
used_tables_cache= parent->get_used_tables_cache();
|
||||||
const_item_cache= parent->get_const_item_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;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,6 +323,8 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
|
|||||||
SELECT_LEX *select_lex= join->select_lex;
|
SELECT_LEX *select_lex= join->select_lex;
|
||||||
|
|
||||||
/* Juggle with current arena only if we're in prepared statement prepare */
|
/* 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 *arena= thd->current_arena;
|
||||||
Item_arena backup;
|
Item_arena backup;
|
||||||
if (arena->is_conventional())
|
if (arena->is_conventional())
|
||||||
@ -723,7 +732,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
|
|||||||
// remove LIMIT placed by ALL/ANY subquery
|
// remove LIMIT placed by ALL/ANY subquery
|
||||||
select_lex->master_unit()->global_parameters->select_limit=
|
select_lex->master_unit()->global_parameters->select_limit=
|
||||||
HA_POS_ERROR;
|
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
|
// left expression belong to outer select
|
||||||
SELECT_LEX *current= thd->lex->current_select, *up;
|
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";
|
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())
|
if (arena->is_conventional())
|
||||||
arena= 0;
|
arena= 0;
|
||||||
else
|
else
|
||||||
|
@ -154,7 +154,7 @@ class Item_maxmin_subselect :public Item_singlerow_subselect
|
|||||||
{
|
{
|
||||||
bool max;
|
bool max;
|
||||||
public:
|
public:
|
||||||
Item_maxmin_subselect(Item_subselect *parent,
|
Item_maxmin_subselect(THD *thd, Item_subselect *parent,
|
||||||
st_select_lex *select_lex, bool max);
|
st_select_lex *select_lex, bool max);
|
||||||
void print(String *str);
|
void print(String *str);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user